Bridge doesn't connect to anything beyond the host itself

Hello all,

I can reproduce this problem on bare metal equipment at work as well as on Hyper-V. I just want to create a simple bridge so I can connect VNET jails to it.

Because of my inability to copy text out of hyper-V I'll tell you what I've done: I have a very simple rc.conf which basically disables sendmail outbound, sendmail msp queue, sendmail submit, but loads zfs. I also have the following set:
Code:
ifconfig_hn0="up" #this is hyper-v's main interface
cloned_interfaces="bridge0"
ifconfig_bridge0="addm hn0 DHCP"
Nice and simple, right, I've commented out jail_enable="YES" at the moment. No need in creating epair interfaces or starting the jails until I can prove the bridge is working.

Anyway, the bridge will not receive an address through DHCP. Tcpdump will show the packets to port 67 going out but nothing coming back in. Tcpdump on the dhcp server/gateway will show no packets to port 67 from this bridge coming in.

Doesn't matter if it's DHCP. I can configure it manually and still can't ping the gateway:
Code:
ifconfig bridge0 create
ifconfig bridge0 inet 192.168.1.7/26 up  (the gateway is at 192.168.1.1) (yes it really is a /26 network)
ifconfig bridge0 addm hn0
yes ifconfig shows bridge0 is up
yes ifconfig shows hn0 is up
the relevant portion of netstat -r shows: 192.168.1.0/26 LINK #3 U bridge0
ping 192.168.1.1 results in "ping: sendto: host is down"

Sure I can add a default route to 192.168.1.1 but I'm only trying to reach something on my broadcast domain.

I know hn0 works fine because I can run dhclient on hn0 is receive an address instantly, and ping the gateway. Or I can configure it statically and ping the gateway. It's just that adding it as a member of a bridge doesn't seem to connect it to the rest of the network. Yes, I know it needs to be added as a member of the bridge and not configured in any way.

I can reproduce this at work on a test machine using an re(4) type card. Sorry, I know people love the intel Pro 1000 (em) including myself but that's only on production equipment.

Anyone have a similar experience? Just for the heck of it tried enabling spanning tree on the hn0 member but didn't matter. I didn't think it would though.

Thank you for your help!
 
This thread can be marked solved. I fixed it by having the bridge inherit hn0's mac address:

sysctl net.link.bridge.inherit_mac=1

Thank you!
 
In hyper-v settings allow mac spoofing. This will allow the guest to transmit more than one different mac address via its virtual network adapter.
 
Good to know, thank you! As for my test machine at work I suspect all I had to do was unplug the ethernet cable and plug it back in.
 
Back
Top