ip route
19-16 IP Configuration
Mode
Anyroutermode.
Usage
Theroutingtablecontainsallactivestaticroutes,alltheRIProutes,learnedforeachnetwork.
Example
ThisexampleshowshowtousetheshowiproutecommandtodisplayallIProuteinformation.A
portionoftheoutputisshown:
B5(su)->router#show ip route
Codes: C - connected, S - static, R - RIP, O - OSPF, IA - OSPF interarea
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
E - EGP, i - IS-IS, L1 - IS-IS level-1, LS - IS-IS level-2
* - candidate default, U - per user static route
R 1.1.1.0/24 [120/2] via 19.0.0.2, Vlan 3803
R 1.2.3.0/24 [120/2] via 19.0.0.2, Vlan 3803
R 1.3.4.0/24 [120/2] via 19.0.0.2, Vlan 3803
R 5.0.0.0/25 [120/2] via 19.0.0.2, Vlan 3803
C 19.0.0.0/30 [0/1] directly connected, Vlan 3803
R 21.21.21.0/30 [120/2] via 19.0.0.2, Vlan 3803
R 24.24.24.0/24 [120/2] via 19.0.0.2, Vlan 3803
R 27.27.27.0/24 [120/2] via 19.0.0.2, Vlan 3803
R 33.9.8.0/28 [120/2] via 19.0.0.2, Vlan 3803
R 34.0.10.192/26 [120/2] via 19.0.0.2, Vlan 3803
R 34.0.11.192/26 [120/2] via 19.0.0.2, Vlan 3803
R 34.0.16.192/26 [120/2] via 19.0.0.2, Vlan 3803
R 34.0.17.192/26 [120/2] via 19.0.0.2, Vlan 3803
R 37.37.37.0/24 [120/2] via 19.0.0.2, Vlan 3803
R 40.1.1.0/24 [120/2] via 19.0.0.2, Vlan 3803
R 50.0.0.0/29 [120/2] via 19.0.0.2, Vlan 3803
R 50.1.1.0/24 [120/2] via 19.0.0.2, Vlan 3803
ip route
UsethiscommandtoaddorremoveastaticIProute.Thenoformofthiscommandremovesthe
staticIProute.
ip route prefix mask dest-addr [distance]
no ip route prefix mask forward-addr
Parameters
prefix SpecifiesadestinationIPaddressprefix.
mask Specifiesadestinationprefixmask.
dest‐addr Specifiesaforwarding(gateway)IPaddress.
distance (Optional)Specifiesanadministrativedistancemetricforthisroute.Valid
valuesare1(default)to255.Routeswithlowervaluesreceivehigher
preferenceinrouteselection.