CentOS 3.5 Enterprise Server -- I need to change my Local Static IP address.
Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
CentOS 3.5 Enterprise Server -- I need to change my Local Static IP address.
I need to change my Local Satic IP address.
My DNS servers:
nameserver 208.67.222.222
nameserver 208.67.220.220
My Dynamic settings:
#INTERNET CONNECTION WORKS
# nVidia Corporation MCP55 Ethernet
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:F1:3E:881:C1
IPV6INIT=yes
IPV6_AUTOCONF=yes
ONBOOT=yes
I have used the ifconfig command to change the IP temporarily and it works great just not Statically.
I have also already googled and tried the fallowing different solutions with no luck: http://www.wallpaperama.com/forums/h...hat-t1692.html
#DOES NOT WORK NO INTERNET CONNECTION
# File: ifcfg-eth0
#
DEVICE=eth0
IPADDR=192.168.0.100
NETMASK=255.255.255.0
BOOTPROTO=static
ONBOOT=yes
http://www.thewebmasterscafe.net/web...tos-linux.html
#DOES NOT WORK NO INTERNET CONNECTION
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:0C:29E:94:8B
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
NETMASK=255.255.255.0
IPADDR=192.168.0.100
GATEWAY=192.168.0.1
Leave BOOTPROTO=dhcp and add your IPADDR=. Most routers will allow this. You may want to rethink using the .100 address. Most routers start at the bottom of their range and assign addresses working their way up. This can lead to conflicts if your machine is not the first machine to get attached. You are usually better off (on your static address) starting from the top of your allowed range(router setting) and working your way down. This way you always get the same static address(no conflicts) and you have a pretty good idea the IP address a guest machine will draw(assuming all "normal" machines are static the guest machine will be .100).
Setting up Local and Public IP's is the same, there are no differences.
Aa for setting up static IP on the network with DHCP, policy is to totally avoid IP range set on the DHCP server. If DHCP range is 192.168.0.2-192.168.0.199 and 192.168.0.1 is the gateway, then IP range for static assignement is 192.168.0.200-192.168.0.254.
The last configuration looks quite good, so I thing you have problems with routing.
First give us the output of commands "ip address" and "ip route" when you are on Dynamic address, and then when you try your static setting. You have to do it logged as root.
Next thing to know is to run command "service network restart" after each change of the ifcfg-eth0 file.
To test your connection, do following things:
1. Ping you gateway to see if you can. If you do not, then gateway has different IP or IP settings for eth0 are not good. If you can, then next thing to test is routing.
2. Ping public IP address for witch you know the IP. Do not ping the name, but it's IP. Pinging DNS address is easiest. If it does not work, then you have routing issues (gateway IP is wrong or router it self thinks your IP is in some other way, on some other interface.
3. Try pinging hostname of some public server, like www.google.com, www.yahoo.com, etc. If step 2 works, but this one does not, then your DNS setting is not right.
Best way to set network connection on CentOS/RHEL/Fedora is using "system-config-network" command/script. If you are in GUI, a familiar dialog will popup, and if you are in terminal/SSH mode, a simple but functional command prompt dialog screen will appear allowing system utility to do it all for you.
When I am connected to dhcp here is the output:
eth0 Link encap:Ethernet HWaddr 00:F1:3E:881:C1
inet addr:192.168.0.3 Bcast:192.168.0.255 Mask:255.255.255.0
When I tried to use "system-config-network" here is the ifcfg-eth0 output:
# nVidia Corporation MCP55 Ethernet
DEVICE=eth0
IPADDR=192.168.0.245
BOOTPROTO=none
HWADDR=00:F1:3E:881:C1
IPV6INIT=yes
IPV6_AUTOCONF=yes
ONBOOT=yes
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
TYPE=Ethernet
Leave BOOTPROTO=dhcp and add your IPADDR=. Most routers will allow this. You may want to rethink using the .100 address. Most routers start at the bottom of their range and assign addresses working their way up. This can lead to conflicts if your machine is not the first machine to get attached. You are usually better off (on your static address) starting from the top of your allowed range(router setting) and working your way down. This way you always get the same static address(no conflicts) and you have a pretty good idea the IP address a guest machine will draw(assuming all "normal" machines are static the guest machine will be .100).
I tried the IPADDR= except when I add it the dynamic address 192.168.0.3 is used.
Yes, I am sure I filled in ifcfg-eth0 right I am able to ping the router but not yahoo.com. I had to revert back to the my default dynamic IP settings to connect to the internet.
If you used "system-config-network" in terminal (not in GNOME), there was checkbox, something about DHCP. For static IP, you need that checkbox clear. If you used GUI, you were to select and add static IP.
I wrote you exact procedure to follow and what you need to post here so we can help you. If you chose to ignore it, that is fine with me, I will not be trying to help you any more. Just for the record, Last 5 years I run small WISP, and administer one little bigger, so I have experience to quickly help you if you are willing to do as I tell you.
If you used "system-config-network" in terminal (not in GNOME), there was checkbox, something about DHCP. For static IP, you need that checkbox clear. If you used GUI, you were to select and add static IP.
I wrote you exact procedure to follow and what you need to post here so we can help you. If you chose to ignore it, that is fine with me, I will not be trying to help you any more. Just for the record, Last 5 years I run small WISP, and administer one little bigger, so I have experience to quickly help you if you are willing to do as I tell you.
I read your instructions and used "system-config-network" I still was unable to connect to the internet. I was able to login to my router but not the internet. I am going to try a clean install and select static instead of dynamic. I printed out your message and read it several times entered the info and I was unable to connect to the internet.
[root@localhost ~]# ping 208.67.222.222
PING 208.67.222.222 (208.67.222.222) 56(84) bytes of data.
64 bytes from 208.67.222.222: icmp_seq=1 ttl=54 time=32.7 ms
64 bytes from 208.67.222.222: icmp_seq=2 ttl=54 time=32.3 ms
64 bytes from 208.67.222.222: icmp_seq=3 ttl=54 time=32.9 ms
64 bytes from 208.67.222.222: icmp_seq=4 ttl=54 time=31.7 ms
64 bytes from 208.67.222.222: icmp_seq=5 ttl=54 time=32.2 ms
[root@localhost ~]# ping yahoo.com
PING yahoo.com (209.191.93.53) 56(84) bytes of data.
64 bytes from b1.www.vip.mud.yahoo.com (209.191.93.53): icmp_seq=1 ttl=52 time=82.6 ms
64 bytes from b1.www.vip.mud.yahoo.com (209.191.93.53): icmp_seq=2 ttl=52 time=82.7 ms
64 bytes from b1.www.vip.mud.yahoo.com (209.191.93.53): icmp_seq=3 ttl=53 time=82.6 ms
64 bytes from b1.www.vip.mud.yahoo.com (209.191.93.53): icmp_seq=4 ttl=52 time=105 ms
64 bytes from b1.www.vip.mud.yahoo.com (209.191.93.53): icmp_seq=5 ttl=52 time=83.8 ms
I noticed the command-line 'system-config-network' that it has an error:
DSN1 <---
DNS2
Tertiary DNS
As you can see about 'DSN' is wrong and should be 'DNS1'.
Anyway thanks for directing me to command-line 'system-config-network' I was finally able to get my network working
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.