Statische Route in Cisco Catalist eintragen

Aus Howtos und Gedankenstuetzen

Wechseln zu: Navigation, Suche

Static routes allow administrators to configure routes for specific hosts or networks manually as against learning dynamically using routing protocols like RIP, EIGRP and OSPF. Static routes basically tells the Cisco IOS of which next hop router or the exit interface on the local router that the traffic for a particular host or network needs to be passed to.

To add a Static Route in cisco ios based switches and routers the following is the command syntax. This command is run from the global configuration mode.

SYNTAX:

   ciscorouter(config)# ip route <IP/Network> <NETMASK> <NEXT HOP ROUTER/Interface> 

For example,

Add Static route to a host using an exit interface

   ciscorouter(config)# ip route 192.168.2.10 255.255.255.255 serial0/0/0 

Where 192.168.1.1 is the host & serial0/0/0 is the exit interface on the router

Add Static route to a Network using a next hop router

   ciscorouter(config)# ip route 192.168.1.0 255.255.255.0 192.168.100.1 

Where 192.168.1.0 is the network & 192.168.100.1 is the next hop router

Add a default Route in Cisco IOS

To Add a default route using a Gateway IP Address (called as Gateway of last resort) as a next hop router

   ciscorouter(config)# ip route 0.0.0.0 0.0.0.0 10.10.10.10 

If you want to use a local exit interface

   ciscorouter(config)# ip route 0.0.0.0 0.0.0.0 serial0/0/1

This should help. To display the static routes on a switch or a router use the following show command

   ciscorouter# show ip route static

To filter the output for a specific host or network

   ciscorouter# show ip route static | include 10.10.10.100
   S       10.10.10.100 [1/0] via 192.168.100.1

where the output is filtered to display only the static route for the host 10.10.10.100.