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)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2006-12-21 19:30 UTC by Daniel Mafua
Modified: 2022-10-17 12:39 UTC (History)
0 users

See Also:


Attachments

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: 

cloned_interfaces="bridge0"
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 10.0.0.1 netmask 255.0.0.0"

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 freebsd_triage 2006-12-21 19:31:42 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-rc

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

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

 ifconfig_bridge0="inet 10.0.0.1 netmask 255.0.0.0 addm em0 addm em1"


cheers,
Andrew
Comment 3 juan 2007-02-27 08:21:00 UTC
Hi,

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_vr0="up"
ifconfig_dc0="up"
cloned_interfaces="bridge0"
ifconfig_bridge0="inet 10.0.1.10 netmask 255.255.255.0 addm vr0 addm dc0"

cheers
Comment 4 Andrew Thompson freebsd_committer freebsd_triage 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? 


http://www.freebsd.org/cgi/query-pr.cgi?pr=107035 

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
Comment 6 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:39:44 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>