News:

Help! We're trapped in the computer, and the computer is trapped in 2008! Someone call the time police!

Main Menu

Are *you* faster than Linksys?

Started by MyndFyre, April 12, 2006, 10:47:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sidoh

dhcpcd: MAC address = 00:e0:98:7c:82:39
dhcpcd: your IP address = 10.0.0.194


      1 # dhcpd.conf
      2 #
      3 # Configuration file for ISC dhcpd (see 'man dhcpd.conf')
      4 #
      5
      6 ddns-update-style ad-hoc;
      7
      8 subnet 10.0.0.0 netmask 255.255.255.0 {
      9     range 10.0.0.30 10.0.0.200;
     10         option subnet-mask 255.255.255.0;
     11         option routers 10.0.0.2;
     12         option domain-name-servers 10.0.0.2;
     13         option domain-name "sidoh.org";
     14         option ip-forwarding on;
     15
     16     }


C:\Documents and Settings\sidoh>ipconfig

Windows IP Configuration


Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . : sidoh.org
        IP Address. . . . . . . . . . . . : 10.0.0.199
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 10.0.0.2

C:\Documents and Settings\sidoh>ipconfig /all

Windows IP Configuration

        Host Name . . . . . . . . . . . . : muaddib
        Primary Dns Suffix  . . . . . . . :
        Node Type . . . . . . . . . . . . : Unknown
        IP Routing Enabled. . . . . . . . : No
        WINS Proxy Enabled. . . . . . . . : No
        DNS Suffix Search List. . . . . . : sidoh.org

Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . : sidoh.org
        Description . . . . . . . . . . . : NVIDIA nForce Networking Controller
        Physical Address. . . . . . . . . : 00-11-2F-62-A4-56
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        IP Address. . . . . . . . . . . . : 10.0.0.199
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 10.0.0.2
        DHCP Server . . . . . . . . . . . : 10.0.0.15
        DNS Servers . . . . . . . . . . . : 10.0.0.2
        Lease Obtained. . . . . . . . . . : Thursday, April 13, 2006 10:21:02 P

        Lease Expires . . . . . . . . . . : Friday, April 14, 2006 10:21:02 AM

C:\Documents and Settings\sidoh>


I suppose you could be right, since there is probably no one simotaneously doing TCP/IP releases/renews on either of the networks I deal with in large.

To elaborate on my point, though, DHCP does assign IP addresses by MAC addresses.  If the local computer (in reference) has a lease, it sends the DHCP server its MAC address, which is validated.  If the server verifies the existance of the lease, it assigns it the previously designated IP address (this is why none of the IP's on my network change, even though I've been using the same DHCP server for over a year).

Eric

#16
Sidoh is correct.  Dynamic address allocation is based almost entirely on MAC addresses; that's why most internet routers have support for MAC address "cloning."  If your lease expires (or is manually released), however, your IP address can be taken by another host, so on devices where DHCP is more appropriate (laptops, for example), but you still wish to use static IP addresses, you'll have to set up dhcpd similar to how Newby has done.

MyndFyre

Quote from: Sidoh on April 13, 2006, 10:56:41 PM
dhcpd (and every single other DHCP server I've worked with, including ones on multiple routers)assigns IP leases according to a MAC address.  If this weren't true, releasing and renewing in IP configuration utilities would result in new IP addresses, which, in my experience, is never the case.

DHCP servers assign leases to a certain MAC address.  They will only dismiss the leases when the expiration date rolls around or if they are manually dismissed by a systems administrator.
As Newby said, I have had the opposite experience.  The only reason the DHCP server reallocates the same IP address to me is that when I released it, it was freed.  My Linksys router regularly cycles through about 2 values more than computers I have.  It's irritating.

Quote from: Lord[nK] on April 14, 2006, 01:15:00 AM
Sidoh is correct.  Dynamic address allocation is based almost entirely on MAC addresses; that's why most internet routers have support for MAC address "cloning."  If your lease expires (or is manually released), however, your IP address can be taken by another host, so on devices where DHCP is more appropriate (laptops, for example), but you still wish to use static IP addresses, you'll have to set up dhcpd similar to how Newby has done.
Well you'll forgive me if I don't take you as a, shall we say, industry expert, but I'm sure I could think of a reason to skip MAC address cloning.  One such reason would be in the event the DHCP server had a list of valid MAC addresses and you wanted to expand the network.  You remove one device, clone its MAC, and put the device that was cloned on the new router's private network.

Why would dynamic IP addresses be based on MAC addresses?  IMO they have absolutely nothing to do with one another.
Quote from: Joe on January 23, 2011, 11:47:54 PM
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Quote from: Rule on May 26, 2009, 02:02:12 PMOur species really annoys me.

Sidoh

Quote from: MyndFyrex86] link=topic=5547.msg65124#msg65124 date=1144998018]
As Newby said, I have had the opposite experience.  The only reason the DHCP server reallocates the same IP address to me is that when I released it, it was freed.  My Linksys router regularly cycles through about 2 values more than computers I have.  It's irritating.

Regardless of this of this fact, the IP address leases are based on MAC addresses (if this weren't true, the DHCP server would not know who's talking to it when a request is made; it'd be forced to assign you a new lease each time you restarted your computer).  I'm sure you can set some DHCP servers so you're reassigned a new IP address every time you query for one, but the MAC address of a network card plays an important role in DHCP transactions.

Quote from: MyndFyrex86] link=topic=5547.msg65124#msg65124 date=1144998018]
Why would dynamic IP addresses be based on MAC addresses?  IMO they have absolutely nothing to do with one another.

Because DHCP server assign IP address leases.

iago

DHCP may associate the same IP with the same MAC, but it doesn't have to.  For example, on Windows' DHCP server, I'm pretty sure the IP is randomized (I've gotten 192.168.0.221, 192.168.0.162, 192.168.0.64, and several others.. it's really weird)

Usually when I request a DHCP address, my system remembers the previous IP and requests it specifically.  Additionally, the router sometimes remembers IP:MAC mappings for a brief time (couple days, I think).  Between the two of those, the IP address often doesn't change.  But the point is that it CAN. 

Sidoh

Quote from: iago on April 14, 2006, 12:40:42 PM
DHCP may associate the same IP with the same MAC, but it doesn't have to.  For example, on Windows' DHCP server, I'm pretty sure the IP is randomized (I've gotten 192.168.0.221, 192.168.0.162, 192.168.0.64, and several others.. it's really weird)

If a lease has been granted, then yes, it does assign the machine the same IP address as long as that lease is not expired (or it has been manually/accidentally removed by an administrator/program bug).

Quote from: iago on April 14, 2006, 12:40:42 PM
Usually when I request a DHCP address, my system remembers the previous IP and requests it specifically.  Additionally, the router sometimes remembers IP:MAC mappings for a brief time (couple days, I think).  Between the two of those, the IP address often doesn't change.  But the point is that it CAN. 

I know they can, but if the DHCP server has assigned a lease and it's not facing a shortage of possible IP addresses in its specified range, it will assign the same machine the same IP address if the lease has not yet expired.

        Lease Obtained. . . . . . . . . . : Friday, April 14, 2006 8:47:14 AM
        Lease Expires . . . . . . . . . . : Saturday, April 22, 2006 8:47:14 AM


If this weren't true, what would be the point of a lease? ;)

iago

Quote from: Sidoh on April 14, 2006, 03:17:11 PM
Quote from: iago on April 14, 2006, 12:40:42 PM
DHCP may associate the same IP with the same MAC, but it doesn't have to.  For example, on Windows' DHCP server, I'm pretty sure the IP is randomized (I've gotten 192.168.0.221, 192.168.0.162, 192.168.0.64, and several others.. it's really weird)

If a lease has been granted, then yes, it does assign the machine the same IP address as long as that lease is not expired (or it has been manually/accidentally removed by an administrator/program bug).

Quote from: iago on April 14, 2006, 12:40:42 PM
Usually when I request a DHCP address, my system remembers the previous IP and requests it specifically.  Additionally, the router sometimes remembers IP:MAC mappings for a brief time (couple days, I think).  Between the two of those, the IP address often doesn't change.  But the point is that it CAN. 

I know they can, but if the DHCP server has assigned a lease and it's not facing a shortage of possible IP addresses in its specified range, it will assign the same machine the same IP address if the lease has not yet expired.

        Lease Obtained. . . . . . . . . . : Friday, April 14, 2006 8:47:14 AM
        Lease Expires . . . . . . . . . . : Saturday, April 22, 2006 8:47:14 AM


If this weren't true, what would be the point of a lease? ;)

That's fine and dandy, for that implementation.  As I said, there's no guarentees, DHCP isn't required to behave that way.  DHCP can change your IP whenever it feels like it (Windows' implementation, for example, does).  Static IP is the only way to be guarenteed the same IP.

Sidoh

Quote from: iago on April 14, 2006, 03:37:50 PM
That's fine and dandy, for that implementation.  As I said, there's no guarentees, DHCP isn't required to behave that way.  DHCP can change your IP whenever it feels like it (Windows' implementation, for example, does).  Static IP is the only way to be guarenteed the same IP.

For the period of time the lease isn't marked as expired, it is required to behave that way.  That was my original point. :)

I misunderstood Newby's original post, but I do say what he is saying.  I'm simply saying DHCP servers almost always assign IP addresses while concurrently reading/recording the MAC addrses of the client.  If it assigns leases (which is the case, by default; I spent 5 minutes configuring the Windows DHCP server and it assigned leases), it does deal with the MAC addresses.  You're correct, though, it doesn't guarantee that address for an undetermined amount of time.  It does, however, guarantee that address for the time that the lease is considered valid.

iago

Well, on Windows XP, I can request an ip, reboot, and request it again in less than 2 minutes, and the ip changes to another random value in the range of (2, 254).  Maybe it has a very short lease time? :P

Chavo

Quote from: iago on April 14, 2006, 04:02:57 PM
Well, on Windows XP, I can request an ip, reboot, and request it again in less than 2 minutes, and the ip changes to another random value in the range of (2, 254).  Maybe it has a very short lease time? :P


Or maybe the Windows device driver is broadcasting a different MAC