- Display the information of route table:route -n- Add route rule:sudo route add -net [ip_address] netmask [netmask_address] gw [gw_address]- Delete route rule:sudo route del -net [ip_address] netmask [netmask_address] dev [gw_address]
route [-CFvnNee] [-A family |-4|-6]
Route manipulates the kernel's IP routing tables. Its primary use is to set up static routes to specific hosts or networks via an interface after it has been configured with the ifconfig(8) program.
When the add or del options are used, route modifies the routing tables. Without these options, route displays the current contents of the routing tables.
If dev If is the last option on the command line, the word dev may be omitted, as it's the default. Otherwise the order of the route modifiers (metric netmask gw dev) doesn't matter.
The output of the kernel routing table is organized in the following columns
/proc/net/ipv6_route /proc/net/route /proc/net/rt_cache
ifconfig(8), netstat(8), arp(8), rarp(8), ip(8)
Route for Linux was originally written by Fred N. van Kempen, <firstname.lastname@example.org> and then modified by Johannes Stille and Linus Torvalds for pl15. Alan Cox added the mss and window options for Linux 1.1.22. irtt support and merged with netstat from Bernd Eckenfels.
Currently maintained by Phil Blundell <Philip.Blundell@pobox.com> and Bernd Eckenfels <email@example.com>.