Personal notes on frequently used and easily forgotten network commands.
Checking
Operation | Linux | FreeBSD |
---|---|---|
Check interfaces | ip link show | ifconfig -l |
Check interfaces (including addresses) | ip addr | ifconfig |
Check interface packet counters | ip -s link dev | netstat -idb -I |
ARP table | ip -4 neighbor | arp -a |
IPv6 neighbor table | ip -6 neighbor | ndp -a |
Bridge
Operation | Linux | FreeBSD |
---|---|---|
Add interface | brctl addif br0 eth0 | ifconfig bridge0 addm vtnet0 |
Remove interface | brctl delif br0 eth0 | ifconfig bridge0 deletem vtnet0 |
Create bridge interface | brctl addbr br0 ip link set up dev br0 | ifconfig bridge0 create ifconfig bridge0 up |
Delete bridge interface | ip link set down dev br0 brctl delbr br0 | ifconfig bridge0 down ifconfig bridge0 destroy |
VLAN
Operation | Linux | FreeBSD |
---|---|---|
Create VLAN interface | ip link add link eth0 name eth0.10 type vlan id 10 ip link set up eth0.10 | ifconfig vtnet0.10 create ifconfig vtnet0.10 up |
Delete VLAN interface | ip link set down eth0.10 ip link delete dev eth0.10 | ifconfig vtnet0.10 down ifconfig vtnet0.10 destroy |