[Dnsmasq-discuss] address assignment without checking context?]]

Benjamin Collar benjamin.collar at siemens.com
Mon Jul 25 15:25:54 BST 2005


Greetings

Thank you for the previous information. We're still working on it and
have come to the following. (The following was forwarded to me by the
colleague who actually performed the work, so it's written from his
POV...). Any other tips/leads you could give us would be much
appreciated! Thanks. Ben.

Hm... Does not seem to work. Tested with dsnmasq-2.22 on SUSE 9.2:
eth0 has 10.0.150.10
eth1 has 10.128.150.10

ip addr add was issued for each IP also to the other interface. 
Nevertheless dnsmasq accepts 10.0 address requests only via eth0 and 10.128 requests only via eth1.
 
linux:/opt/dnsmasq # ip addr show
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:01:02:dd:84:bc brd ff:ff:ff:ff:ff:ff
    inet 10.0.150.111/15 brd 10.1.255.255 scope global eth0
    inet 10.128.150.111/32 scope global eth0
    inet6 fe80::201:2ff:fedd:84bc/64 scope link
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:50:da:48:d1:fe brd ff:ff:ff:ff:ff:ff
    inet 10.128.150.111/15 brd 10.129.255.255 scope global eth1
    inet 10.0.150.111/32 scope global eth1
    inet6 fe80::250:daff:fe48:d1fe/64 scope link
       valid_lft forever preferred_lft forever
4: sit0: <NOARP> mtu 1480 qdisc noqueue
    link/sit 0.0.0.0 brd 0.0.0.0
linux:/opt/dnsmasq # ip route show
169.254.0.0/16 dev eth0  scope link
10.0.0.0/15 dev eth0  proto kernel  scope link  src 10.0.150.111
10.128.0.0/15 dev eth1  proto kernel  scope link  src 10.128.150.111
127.0.0.0/8 dev lo  scope link
linux:/opt/dnsmasq # ./dnsmasq -d -C ./dnsmasq.conf
dnsmasq: started, version 2.22 cachesize 180
dnsmasq: DHCP, static leases only on 10.128.150.10, lease time 45m
dnsmasq: DHCP, static leases only on 10.0.150.10, lease time 45m
dnsmasq: DHCP, static leases only on 10.64.150.10, lease time 45m
dnsmasq: read /etc/hosts - 93 addresses
dnsmasq: reading /opt/dnsmasq/resolv.conf
dnsmasq: DHCPDISCOVER(eth0) 00:10:5a:5a:05:e2
dnsmasq: DHCPOFFER(eth0) 10.0.150.32 00:10:5a:5a:05:e2
dnsmasq: DHCPDISCOVER(eth1) 00:10:5a:5a:05:e2 no address available
dnsmasq: DHCPREQUEST(eth0) 10.0.150.32 00:10:5a:5a:05:e2
dnsmasq: DHCPACK(eth0) 10.0.150.32 00:10:5a:5a:05:e2 INT0_IOD_MB_BAS0_MAS
dnsmasq: DHCPDISCOVER(eth0) 00:10:5a:5a:05:e2
dnsmasq: DHCPOFFER(eth0) 10.0.150.33 00:10:5a:5a:05:e2
dnsmasq: DHCPDISCOVER(eth1) 00:10:5a:5a:05:e2 no address available
dnsmasq: DHCPREQUEST(eth0) 10.0.150.33 00:10:5a:5a:05:e2
dnsmasq: DHCPACK(eth0) 10.0.150.33 00:10:5a:5a:05:e2 INT0_IOD_MB_BAS0_SLV
dnsmasq: DHCPDISCOVER(eth0) 00:10:5a:5a:05:e2
dnsmasq: DHCPOFFER(eth0) 10.0.150.34 00:10:5a:5a:05:e2
dnsmasq: DHCPDISCOVER(eth1) 00:10:5a:5a:05:e2 no address available
dnsmasq: DHCPREQUEST(eth0) 10.0.150.34 00:10:5a:5a:05:e2
dnsmasq: DHCPACK(eth0) 10.0.150.34 00:10:5a:5a:05:e2 INT0_IOD_MB_EXT0_MAS
dnsmasq: DHCPDISCOVER(eth0) 00:10:5a:5a:05:e2
dnsmasq: DHCPOFFER(eth0) 10.0.150.35 00:10:5a:5a:05:e2
dnsmasq: DHCPDISCOVER(eth1) 00:10:5a:5a:05:e2 no address available
dnsmasq: DHCPREQUEST(eth0) 10.0.150.35 00:10:5a:5a:05:e2
dnsmasq: DHCPACK(eth0) 10.0.150.35 00:10:5a:5a:05:e2 INT0_IOD_MB_EXT0_SLV
dnsmasq: DHCPDISCOVER(eth0) 00:10:5a:5a:05:e2 no address available
dnsmasq: DHCPDISCOVER(eth1) 00:10:5a:5a:05:e2
dnsmasq: DHCPOFFER(eth1) 10.128.150.32 00:10:5a:5a:05:e2
dnsmasq: DHCPREQUEST(eth1) 10.128.150.32 00:10:5a:5a:05:e2
dnsmasq: DHCPACK(eth1) 10.128.150.32 00:10:5a:5a:05:e2 INT1_IOD_MB_BAS0_MAS
dnsmasq: DHCPDISCOVER(eth0) 00:10:5a:5a:05:e2 no address available
dnsmasq: DHCPDISCOVER(eth1) 00:10:5a:5a:05:e2
dnsmasq: DHCPOFFER(eth1) 10.128.150.33 00:10:5a:5a:05:e2
dnsmasq: DHCPREQUEST(eth1) 10.128.150.33 00:10:5a:5a:05:e2
dnsmasq: DHCPACK(eth1) 10.128.150.33 00:10:5a:5a:05:e2 INT1_IOD_MB_BAS0_SLV
dnsmasq: DHCPDISCOVER(eth0) 00:10:5a:5a:05:e2 no address available
dnsmasq: DHCPDISCOVER(eth1) 00:10:5a:5a:05:e2
dnsmasq: DHCPOFFER(eth1) 10.128.150.34 00:10:5a:5a:05:e2
dnsmasq: DHCPREQUEST(eth1) 10.128.150.34 00:10:5a:5a:05:e2
dnsmasq: DHCPACK(eth1) 10.128.150.34 00:10:5a:5a:05:e2 INT1_IOD_MB_EXT0_MAS
dnsmasq: DHCPDISCOVER(eth0) 00:10:5a:5a:05:e2 no address available
dnsmasq: DHCPDISCOVER(eth1) 00:10:5a:5a:05:e2
dnsmasq: DHCPOFFER(eth1) 10.128.150.35 00:10:5a:5a:05:e2
dnsmasq: DHCPREQUEST(eth1) 10.128.150.35 00:10:5a:5a:05:e2
dnsmasq: DHCPACK(eth1) 10.128.150.35 00:10:5a:5a:05:e2 INT1_IOD_MB_EXT0_SLV



Am Donnerstag, 21. Juli 2005 17:35 schrieb Benjamin Collar:
> -------- Forwarded Message --------
> From: Simon Kelley <simon at thekelleys.org.uk>
> To: Benjamin Collar <benjamin.collar at siemens.com>
> Cc: dnsmasq-discuss at thekelleys.org.uk
> Subject: Re: [Dnsmasq-discuss] address assignment without
> checking context?
> Date: Thu, 21 Jul 2005 16:15:39 +0100
>
> Benjamin Collar wrote:
> > Greetings
> >
> > We have set up two interfaces that are physically connected to
> > the same network:
> > eth0: 10.0.150.10 netmask 255.254.0.0
> > eth1: 10.128.150.10 netmask 255.254.0.0
> >
> > dnsmasq is configured to only statically assign IP addresses
> > via the client id. Excerpt from dnsmasq.conf:
> > dhcp-host:id=Linda,10.0.150.100,12h
> >
> > Now, if a DHCP request from a client with client id "Linda"
> > arrives over eth0, then everything works as expected -
> > 10.0.150.100 will be assigned to it. If the same DHCP request
> > arrives over eth1, it is discarded (DHCPDISCOVER(eth1) .... no
> > address available). My question: Is there a way to configure
> > dnsmasq so that DHCP requests with client id are not checked
> > for their "context" but instead are handled regardless on which
> > interface they arrive?
> >
> > Thanks in advance!
> > Ben
>
> There's no code in dnsmasq to change that behaviour, however in
> recent versions of dnsmasq running on Linux, it's possible for an
> interface to have more than on IP address. You should therefore
> be able to give each interface the address of the other as a
> secondary address. That would make dnsmasq behave as you want, I
> have little idea if it would break anything else. I just tried it
> here, and it's at least possible to set the extra address without
> getting an error (you have to use the "ip" command, ifconfig
> doesn't know about secondary addresses)
>
> Worth a try before starting to patch.....
>
> HTH
>
> Simon.
-- 
Benjamin Collar
Siemens AG
CT SE 2
Embedded Linux
089-636-53711





More information about the Dnsmasq-discuss mailing list