Changes

Manually adding a new bridge

1,647 bytes added, 14:18, 12 February 2014
/* Configuration */
/etc/init.d/net.${bridgeName} start
ip addr show ${bridgeName} && brctl show
</source>
 
== Delete a bridging device ==
Tear the bridge down but check if it would also stop all network services:
<source lang="bash">
# Set your bridge name
bridgeName=<NAME OF YOUR BRIDGE> # e.g.: vmbr4
 
# Check if it excludes the net services
grep rc_net_${bridgeName}_provide /etc/conf.d/net
</source>
If grep produces output you might consider running the initscript with the ''-D'' options (otherwise network services, like sshd, might get stopped).
 
Otherwise just stop the bridge and remove the initscript:
<source lang="bash">
/etc/init.d/net.vmbr4 start
 
rc-update add net.vmbr4 default
 
ln -s /etc/init.d/net.lo /etc/init.d/net.vmbr4
</source>
 
Remove the bridge from the network configuration:
<source lang="bash">
$EDITOR /etc/conf.d/net
</source>
<source lang="bash">
# [...]
 
### Remove the options for the bridge you want to delete
#bridge_vmbr4="vlan141"
#bridge_add_vlan141="vmbr4"
#config_vmbr4="192.0.2.13/24 brd 192.0.2.255"
#rc_net_vmbr4_provide="!net" # Otherwise stopping or restarting the bridge, will bring all net-services down.
 
# [...]
</source>
 
== Remove a VLAN on a bonding interface ==
Delete the VLAN from the interface bond0:
<source lang="bash">
# Set your vlan id
vlanId=<VLAN ID> # e.g. 141
 
# Shut the vlan down
ip link set vlan${vlanId} down
 
# Remove it from the interface bond0
ip link delete link bond0 name vlan${vlanId} type vlan id ${vlanId}
</source>
 
Edit <code>/etc/conf.d/net</code> and remove your VLAN:
<source lang="bash">
$EDITOR /etc/conf.d/net
</source>
 
<source lang="bash">
# [...]
 
### Remove your vlan options
# pub2 VLAN
# vlan141_name="vlan141"
# config_vlan141="null"
 
# [...]
</source>
16
edits