1 |
On Sunday 26 October 2008, Nikos Chantziaras wrote: |
2 |
> Volker Armin Hemmann wrote: |
3 |
|
4 |
> > I don't need it. But in our network most people use windows - and don't |
5 |
> > know anything about computers. So they get their static ip assigned by |
6 |
> > dhcp. Once in a while the server chokes - and that is one of the many |
7 |
> > reasons why I usually don't use dhcp. There are a lot better ones, but |
8 |
> > if you really need to know the details, ask off-list ;) |
9 |
> |
10 |
> Anyway, maybe it's not a dhcp problem but originates further down the |
11 |
> stack. Not sure what I'm looking for though :P |
12 |
|
13 |
I've posted a couple of weeks ago about the same thing |
14 |
titled "net-misc/dhcpcd-4.0.1-r1 change of USE flags". I have since found |
15 |
that the problem you observed essentially boils down to the router's dhcp |
16 |
server implementation and the way it treats the client_identifier string. |
17 |
|
18 |
The dhcpcd package complies with RFC2131 and generates and broadcasts a |
19 |
unique device identification number for your NIC (DUID). DUID is the long |
20 |
number you have posted, the tail end of which contains the MAC. The server |
21 |
is meant to use this number (according to RFC4361, clause 6.3): |
22 |
============================================= |
23 |
DHCPv4 servers that conform to this specification MUST use the |
24 |
'client identifier' option to identify the client if the client sends |
25 |
it. |
26 |
============================================= |
27 |
|
28 |
All this is fine and dandy, if only the dhcp server in question could directly |
29 |
correlate the dhcpcd generated DUID to your MAC. Unfortunately, many routers |
30 |
won't. They will treat the static MAC settings as a different device than |
31 |
that of the DUID and issue your PC with a different than the preselected |
32 |
static IP address. You can run dhcpcd eth0 -T -d to verify what's happening |
33 |
in your case, although a newly issued IP address which is different than the |
34 |
preset static IP address is a giveaway. |
35 |
|
36 |
More sophisticated routers allow you to set up on their CLI static LAN IP |
37 |
addresses using the DUID string, instead of the client's MAC hardware |
38 |
address. |
39 |
|
40 |
Previous versions of dhcpcd had the vram USE flag which copied the hardware |
41 |
address into the DUID string and the dhcp servers would happily recognise the |
42 |
original network device, while using the DUID string. Now the vram flag is |
43 |
gone. Therefore, if you cannot set up static IP addresses with your router's |
44 |
CLI using the client_indentifier string (like e.g. on Cisco and |
45 |
Adtran/Netvanta routers), the only other solution would be to set it on the |
46 |
client side. That's an inconvenient solution if you have a laptop which |
47 |
connects to all sort of networks with different LAN IP addresses/ranges. In |
48 |
that case you may have to run ifconfig and route manually each time you |
49 |
connect to a network. |
50 |
-- |
51 |
Regards, |
52 |
Mick |