i have dhcp yet i get the same ip , always!!!!how do i change it?

Hi all,

I have a dhcp connection on my solaris box..
But i always get the same ip when i connect to then net....
However when i use windows, every instant i disconnect and reconnect, i get a new ip...
Now a bit of googling about this problem, led me to understand that there might be a lease period in solaris's dhcp connection that is causing this issue!!

I wanted to know how i can counter this?
How to get different ip's every time i reconnect on my solaris box...
I am using solaris (b83) and "inetmenu" to connect to the net!!!!

Why do you want a different IP address every time?

It helps me download better ...
And you can figure out how it will help me if you are used to downloading stuff from rapidshare

So can you please tell me how i can change my IP

Thanks

Just a guess here, but since the dhcpagent keeps the lease information in memory, killing it may solve your problem...

Try:
ifconfig <interface> dhcp release
pkill dhcpagent
ifconfig <interface> dhcp start

I'd also make sure your router/dhcp server isn't looking explicitly for the MAC address of that interface and assigning it an IP based on that MAC address.

Yeah even i had the same hunch regarding the lease period..
But this happens only in solaris.
When i was using xp the dhcp used to turn out different IPs each time i connected to the network

'd also make sure your router/dhcp server isn't looking explicitly for the MAC address of that interface and assigning it an IP based on that MAC address.

How do i check for this?

delete/remove the lease from the lease table of the dhcp server. It will by default try to allow a client to have the same IP (the client is asking for the same one) whenever possible, and its possible so you get the same IP.

How? What DHCp server are you running? What version?

First, you have to have access to the router ... If you don't know the ip of your router, you can try the command "cat /etc/defaultrouter" once you obtain the lease..

After that, it really depends on what kind of router it is...
If it happens to be a Netgear, look for something like "LAN IP Setup" .. For any other brand I'm not exactly sure - keep your eye out for things like "DHCP IP Assignment" / "DHCP Lease Management" etc...

If you see the MAC address for your solaris box there, then it's probably assigning it an IP based on that MAC address...

Running tcpdump on the DHCP traffic might also reveal interesting differences between a Wintendo XP and your *x box when acquiring an IP address. Technically DHCP uses the same port as BOOTP which is an older protocol.

Especially if you don't have access to the DHCP server's internals, this might help you get some idea of what to change in the DHCP request.

Thanks for all your inputs.
It really helped me understand a couple of point on lease periods and why I could get different ips on xp and not on solaris!
I will test out all these and get back to you folks

Thanks a lot