PDA

View Full Version : Wifi router question


SpringHeeledJack
4th Feb 2014, 09:01
I have noticed that with my wifi router the address given to my laptop varies between 192.168.0..1,2,3,4,5 etc. Am I correct in thinking that this depends on how many devices are connected to the local network ? So what controls this address, because surely my device is the 'dominant' one, that is connected to the network for the longest time each day, yet often a box will appear telling me that my address e.g 192.168.0.2 is being given to another device and I now have 192.168.0.3 etc....What causes that ? Also at home there are only ever a maximum of 4 devices connected, yet today my address is 192.168.0.5 :confused: Could this indicate that someone else is using the network, even though it's WPA/WPA2-PSK encrypted ? Any advice appreciated.



SHJ

mixture
4th Feb 2014, 09:08
Could this indicate that someone else is using the network, even though it's WPA/WPA2-PSK encrypted ?

Well, if you've chosen a stupidly easy WPA2 password then that could be.

However the more likely answer is DHCP.

The router runs a little server process which dishes out IP addresses automatically to devices that request it.

Most DHCP servers will lease the IP to a MAC address for a given lifetime, however it sounds like the DHCP lease time is set very short on your router and hence is why new IPs are being dished out.

SpringHeeledJack
4th Feb 2014, 09:27
Thankyou mr mixture, can one change the DHCP lease time within the router settings or is it something generally set by the manufacturer ? This one being the French Sagem company btw.


SHJ

mixture
4th Feb 2014, 10:00
You should certainly be able to change the lease time.... but you don't often see more advanced settings exposed in home ADSL routers.

Sometimes there's a hidden advanced screen you can access by appending something to the router address in your browser's web bar.

I'll have a dig around re:Sagem, haven't seen many of those.

(By the way, just incase you weren't aware and were wondering, my reference to MAC address earlier was as in Media Access Control address... i.e. the unique identifier of your network card... rather than Mac as in the abbreviation of Macintosh).

Edit to add: Found a somewhat old (2004) Sagem manual which suggest its might be in Settings -> Network. Not sure if the menu structure has changed.

Mike-Bracknell
4th Feb 2014, 11:07
Given that this was my pet subject for several years as elucidated in previous threads, I can state the following:

- MS O/Ss do not (or at least in the early 2000s *did* not) follow the RFC as regards lease times for DHCP.
- Many consumer router DHCP daemons do not lease the same address to the same client

If you want the same address giving to the same client, your best bet is by static allocation over DHCP - this is where you get the MAC address of your device's network card (the address is 6 pairs of hex characters separated by colons and looks akin to this: 09:87:56:b3:2a:cf), and you insert it into the router in a static DHCP allocation table against the IP address you wish to receive. That way, when your device requests an IP address it is always given the one associated to that device.

HTH :ok:

le Pingouin
4th Feb 2014, 11:31
If you log in to the router there is probably a page somewhere listing connected devices.

Saab Dastard
4th Feb 2014, 18:13
As a matter of interest, what's your router address? It's normally either the first available or the last available address in the subnet - e.g. 192.168.0.1 or 192.168.0.254, in your network.

If the router address is itself 192.168.0.1 and you have no more than 4 other devices, then you would not expect to see an address higher than 5.

SD

SpringHeeledJack
4th Feb 2014, 18:21
Thanks for all the replies. I did a reboot of the wifi router and my address changed from 192.168.0.5 down to 0.2. I checked the users and there appeared to be just one, me :hmm: The router address is 0.1, but I'm sure that my laptop's address has been this many times in the past or is my drug-addled rock star past catching up with me finally ?

I've not found anything that allows me to change the DHCP lease length, but none of you experts have explained to me why my laptop happily using said router is turfed off it's address unceremoniously when any other allowed device connects to the local network ? It doesn't make sense to me as the router could just as easily allocate another address to the newly joined device, or is that too simple ?


SHJ

Saab Dastard
4th Feb 2014, 18:33
The router address is 0.1, but I'm sure that my laptop's address has been this many times in the past
That, sir, would be an IP address conflict, and things become very unhappy if it occurs! So I think it's your drug-addled rock star past catching up with you! ;)

why my laptop happily using said router is turfed off it's address unceremoniously when any other allowed device connects to the local network

I'm not sure exactly what you mean - do you mean you lose network connectivity when another device connects, or just that you don't get the same IP address every time you power up your laptop?

SD

SpringHeeledJack
4th Feb 2014, 20:31
I'm not sure exactly what you mean - do you mean you lose network connectivity when another device connects, or just that you don't get the same IP address every time you power up your laptop?


So.....I'm on pprune (of course!) happily connected and surfing the future and as soon as someone else comes home, their device(s) seem to command priority from the router and a little box pops up on the screen telling me, as it's already a 'fait accompli' , that my address has been changed to (e.g from ...0.2 to ...0.3 etc) and that's that. If I recall correctly I cannot continue using the router until I click the azure blue 'agree' button. Why should my device be of less priority and the others more ? I know my place, but really!


SHJ

Mike-Bracknell
4th Feb 2014, 21:32
As a matter of interest, what's your router address? It's normally either the first available or the last available address in the subnet - e.g. 192.168.0.1 or 192.168.0.254, in your network.

If the router address is itself 192.168.0.1 and you have no more than 4 other devices, then you would not expect to see an address higher than 5.

SD

Not quite. As I pointed out earlier it depends upon the router's implementation of DHCP daemon (quite often some open source GPL code) and the configured size of the DHCP scope as to what address the router wants to give you (on at least 2 manuf. routers I know, you'll start the scope in reverse order or totally randomly), and that's before the registry entry of the last leased IP tries to muscle in on things, ably abetted by the RFC-busting 110% lease time issue on some MS O/Ss as alluded to earlier.

Mike-Bracknell
4th Feb 2014, 21:35
So.....I'm on pprune (of course!) happily connected and surfing the future and as soon as someone else comes home, their device(s) seem to command priority from the router and a little box pops up on the screen telling me, as it's already a 'fait accompli' , that my address has been changed to (e.g from ...0.2 to ...0.3 etc) and that's that. If I recall correctly I cannot continue using the router until I click the azure blue 'agree' button. Why should my device be of less priority and the others more ? I know my place, but really!


SHJ
Can you further describe the azure dialog box? as this isn't consistent with the expected operation of DHCP and is either an address conflict as suggested by SD or the function of some third party s/w.

llondel
5th Feb 2014, 02:43
My guess is that the client device connects, gets given 0.2 but then fails to renew the lease before expiry. Something else comes along and the DHCP implementation in the router gives it the lowest currently-free address. Your client then detects the clash and asks for another IP address. Some DHCP implementations will attempt to reserve an IP address for a particular MAC and will only re-use one if it runs out of spare addresses.

I hardwire my DHCP to dish out known fixed addresses to the known devices on the network and have a small dynamic pool for new devices. A quick check shows that my home network has accumulated 50 different known devices, although some of those are now defunct and some are virtual machines.

SpringHeeledJack
5th Feb 2014, 17:14
Can you further describe the azure dialog box? as this isn't consistent with the expected operation of DHCP and is either an address conflict as suggested by SD or the function of some third party s/w.


Just to be clear (using OS X in case that wasn't) a typically 'Apple' styled info box pops up in the middle of the screen telling me that my address has been changed and that I'm no longer connected, and I either press the white cancel/decline button OR the azure blue accept/change button to continue online. My curiosity is why, why has another device priority over another seemingly and why couldn't the router just leave me alone and give one of the other addresses to the other device(s) allowed on the network ?

When I am referring to my address changing it's NOT the Mac address, but the IPv4 address if that helps :8

SHJ

Mike-Bracknell
5th Feb 2014, 17:47
My guess is that the client device connects, gets given 0.2 but then fails to renew the lease before expiry. Something else comes along and the DHCP implementation in the router gives it the lowest currently-free address. Your client then detects the clash and asks for another IP address. Some DHCP implementations will attempt to reserve an IP address for a particular MAC and will only re-use one if it runs out of spare addresses.


The DHCP implementation in both client and server maintain the same clock. Hence, unless the server (router in this case) saves it's lease information in volatile memory and is rebooting itself before the lease time is up, then this scenario shouldn't happen (although 'shouldn't' versus 'can't' is a subtle difference)

Mike-Bracknell
5th Feb 2014, 17:50
Just to be clear (using OS X in case that wasn't) a typically 'Apple' styled info box pops up in the middle of the screen telling me that my address has been changed and that I'm no longer connected, and I either press the white cancel/decline button OR the azure blue accept/change button to continue online. My curiosity is why, why has another device priority over another seemingly and why couldn't the router just leave me alone and give one of the other addresses to the other device(s) allowed on the network ?

When I am referring to my address changing it's NOT the Mac address, but the IPv4 address if that helps :8

SHJ

To be clear, when I mentioned MAC-address above, I was referring to the Media Access Control address. The address that's unique to and physically burned into each network device.

It does indeed sound like your router might be at fault though if it's a standard Apple dialog box you're clicking on. Why don't you attempt to update the firmware on the router and see if that fixes things? routers are known to undergo many iterations of firmware throughout their lives, and you might get several other benefits as well.

SpringHeeledJack
5th Feb 2014, 19:45
Thanks MB. The router is a SKY Sagem router and apparently it is updated automatically in the dead of night on a regular basis and according to SKY I have the latest firmware that came out 2 weeks ago. As I haven't experienced this being turfed out of my IPv4 address for a few weeks (but many times before) perhaps it will not now happen again ?



SHJ

Mike-Bracknell
5th Feb 2014, 23:39
Thanks MB. The router is a SKY Sagem router and apparently it is updated automatically in the dead of night on a regular basis and according to SKY I have the latest firmware that came out 2 weeks ago. As I haven't experienced this being turfed out of my IPv4 address for a few weeks (but many times before) perhaps it will not now happen again ?



SHJ

Possibly, possibly not.

Take 2 aspirin and see me in the morning ;)

llondel
6th Feb 2014, 01:19
Of course, a "polite" DHCP server will attempt to ping the IP address it's about to assign and if it doesn't like what happens next, will choose a different one and try that instead. I don't think that's a requirement though, merely an example of defensive programming.

Ancient Observer
6th Feb 2014, 17:03
I just about managed to follow the conversation above.

It convinces me that the only proper way of solving IT problems is by the injudicious use of a very large hammer. Then, go and listen to the hi-fi instead.

My Rega Planar 3 is 100 years old and still works perfectly, not requiring any XP type updates, and the NADs and the great big NEF Q's do not need an update on the first Tuesday of each month......

Saab Dastard
6th Feb 2014, 19:40
AO,

A man after my own heart! My Meridian CD transport and DAC are still going strong (admittedly only 20 something years old), although I had to replace my Musical Fidelity amp with a Yamaha device recently. Sadly the Nakamichi cassette deck is just gathering dust these days, as I've largely replaced tapes with CDs.

Sorry for the thread drift!

SD

mixture
7th Feb 2014, 11:23
I don't think that's a requirement though, merely an example of defensive programming.

Agree with you about defensive programming, however "design by committee" appear to have eventually agreed on the word "should" instead of "must" !

When allocating a new address, servers SHOULD check that the offered network address is not already in use; e.g., the server may probe the offered address with an ICMP Echo Request.
-and-
The client SHOULD perform a check on the suggested address to ensure that the address is not already in use.

Saab Dastard
7th Feb 2014, 13:10
I have long maintained that "should" is the most over-worked word in IT.

"it should work..."
"it should have worked..."
"We should have done..."
"We shouldn't have done..."
"We should try..."

etc. etc.

SD

SpringHeeledJack
7th Feb 2014, 13:20
192.168.0.2 holding steady since a few days......Who's the daddy ? :}



SHJ

Mike-Bracknell
7th Feb 2014, 14:19
Agree with you about defensive programming, however "design by committee" appear to have eventually agreed on the word "should" instead of "must" !

It was never in the original RFC. Purely an addition by Microsoft in SP1 of Server 2003, and given how many years DHCP predates 2003 gives you an idea of the amount of implementations that were out there without it. Even now it's not anywhere near the majority, especially in open source packages chosen for size to stuff into router firmware.

I once lobbied a pair of blokes from IBM who had proposed an addition to the RFC for DHCP to specify the DNS suffix search list. Nothing ever came of it either.

mixture
7th Feb 2014, 14:29
Aah.... so I can blame your various lobbying attempts for the many failings of DHCP ...I shall duly procure a DHCP voodoo doll in your name..... :E

Thanks for the clarification / extra tidbits ! I guess you really have been around since the days of Babbage and the computing dark ages.

Loose rivets
7th Feb 2014, 17:27
I won't hijack this thread about my Seagate Black Armor woes, but upon changing my Motorola U-verse NVG510, the darn 1TB network drive started playing up. I wondered if it was just not seeing the new router.

The router's IP is 192.168.1.254

I have a 10 digit Device Access Code on the same Motorola label that the WEP is on. I was able to look at the devices - it was a huge list. I cleared that list and let it search for my current kit. Rob's computer. (hard wired) Rivetess' computer and the Black Armor backup drive is all I expected to see at that moment. The entire darn list came back with all the stuff OFF except for the named kit above.

Last night I read somewhere it (the router) remembers all this stuff and puts it back anyway. I can't even delete one at a time. :ugh:

Well, I kind of have hijacked the thread, but a lot of it seems to be germane. Feeling guilty, I'll start a new thread right away.

llondel
8th Feb 2014, 02:06
I once lobbied a pair of blokes from IBM who had proposed an addition to the RFC for DHCP to specify the DNS suffix search list. Nothing ever came of it either.

That would be RFC3397 (http://tools.ietf.org/html/rfc3397) specifying how DHCP option 119 is encoded, I assume?

As for it being proposed by MS, the cynic in me wonders if that was because they had a hole in their implementation whereby it might try to erroneously re-allocate an address. I'll let them off if so, it is good defensive programming and handles the case where someone's configured a static IP in the middle of the dynamic allocation pool. On the other side of the coin, there's an interesting denial-of-service attack there if you've got something sitting on the network that will respond to such pings from the DHCP server, such that it thinks the entire pool is allocated :8

Mike-Bracknell
8th Feb 2014, 16:00
That would be RFC3397 (http://tools.ietf.org/html/rfc3397) specifying how DHCP option 119 is encoded, I assume?
It was earlier than that. My work was in 1998-2000.
As for it being proposed by MS, the cynic in me wonders if that was because they had a hole in their implementation whereby it might try to erroneously re-allocate an address. I'll let them off if so, it is good defensive programming and handles the case where someone's configured a static IP in the middle of the dynamic allocation pool. On the other side of the coin, there's an interesting denial-of-service attack there if you've got something sitting on the network that will respond to such pings from the DHCP server, such that it thinks the entire pool is allocated :8

You'd be right to be cynical. At that time, Microsoft had been kicked hard by a lot of heavyweight for lack of RFC-compliance in a lot of the things they were doing, so it became apparent that someone inside Microsoft had handed down an edict saying they were going to drive compliance through RFCs, which essentially meant them doing what they wanted and proposing it as extensions to existing RFCs.

SpringHeeledJack
14th Feb 2014, 18:08
A quick question for the egg spurts :8 On checking the router settings just now I notice that my MAC address is both IPv4 and IPv6……How is this possible ?



SHJ

Saab Dastard
14th Feb 2014, 18:45
MAC address is layer 2, IP address is layer 3. They are different things.

MAC address is the hardware address of the NIC, IP address is the logical address on the network. IP implementation can be either IPv6 or IPv4 or both.

SD

SpringHeeledJack
14th Feb 2014, 20:18
Thanks SD, however when I look at the attached devices page on the router page, it shows the IPv4 address (192.168.0.2) with my hexadecimal MAC address and again in the IPv6 column same addresses. I know, what little I do know!, that IPv6 is the new kid on the block due to numbering limitations with IPv4. Why would they both be in use at the same time and not just you're either the old v4 or the new v6 ?



SHJ

Saab Dastard
14th Feb 2014, 20:40
Why would they both be in use at the same time

Because they can. The default for many OSs nowadays seems to be for both IPv4 and IPv6 to be enabled at the same time. MS claim that the network stack works best with both enabled.

A network adapter can have multiple network protocols bound to it, and certainly with TCP/IP, a network adapter can have multiple IP addresses assigned to it.

SD