Ethteam pool
Publish: 2021-05-18 17:01:49
1. GMCC, a public chain, can be directly exchanged for Ethereum
2. [ root@centos1 ~]#Ifconfig
- bash: ifconfig: command not found
first, habitually input echo $path (check the current path environment variable, which has the same function as DOS path command, and note that the commands in Linux system are case sensitive), The results are as follows:
[ root@centos1 ~]#Echo $path
/ usr / local / SBIN / usr / local / bin / usr / SBIN / usr / bin / root / bin
from the results shown above, the path / usr / SBIN to place the system management program already exists, which is the path to place the external command. Directly use ls to view the / usr / SBIN / directory, and you don't see ifconfig. What's the matter< br />
[ root@centos1 ~]#Ls / usr / SBIN /
I still don't give up and I can't find ifconfig with find command< br />
[ root@centos1 ~]# find / -name " ifconfig"
at this time, I have the bottom of my mind. I should replace ifconfig with a command. Check on the network, sure enough, IP command has been used instead of ifconfig command. The common parameters of IP command are listed below< The code is as follows:
IP [option] operation object {link | addr | route...} & lt/ p> & lt; p># The network interface information is shown in the IP link show, and the network interface information is shown in the network interface information < br /
35; IP link set eth0 UPI 35; opening the network card
35; IP link set eth0 down # IP link set eth0 down # closing the network card < br / # IP link set eth0 promise on # opening the mixed mode of the network card < br /
35; IP link set eth0 Up0 upupi 35; opening the mixed mode of the network card < mixed mode of the network card is opening the mixed mode of the mixed mode of the network card < br / < br /
# IP link set set set set set set the IP link set set eth0 to be set as the network interface to be described in the network card, which is the network interface interface interface and the next one of the network card, which is defined in the network card, which is defined in the network interface interface H0 MTU 1400 ﹥ set the maximum transmission unit of network card
﹥ IP addr show ﹥ display IP information of network card
﹥ IP addr add 192.168.0.1/24 dev eth0 ﹥ set eth0 IP address 192.168.0.1
﹥ IP addr del 192.168.0.1/24 dev eth0 ﹥ delete eth0 IP address & lt/ p> & lt; p># IP route list # view routing information
# IP route add 192.168.4.0/24 via 192.168.0.254 dev eth0 # set the gateway of 192.168.4.0 network segment to 192.168.0.254, Data goes through eth0 interface
# IP route add default via 192.168.0.254 dev eth0 # setting default gateway to 192.168.0.254
# IP route del 192.168.4.0/24 # deleting gateway of 192.168.4.0 network segment
# IP route del default # deleting default route
after entering IP addr command, it is found that enp2s0 network card (this enp2s0 is my network card) has no IP address< br />
[ root@centos1 ~]#IP addr
since there is no IP address, go directly to the / etc / sysconfig / network scripts directory to see the configuration file name of the IP information of the network card< br />
[ root@centos1 ~]# ls /etc/sysconfig/network-scripts/
ifcfg-enp2s0 ifdown-eth ifdown-post ifdown-Team ifup-aliases ifup-ipv6 ifup-post ifup-Team init.ipv6-global
ifcfg-lo ifdown-ippp ifdown-ppp ifdown-TeamPort ifup-bnep ifup-isdn ifup-ppp ifup-TeamPort network-functions
ifdown ifdown-ipv6 ifdown-routes ifdown-tunn el ifup-eth ifup-plip ifup-routes ifup-tunnel network-functions-ipv6
ifdown-bnep ifdown-isdn ifdown-sit ifup ifup-ippp ifup-plusb ifup-sit ifup-wireless
[ root@centos1 ~]#
from the results, the name of the configuration file used to save the IP information of the network card has changed from ifcfg-eth0 to ifcfg-enp2s0. Well, since you gave him such a name, I'll use it first. Cat ifcfg-enp2s0
first[ root@centos1 ~]#Cat / etc / sysconfig / network scripts / ifcfg-enp2s0
code
the code is as follows:
hwaddr = 00: e0:69:01:6a:96
type = Ethernet
bootproto = DHCP
defraute = yes
peerdns = yes
peeroutes = yes
IPv4_ FAILURE_ FATAL=no
IPV6INIT=yes
IPV6_ AUTOCONF=yes
IPV6_ DEFROUTE=yes
IPV6_ PEERDNS=yes
IPV6_ PEERROUTES=yes
IPV6_ FAILURE_ Fat = no
name = enp2s0
UUID = 5b0a7d76-1602-4e19-aee6-29f57618ca01
onboot = no
from the above configuration, we can see that although bootproto = DHCP, onboot = No. here, use VI to change onboot = no to onboot = yes, and then restart CentOS< br />
[ root@centos1 ~]#Shutdown - R
after the restart, enter the account number and password to enter the command prompt operator and continue to view the network card information with IP addr. The results are as follows:
[ root@centos1 ~]# ip add
1: lo: < LOOPBACK,UP,LOWER_ UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_ lft forever preferred_ lft forever
inet6 ::1/128 scope host
valid_ lft forever preferred_ lft forever
2: enp2s0: < BROADCAST,MULTICAST,UP,LOWER_ UP> mtu 1500 qdisc pfifo_ fast state UP qlen 1000
link/ether 00:e0:69:01:6a:96 brd ff:ff:ff:ff:ff:ff
inet 172.8.1.200/24 brd 172.8.1.255 scope global enp2s0
valid_ lft forever preferred_ lft forever
inet6 fe80::2e0:69ff:fe01:6a96/64 scope link
valid_ lft forever preferred_ lft forever
[ root@centos1 ~]#
from the above results, we can see that the IP address assigned through DHCP is 172.8.1.200. Although it is a testing machine, we should configure a fixed IP for this machine for the convenience of remote connection in the future
open ifcfg-enp2s0 with VI, input the following parameters, and then annotate bootproto = DHCP with #
code
the code is as follows:
ipaddr0 = 172.8.1.211
prefix 0 = 24
gateway 0 = 172.8.1.1
dns1 = 172.8.1.1
the complete parameters are as follows, OK, the network is configured.
- bash: ifconfig: command not found
first, habitually input echo $path (check the current path environment variable, which has the same function as DOS path command, and note that the commands in Linux system are case sensitive), The results are as follows:
[ root@centos1 ~]#Echo $path
/ usr / local / SBIN / usr / local / bin / usr / SBIN / usr / bin / root / bin
from the results shown above, the path / usr / SBIN to place the system management program already exists, which is the path to place the external command. Directly use ls to view the / usr / SBIN / directory, and you don't see ifconfig. What's the matter< br />
[ root@centos1 ~]#Ls / usr / SBIN /
I still don't give up and I can't find ifconfig with find command< br />
[ root@centos1 ~]# find / -name " ifconfig"
at this time, I have the bottom of my mind. I should replace ifconfig with a command. Check on the network, sure enough, IP command has been used instead of ifconfig command. The common parameters of IP command are listed below< The code is as follows:
IP [option] operation object {link | addr | route...} & lt/ p> & lt; p># The network interface information is shown in the IP link show, and the network interface information is shown in the network interface information < br /
35; IP link set eth0 UPI 35; opening the network card
35; IP link set eth0 down # IP link set eth0 down # closing the network card < br / # IP link set eth0 promise on # opening the mixed mode of the network card < br /
35; IP link set eth0 Up0 upupi 35; opening the mixed mode of the network card < mixed mode of the network card is opening the mixed mode of the mixed mode of the network card < br / < br /
# IP link set set set set set set the IP link set set eth0 to be set as the network interface to be described in the network card, which is the network interface interface interface and the next one of the network card, which is defined in the network card, which is defined in the network interface interface H0 MTU 1400 ﹥ set the maximum transmission unit of network card
﹥ IP addr show ﹥ display IP information of network card
﹥ IP addr add 192.168.0.1/24 dev eth0 ﹥ set eth0 IP address 192.168.0.1
﹥ IP addr del 192.168.0.1/24 dev eth0 ﹥ delete eth0 IP address & lt/ p> & lt; p># IP route list # view routing information
# IP route add 192.168.4.0/24 via 192.168.0.254 dev eth0 # set the gateway of 192.168.4.0 network segment to 192.168.0.254, Data goes through eth0 interface
# IP route add default via 192.168.0.254 dev eth0 # setting default gateway to 192.168.0.254
# IP route del 192.168.4.0/24 # deleting gateway of 192.168.4.0 network segment
# IP route del default # deleting default route
after entering IP addr command, it is found that enp2s0 network card (this enp2s0 is my network card) has no IP address< br />
[ root@centos1 ~]#IP addr
since there is no IP address, go directly to the / etc / sysconfig / network scripts directory to see the configuration file name of the IP information of the network card< br />
[ root@centos1 ~]# ls /etc/sysconfig/network-scripts/
ifcfg-enp2s0 ifdown-eth ifdown-post ifdown-Team ifup-aliases ifup-ipv6 ifup-post ifup-Team init.ipv6-global
ifcfg-lo ifdown-ippp ifdown-ppp ifdown-TeamPort ifup-bnep ifup-isdn ifup-ppp ifup-TeamPort network-functions
ifdown ifdown-ipv6 ifdown-routes ifdown-tunn el ifup-eth ifup-plip ifup-routes ifup-tunnel network-functions-ipv6
ifdown-bnep ifdown-isdn ifdown-sit ifup ifup-ippp ifup-plusb ifup-sit ifup-wireless
[ root@centos1 ~]#
from the results, the name of the configuration file used to save the IP information of the network card has changed from ifcfg-eth0 to ifcfg-enp2s0. Well, since you gave him such a name, I'll use it first. Cat ifcfg-enp2s0
first[ root@centos1 ~]#Cat / etc / sysconfig / network scripts / ifcfg-enp2s0
code
the code is as follows:
hwaddr = 00: e0:69:01:6a:96
type = Ethernet
bootproto = DHCP
defraute = yes
peerdns = yes
peeroutes = yes
IPv4_ FAILURE_ FATAL=no
IPV6INIT=yes
IPV6_ AUTOCONF=yes
IPV6_ DEFROUTE=yes
IPV6_ PEERDNS=yes
IPV6_ PEERROUTES=yes
IPV6_ FAILURE_ Fat = no
name = enp2s0
UUID = 5b0a7d76-1602-4e19-aee6-29f57618ca01
onboot = no
from the above configuration, we can see that although bootproto = DHCP, onboot = No. here, use VI to change onboot = no to onboot = yes, and then restart CentOS< br />
[ root@centos1 ~]#Shutdown - R
after the restart, enter the account number and password to enter the command prompt operator and continue to view the network card information with IP addr. The results are as follows:
[ root@centos1 ~]# ip add
1: lo: < LOOPBACK,UP,LOWER_ UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_ lft forever preferred_ lft forever
inet6 ::1/128 scope host
valid_ lft forever preferred_ lft forever
2: enp2s0: < BROADCAST,MULTICAST,UP,LOWER_ UP> mtu 1500 qdisc pfifo_ fast state UP qlen 1000
link/ether 00:e0:69:01:6a:96 brd ff:ff:ff:ff:ff:ff
inet 172.8.1.200/24 brd 172.8.1.255 scope global enp2s0
valid_ lft forever preferred_ lft forever
inet6 fe80::2e0:69ff:fe01:6a96/64 scope link
valid_ lft forever preferred_ lft forever
[ root@centos1 ~]#
from the above results, we can see that the IP address assigned through DHCP is 172.8.1.200. Although it is a testing machine, we should configure a fixed IP for this machine for the convenience of remote connection in the future
open ifcfg-enp2s0 with VI, input the following parameters, and then annotate bootproto = DHCP with #
code
the code is as follows:
ipaddr0 = 172.8.1.211
prefix 0 = 24
gateway 0 = 172.8.1.1
dns1 = 172.8.1.1
the complete parameters are as follows, OK, the network is configured.
Hot content