Results 1 to 4 of 4
hi all. i have been having lots of trouble getting a static ip working on my system... from what I undderstand from the research ive done, the secret is in ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-06-2011 #1
- Join Date
- Jul 2005
help with static ip
hi all. i have been having lots of trouble getting a static ip working on my system... from what I undderstand from the research ive done, the secret is in my ifcfg-eth0 file. SO here it is.
# Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller DEVICE=eth0 HWADDR=A4:BA:DB:FB:44:51 TYPE=Ethernet DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth0" UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 ONBOOT=yes PEERDNS=yes PEERROUTES=yes # below this line are static ip settings BOOTPROTO=dhcp #IPADDR=192.168.0.22 #NETMASK=255.255.255.0 #GATEWAY=192.168.0.1
by the way, all the settings on here were default from installation, including bootproto even though i moved it down below that comment line, and I commented the 3 lines i added.
- 01-06-2011 #2
OK you must be doing something right if you can ping
the router and other local computers. Maybe since you
change it from DHCP to static it is no longer getting
a name server automatically.
Your name server is configured in /etc/resolv.conf
Edit the file manually with a name server provided by your
ISP. Check the configuration of your router for this, or try
the router's address, since most routers run a name server.
- 01-09-2011 #3
- Join Date
- Jan 2011
Do you have the setup command on your system?
if so open it and configure your static IP, save and then restart the network
then compare the new ifcfg-eth0 file to the previous one and you should see the problem
- 01-09-2011 #4
Not sure you need everything that is in that confg file. Looks like it was generated with NetworkManager. I would make sure it isn't running when you switch to static addresses. You can check it as follows:
service NetworkManager status
service NetworkManager stop
chkconfig --level 2345 NetworkManager off
Here is a cleaned up version of your file
DEVICE=eth0 BOOTPROTO=static BROADCAST=192.168.0.255 HWADDR=A4:BA:DB:FB:44:51 IPADDR=192.168.0.22 NETMASK=255.255.255.0 NETWORK=192.168.0.0 ONBOOT=yes
The adventure of a life time.
Linux User #296285