Ifconfigeth0 new ip then edit/etc/sysconfig/network-scripts/ifcfg-eth0, modify ip 1, modify ip address [aeolus @ db1network-scripts] $ viifcfg-eth0DEVICEeth0ONBOOTyesBOOTPROTOstaticIPADDR219.136
Ifconfig eth0 New ip
Then edit/etc/sysconfig/network-scripts/ifcfg-eth0 and modify the ip
1. modify the IP address
[Aeolus @ db1 network-scripts] $ vi ifcfg-eth0
DEVICE = eth0
ONBOOT = yes
BOOTPROTO = static
IPADDR = 219.136.241.211
NETMASK = 255.255.255.255.128
GATEWAY = 219.136.241.254
2. modify the Gateway
Vi/etc/sysconfig/network
NETWORKING = yes
HOSTNAME = Aaron
GATEWAY = 192.168.1.1
3. modify DNS
[Aeolus @ db1 etc] $ vi resolv. conf
Nameserver 202.96.128.68
Nameserver 219.136.241.206
4. restart the network configuration
/Etc/init. d/network restart
Modify IP address
Effective immediately:
# Ifconfig eth0 192.168.0.20 netmask 255.255.255.0
Start effective:
Modify/etc/sysconfig/network-scripts/ifcfg-eth0
Modify the default gateway
Effective immediately:
# Route add default gw 192.168.0.254
Start effective:
Modify/etc/sysconfig/network-scripts/ifcfg-eth0
Modify dns
Modify/etc/resolv. conf
The modification takes effect immediately and starts as well.
Modify host name
Effective immediately:
# Hostname fc2
Start effective:
Modify/etc/sysconfig/network
Ps:
DEVICE = eth0
BOOTPROTO = static
IPADDR = 192.168.8.85
NETMASK = 255.255.248.0
GATEWAY = 192.168.8.1
HWADDR = 00: 0uu3: 47: 2C: D5: 40
ONBOOT = yes