Bug 107035 - [patch] bridge(8): bridge interface given in rc.conf not taking an (static) IP address
Summary: [patch] bridge(8): bridge interface given in rc.conf not taking an (static) I...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2006-12-21 19:30 UTC by Daniel Mafua
Modified: 2018-01-03 05:13 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Mafua 2006-12-21 19:30:10 UTC
A bridge defined in rc.conf does not take a static IP address.  According to the man page for if_bridge a bridge is created using cloned_interfaces. It is then configured using ifconfig_{bridgename}="whatever".  The documentation example in the man page says: 

ifconfig_bridge0="addm em0 addm em1 DHCP"

Assuming that you were going to add a static IP address for the bridge that would be:

ifconfig_bridge0="addm em0 addm em1 inet netmask"

This however does not work.  The bridge is created with child interfaces correctly, but an IP address is not assigned to the bridge interface.  This creates problems during startup as many services need to bind to an IP.  The workaround is to make your own RC script and assign it there.  

If there is another way to do this, it should be documented.

How-To-Repeat: Attempt to create static ip address on bridged interface during bootup.  See rc.conf example above.
Comment 1 Remko Lodder freebsd_committer 2006-12-21 19:31:42 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-rc

reassign to rc.
Comment 2 Andrew Thompson freebsd_committer 2007-01-05 07:22:21 UTC

It would be interesting to see if it worked with a different order of
the arguments, please try with:

 ifconfig_bridge0="inet netmask addm em0 addm em1"

Comment 3 juan 2007-02-27 08:21:00 UTC

I had the same problem setting up a bridge with static ip address. I 
tried with a different order of arguments as it was sugested by Andrew 
and it worked.

Here's my /etc/rc.conf:
ifconfig_bridge0="inet netmask addm vr0 addm dc0"

Comment 4 Andrew Thompson freebsd_committer 2007-02-27 08:58:47 UTC
Responsible Changed
From-To: freebsd-rc->freebsd-net

This is a limitation of ifconfig rather than rc. The ip address 
needs to be the first argument, why is this so? 


Date: Mon, 16 Apr 2007 23:26:30 +0930
Comment 5 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:27 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped