RE: Requesting new IP address RH 9

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

 



> John Nichel <mailto:jnichel@xxxxxxxxxx>
>     on Friday, January 09, 2004 3:42 PM said:
>
> >    I'm trying to get one of my RH boxes to request a new IP address
> > from the upstream DHCP server, but I've run into a snag.
>
> > I've googled, but
> > can't find anything that I haven't already tried to give me a NEW ip
> > address (I don't want to get the same one).
>
> Now I'm no expert but I know that the MAC address of your nic is stored
> in the DHCP server and given a lease time. I would guess that unless
> your IP is taken by another NIC (when you ifdown [or whatever]) you'll
> always get the same one.
>
> In other words it's like the DHCP server saying "oh yeah I remember you!
> here, i'll give you your old ip address back since you're familiar with
> it."
>
> Having said all that it may be possible to tell the DHCP server "hey can
> I get a new ip address please?" In that case I have no idea. :)

Outside of having calling your ISP and having them force it... I don't see
how you would do it.  Normally your machine on interface up will ask for a
newlease . The server gives the one it has in its memory.  Your client
normally accepts it.

Read rfc2131 for the DHCP spec and it should give you lots of good info on
how DHCP works.  If you'r REALLY ambitious, you could possibly learn to talk
the protocol.  Similar to how people telnet to ports and "talk" protocols
(most commmonly SMTP port 25, HTTP port 80, and POP3 port 110), if you're
ambitious you could try telnetting to the DHCP server port (67?) and talk
DHCP to it and force it to give you a new one.  I think it's something like
the server offers you the address, your client  take it (under normal
circumstances).  But if you're doing the talking manually you could refuse
it and ask for a different one, thereby forcing the server to send you
another one.  Hmm.. it'd definitely be an interesting exercise.

Anyway, here's a link to a straight text version of the RFC
http://www.ietf.org/rfc/rfc2131.txt

Another idea, something easier to try out (it may cause some havoc):

you could see if putting a duplicate IP out there would work.  Get a second
machine next to your first one and put a fixed IP on it with same IP as your
DHCP client. Stop/start your DHCP client network interface (or reboot),
making it ask for a new lease.  Perhaps the DHCP server will see the IP
addres on the network (in this case you're second machine) and decide to
send a different one.  Or perhaps your client will see the duplicate IP and
refuse and ask for a new one.

Just throwing out more ideas.  If you try any of them let me know :)  I'm
curious .

Good luck, have a good weekend

Ben Y




-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux