Jump to Navigation

166 - How to use iP route

ip route provides management tools for manipulating any of the routing tables. Operations include displaying routes or
the routing cache, adding routes, deleting routes, modifying existing routes, and fetching a route and clearing an entire
routing table or the routing cache.

1. View the main routing table with ip route show.

# route -n (or, ip route show)

2. Using ip route add to populate a routing table.

# ip route add192.168.1.0/24 dev eth0

# ip route add dev eth1 src

# ip route add default via

3. Removing routes with ip route del.

# ip route delete dev eth1 src

4. Altering existing routes with ip route change.

# ip route change default via dev eth0

5. CIDR (Classless Inter-Domain Routing).   --   From   To --   Only






Main menu 2

Story | by Dr. Radut