Linux network card naming rule: Eth0,eth1. First Ethernet card, second block. Lo is a loopback interface with a fixed IP address of 127.0.0.1, and a mask of 8 bits. It stands for your machine itself. ifconfig [Interface]
is to view the network card information, if you do not add parameters to see all the network card information
Add parameter eth0 to view eth0 NIC information
Some explanations for NIC information:First line: Connection type: Ethernet (Ethernet) HWADDR (Hardware MAC address) Line 23rd: IP address, subnet, mask of network card Line Fourth: Up (on behalf of the NIC on) RUNNING (the network cable representing the NIC is connected) multicast (multicast enabled)
MTU:1500 (Maximum transmission Unit): 1500 bytes www.2cto.com here is the statistics for receiving, sending packet statistics, and sending bytes of accepted data. Configure the IP address of the network card ifconfig eth0 192.168.168.64 netmask 255.255.255.0 Configure the IP address and subnet mask on the eth0 on the 192.168.168.64. Configure the hardware address of the NICifconfig eth0 hw ether xx:xx:xx:xx:xx:xx Disable NIC Eth0
ifconfig eth0 down Enable NIC Eth0
ifconfig eth0 up In addition, you can also use Ifup to start and disable network cards | Ifdown eth0
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Linux ifconfig command configuration IP address