ip a
gives output like
-c
switch:ip -c a
You could even add this to your .bashrc file to create an alias:
alias ip='ip -c'
ip -br a
ip -s link show
will show statistics from all devices.
ip -s link show [DEVICE]
will show statistics for specific [DEVICE]
In order to configure a vLAN using ip
, follow these steps:
ip -br a
sudo ip link add link [DEVICE] name [DEVICE].549 type vlan id 549
sudo ip link set [DEVICE].549 up
sudo ip a add 10.10.10.43/24 dev [DEVICE].549
sudo ip route add default via 10.10.10.254
ping -c 3 10.10.10.1
nmcli device
nmcli connection show
If the device that you wish to use for vLAN already has a profile associated with it, you will need to remove that association
nmcli connection del [CONNECTION_PROFILE]
Create the vlan profile. Recommand naming the profile with the vlan ID included
nmcli connection add type vlan con-name [VLAN_PROFILE_NAME] ifname [VLAN_PROFILE_NAME] dev [DEVICE] id [VLANID]
Configure the newly created vlan profile with IP address, gateway etc.
nmcli connection modify [VLAN_PROFILE_NAME] ipv4.method manual ipv4.addresses 10.102.136.110/23 ipv4.gateway 10.102.136.1
Bring the connection up
nmcli connection up [VLAN_PROFILE_NAME]
To set jumbo frames, use the following command:
sudo ip link set dev [DEVICE] mtu [MTU VALUE]