What is eth0, eth1, eth2, and lo?

Source: Internet
Author: User
Eth0, eth1, eth2, lo what is eth0, eth1, eth2 & hellip; represents network adapter 1, network adapter 2, Network Adapter 3 & hellip; lo represents 127.0.0.1, for localhost, refer to: Linux command: ifconfigwww.2cto.com function description: Display or set the network device syntax: ifco eth0, eth1, eth2, lo what is eth0, eth1, eth2 ...... Indicates network adapter 1, network adapter 2, Network Adapter 3 ...... Lo represents 127.0.0.1, that is, localhost reference: Linux command: ifconfig www.2cto.com function description: Display or set the network device syntax: ifconfig [network device] [down up-allmulti-arp-promisc] [add <地址> ] [Del <地址> ] [ <硬件地址> ] [Media <网络媒介类型> ] [Mem_start <内存地址> ] [Metric <数目> ] [Mtu <字节> ] [Netmask <子网掩码> ] [Tunnel <地址> ] [-Broadcast <地址> ] [-Pointopoint <地址> ] Note: ifconfig can be used to set the status of network devices or display the current settings. Parameter: name of the [network device] network device. Down to disable the specified network device. Up to start the specified network device. -Arp: Enables or disables the ARP protocol used on the specified interface. Add a negative sign to disable this option. -Allmuti: no difference between disabling or starting a specified interface. Add a negative sign to disable this option. -Promisc: disable or start the promiscuous mode of the specified network device. Add a negative sign to disable this option. Www.2cto.com add <地址> Set the IPv6 IP address of the network device. Del <地址> Delete the IPv6 IP address of a network device. Media <网络媒介类型> Set the media type of the network device. Mem_start <内存地址> Set the starting address of the network device in the main memory. Metric <数目> Specify the number of data packets to be transferred when calculating the number of data packets. Mtu <字节> Set the MTU of the network device. Netmask <子网掩码> Set the subnet mask of the network device. Tunnel <地址> Create a tunnel communication address between IPv4 and IPv6. -Broadcast <地址> Data packets sent to the specified address are processed as broadcast data packets. -Pointopoint <地址> Establish a direct connection with the network device of the specified address. this mode has the confidentiality function. In Linux, the NIC editing command, whether automatically installed in Linux or manually installed in Linux, will ask you about network problems and configure related software. The basic command used to configure the NIC is ifconfig. After executing the ifconfig command, the system will set necessary parameters in the kernel table, so that Linux will know how to communicate with the network card. The ifconfig command has two formats: ※ifconfig [interface] ※ifconfig interface [aftype] option | address... The first format of ifconfig (or the ifconfig command without any parameters) can be used to view the network configuration of the current system. After installing the system, you actually use Linux without a network adapter or network connection. However, ifconfig allows you to work in a loop to make the computer think that it is working on the network. Run the ifconfig command. the ifconfig command without parameters can display the network interface Currently started. the output result is [root @ machine1/sbin] # ifconfig eth0 Link encap: ethernet HWaddr 52: 54: AB: DD: 6F: 61 inet addr: 210.34.6.89 Bcast: 210.34.6.127 Mask: adjust bandwidth limit 128 UP BROADCAST RUNNING MULTICAST MTU: 1500 Metric: 1 RX packets: 46299 errors: 0 dropped: 0 overruns: 0 frame: 189 TX packets: 3057 errors: 0 dropped: 0 overruns: 0 carrier: 0 collisions: 0 txqueuelen: 100 Interrupt: 5 Base address: 0xece0 lo Link encap: Local Loopback inet addr: 127.0.0.1 Mask: 255.0.0.0 up loopback running mtu: 3924 Metric: 1 RX packets: 44 errors: 0 dropped: 0 overruns: 0 frame: 0 TX packets: 44 errors: 0 dropped: 0 overruns: 0 carrier: 0 collisions: 0 txqueuelen: 0
The part headed by eth0 is the Ethernet card configuration parameter of the local machine. the device name/dev/eth0 of the NIC and the MAC address of the hardware are shown as 52: 54: AB: DD: 6F: 61. the MAC address is set by the manufacturer. each Nic has a unique address. However, you can manually change the MAC address of the NIC as long as we are at/etc/rc. d/init. add: ifconfig eth0 hw ether xx: xx Jiania to the network in d/. note: eth0, eth1, and eth2, which indicate network adapter 1, network adapter 2, nic 3 hw stands for hardware meaning ether stands for ethernet and then restarts. then run the ifconfig command to check whether the MAC address of the NIC has changed to xx: xx: xx. Www.2cto.com ifconfig configure the nic ip address ifconfig eth0 192.168.0.1 netmask 255.255.255.0 configure the IP address 192.168.0.1 and 24-bit mask on eth0. What if I want to configure another IP address 192.168.1.1/24 on eth0? Run the following command ifconfig eth0: 0 192.168.1.1 netmask 255.255.255.0 and then run the ifconifg command to view the information of the two Nics: eth0 and eth0: 0. if you want to add more IP addresses, the name of the NIC will be: eth0: 1, eth0: 2 ...... Enter a few if you want. OK! Configure the hardware address ifconfig eth0 hw ether xx: xx to change the hardware address of the NIC, in this case, you can cheat the IP address bonding in the LAN. Disable ifconfig eth0 down. enable ifconfig eth0 up ifconfig for the NIC. you can also set MTU and hybrid mode for the NIC. I will not discuss it one by one. I can study it myself in time.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.