Академический Документы
Профессиональный Документы
Культура Документы
What is Routing?
RTA#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 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, L2 - IS-IS level-2, * - candidate default U - per-user static route, o - ODR Gateway of last resort is not set
RTA#
The Routing Table prior to any interface configuration The command to view the IP Routing table is: (priviledge or user mode)
192.168.2.0/24 RTA e0
172.16.0.0/16 s0 s0
RTB
192.168.1.0/24 s1
10.0.0.0/8 RTC e0
RTA(config)#inter e 0 RTA(config-if)#ip add 192.168.2.1 255.255.255.0 RTA(config-if)#no shutdown RTA#show ip route Codes: C - connected,.. <Other codes and gateway information omitted> C 192.168.2.0/24 is directly connected, Ethernet0 RTA #
Adding an ipaddress/mask to an interface tells the router that it is a member, Directly Connected" to that network just like when a host computer is configured with an ip address/mask. Notice the route is shown with the subnet mask and the exit-interface. Dont forget the no shutdown Dont forget the interface must be in up and up
s1
RTC
RTA#show ip route
Codes: C - connected,.. <Other codes and gateway information omitted> C C 172.16.0.0/16 is directly connected, Serial0 192.168.2.0/24 is directly connected, Ethernet0
RTB#show ip route Codes: C - connected,.. <Other codes and gateway information omitted> C C 172.16.0.0/16 is directly connected, Serial0 192.168.1.0/24 is directly connected, Serial1
RTC#show ip route Codes: C - connected,.. <Other codes and gateway information omitted> C C 10.0.0.0/8 is directly connected, Ethernet0 192.168.1.0/24 is directly connected, Serial1
172.16.0.0/16 s0 .1 .1 s0 .1 .2
192.168.1.0/24 RTB .2
s1
RTC
10.1.0.0/ 16 e0
RTA#show ip route C C !!!!! 172.16.0.0/16 is directly connected, Serial0 192.168.2.0/24 is directly connected, Ethernet0
RTA#ping 172.16.0.1
RTA#ping 172.16.0.2
!!!!! RTA#ping 192.168.1.1 .....
RTA#ping 192.168.1.2
..... RTA#ping 10.1.0.1 .....
Question: If RTA can ping RTBs 172.16.0.2 interface why cant it ping RTBs 192.168.1.1 interface?
Answer: Routers can only reach networks known about in its own
routing table.
Routing Types
Hoboken#show ip route Codes: C - connected, S - static, S C 172.16.1.0/24 [1/0] is directly connected, Serial0 192.168.2.0/24 is directly connected, Ethernet0
ip route command
RTR(config)# ip route prefix mask{address|
interface} [distance] prefix IP route prefix for the destination. mask Prefix mask for the destination. IP address of the next hopthat can be used to reach address that network.
interface
Static Routes
Configured unidirectional static routes to and from a stub network to allow communications to occur.
This is a unidirectional route. You must have a route configured in the opposite direction. With point-to-point serial links, you can also configure the outgoing interface instead of the next-hop IP address.
Default Routes
This route allows the stub network to reach all known networks beyond router A.
RTB#show iproute Gateway of last resort is 172.16.2.2 to network 0.0.0.0 172.16.0.0/16 is subnetted, 1 subnets C C S* 172.16.1.0/24 is directly connected, Ethernet0 172.16.2.0/24 is directly connected, Serial1 0.0.0.0/0 [1/0] via 172.16.2.2
Baypointe
Lets configure three static routes on Baypointe using either an intermediateaddress or exit interface:
.1 E0
172.16.1.0/2 4
Hub .1 E0 SanJose1 S0 S1 .2
172.16.2.0/2 4
192.168.1.0/2 4
.1 S0 SanJose2 S0
.1 Baypointe E0 .1
Hub
172.16.3.0/2 4
192.168.2.0/2 4
Hub
Host 2 Host 3 Baypointe(config)# ip route 172.16.1.0 255.255.255.0 192.168.1.2 Baypointe(config)# ip route 172.16.2.0 255.255.255.0 192.168.1.2 Baypointe(config)# ip route 172.16.3.0 255.255.255.0 192.168.1.2