ls -l /sys/class/net/ # E.g.: ens3 -> ../../devices/pci0000:00/0000:00:03.0/virtio0/net/ens3
ip addr show dev eth1
ifconfig ens7 10.99.0.10/16 up
ip addr add 192.168.6.13/24 dev eth0 && ip link set eth0 up
ip addr flush dev eth0
ifconfig eth0 0.0.0.0 0.0.0.0 && dhclient
ip route add default via 192.168.1.1
ip route show table all
ip tuntap add mode tap dev tap1
tap1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether a2:05:e8:7f:d9:e8 brd ff:ff:ff:ff:ff:ff
ip tuntap add mode tun dev tun1
tun1: <POINTOPOINT,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 500
link/none
Features
ethtool -k ens3 | grep offload # list Features
ethtool -K ens3 gro off gso off tso off # set tcp-segmentation-offload, generic-segmentation/receive-offload
modprobe nf_log_ipv4
sysctl net.netfilter.nf_log.2=nf_log_ipv4
iptables -t raw -A OUTPUT -p icmp -j TRACE
iptables -t raw -A PREROUTING -p icmp -j TRACE
vi /var/log/kern.log
tcpdump -i any icmp
Priority: 0, Selector: match anything, Action: lookup routing
table local (ID 255). The local table is a special routing
table containing high priority control routes for local and
broadcast addresses.
Priority: 32766, Selector: match anything, Action: lookup
routing table main (ID 254). The main table is the normal
routing table containing all non-policy routes. This rule may
be deleted and/or overridden with other ones by the
administrator.
Priority: 32767, Selector: match anything, Action: lookup
routing table default (ID 253). The default table is empty.
It is reserved for some post-processing if no previous default
rules selected the packet. This rule may also be deleted.
# cat /etc/iproute2/rt_tables
#
# reserved values
#
255 local
254 main
253 default
0 unspec
#
# local
#
#1 inr.ruhep
https://docs.cumulusnetworks.com/display/DOCS/Virtual+Routing+and+Forwarding+-+VRF
multiple independent routing tables working simultaneously on the same router or switch Think of this feature as VLAN for layer 3