Cisco WS-C1912-A Hardware Installation Guide - Page 90

Specifying a Default Route: Example, Sample Output for the show ip route Command, Example

Page 90 highlights

Performing the Initial Configuration on the Router Chapter 5 Configuring the Router Step 4 Command or Action ip route dest-prefix mask next-hop-ip-address [admin-distance] [permanent] Purpose Establishes a static route. Step 5 Example: Router(config)# ip route 192.168.24.0 255.255.255.0 172.28.99.2 ip default-network network-number or ip route dest-prefix mask next-hop-ip-address Example: Router(config)# ip default-network 192.168.24.0 Selects a network as a candidate route for computing the gateway of last resort. Creates a static route to network 0.0.0.0 0.0.0.0 for computing the gateway of last resort. Step 6 Example: Router(config)# ip route 0.0.0.0 0.0.0.0 172.28.99.1 end Returns to privileged EXEC mode. Step 7 Example: Router(config)# end show ip route Example: Router# show ip route Displays the current routing table information. • Verify that the gateway of last resort is set. Examples Specifying a Default Route: Example ! ip routing ! ip route 192.168.24.0 255.255.255.0 172.28.99.2 ! ip default-network 192.168.24.0 ! Sample Output for the show ip route Command Router# show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default Gateway of last resort is 172.28.99.2 to network 192.168.24.0 172.24.0.0 255.255.255.0 is subnetted, 1 subnets C 172.24.192.0 is directly connected, FastEthernet0 S 172.24.0.0 255.255.0.0 [1/0] via 172.28.99.0 S* 192.168.24.0 [1/0] via 172.28.99.2 172.16.0.0 255.255.255.0 is subnetted, 1 subnets C 172.16.99.0 is directly connected, FastEthernet1 Router# 5-16 Cisco 1900 Series Hardware Installation OL-19084-02

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102

5-16
Cisco 1900 Series Hardware Installation
OL-19084-02
Chapter 5
Configuring the Router
Performing the Initial Configuration on the Router
Examples
Specifying a Default Route: Example
!
ip routing
!
ip route 192.168.24.0 255.255.255.0 172.28.99.2
!
ip default-network 192.168.24.0
!
Sample Output for the show ip route Command
Router#
show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
Gateway of last resort is 172.28.99.2 to network 192.168.24.0
172.24.0.0 255.255.255.0 is subnetted, 1 subnets
C
172.24.192.0 is directly connected, FastEthernet0
S
172.24.0.0 255.255.0.0 [1/0] via 172.28.99.0
S*
192.168.24.0 [1/0] via 172.28.99.2
172.16.0.0 255.255.255.0 is subnetted, 1 subnets
C
172.16.99.0 is directly connected, FastEthernet1
Router#
Step 4
ip route
dest-prefix mask
next-hop-ip-address
[
admin-distance
] [
permanent
]
Example:
Router(config)# ip route 192.168.24.0
255.255.255.0 172.28.99.2
Establishes a static route.
Step 5
ip default-network
network-number
or
ip route
dest-prefix mask
next-hop-ip-address
Example:
Router(config)# ip default-network 192.168.24.0
Example:
Router(config)# ip route 0.0.0.0 0.0.0.0
172.28.99.1
Selects a network as a candidate route for computing the
gateway of last resort.
Creates a static route to network 0.0.0.0 0.0.0.0 for
computing the gateway of last resort.
Step 6
end
Example:
Router(config)# end
Returns to privileged EXEC mode.
Step 7
show ip route
Example:
Router# show ip route
Displays the current routing table information.
Verify that the gateway of last resort is set.
Command or Action
Purpose