Linuxifconfig command to configure IP Address
Nic naming rules in Linux: eth0 and eth1. The first Ethernet Card and the second card. Lo is the loopback interface, its IP address is fixed to 127.0.0.1, And the mask is 8 bits. It represents your machine. Ifconfig [Interface]
Is to view the information of the network card, if no parameter is added to view all network card information
The eth0 parameter is used to view the eth0 Nic information.
Nic information explanation: Line 1: Connection Type: Ethernet (Ethernet) HWaddr (hardware mac address) Line 2: Nic IP address, subnet, mask line 4: UP (indicating that the network card is enabled) RUNNING (indicating that the network card is connected) MULTICAST (supporting MULTICAST)
MTU: 1500 (maximum transmission unit): 1500 bytes under www.bkjia.com are statistics on the number of received and sent data packets and the number of bytes sent and received data. Configure the nic ip address ifconfig eth0 192.168.168.64 netmask 255.255.255.0 configure the IP address and subnet mask of 192.168.168.64 on eth0. Configure the NIC hardware address ifconfig eth0 hw ether xx: xx disable Nic eth0
Ifconfig eth0 down enable Nic eth0
Ifconfig eth0 up you can also use ifup to enable or disable NICs. | ifdown eth0