ip route showDisplay the main routing table.
Linux routing tables, policy routing, bridges, VLANs, bonds, and tunnel configuration commands.
Inspect and manipulate routing tables and policy routes.
ip route showDisplay the main routing table.
ip route get 8.8.8.8Show which route and source address will be used.
sudo ip route add default via 192.168.1.1 dev eth0Set a default gateway.
sudo ip route del defaultRemove the default gateway.
sudo ip route add 10.20.0.0/16 via 192.168.1.254 dev eth0Add a route for a remote network.
sudo ip route del 10.20.0.0/16Remove a static route.
ip rule showDisplay source-based and policy routing rules.
sudo ip rule add from 10.10.0.0/24 table 100Route traffic from a source CIDR using a specific table.
sudo ip route add default via 10.10.0.1 dev eth1 table 100Insert a route into an alternate routing table.
tracepath example.comTrace MTU and path to a host.
traceroute example.comTrace path hops to a host.
Work with bridges, VLAN subinterfaces, bonds, and tunnels.
bridge link showDisplay interfaces participating in Linux bridges.
bridge fdb showInspect learned MAC addresses on bridges.
sudo ip link add br0 type bridgeCreate a software bridge device.
sudo ip link set eth1 master br0Add an interface as a bridge port.
sudo ip link add link eth0 name eth0.100 type vlan id 100Create a VLAN-tagged interface.
sudo ip link add bond0 type bond mode active-backupCreate a bonding interface.
sudo ip tunnel add gre1 mode gre local 10.0.0.1 remote 10.0.0.2 ttl 255Create a GRE tunnel interface.
sudo ip link add vxlan100 type vxlan id 100 dev eth0 remote 10.0.0.2 dstport 4789Create a VXLAN tunnel device.
ip neigh showDisplay IPv4 ARP and IPv6 neighbor entries.
sudo arping -I eth0 192.168.1.1Probe L2 reachability on the local subnet.