Take Red Hat as an example
Related network configuration under Linux
The Setup tool can be used to configure, directly tap the Setup command to pop up a graphical configuration interface, but only if the installation of the Setup tool, this method is more convenient to configure, after the completion of the network service will be restarted after the effective
Can be configured with the Ifconfig command: ifconfig eth0 192.168.202.129 netmask 255.255.255.0
Hit ENTER after this method is temporarily in effect, the next time the IP address back to the previous IP address
Using files to configure: We want to make it clear that everything is under Linux. This configuration is Permanent
# Vi/etc/sysconfig/network-scripts/ifcfg-eth0//Enter the network card information file Device=eth0//NIC name bootproto=st ATIC//Network IP Way, here is the static way, you can change DHCP dynamically assigned ipipaddr=192.168.1.30//Here fill in the IP address you want to modify netmask=255.255.255.0 Subnet mask hwaddr=52:54:ab:2f:cf:f0//mac address gateway=192.168.1.1//Gateway Onboot=on//network boot with service Qi Gong type=ethernet Network Type Ethernet
For DNS service settings: #vi/etc/resolv.conf//Enter DNS profile nameserver 192.168.202.1nameserver 192.168.202.4//You can set multiple domain names /c1>
To view the host information:
Vi/etc/sysconfig/network//You can modify the hostname but this mode takes effect after reboot
Hostname host name is also available
This article is from the "11309357" blog, please be sure to keep this source http://11319357.blog.51cto.com/11309357/1761226
IP configuration for Linux