Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 May 2008 19:55:09 +0100
From:      "Jay L. T. Cornwall" <jay@jcornwall.me.uk>
To:        freebsd-net@freebsd.org
Subject:   if_bridge with two subnets
Message-ID:  <4825EF8D.1050304@jcornwall.me.uk>

next in thread | raw e-mail | index | archive | help
Hi,

I have an if_bridge, thus:

bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 
1500
	inet XX.XX.XXX.20 netmask 0xfffffff8 broadcast XX.XX.XXX.23
	inet 192.168.1.30 netmask 0xffffff00 broadcast 192.168.1.255

On one side of the bridge is a layer 2 switch with clients of a mix of 
addresses from these two subnets. On the other side is a gateway 
XX.XX.XXX.22. All clients can communicate through the gateway correctly, 
with the 192.168.1.x subnet being NAT'd.

However, clients from one subnet cannot communicate with clients from 
the other subnet. Pinging a 192.168.1.X machine from the other subnet 
shows the packet incorrectly routed out through the gateway, not back 
through the interface it came.

The routing table shows that both subnets should be routed through the 
bridge:

XX.XX.XXX.XX/29    link#5             UC          0        0 bridge
192.168.1.0/24     link#5             UC          0        0 bridge

The bridge host itself can ping machines on both subnets. So why is the 
if_bridge routing packets destined for the private subnet out through 
the default route instead?

(The specific hosts being pinged are present in the routing table from 
ARP lookups. They are all destined for the bridge interface.)

-- 
Jay L. T. Cornwall
http://www.jcornwall.me.uk/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4825EF8D.1050304>