public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user]  dhcpd uses fake MAC address
@ 2008-10-24 23:07 Nikos Chantziaras
  2008-10-24 23:56 ` Nick Stinemates
  2008-10-29  2:56 ` [gentoo-user] " Iain Buchanan
  0 siblings, 2 replies; 14+ messages in thread
From: Nikos Chantziaras @ 2008-10-24 23:07 UTC (permalink / raw
  To: gentoo-user

My router has big problems assigning the correct IPs to Gentoo boxes. 
If the NIC in the box has a MAC address of, say, 01:00:12:11:41:49:1e, 
dhcpd reports something else to router: ff:42:54:59:20:00:1c:21:e0:42:c2

Why is this happening and how do I tell dhcpd not to mess with the MAC 
address it reports to DHCP servers?




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user]  dhcpd uses fake MAC address
  2008-10-24 23:07 [gentoo-user] dhcpd uses fake MAC address Nikos Chantziaras
@ 2008-10-24 23:56 ` Nick Stinemates
  2008-10-25  0:31   ` [gentoo-user] " Nikos Chantziaras
  2008-10-29  2:56 ` [gentoo-user] " Iain Buchanan
  1 sibling, 1 reply; 14+ messages in thread
From: Nick Stinemates @ 2008-10-24 23:56 UTC (permalink / raw
  To: gentoo-user

On Sat, Oct 25, 2008 at 02:07:20AM +0300, Nikos Chantziaras wrote:
> My router has big problems assigning the correct IPs to Gentoo boxes. If 
> the NIC in the box has a MAC address of, say, 01:00:12:11:41:49:1e,  
> dhcpd reports something else to router: ff:42:54:59:20:00:1c:21:e0:42:c2
>
> Why is this happening and how do I tell dhcpd not to mess with the MAC  
> address it reports to DHCP servers?

Same experience here. I always thought it was a linux/windows
compatibility problem since that is where I noticed the problem first.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-user]  Re: dhcpd uses fake MAC address
  2008-10-24 23:56 ` Nick Stinemates
@ 2008-10-25  0:31   ` Nikos Chantziaras
  2008-10-25 11:34     ` Volker Armin Hemmann
  0 siblings, 1 reply; 14+ messages in thread
From: Nikos Chantziaras @ 2008-10-25  0:31 UTC (permalink / raw
  To: gentoo-user

Nick Stinemates wrote:
> On Sat, Oct 25, 2008 at 02:07:20AM +0300, Nikos Chantziaras wrote:
>> My router has big problems assigning the correct IPs to Gentoo boxes. If 
>> the NIC in the box has a MAC address of, say, 01:00:12:11:41:49:1e,  
>> dhcpd reports something else to router: ff:42:54:59:20:00:1c:21:e0:42:c2
>>
>> Why is this happening and how do I tell dhcpd not to mess with the MAC  
>> address it reports to DHCP servers?
> 
> Same experience here. I always thought it was a linux/windows
> compatibility problem since that is where I noticed the problem first.

Nope, it only happens with the dhcpd of Gentoo.  Other Linux boxes 
report the correct MAC address.




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user]  Re: dhcpd uses fake MAC address
  2008-10-25  0:31   ` [gentoo-user] " Nikos Chantziaras
@ 2008-10-25 11:34     ` Volker Armin Hemmann
  2008-10-25 18:33       ` Nick Stinemates
  0 siblings, 1 reply; 14+ messages in thread
From: Volker Armin Hemmann @ 2008-10-25 11:34 UTC (permalink / raw
  To: gentoo-user

On Samstag 25 Oktober 2008, Nikos Chantziaras wrote:
> Nick Stinemates wrote:
> > On Sat, Oct 25, 2008 at 02:07:20AM +0300, Nikos Chantziaras wrote:
> >> My router has big problems assigning the correct IPs to Gentoo boxes. If
> >> the NIC in the box has a MAC address of, say, 01:00:12:11:41:49:1e,
> >> dhcpd reports something else to router: ff:42:54:59:20:00:1c:21:e0:42:c2
> >>
> >> Why is this happening and how do I tell dhcpd not to mess with the MAC
> >> address it reports to DHCP servers?
> >
> > Same experience here. I always thought it was a linux/windows
> > compatibility problem since that is where I noticed the problem first.
>
> Nope, it only happens with the dhcpd of Gentoo.  Other Linux boxes
> report the correct MAC address.

my dhcpd reports the right mac adress (when I try it), so it must be your 
fault ;)




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user]  Re: dhcpd uses fake MAC address
  2008-10-25 11:34     ` Volker Armin Hemmann
@ 2008-10-25 18:33       ` Nick Stinemates
  2008-10-25 22:39         ` Volker Armin Hemmann
  0 siblings, 1 reply; 14+ messages in thread
From: Nick Stinemates @ 2008-10-25 18:33 UTC (permalink / raw
  To: gentoo-user

On Sat, Oct 25, 2008 at 01:34:36PM +0200, Volker Armin Hemmann wrote:
> On Samstag 25 Oktober 2008, Nikos Chantziaras wrote:
> > Nick Stinemates wrote:
> > > On Sat, Oct 25, 2008 at 02:07:20AM +0300, Nikos Chantziaras wrote:
> > >> My router has big problems assigning the correct IPs to Gentoo boxes. If
> > >> the NIC in the box has a MAC address of, say, 01:00:12:11:41:49:1e,
> > >> dhcpd reports something else to router: ff:42:54:59:20:00:1c:21:e0:42:c2
> > >>
> > >> Why is this happening and how do I tell dhcpd not to mess with the MAC
> > >> address it reports to DHCP servers?
> > >
> > > Same experience here. I always thought it was a linux/windows
> > > compatibility problem since that is where I noticed the problem first.
> >
> > Nope, it only happens with the dhcpd of Gentoo.  Other Linux boxes
> > report the correct MAC address.
> 
> my dhcpd reports the right mac adress (when I try it), so it must be your 
> fault ;)
> 
>

Could it be a /etc/conf.d/net issue? Mind pasting yours?



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user]  Re: dhcpd uses fake MAC address
  2008-10-25 18:33       ` Nick Stinemates
@ 2008-10-25 22:39         ` Volker Armin Hemmann
  2008-10-25 22:53           ` Nikos Chantziaras
  0 siblings, 1 reply; 14+ messages in thread
From: Volker Armin Hemmann @ 2008-10-25 22:39 UTC (permalink / raw
  To: gentoo-user

On Samstag 25 Oktober 2008, Nick Stinemates wrote:
> On Sat, Oct 25, 2008 at 01:34:36PM +0200, Volker Armin Hemmann wrote:
> > On Samstag 25 Oktober 2008, Nikos Chantziaras wrote:
> > > Nick Stinemates wrote:
> > > > On Sat, Oct 25, 2008 at 02:07:20AM +0300, Nikos Chantziaras wrote:
> > > >> My router has big problems assigning the correct IPs to Gentoo
> > > >> boxes. If the NIC in the box has a MAC address of, say,
> > > >> 01:00:12:11:41:49:1e, dhcpd reports something else to router:
> > > >> ff:42:54:59:20:00:1c:21:e0:42:c2
> > > >>
> > > >> Why is this happening and how do I tell dhcpd not to mess with the
> > > >> MAC address it reports to DHCP servers?
> > > >
> > > > Same experience here. I always thought it was a linux/windows
> > > > compatibility problem since that is where I noticed the problem
> > > > first.
> > >
> > > Nope, it only happens with the dhcpd of Gentoo.  Other Linux boxes
> > > report the correct MAC address.
> >
> > my dhcpd reports the right mac adress (when I try it), so it must be your
> > fault ;)
>
> Could it be a /etc/conf.d/net issue? Mind pasting yours?

yes, because I have a static ip. But it is the usual 

config_eth0="... netmask 255.255.255.0"
routes_eth0="default via ..."         
gateways_eth0="..." 

so nothing special there.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-user]  Re: dhcpd uses fake MAC address
  2008-10-25 22:39         ` Volker Armin Hemmann
@ 2008-10-25 22:53           ` Nikos Chantziaras
  2008-10-26  0:32             ` Volker Armin Hemmann
  0 siblings, 1 reply; 14+ messages in thread
From: Nikos Chantziaras @ 2008-10-25 22:53 UTC (permalink / raw
  To: gentoo-user

Volker Armin Hemmann wrote:
> On Samstag 25 Oktober 2008, Nick Stinemates wrote:
>> On Sat, Oct 25, 2008 at 01:34:36PM +0200, Volker Armin Hemmann wrote:
>>> my dhcpd reports the right mac adress (when I try it), so it must be your
>>> fault ;)
>> Could it be a /etc/conf.d/net issue? Mind pasting yours?
> 
> yes, because I have a static ip. But it is the usual 
> 
> config_eth0="... netmask 255.255.255.0"
> routes_eth0="default via ..."         
> gateways_eth0="..." 
> 
> so nothing special there.


If you have a static IP what do you need a dhcp daemon for? :P




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user]  Re: dhcpd uses fake MAC address
  2008-10-25 22:53           ` Nikos Chantziaras
@ 2008-10-26  0:32             ` Volker Armin Hemmann
  2008-10-26  1:29               ` Nikos Chantziaras
  0 siblings, 1 reply; 14+ messages in thread
From: Volker Armin Hemmann @ 2008-10-26  0:32 UTC (permalink / raw
  To: gentoo-user

On Sonntag 26 Oktober 2008, Nikos Chantziaras wrote:
> Volker Armin Hemmann wrote:
> > On Samstag 25 Oktober 2008, Nick Stinemates wrote:
> >> On Sat, Oct 25, 2008 at 01:34:36PM +0200, Volker Armin Hemmann wrote:
> >>> my dhcpd reports the right mac adress (when I try it), so it must be
> >>> your fault ;)
> >>
> >> Could it be a /etc/conf.d/net issue? Mind pasting yours?
> >
> > yes, because I have a static ip. But it is the usual
> >
> > config_eth0="... netmask 255.255.255.0"
> > routes_eth0="default via ..."
> > gateways_eth0="..."
> >
> > so nothing special there.
>
> If you have a static IP what do you need a dhcp daemon for? :P

I don't need it. But in our network most people use windows - and don't know 
anything about computers. So they get their static ip assigned by dhcp. Once 
in a while the server chokes - and that is one of the many reasons why I 
usually don't use dhcp.  There are a lot better ones, but if you really need 
to know the details, ask off-list ;)




^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-user]  Re: dhcpd uses fake MAC address
  2008-10-26  0:32             ` Volker Armin Hemmann
@ 2008-10-26  1:29               ` Nikos Chantziaras
  2008-10-29 10:49                 ` Mick
  0 siblings, 1 reply; 14+ messages in thread
From: Nikos Chantziaras @ 2008-10-26  1:29 UTC (permalink / raw
  To: gentoo-user

Volker Armin Hemmann wrote:
> On Sonntag 26 Oktober 2008, Nikos Chantziaras wrote:
>> Volker Armin Hemmann wrote:
>>> On Samstag 25 Oktober 2008, Nick Stinemates wrote:
>>>> On Sat, Oct 25, 2008 at 01:34:36PM +0200, Volker Armin Hemmann wrote:
>>>>> my dhcpd reports the right mac adress (when I try it), so it must be
>>>>> your fault ;)
>>>> Could it be a /etc/conf.d/net issue? Mind pasting yours?
>>> yes, because I have a static ip. But it is the usual
>>>
>>> config_eth0="... netmask 255.255.255.0"
>>> routes_eth0="default via ..."
>>> gateways_eth0="..."
>>>
>>> so nothing special there.
>> If you have a static IP what do you need a dhcp daemon for? :P
> 
> I don't need it. But in our network most people use windows - and don't know 
> anything about computers. So they get their static ip assigned by dhcp. Once 
> in a while the server chokes - and that is one of the many reasons why I 
> usually don't use dhcp.  There are a lot better ones, but if you really need 
> to know the details, ask off-list ;)

Anyway, maybe it's not a dhcp problem but originates further down the 
stack.  Not sure what I'm looking for though :P




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user]  dhcpd uses fake MAC address
  2008-10-24 23:07 [gentoo-user] dhcpd uses fake MAC address Nikos Chantziaras
  2008-10-24 23:56 ` Nick Stinemates
@ 2008-10-29  2:56 ` Iain Buchanan
  1 sibling, 0 replies; 14+ messages in thread
From: Iain Buchanan @ 2008-10-29  2:56 UTC (permalink / raw
  To: gentoo-user

Nikos Chantziaras wrote:
> My router has big problems assigning the correct IPs to Gentoo boxes. If
> the NIC in the box has a MAC address of, say, 01:00:12:11:41:49:1e,
> dhcpd reports something else to router: ff:42:54:59:20:00:1c:21:e0:42:c2
>
> Why is this happening and how do I tell dhcpd not to mess with the MAC
> address it reports to DHCP servers?

what happens when you ping from the erroneous box to the dhcp server, 
and sniff the actual traffic on the dhcp server to see what it sees. 
Then ping a different box and see what that sees, etc.


-- 
Iain Buchanan <iaindb at netspace dot net dot au>

Any clod can have the facts, but having opinions is an art.
		-- Charles McCabe



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user]  Re: dhcpd uses fake MAC address
  2008-10-26  1:29               ` Nikos Chantziaras
@ 2008-10-29 10:49                 ` Mick
  2008-10-30  1:08                   ` Joshua Murphy
  0 siblings, 1 reply; 14+ messages in thread
From: Mick @ 2008-10-29 10:49 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2813 bytes --]

On Sunday 26 October 2008, Nikos Chantziaras wrote:
> Volker Armin Hemmann wrote:

> > I don't need it. But in our network most people use windows - and don't
> > know anything about computers. So they get their static ip assigned by
> > dhcp. Once in a while the server chokes - and that is one of the many
> > reasons why I usually don't use dhcp.  There are a lot better ones, but
> > if you really need to know the details, ask off-list ;)
>
> Anyway, maybe it's not a dhcp problem but originates further down the
> stack.  Not sure what I'm looking for though :P

I've posted a couple of weeks ago about the same thing 
titled "net-misc/dhcpcd-4.0.1-r1 change of USE flags".  I have since found 
that the problem you observed essentially boils down to the router's dhcp 
server implementation and the way it treats the client_identifier string.

The dhcpcd package complies with RFC2131 and generates and broadcasts a 
unique device identification number for your NIC (DUID).  DUID is the long 
number you have posted, the tail end of which contains the MAC.  The server 
is meant to use this number (according to RFC4361, clause 6.3):
=============================================
   DHCPv4 servers that conform to this specification MUST use the
   'client identifier' option to identify the client if the client sends
   it.
=============================================

All this is fine and dandy, if only the dhcp server in question could directly 
correlate the dhcpcd generated DUID to your MAC.  Unfortunately, many routers 
won't.  They will treat the static MAC settings as a different device than 
that of the DUID and issue your PC with a different than the preselected 
static IP address.  You can run dhcpcd eth0 -T -d to verify what's happening 
in your case, although a newly issued IP address which is different than the 
preset static IP address is a giveaway.

More sophisticated routers allow you to set up on their CLI static LAN IP 
addresses using the DUID string, instead of the client's MAC hardware 
address.

Previous versions of dhcpcd had the vram USE flag which copied the hardware 
address into the DUID string and the dhcp servers would happily recognise the 
original network device, while using the DUID string.  Now the vram flag is 
gone.  Therefore, if you cannot set up static IP addresses with your router's 
CLI using the client_indentifier string (like e.g. on Cisco and 
Adtran/Netvanta routers), the only other solution would be to set it on the 
client side.  That's an inconvenient solution if you have a laptop which 
connects to all sort of networks with different LAN IP addresses/ranges.  In 
that case you may have to run ifconfig and route manually each time you 
connect to a network.
-- 
Regards,
Mick

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] Re: dhcpd uses fake MAC address
  2008-10-29 10:49                 ` Mick
@ 2008-10-30  1:08                   ` Joshua Murphy
  2008-11-02 10:33                     ` Nikos Chantziaras
  0 siblings, 1 reply; 14+ messages in thread
From: Joshua Murphy @ 2008-10-30  1:08 UTC (permalink / raw
  To: gentoo-user

On Wed, Oct 29, 2008 at 6:49 AM, Mick <michaelkintzios@gmail.com> wrote:
<snip>
> More sophisticated routers allow you to set up on their CLI static LAN IP
> addresses using the DUID string, instead of the client's MAC hardware
> address.
>
> Previous versions of dhcpcd had the vram USE flag which copied the hardware
> address into the DUID string and the dhcp servers would happily recognise the
> original network device, while using the DUID string.  Now the vram flag is
> gone.  Therefore, if you cannot set up static IP addresses with your router's
> CLI using the client_indentifier string (like e.g. on Cisco and
> Adtran/Netvanta routers), the only other solution would be to set it on the
> client side.  That's an inconvenient solution if you have a laptop which
> connects to all sort of networks with different LAN IP addresses/ranges.  In
> that case you may have to run ifconfig and route manually each time you
> connect to a network.
> --
> Regards,
> Mick
>

Or, actually, you could just give in and use a different dhcp
client... one more forgiving of less RFC compliant servers.  Just
winging an admittedly untested idea... try "busybox udhcpc" and see if
it gives you the right IP... and if so, try emerging net-misc/udhcp
(different from BB's built in, but it's worked in all the same places
as BB's has for me, which includes some very cheap routers) and
setting your conf.d/net to use it over other clients. ( modules=(
"udhcpc" ) )

-- 
Poison [BLX]
Joshua M. Murphy



^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-user]  Re: dhcpd uses fake MAC address
  2008-10-30  1:08                   ` Joshua Murphy
@ 2008-11-02 10:33                     ` Nikos Chantziaras
  2008-11-03  0:17                       ` Adam Carter
  0 siblings, 1 reply; 14+ messages in thread
From: Nikos Chantziaras @ 2008-11-02 10:33 UTC (permalink / raw
  To: gentoo-user

Joshua Murphy wrote:
> On Wed, Oct 29, 2008 at 6:49 AM, Mick <michaelkintzios@gmail.com> wrote:
> <snip>
>> More sophisticated routers allow you to set up on their CLI static LAN IP
>> addresses using the DUID string, instead of the client's MAC hardware
>> address.
>>
>> Previous versions of dhcpcd had the vram USE flag which copied the hardware
>> address into the DUID string and the dhcp servers would happily recognise the
>> original network device, while using the DUID string.  Now the vram flag is
>> gone.  Therefore, if you cannot set up static IP addresses with your router's
>> CLI using the client_indentifier string (like e.g. on Cisco and
>> Adtran/Netvanta routers), the only other solution would be to set it on the
>> client side.  That's an inconvenient solution if you have a laptop which
>> connects to all sort of networks with different LAN IP addresses/ranges.  In
>> that case you may have to run ifconfig and route manually each time you
>> connect to a network.
> 
> Or, actually, you could just give in and use a different dhcp
> client... one more forgiving of less RFC compliant servers.  Just
> winging an admittedly untested idea... try "busybox udhcpc" and see if
> it gives you the right IP... and if so, try emerging net-misc/udhcp
> (different from BB's built in, but it's worked in all the same places
> as BB's has for me, which includes some very cheap routers) and
> setting your conf.d/net to use it over other clients. ( modules=(
> "udhcpc" ) )

I just did this and everything is OK; the MAC address is correct. 
Booting is also faster by about 8-10 seconds (dhcpcd needed about 10 
seconds to get the IP, udhcpc gets an IP instantly.)

And no, my router isn't broken.  Quite the contrary; all the Ciscos and 
Netgears and whatevers developed problems over time.  My old trusty 
Thomson SpeedTouch just keeps walking for ages, running 24/7 for over 5 
years :)




^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: [gentoo-user]  Re: dhcpd uses fake MAC address
  2008-11-02 10:33                     ` Nikos Chantziaras
@ 2008-11-03  0:17                       ` Adam Carter
  0 siblings, 0 replies; 14+ messages in thread
From: Adam Carter @ 2008-11-03  0:17 UTC (permalink / raw
  To: gentoo-user@lists.gentoo.org

> I just did this and everything is OK; the MAC address is correct.
> Booting is also faster by about 8-10 seconds (dhcpcd needed about 10
> seconds to get the IP, udhcpc gets an IP instantly.)

The difference in time could be due to dhcpcd performing a DHCPREQUEST, getting NACKed and falling back to DHCPDISCOVER.

If its not that, im changing to udhcpc...



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-11-03  0:17 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-24 23:07 [gentoo-user] dhcpd uses fake MAC address Nikos Chantziaras
2008-10-24 23:56 ` Nick Stinemates
2008-10-25  0:31   ` [gentoo-user] " Nikos Chantziaras
2008-10-25 11:34     ` Volker Armin Hemmann
2008-10-25 18:33       ` Nick Stinemates
2008-10-25 22:39         ` Volker Armin Hemmann
2008-10-25 22:53           ` Nikos Chantziaras
2008-10-26  0:32             ` Volker Armin Hemmann
2008-10-26  1:29               ` Nikos Chantziaras
2008-10-29 10:49                 ` Mick
2008-10-30  1:08                   ` Joshua Murphy
2008-11-02 10:33                     ` Nikos Chantziaras
2008-11-03  0:17                       ` Adam Carter
2008-10-29  2:56 ` [gentoo-user] " Iain Buchanan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox