Introduction to Linux Networking

Introduction to Linux Networking
Show mac address table of a linux bridge
sudo brctl showmacs <bridge-name/interface>
Creating a Vlan subinterface

Create the VLAN Sub-Interface:

sudo ip link add link eth0 name vlan99 type vlan id 99

Assign an IP Address to the VLAN Sub-Interface:

sudo ip addr add 10.99.0.2/24 dev vlan99

Bring Up the VLAN Sub-Interface:

sudo ip link set dev vlan99 up

Remove current default route via old interface (Only do the next 2 steps if you want to use the sub-interface as the default gateway):

sudo ip route del default via <gateway> dev <old interface>
run "ip route" to see current/old default route to remove

Add new Default Route:

sudo ip route add default via 10.99.0.1 dev vlan99

Persist changes:

sudo nano /etc/network/interfaces
auto eth0
iface eth0 inet manual

auto vlan99
iface vlan99 inet static
    address 10.99.0.2
    netmask 255.255.255.0
    vlan-raw-device eth0 //old interfce
    post-up ip route del default via 10.0.90.1 dev pnet0
    post-up ip route add 10.99.0.0/24 dev vlan 99
    post-up ip route add default via 192.168.10.1 dev eth0.10

If the original interface was set to DHCP you will have to alter it:

VERY DIRTY FIX

ALIimage.png