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 have a small problem. Actually, I have more than one problem, but I'm only going to share the Linux networking problem.
I have a Linux box that - courtesy of SAMBA - acts as a fileserver to a network of Windoze boxes. Specifically, it stores all my media: MP3s, etc. For a long while this worked very well. Then one day, those lovely chaps at Microsoft decided to update Windows Media Center software. No longer are Media Center PCs (MPCs) allowed to join domains. Result: my MPC can no longer connect and play my music.
No problem, I think. And use the old "\\192.168.0.33\whatever" trick. (Good old Windows, allowing you to connect and look at the shares on any network machine by just keying in the IP address. Try it with one of your colleagues PCs. It may even let you in at the C:\ level...)
Anyway, this worked well for... ohhhhh... about a day. The my PC decided to re-poll the router (which provides DHCP) for a new IP address. Result: broken share. As there is no keyboard or mouse attached to my MPC, this is a pain. So, I decide the easiest solution is simply to fix the IP address of the fileserver. From Gnome, I go Desktop->System Settings->Network->eth0->edit. I change the settings to "Statically set IP address". Then I restart networking (/etc/init.d/networking restart). Success!
At least, success for a day. Then the fileserver decides it doesn't like the IP address I gave it, and changes (again) to a router assigned one. Hmmmmm. I go back into the network control panel, and check. No change. It still says it is statically set, even though it isn't. I scratch my head.
Next stop: /etc/sysconfig/network-scripts/ifcfg-eth0. Ah ha! It appears to still have DHCP in there. I comment it out and replace it with the same fixed IP settings I put in the network panel.
Success? Nope. It still insists on changing IP address every day... I look at SELinux, and turn off the DHCP settings in there. Nothing, nothing, nothing.
What am I missing? Why does Fedora have a fixation with DHCP? How can I fix my machine's IP address?
Not sure about Fedora in particular, but I use a completely different way of fixing my PC's addresses.
I use "Static DHCP" to fix the address from the DHCP server. What you do is bind a MAC address to a particular IP. Then when that machine queries for an address, it is always assigned the same address. My Linksys router had a web page that I could access and just type the MAC and corresponding IP I wanted the machine to have...
Next stop: /etc/sysconfig/network-scripts/ifcfg-eth0. Ah ha! It appears to still have DHCP in there. I comment it out and replace it with the same fixed IP settings I put in the network panel.
Don't comment the BOOTPROTO line out. If it says BOOTPROTO=dhcp change it to:
BOOTPROTO=static
or
BOOTPROTO=none
And make sure the rest of that file has the static IP address information. If it was previously set to DHCP, you'll have to add the following lines if they aren't there:
You will need at least the first two, but I usually use all four. If the first two items aren't in the ifcfg-eth0 file, you'll most likely lose the settings when you reboot.
I'm having similiar problems. DHCP gave me the same IP for almost half a year then up and changed on my linux box. I have messed with ifcfg-eth0 for a while now. I use the ifconfig command to get the BROADcAST NETMASK and use that in my static one, still no avail.
Is the network= just the IP of your router? What is the broadcast? I have also used ipconfig /all in ms-dos to get some settings as well.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.