Changes

Manually adding a new bridge

1,077 bytes added, 11:19, 6 February 2014
/* Create a new bridging device */
== Create a new bridging device ==
As the new VLAN interface is now up, an additional bridge can be added. Again the network configuration needs to be edited. Add the configuration of the new bridge, below the <code>vmbr0</code> bridge. In the following example the bridge <code>vmbr4</code> is added on top of VLAN <code>141</code>:
<source lang="bash">
$EDITOR /etc/conf.d/net
</source>
 
<source lang="bash">
# [...]
 
#-----------------------------------------------------------------------------
# Bridging (802.1d) interfaces
 
bridge_vmbr0="vlanXXX"
bridge_add_vlanXXX="vmbr0"
config_vmbr0="XXX.XXX.XXX.XXX/XX brd XXX.XXX.XXX.XXX"
routes_vmbr0="default via XXX.XXX.XXX.XXX"
 
bridge_vmbr4="vlan141"
bridge_add_vlan141="vmbr4"
config_vmbr4="192.0.2.13/24 brd 192.0.2.255"
</source>
 
Or if you would like to copy&paste:
<source lang="bash">
vlanId=141
bridgeName=vmbr4
nodeIp=192.0.2.13
prefixLength=24
broadcast=192.0.2.255
 
cat << EOF >> /etc/conf.d/net
 
bridge_${bridgeName}="vlan${vlanId}"
bridge_add_${vlanId}="${bridgeName}"
config_${bridgeName}="${nodeIp}/${prefixLength} brd ${broadcast}"
EOF
</source>
= Links =
SLB
385
edits