Linux Network configuration

Source: Internet
Author: User

Reprinted from: http://blog.chinaunix.net/uid-26872853-id-3255250.html

Linux Network configuration First, the configuration of IP:configuration file for first (second) block card:/etc/sysconfig/network-scripts/ifcfg-eth0 (1)# # static IPDevice=eth0bootproto=static//Specifies whether to assign IP statically or dynamically. The values are: static DHCPOnboot=yesHWADDR=00:0C:29:84:D1:B1netmask=255.255.255.0ipaddr=192.168.2.2type=ethernet # # dynamic IPDEVICE=ETH0BOOTPROTO=DHCP//Specifies whether to assign IP statically or dynamically. The values are: static dhcponboot=yeshwaddr=00:0c:29:84:d1:b1type=ethernet Second, the configuration of DNSconfiguration file for DNS:/etc/resolv.confnameserver 211.98.4.1 command to restart the Network service: Service network restart "If the IP of one NIC is dynamically allocated, then the DNS address of the other NIC will be overwritten." "" Temporarily Configure IP address by command: ifconfig eth0 192.168.1.25; now only command with IP "

===========================================================================
The directory where the network configuration files under Linux are located:/etc/sysconfig/networking/profiles/default. This directory has the IP configuration file ifcfg-eth0 (1), which has the DNS configuration file resolv.conf

Linux Network configuration

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.