list all route tables

There exists a way to list all routing entries of all tables. ip route show table all Using some shell piping magic, you can extract all table names and IDs like this: ip route show table all | grep “table” | sed ‘s/.*\(table.*\)/\1/g’ | awk ‘{print $2}’ | sort | uniq or ip route show … Read more

ip route show src field

When adding a route to a multihomed host, you might want to have control over the source IP address your host is sending from when starting communications using this route. This is what src is for. A short example: you have a host with two interfaces and the IP addresses 192.168.1.123/24 and 10.45.22.12/24. You are … Read more

Why does removing an unused IP address from an interface kill connections unrelated to that address

In linux, IP addresses have a notion of ‘primary’ and ‘secondary’ addresses. The primary is typically the first address you add to the system. Removing the primary address has the implicit operation of flushing the entire list of secondary addresses also. You can avoid this behaviour by setting the sysctl net.ipv4.conf.all.promote_secondaries to 1 like so: … Read more

Where is the statement of deprecation of ifconfig (on linux)?

The official statement regarding the plans to obsolete net-tools was made on the debian-devel mailing list in early 2009 by one of the net-tools maintainers. True to their statement, net-tools has been hardly maintained at all since that time. Luk Claes and me, as the current maintainers of net-tools, we’ve been thinking about it’s future. … Read more

Should I quit using Ifconfig?

Quoting Thomas Pircher‘s website (cc-by-sa): ifconfig vs ip The command /bin/ip has been around for some time now. But people continue using the older command /sbin/ifconfig. Let’s be clear: ifconfig will not quickly go away, but its newer version, ip, is more powerful and will eventually replace it. The man page of ip may look … Read more