Sinsing analysis of NIC configuration instructions in Linux

Source: Internet
Author: User

We can use Ifconfig to start, observe and modify the parameters of the network interface, we can see all the network interfaces directly using Ifconfig, we can use Ifconfig interface Up|down to start or shut down the network interface, We can use Ifconfig interface option to make changes, such as we can modify the IP address.

we can use the ifconfig eth0 to see the configuration of the network card, where Lo is the meaning of loopback, and HWADDR is the hardware address of the network card, that is, the so-called Mac, and Rx and TX is the network from the start to now send and transmit packets. We can use Ifconfig eth0 192.168.1.100来 directly to eth0 an IP address, the system automatically calculates the network, broadcast and other IP parameters according to the IP address. If we want to close eth1 This network card, we use ifconfig eth1 down directly.

After we have configured, we usually need to restart the network service to read these parameters, we usually use/etc/init.d/network restart, note that the value here will use IFCFG-ETHX settings.

For real-time modification of some network interface parameters, you can use Ifconfig to complete, if we are modifying the configuration file, that is,/etc/sysconfig/network-scripts inside the IFCFG-ETHX and other parameters of the file to start, We can use ifup eth0 or ifdown eth0 this way to make the configuration take effect.

We can use the DHCP protocol to obtain the IP address in the LAN, we can use the dhclient command, it will send the DHCP request, so it can immediately call our network card with the DHCP protocol to try to obtain an IP address.

Sinsing analysis of NIC configuration instructions in Linux

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.