Iproute2
Jump to navigation
Jump to search
src
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
vlans
sudo ip link add link eno1 name eno1.52 type vlan id 52 sudo ip link add link eno1 name eno1.52 type vlan id 52 sudo ip link set dev eno1.52 up sudo ip addr add 192.168.52.2/24 brd 192.168.52.255 dev eno1.52 ping 192.168.52.1 # this would be firewall or other host see line below sudo tcpdump -nnei eno1 -vvv | grep "vlan 52" sudo tcpdump -i eno1 vlan 52
use same but on other host (ie firewall)
sudo ip addr add 192.168.52.1/24 brd 192.168.52.255 dev eno1.52
on cisco
this setups a trunk native vlan is 1 for untagged and default allows all vlans
portfast might not be the best idea if you don't know what you are doing
conf t int vlan 52 exit interface GigabitEthernet0/1 switchport trunk encapsulation dot1q switchport mode trunk spanning-tree portfast trunk
you might also use these for link agg (LACP)
interface Port-channel1 channel-group 1 mode active
Trouble shooting
Cisco
sh int trunk sh lacp neighbor
If you make changes you might need to do a shut/no shut on range of interfaces you are using.
Linux
cat /proc/net/bonding/bond0