In Linux, IP address modification and DNS take RedHatEnterpriseLinux5.2 as an example. 1. the most common command for configuring ip addresses for NICS is www.2cto.com # ifconfigeth0192.168.0.1netmask?255.0up. note: eth0 is the first Nic, and ET ,... linux IP address modification and DNS take Red Hat Enterprise Linux 5.2 as an example 1. the most common command for configuring ip addresses for NICS is www.2cto.com # ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up. description: eth0 is the first Nic, the others are eth1, eth * 192.168.0.1 is the IP address configured for the first Nic for the NIC. netmask 255.255.255.255.0 is configured with the subnet mask up. it indicates that ifconfig is activated immediately. for more Parameter descriptions, see related help. 2. manually modify/ etc/sysconfig/network-scripts/ifcfg-eth0 file www.2cto.com vi open the ifcfg-eth0 File original content: DEVICE = eth0 BOOTPROTO = dhcp HWADDR = 00: 03: 47: 2C: D5: 40 ONBOOT = yes TYPE = Ethernet changed: DEVICE = eth0 BOOTPROTO = static IPADDR = 192.168.1.223 NETMASK = 255.255.255.0 GATEWAY = 192.168.1.1 HWADDR = 00: 03: 47: 2C: D5: 40 ONBOOT = yes TYPE = Ethernet execute the command/sbin/ifdown eth0/sbin/ifup eth0/etc/init respectively. d/network restart // Set the gateway to take effect immediately ifup-indicates the dialing connection command, if the command can be successfully executed on the command line or terminal, ifdown indicates that the connection is disconnected, similarly, this command can be successfully executed on the command line or terminal. 3. set DNS/etc/resolv. conf nameserver 202.102.24.35 specifies the dns server address
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