# ifconfig errors in rc.conf



## MartynH (Feb 11, 2013)

Good morning,

Am just getting to grips with FreeBSD again after many years in Windows-land, and am trying to create a virtual server with multiple NICs so as to use ipfw/dummynet to simulate WAN connections for software testing.

My box is built, but the following commands don't seem to execute properly in rc.conf:

em0 is management interface, em1 and em2 the bridge interfaces.


```
hostname="SPDemo-NetSimulator"
keymap="uk.iso.kbd"
ifconfig_em0="DHCP"
cloned_interfaces="bridge0"
ifconfig_bridge0="addm em1 addm em2 up"
ifconfig_em1="up"
ifconfig_em2="up"
sshd_enable="YES"
ntpd_enable="YES"
firewall_enable="YES"
firewall_type="/etc/fw.conf"
dummynet_enable="YES"
```

bridge0 is created, but the interfaces are not added to it, and the ipfw file is not loaded - all advice much appreciated!

Apologies if I've made a silly mistake!

Thanks,

Martyn.


----------



## SirDice (Feb 11, 2013)

What version of FreeBSD?


----------



## MartynH (Feb 11, 2013)

Thanks, version 9.1, release #1 dated Feb 8th 2013.


----------



## Morte (Feb 11, 2013)

I've never put "up" in a bridge configuration (it's always up), so maybe try taking that out.

You have firewall_type set wrong. It should be set to open, closed, client, or simple.  Or perhaps you wanted to set firewall_script instead?


----------



## wblock@ (Feb 11, 2013)

It looks weird, but firewall_type can also be a filename.  See /etc/rc.firewall.


----------



## MartynH (Feb 11, 2013)

Thanks both, taking out the bridge up command has made the network interface lines behave correctly - it now adds the members to the bridge on boot up. It is also now correctly loading my firewall file, many thanks for the assistance.


----------

