[Dnsmasq-discuss] Re: Multiple mac addresses to one ip

Aaron D. Brooks aaron.brooks at sicortex.com
Fri Aug 17 22:18:50 BST 2007


[ resend, after I made the *same* mistake, replying directly to Yaakov. ;-) ]

Yaakov,

    I'm afraid I don't have any experience with NetworkManager (though
I hear that people like it) or dhclient. You can force MAC address on
a one of the interfaces with ifconfig or the ip command (from
iproute2):

    ifconfig hw ether 00:AB:CD:01:02:03

or

    ip link set address 00:AB:CD:01:02:03
    (I think... I don't recall if I've ever actually used this.)

Setting them with the same MAC address (as long as they're never on
the same network segment, which seems unlikely) will give them the
same client ID, effecting the desired outcome.

Hope that helps,

Aaron

On Fri, Aug 17, 2007 at 04:17:41PM -0400, Yaakov Nemoy wrote:
> [resend, after i realized this did not go to the list]
> 
> I'm trying to set this up, and I found some very fine documantation to
> that effect.  I've encountered a new problem though.  NetworkManager
> does not seem to honour /etc/dhcp3/dhclient.conf (on debian).  I know
> this is out of dnsmasqs scope, but are there any quick hacks?
> 
> Alternatively, can i set up a script for dnsmasq that when a request
> from either mac address comes in, the other lease is released, so the
> new one can go through?
> 
> Cheers,
> 
> On 8/17/07, Aaron D. Brooks <aaron.brooks at sicortex.com> wrote:
> > Yaakov,
> >
> > Joshua is right, you can do this by specifying the same client ID for
> > your DHCP client. Usually your client ID defaults to the MAC address
> > but most DHCP clients allow you to override this. ("dhcpcd -I
> > <CLIENTID>...", "udhcpc -c <CLIENTID>", I don't think pump can pass
> > a specified client ID.)
> >
> > Assigning IP address based on requested hostname would work some of
> > the time but, since you'd likely switch between the wired / wireless
> > networks before the lease times out, you'd hit points where you
> > wouldn't be able to acquire the lease. Client ID trumps all lease
> > association mechanisms, including MAC address (though you don't
> > normally notice this since the client ID _is_ the MAC address by
> > default).
> >
> > HTH,
> >
> > Aaron
> >
> > --
> > Aaron Brooks - Senior Software Engineer
> > http://SiCortex.com - Teraflops from Milliwatts
> >
> > On Fri, Aug 17, 2007 at 09:15:40AM -0800, Joshua J. Kugler wrote:
> > > On Friday 17 August 2007 08:06, Yaakov Nemoy wrote:
> > > > Hi list,
> > > >
> > > > I've just recently discovered dnsmasq through openwrt.  I'm trying to
> > > > setup my laptop to get the same IP for dns reasons no matter wether I
> > > > use the ethernet or wireless card.  I have two MAC addresses set to
> > > > the same IP in /etc/ethers in the following order:
> > > >
> > > > 00:18:de:20:9a:c5       192.168.4.128
> > > > <snip>
> > > > 00:E0:B8:AE:40:5F       192.168.4.128
> > > >
> > > > the first line is the wireless and the second line is the ethernet.
> > > > dnsmasq seems to honour the second line in ethers but not the first
> > > > line.  is there a way to configure it to honour both?
> > >
> > > I'm not sure if that's possible, but what you may be able to do is use your
> > > client name to set your IP.  I don't remember how to do it off the top of my
> > > head, but I'm pretty sure it can be done that way.  Look in the docs for more
> > > info.
> > >
> > > j
> > >
> > > --
> > > Joshua Kugler
> > > Lead System Admin -- Senior Programmer
> > > http://www.eeinternet.com
> > > PGP Key: http://pgp.mit.edu/  ID 0xDB26D7CE
> > > PO Box 80086 -- Fairbanks, AK 99708 -- Ph: 907-456-5581 Fax: 907-456-3111
> > >
> > > _______________________________________________
> > > Dnsmasq-discuss mailing list
> > > Dnsmasq-discuss at lists.thekelleys.org.uk
> > > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> >
> > _______________________________________________
> > Dnsmasq-discuss mailing list
> > Dnsmasq-discuss at lists.thekelleys.org.uk
> > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> >



More information about the Dnsmasq-discuss mailing list