Re: Two elementary questions on LANs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/17/2011 04:03 AM, Timothy Murphy wrote:
> Tim wrote:
>
>> On Thu, 2011-06-16 at 16:27 +0200, Timothy Murphy wrote:
>>> It's as though there is a lease somewhere
>>> and I have to wait for it to expire.
>> That's when you use commands like "dhclient -r" to try and get your
>> client to release its current lease.
>>
>> In the absence of being told to use some specific IP, a client will
>> generally ask to use the same IP as it used last time.
> I'm sure that is true.
> But where does the machine keep the old IP?
> I couldn't find it anywhere.


That information is kept in the lease information and is why I've been
trying to elicit explicit information with explicit question.

The "old" IP information is actually kept by the CLIENT and the SERVER......

Let us take my system as an example....

My LAN interface is p2p1....

It has an ifcfg-p2p1 containing.... among other things, the following....

DEVICE="p2p1"
ONBOOT=yes
NM_CONTROLLED="yes"
TYPE=Ethernet
BOOTPROTO=dhcp
UUID=b92aa237-1b70-4a2b-9bbb-da15a3f0e599

Then in /var/lib/dhclient/  there is a file called
dhclient-b92aa237-1b70-4a2b-9bbb-da15a3f0e599-p2p1.lease

This file contains the information the dchcp server supplied when the
system "broadcast" a dhcp request.   Among other things it contains....

  renew 4 2011/06/16 21:07:47;
  rebind 5 2011/06/17 08:11:13;
  expire 5 2011/06/17 11:11:13;

It also contains the IP address that was assigned.

When the lease time expires the dhcp client will send a renewal request
to the server and ask for the same IP address to be assigned.  I'd have
to check to see if it is a direct request or not.  But it is 5AM and I
can't see the book I need to reference.

Now, I really want to know what interface you want to concentrate
on.....  Is it your wired LAN, eth1...or your wireless wlan0?  You've
confused me by talking about both. 

>> Removing DHCP
>> data on the client may stop this, causing the client to just as for an
>> IP, not a specific one.  And removing DHCP data on the server may cause
>> it to assign a different IP, so long as the server is randomly doling
>> out IPs.  But if it has a fixed set of rules, than the server will try
>> to give it the same IP.
> Actually, I have solved my problems now.
> The basic problem was that as far as I can see dhcp or dhcpd
> was not running properly, if at all, on my Linksys router
> (running the original Linksys software).
>
> When I started running dhcpd on my server instead
> (and stopped it on the router),
> everything started to work as I expected,
> and my laptop got its correct address at last.
>
>

Another key bit of information would have been in the file in
/var/lib/dhclient.  That would have told you where the client was
getting its lease.  option dhcp-server-identifier tells you that.

>From what you've said, I think I would be a bit concerned.....

Do you have 2 dhcp servers on the same subnet?  That isn't a good idea. 
DHCP is a broadcast protocol.   At the very start a client will send out
a broadcast message saying  "I need an IP address, can anyone give me
one to use?".  If there are 2 DHCP servers on the subnet, they both will
answer.  The client will take the information from the first one that
responds.  If, at another time, the client asks again in a broadcast and
the other server responds you may get some very weird results.




-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux