Before going to set static addressing , Please note down the following things in your network
1. IP Address of the machine
2. NETMASK and GATEWAY
3. Routing ( Default via 192.168.1.x dev eth0)
4. nameserver in the /etc/resolv.conf
- search domain.com
- nameserver 192.168.1.x
Change the contents of /etc/sysconfig/network-scripts/ifcfg-eth0
Device=eth0
BOOTPROTO=None #( Don’t forget to change it from dhcp to none)
ONBOOT=yes
#Add IPAddress here :
IPADDR=192.168.1.x
#Add NETMASK
NETMASK=255.255.255.0
#Add GATEWAY
GATEWAY: 192.168.1.x
Make sure that your hostname is correct.
Open your /etc/sysconfig/network and check your hostname
HOSTNAME=Example
Verify that hostname can be resolved with out using DNS
127.0.0.1 localhost.localdomain localhost
192.168.1.2 example example.example.com
Bring up eth0 ...............ping machine...............it works ...!
Restart your machine with : shutdown -r now
ping machine.........it works...!
No comments:
Post a Comment