- Log into the VM
- Copy the existing eth0 configuration to a backup file:
sudo mv /etc/sysconfig/network/ifcfg-eth0 /root/ifcfg-eth0
- Edit the network config file
sudo vi /etc/sysconfig/network/ifcfg-eth0
- Change the following:
IPADDR=192.168.1.10 < Your static IP address
NETMASK=255.255.255.0
- Save the file
- Using vi create the following file:
/etc/sysconfig/network/routes
- with the following content:
default 192.168.2.1 - -(where 192.x.x.x is your default gateway)
- Edit the following file:
/etc/sysconfig/network/config
- and change:
NETCONFIG_DNS_STATIC_SERVERS=""
- to
NETCONFIG_DNS_STATIC_SERVERS="X.X.X.X"(where X.X.X.X is your DNS server)
- Restart networking
sudo /etc/init.d/network restart
No comments:
Post a Comment