LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-31-2006, 05:13 PM   #1
rcs1000
Member
 
Registered: Feb 2004
Posts: 30

Rep: Reputation: 15
Fedora loves DHCP too much


Hello,

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?

Many thanks in advance,

Robert
 
Old 03-31-2006, 05:19 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
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...
 
Old 03-31-2006, 11:20 PM   #3
rcs1000
Member
 
Registered: Feb 2004
Posts: 30

Original Poster
Rep: Reputation: 15
Alas, my router doesn't have this option. I could always change it, but that would be an expensive way to solve the problem!
 
Old 04-01-2006, 01:16 AM   #4
alienmagic
Member
 
Registered: Feb 2006
Distribution: Slackware 10.2, (2.6.16.16), FC 5
Posts: 109

Rep: Reputation: 15
Quote:
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:

IPADDR=192.168.100.10
NETMASK=255.255.255.0
NETWORK=192.168.100.0
BROADCAST=192.168.100.255

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.
 
Old 04-01-2006, 03:03 AM   #5
rcs1000
Member
 
Registered: Feb 2004
Posts: 30

Original Poster
Rep: Reputation: 15
Thanks Alienmagic. Unfortunately, I'm already there. This is what how my ifcfg-eth0 reads:

DEVICE=eth0
# BOOTPROTO=dhcp
# HWADDR=00:14:85:07:FE:39
ONBOOT=yes
TYPE=Ethernet
NETMASK=255.255.255.0
IPADDR=192.168.0.33
USERCTL=no
PEERDNS=yes
GATEWAY=192.168.0.1
IPV6INIT=no
BOOTPROTO=none

Thanks, Robert
 
Old 04-01-2006, 11:43 AM   #6
cramer
Member
 
Registered: Feb 2006
Distribution: Red Hat 9
Posts: 112

Rep: Reputation: 15
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.

How is that MAC Address thing done?
 
Old 04-02-2006, 11:54 AM   #7
rcs1000
Member
 
Registered: Feb 2004
Posts: 30

Original Poster
Rep: Reputation: 15
A solution!

This has been going well for almost a day now. I used "yum remove dhclient" and it seems to be OK.

Fingers crossed...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Everybody Loves Raymond BarfBag General 7 12-31-2005 09:48 PM
HELP: Gnome loves me and not KDE kevingpo Fedora 9 02-04-2005 03:44 PM
Mepis Loves Me And I Love It mepisfreak LinuxQuestions.org Member Success Stories 0 01-17-2005 03:16 PM
Who here loves Orielly??? Squall General 12 04-07-2004 02:57 AM
Wife Loves Linux! naeric LinuxQuestions.org Member Success Stories 22 10-30-2003 06:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration