route add -net netaddress netmask mask gw gw_address route add -net netaddress netmask mask dev iface |
Adds a routing table entry for the network prefix identified by IP address netaddressand netmask mask. The next-hop is identified by IP address gw_address or by interface iface. |
route add -host hostaddress gw gw_address route add -host hostaddress dev iface |
Adds a host route entry for IP address hostaddress with the next-hop identified by IP address gw_address or by interface iface. |
route add default gw gw_address |
Sets the default route to IP address gw_address |
route del -net netaddress netmask mask gw gw_address route del -host hostaddress gw gw_address route del default gw gw_address |
Deletes an existing route from the routing table. It isn’t necessary to type all arguments. If enough arguments are provided that it can be matched with an existing routing entry, the first entry that matches the given arguments is deleted. |
route -e |
Displays the current routing table with extended fields. The command is identical to the netstat -r command. |
route -c |
Displays the routing table cache.
|