How to configure to create a bridge with dummynet while booting up?

My code is given below, but the bridge is not getting created while booting up:

/etc/rc.conf
Code:
if_bridge_load="YES"
cloned_interface="bridge0"
ifconfig_bridge0="addm em0 addm em1 up"
sshd_enable="YES"
firewall_enable="YES"
firewall_type="open
firewall_quiet="YES"
hostname="Bridge"
static route "-net 192.168.20.0 192.168.30.11 255.255.255.0"

/boot/loader.conf
Code:
dummynet_load="YES"
if_bridge_load="YES"
ipfw_load="YES"
kern.hz=10000

/etc/sysctl.conf
Code:
net.link.bridge.ipfw=1

But still in the boot-up phase the bridge is not getting created. When I enter the command to create the bridge it's working. Commands I used to create the bridge manually are given below.
Code:
Bridge# ifconfig bridge create
Bridge# ifconfig em0 up
Bridge# ifconfig em1 up
 
Bridge# ipfw add 2000 pipe 1 ip from any to any
Bridge# ipfw pipe 1 config delay 20ms plr .2
When I use the above commands manually the bridge is working. But I want to get it created as default while booting up.
 
nikeadasa said:
Code:
if_bridge_load="YES"
Doesn't belong in rc.conf, should be in /boot/loader.conf.

Code:
cloned_interface="bridge0"
It's cloned_interfaces.

Code:
static route "-net 192.168.20.0 192.168.30.11 255.255.255.0"
Never put commands in rc.conf. They will get executed multiple times during boot. Instead use this:
Code:
static_routes="myroute"
route_myroute="-net 192.168.20.0/24 192.168.30.11"

You'll also want to add:
Code:
ifconfig_em0="up"
ifconfig_em1="up"

And there's a quote missing:
Code:
firewall_type="open
 
Back
Top