Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
I am moving a Red Hat 7.3 server from IP xxx.95.119.48 to xxx.95.149.35. the /etc/sysconfig/network-scripts/ifcfg-eth0 shows
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
I ran ifconfig eth0 xxx.95.149.35 broadcast xxx.95.149.255 netmask 255.255.255.0
After that I did /etc/init.d/network restart and eth0 FAILS.
I am not sure what is wrong. I can ping myself after the change but cannot ping the GATEWAY or anything else. There are no other systems on this xxx.95.149 subnet but I was able to ping the gateway xxx.95.149.254 from my Windows desktop which is on the xxx.95.100 subnet.
You are mixing boot scripts, dhcp & ifconfig together.... They all have different information...
If eth0 boots as dhcp, there will be a dhcp server somewhere to talk to, (otherwise it will use it's last good ip allocation.) Best to change the dhcp sever settings to issue the new ip number..
then restart the network.
Usually, ifup eth0 will be enough.
ifconfig doesn't save any settings anywhere which is why the net restart wiped the changes you made.
Thank you for your assistance. I actually want to make this static so I have done exactly as you stated. When I restart the network I can only ping myself. We plugged a windows laptop into the same hub and was able to ping the xxx.95.149.35 ( the box I'm configuring) and the DNS which is xxx.95.149.1.
I found that the /etc/sysconfig/network-scripts.ifcfg-eth0 file was originally set to DHCP. I saved it and ran "netconfig" with eth0 down. I set the ip, netmask and broadcast. Then restarted the network with the above results.
There is a file /etc/dhcpc/dhcpcd-eth0.info as I mentioned in my original post. I made changes in there but I was told there is no dhcp on this subnet
Bottom line is I want to set this up for "static". Knowing that there was some dhcp piece before how do I go about it?
u can try editing the /etc/resolv.conf file and
adding the static ip addresses there
eg
nameserver xxx.xxx.xxx.xxx (which will be the gateway server address which I presume is ur winxp box) but i am not to sure about ur network, can u be a bit more specific....are u trying to connect a standalone linux to a standalone windoze? If so then u need to look at your ip addresses and subnet...can u try and give a bit more info :-)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.