[Dnsmasq-discuss] Incorrect broadcast address given
OB Lutz
ob.lutz at gmail.com
Wed Oct 8 16:00:32 BST 2008
This is output from another router, same setup, different ip range,
that doesn't exhibit this problem.
# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
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
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP qlen 100
link/ether 00:d0:12:0b:a2:98 brd ff:ff:ff:ff:ff:ff
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast
state DOWN qlen 100
link/ether 00:d0:12:0c:a3:99 brd ff:ff:ff:ff:ff:ff
4: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UNKNOWN
link/ether 00:d0:12:0b:a2:98 brd ff:ff:ff:ff:ff:ff
inet 192.168.8.1/27 brd 192.168.8.31 scope global br-lan
5: wifi0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UNKNOWN qlen 1000
link/ieee802.11 00:15:6d:63:b3:a2 brd ff:ff:ff:ff:ff:ff
6: ath0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP qlen 1000
link/ether 00:15:6d:63:b3:a2 brd ff:ff:ff:ff:ff:ff
inet 192.168.8.2/32 brd 255.255.255.255 scope global ath0
7: wifi1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UNKNOWN qlen 1000
link/ieee802.11 00:15:6d:63:d0:b1 brd ff:ff:ff:ff:ff:ff
8: ath1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP qlen 1000
link/ether 00:15:6d:63:d0:b1 brd ff:ff:ff:ff:ff:ff
inet 192.168.8.3/32 brd 255.255.255.255 scope global ath1
9: bmf0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc
pfifo_fast state UNKNOWN qlen 500
link/[65534]
inet 192.168.8.2/32 brd 192.168.8.2 scope global bmf0
He offers up the correct 192.168.8.31 broadcast address
On Wed, Oct 8, 2008 at 10:51 AM, OB Lutz <ob.lutz at gmail.com> wrote:
> # ip addr show
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
> 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
> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
> state UP qlen 100
> link/ether 00:d0:12:09:91:52 brd ff:ff:ff:ff:ff:ff
> 3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast
> state DOWN qlen 100
> link/ether 00:d0:12:19:91:52 brd ff:ff:ff:ff:ff:ff
> 4: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
> state UNKNOWN
> link/ether 00:d0:12:09:91:52 brd ff:ff:ff:ff:ff:ff
> inet 192.168.8.225/27 brd 192.168.8.255 scope global br-lan
> 5: wifi0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
> state UNKNOWN qlen 1000
> link/ieee802.11 00:15:6d:63:d4:31 brd ff:ff:ff:ff:ff:ff
> 6: ath0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
> state UP qlen 1000
> link/ether 00:15:6d:63:d4:31 brd ff:ff:ff:ff:ff:ff
> inet 192.168.8.226/32 brd 255.255.255.255 scope global ath0
> 7: bmf0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc
> pfifo_fast state UNKNOWN qlen 500
> link/[65534]
> inet 192.168.8.226/32 brd 192.168.8.226 scope global bmf0
>
>
> On Wed, Oct 8, 2008 at 9:58 AM, Simon Kelley <simon at thekelleys.org.uk> wrote:
>> OB Lutz wrote:
>>>
>>> The routing is fine. All the eth*s are bridged to br-lan, which is
>>> given 192.168.8.225/27 (255.255.255.224). ath0 is 192.168.8.226/27,
>>> ath1 192.168.8.227/27. iptables rules take care of forwarding
>>> appropriate traffic around. Routing is not an issue.
>>>
>>> Shoving various log messages into dnsmasq, i could see that when going
>>> through the block of code at dhcp.c: complete_context,line 404-405
>>>
>>> if (is_same_net(broadcast, context->start, context->netmask))
>>> context->broadcast = broadcast;
>>>
>>> Prior to sending the response back, dnsmasq would pass through here
>>> about 4 times. Most passes the correct 192.168.8.255 broadcast address
>>> would be put in context->broadcast, but the final pass always put in
>>> the incorrect 192.168.8.226. I assume the only pass with relevance to
>>> the broadcast address offered in dnsmasq's response was the last one.
>>
>> That code gets called for each address associated with each interface. Maybe
>> you have more than one address set up on the interface, with a different
>> broadcast address for some. What does
>>
>> ip addr show
>>
>> return?
>>
>>>
>>> Now, I'm no expert in the ways of dnsmasq so maybe I'm just not seeing
>>> something thats blatantly obvious to all of you. But seeing as how
>>> dhcp is dhcp and ip routing is ip routing, why would my network setup
>>> have any influence on the address dnsmasq gives for broadcast? If i
>>> tell it to give addresses in the range of 192.168.8.230 through
>>> 192.168.8.254 with a mask of 255.255.255.224, why should it do any
>>> different? It happily respects my configuration when I force the
>>> broadcast address, why should it ignore my other configs?
>>>
>> If you don't explicitly configure it, it tries to use the interface
>> configuration. To understand why it's doing what it is, we need to know what
>> that is.
>>
>> Cheers,
>>
>> Simon.
>>
>>
>>
>> _______________________________________________
>> 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