Home > Linux > Linux: add | delet route

Linux: add | delet route

Checking the route table in Linux

netstat -rn
route -n

Adding and Removing a Network in Linux

route add -net 10.10.10.0/24 gw 192.168.0.1
route del -net 10.10.10.0/24 gw 192.168.0.1

Adding and Removing a specific host in Linux

route add -host 10.10.10.45 gw 192.168.0.1
route del -host 10.10.10.45 gw 192.168.0.1

Adding a Default GW in Linux

route add default gw 192.168.0.1
route del default gw 192.168.0.1
Categories: Linux Tags:
  1. No comments yet.
  1. No trackbacks yet.

17043 pages viewed, 0 today
11075 visits, 0 today
FireStats icon Powered by FireStats