Reviewing IP Traffic and Configuring Routes ip route
16-26 IP Configuration
Example
ThisexampleshowshowtodisplayallIProuteinformation.Inthiscase,thereareroutesdirectly
connectedtoVLANs1and2,twostaticroutesconnectedtoVLAN1(oneindirectly,andonevia
anothernetworkIP),andoneRIProute.Distance/costisdisplayedas[x/y]:
Matrix>Router#show ip route
Codes: C – connected, S – static, R – RIP, O – OSPF, IA – OSPF inter area, N1
– OSPF NSSA external type 1, N2 – OSPF NSSA external type 2, E1 – OSPF external
type 1, E2 – OSPF external type 2, * - candidate default, U – per user static route
C 192.168.27.0/24 [ 0/0001] directly connected, vlan 1
C 192.168.32.0/24 [ 0/0001] directly connected, vlan 2
S 2.0.0.0/8 [ 65/0001] via 192.168.72.1, vlan 1
S 3.0.0.0/8 [ 0/0001] directly connected vlan 1
R 1.0.0.0/8
[ 70/0002] via 192.168.72.22 vlan 1
ip route
UsethiscommandtoaddorremoveastaticIProute.
Syntax
ip route prefix mask {forward-addr | vlan vlan-id} [distance] [permanent] [tag
value]
no ip route prefix mask {forward-addr | vlan vlan-id}
Parameters
Defaults
•Ifdistanceisnotspecified,thedefaultvalueof1willbeapplied.
•Ifpermanentandtagarenotspecified,theroutewillbesetasnon‐permanentwithnotag
assigned.
Mode
Routercommand,Globalconfiguration:Matrix>Router(config)#
Usage
The“no”formofthiscommandremovesthestaticIProute.
prefix SpecifiesadestinationIPaddressprefix.
mask Specifiesadestinationprefixmask.
forward‐addr|vlan
vlan‐id
Specifiesaforwarding(gateway)IPaddressorrouting(VLAN)
interfaceID.
distance (Optional)Specifies anadministrativedistancemetricforthisroute.
Validvaluesare
1(default)to255.Routeswithlowe rvaluesreceive
higherpreferenceinrouteselection.
permanent (Optional)Specifiesapermanentroute.
tagvalue (Optional)Specifies atagforthisroute.Validvaluesare1to
4294967295.