Add vlan and bridge interfaces on the fly

We have one eth0 NIC.

We want to create another eth0.677 vlan interface, then add it to the bridge (and possibly add new VMs to that bridge, or whatever).

Need vconfig and brctl utilities (yum install vconfig bridge-utils)

CREATE NEW VLAN AND BRIDGE INTERFACES

vconfig add eth0 677 # create eth0.677 vlan interface

ifconfig eth0.677 up # bring up the interface

brctl addbr br677 # create new bridge interface

brctl addif br677 eth0.677 # add eth0.677 interface to bridge br677

ifconfig br677 up # bring up the new bridge

DESTROY NEW VLAN AND BRIDGE INTERFACES

ifconfig br677 down # bring up the new bridge

brctl delif br677 eth0.677 # remove eth0.677 from bridge

brctl delbr br677 # delete the bridge itself

ifconfig eth0.677 down # bring down the eth0.677 interfaces

vconfig rem eth0.677 # destroy the erth0.677 interface

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: