Table of Contents

Cisco Statick Route Configuration Examples



Commands

Check

Operation Commands
Checking ip routing Router#show ip route
Router# show ip route vrf all
Traceing the routing
to stop tracerouting is 'CTRL + SHIFT + 6'
Router#traceroute IPADDRESS

Configuration

Operation Commands
adding the routing Router(config)#ip route 192.168.1.0 255.255.255.0 192.168.0.1
→ Destination 192.168.1.0/255.255.255.0 Via 192.168.0.1(Gateway)
Router(config)#ip route 192.168.1.0/24 192.168.0.1
Router(config)#ip route 192.168.1.0 255.255.255.0 192.168.0.1 125 ← 125 is ad
Router(config)#ip route 192.168.1.0 255.255.255.0 s0/0
adding the default routing Router(config)#ip route 0.0.0.0 0.0.0.0 192.168.0.1
Router(config)#ip route 0.0.0.0 0.0.0.0 s0/0
deleting the routing Router(config)#no ip route 192.168.1.0 255.255.255.0 192.168.0.1
setting of ip classless
Default setting after IOS 12.0 is enable.
Router(config)#ip classless
Router(config)#no ip classless



Does not consider subnet mask and broadcast address in routing

ip route 192.168.1.0 255.255.255.192 192.168.0.1    # 192.168.1.0/26 = Host 192.168.1.0 - 192.168.1.63
ip route 192.168.1.64 255.255.255.192 192.168.0.1   # 192.168.1.64/26 = Host 192.168.1.64 - 192.168.1.127
ip route 192.168.1.128 255.255.255.192 192.168.0.1  # 192.168.1.128/26 = Host 192.168.1.128 - 192.168.1.192