38
Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

  • View
    234

  • Download
    5

Embed Size (px)

Citation preview

Page 1: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Understanding The Routing Table

Part 1: The Routing Table Structure

Part 2: The Lookup Process

Rick Graziani

Cabrillo College

Page 2: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 2

The Routing Table on PDF

• Instructors and Students: Complete information explanations associated with this PowerPoint can be found on my web site.

Understanding the Routing Table

• The Routing Table: Part 1 or 2 - The Routing Table Structure (PDF) 

• The Routing Table: Part 2 or 2 - The Routing Table Lookup Process (PDF) 

• Discard Routes - Avoiding Routing Loops (PowerPoint)

Page 3: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Part 1: The Routing Table Structure

Page 4: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 4

Directly Connected Networks

RouterB#show ip routeCodes: 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, ia - IS-IS inter

area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set RouterB#

Router B Router CRouter A

s0 s0 s0s1

fa0 fa0 fa0

172.16.1.0/24

172.16.2.0/24

172.16.3.0/24 172.16.4.0/24

192.168.1.0/24.1

.1 .2

.1

.1

.1

.2

Page 5: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 5

Directly Connected Networks

RouterB#debug ip routing

RouterB(config)#interface s 1

RouterB(config-if)#ip add 192.168.1.1 255.255.255.0

RouterB(config-if)#no shutdown

00:59:48: %LINK-3-UPDOWN: Interface Serial1, changed state to up

00:59:48: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1, changed state

to up

00:59:48: RT: add 192.168.1.0/24 via 0.0.0.0, connected metric [0/0]

00:59:48: RT: interface Serial1 added to routing table

RouterB(config-if)#end

RouterB#undebug all

All possible debugging has been turned off

RouterB#

Page 6: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 6

Directly Connected Networks

RouterB#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

<text omitted>

 

Gateway of last resort is not set

 

C 192.168.1.0/24 is directly connected, Serial1

RouterB#

Page 7: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 7

Creating a Parent/Child Route

RouterB(config)#interface fastethernet 0RouterB(config-if)#ip add 172.16.3.1 255.255.255.0RouterB(config-if)#no shutdown01:21:11: RT: add 172.16.3.0/24 via 0.0.0.0, connected metric [0/0]01:21:11: RT: interface FastEthernet0 added to routing tableRouterB(config-if)#endRouterB#undebug allAll possible debugging has been turned offRouterB#RouterB#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile,<text omitted> Gateway of last resort is not set  172.16.0.0/24 is subnetted, 1 subnetsC 172.16.3.0 is directly connected, FastEthernet0C 192.168.1.0/24 is directly connected, Serial1RouterB#

Page 8: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 8

Parent, Child, Ultimate Routes

So far on Router B:

Parent Route: 172.16.0.0/24 is subnetted, 1 subnets

Child Route: C 172.16.3.0 is directly connected, FastEthernet0

Ultimate Route: C 192.168.1.0/24 is directly connected, Serial1

Router B Router CRouter A

s0 s0 s0s1

fa0 fa0 fa0

172.16.1.0/24

172.16.2.0/24

172.16.3.0/24 172.16.4.0/24

192.168.1.0/24.1

.1 .2

.1

.1

.1

.2

Page 9: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 9

Creating Another Child Route

RouterB(config)#inter s 0

RouterB(config-if)#ip add 172.16.2.2 255.255.255.0

RouterB(config-if)#end

 

RouterB#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

<text omitted>

 

Gateway of last resort is not set

 

172.16.0.0/24 is subnetted, 2 subnets

C 172.16.2.0 is directly connected, Serial0

C 172.16.3.0 is directly connected, FastEthernet0

C 192.168.1.0/24 is directly connected, Serial1

RouterB#

Page 10: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 10

Same structure no matter the source of route

RouterB#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

<text omitted>

 

Gateway of last resort is not set

 

172.16.0.0/24 is subnetted, 4 subnets

S 172.16.4.0 is directly connected, Serial1

R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:08, Serial0

C 172.16.2.0 is directly connected, Serial0

C 172.16.3.0 is directly connected, FastEthernet0

10.0.0.0/16 is subnetted, 1 subnets

S 10.1.0.0 is directly connected, Serial1

C 192.168.1.0/24 is directly connected, Serial1

S 192.168.100.0/24 is directly connected, Serial1

RouterB#

Page 11: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 11

Static Routes and Recursive Lookups

RouterA#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP<text omitted> Gateway of last resort is not set  172.16.0.0/24 is subnetted, 2 subnetsC 172.16.1.0 is directly connected, FastEthernet0C 172.16.2.0 is directly connected, Serial0RouterA#RouterA(config)#ip route 172.16.3.0 255.255.255.0 172.16.2.203:12:45: RT: add 172.16.3.0/24 via 172.16.2.2, static metric [1/0]RouterA(config)#

Router B Router CRouter A

s0 s0 s0s1

fa0 fa0 fa0

172.16.1.0/24

172.16.2.0/24

172.16.3.0/24 172.16.4.0/24

192.168.1.0/24.1

.1 .2

.1

.1

.1

.2

Page 12: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 12

Static Routes and Recursive Lookups

RouterA#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

<text omitted>

 

Gateway of last resort is not set

 

172.16.0.0/24 is subnetted, 3 subnets

C 172.16.1.0 is directly connected, FastEthernet0

C 172.16.2.0 is directly connected, Serial0

S 172.16.3.0 [1/0] via 172.16.2.2

RouterA#

First lookup of 172.16.3.0:

S 172.16.3.0 [1/0] via 172.16.2.2

Second lookup of 172.16.2.0:

C 172.16.2.0 is directly connected, Serial0

Page 13: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 13

Static Routes without Recursive Lookup

RouterB(config)#ip route 172.16.1.0 255.255.255.0 serial 005:05:30: RT: add 172.16.1.0/24 via 0.0.0.0, static metric [1/0]RouterB(config)#RouterB#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP<text omitted> Gateway of last resort is not set  172.16.0.0/24 is subnetted, 3 subnetsS 172.16.1.0 is directly connected, Serial0C 172.16.2.0 is directly connected, Serial0C 172.16.3.0 is directly connected, FastEthernet0C 192.168.1.0/24 is directly connected, Serial1RouterB#

Router B Router CRouter A

s0 s0 s0s1

fa0 fa0 fa0

172.16.1.0/24

172.16.2.0/24

172.16.3.0/24 172.16.4.0/24

192.168.1.0/24.1

.1 .2

.1

.1

.1

.2

Page 14: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 14

Static Routes and Administrative Distance

You might have also noticed that the routing table states that this static route is “directly connected.”

S 172.16.1.0 is directly connected, Serial0

 

• In the case of a static route, directly connected means that the static route was configured with an exit interface.

• This does not mean that it is a directly connected network like an interface on the router.

• Like all static routes, the default administrative distance of this static route is still “1”.

• Only directly connected interfaces, (which have a code of “C” in the routing table) can have an administrative distance of “0”.

• Although it is possible to modify the administrative distance of static and dynamic routes, they cannot be given the administrative distance of “0”.

• Likewise, directly connected interfaces can only have an administrative distance of “0”.

Page 15: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 15

Static Routes via Ethernet Interfaces

RouterB(config)#ip route 172.16.1.0 255.255.255.0 172.16.2.1RouterB(config)#end RouterB#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP<text omitted> Gateway of last resort is not set  172.16.0.0/24 is subnetted, 3 subnetsS 172.16.1.0/24 [1/0] via 172.16.2.1  C 172.16.2.0 is directly connected, FastEthernet1C 172.16.3.0 is directly connected, FastEthernet0C 192.168.1.0/24 is directly connected, Serial1RouterB#

Router B Router CRouter A

fa1 fa1 s0s1

fa0 fa0 fa0

172.16.1.0/24

172.16.2.0/24

172.16.3.0/24 172.16.4.0/24

192.168.1.0/24.1

.1 .2

.1

.1

.1

.2

Page 16: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 16

Static Routes via Ethernet Interfaces

RouterB(config)#ip route 172.16.1.0 255.255.255.0 fastethernet 1 172.16.2.1

RouterB(config)#end

 

RouterB#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

<text omitted>

 

Gateway of last resort is not set

 

172.16.0.0/24 is subnetted, 3 subnets

S 172.16.1.0/24 [1/0] via 172.16.2.1 FastEthernet1 

C 172.16.2.0 is directly connected, FastEthernet1

C 172.16.3.0 is directly connected, FastEthernet0

C 192.168.1.0/24 is directly connected, Serial1

RouterB#

Page 17: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 17

VLSM

RouterX#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

<text omitted>

 

Gateway of last resort is not set

 

172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks

C 172.16.1.4/30 is directly connected, Serial0

C 172.16.1.8/30 is directly connected, Serial1

C 172.16.3.0/24 is directly connected, FastEthernet0

RouterX#

Router X

s0 s1

fa0172.16.1.4/30

172.16.3.0/24

.5

.1

.9172.16.1.8/30

Page 18: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Part 2: The Lookup Process

Page 19: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 19

Subnet Mask = # of bits that must match

RouterA#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP<text omitted> Gateway of last resort is not set  172.16.0.0/24 is subnetted, 3 subnetsC 172.16.1.0 is directly connected, FastEthernet0C 172.16.2.0 is directly connected, Serial0R 172.16.3.0 [120/1] via 172.16.2.2, 00:00:00, Serial0R 192.168.1.0/24 [120/1] via 172.16.2.2, 00:00:00, Serial0RouterA#

Figure 2 IP Packet

192.168.1.10 11000000

10101000

00000001

00001010

16 bits must match, but only one bit matches.

Parent Route

172.16.0.0

10101100

00010000

00000000

00000000

Page 20: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 20

Subnet Mask = # of bits that must match

RouterA#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

<text omitted>

 

Gateway of last resort is not set

 

172.16.0.0/24 is subnetted, 3 subnets

C 172.16.1.0 is directly connected, FastEthernet0

C 172.16.2.0 is directly connected, Serial0

R 172.16.3.0 [120/1] via 172.16.2.2, 00:00:00, Serial0

R 192.168.1.0/24 [120/1] via 172.16.2.2, 00:00:00, Serial0

RouterA#

Figure 3 IP Packet

192.168.1.10

11000000

10101000

00000001

00001010

These 24 bits match!

Ultimate Route

192.168.1.0

11000000

10101000

00000001

00000000

Page 21: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 21

Parent then Children

RouterA#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B -

BGP<text omitted> Gateway of last resort is not set  172.16.0.0/24 is subnetted, 3 subnetsC 172.16.1.0 is directly connected, FastEthernet0C 172.16.2.0 is directly connected, Serial0R 172.16.3.0 [120/1] via 172.16.2.2, 00:00:00, Serial0R 192.168.1.0/24 [120/1] via 172.16.2.2, 00:00:00, Serial0RouterA#

IP Packet

172.16.3.10

10101100

00010000

00000011

00001010

These 16 bits match!

Parent Route

172.16.0.0

10101100

00010000

00000000

00000000

Page 22: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 22

RouterA#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP<text omitted> Gateway of last resort is not set  172.16.0.0/24 is subnetted, 3 subnetsC 172.16.1.0 is directly connected, FastEthernet0C 172.16.2.0 is directly connected, Serial0R 172.16.3.0 [120/1] via 172.16.2.2, 00:00:00, Serial0R 192.168.1.0/24 [120/1] via 172.16.2.2, 00:00:00, Serial0RouterA#

Figure 6 (child routes shown in different order than with ‘show ip route’) IP Packet

172.16.3.10

10101100

00010000

00000011

00001010

These 24 bits match!

Child Route

172.16.3.0

10101100

00010000

00000011

00000000

Child Route

172.16.1.0

10101100

00010000

00000001

00000000

Child Route

172.16.2.0

10101100

00010000

00000010

00000000

Page 23: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 23

The Default Route

RouterB(config)#ip route 0.0.0.0 0.0.0.0 serial1

RouterB(config)#end

 

RouterB#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

<text omitted>

 

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

 

172.16.0.0/24 is subnetted, 3 subnets

R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:13, Serial0

C 172.16.2.0 is directly connected, Serial0

C 172.16.3.0 is directly connected, FastEthernet0

C 192.168.1.0/24 is directly connected, Serial1

S* 0.0.0.0/0 is directly connected, Serial1

RouterB#

Page 24: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 24

Classful Routing Behavior

RouterB#show running-config

Building configuration...

 

Current configuration:

!

version 11.2

!

<text omitted>

!

no ip classless

!

<text omitted>

Page 25: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 25

Classful Routing Behavior

RouterB#show ip routeGateway of last resort is 0.0.0.0 to network 0.0.0.0  172.16.0.0/24 is subnetted, 3 subnetsR 172.16.1.0 [120/1] via 172.16.2.1, 00:00:13, Serial0C 172.16.2.0 is directly connected, Serial0C 172.16.3.0 is directly connected, FastEthernet0C 192.168.1.0/24 is directly connected, Serial1S* 0.0.0.0/0 is directly connected, Serial1RouterB#

IP Packet

172.16.4.10

10101100

00010000

00000100

00001010

No match!

Child Route

172.16.3.0

10101100

00010000

00000011

00000000

Child Route

172.16.1.0

10101100

00010000

00000001

00000000

Child Route

172.16.2.0

10101100

00010000

00000010

00000000

Page 26: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 26

Classful Routing Behavior

Routing Behavior: classful (no ip classless)

Packet’s Destination IP Address: 172.16.4.10

 

RouterB#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP,

<text omitted>

 

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

 

1. Match 172.16.0.0/24 is subnetted, 3 subnets

2. No Match R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:13, Serial0

3. No Match C 172.16.2.0 is directly connected, Serial0

4. No Match C 172.16.3.0 is directly connected, FastEthernet0

C 192.168.1.0/24 is directly connected, Serial1

5. Drop Packet S* 0.0.0.0/0 is directly connected, Serial1

RouterB#

Page 27: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 27

Classless Routing Behavior

RouterB#show running-config

Building configuration...

 

Current configuration:

!

version 11.3

!

<text omitted>

!

ip classless

!

<text omitted>

Page 28: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 28

Classless Routing Behavior

RouterB#show ip routeGateway of last resort is 0.0.0.0 to network 0.0.0.0  172.16.0.0/24 is subnetted, 3 subnetsR 172.16.1.0 [120/1] via 172.16.2.1, 00:00:13, Serial0C 172.16.2.0 is directly connected, Serial0C 172.16.3.0 is directly connected, FastEthernet0C 192.168.1.0/24 is directly connected, Serial1S* 0.0.0.0/0 is directly connected, Serial1RouterB#

IP Packet

172.16.4.10

10101100

00010000

00000100

00001010

No match!

Child Route

172.16.3.0

10101100

00010000

00000011

00000000

Child Route

172.16.1.0

10101100

00010000

00000001

00000000

Child Route

172.16.2.0

10101100

00010000

00000010

00000000

Page 29: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 29

Classless Routing Behavior

Routing Behavior: classless (ip classless)

Packet’s Destination IP Address: 172.16.4.10

 

RouterB#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP,

<text omitted>

 

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

 

1. Match 172.16.0.0/24 is subnetted, 3 subnets

2. No Match R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:13, Serial0

3. No Match C 172.16.2.0 is directly connected, Serial0

4. No Match C 172.16.3.0 is directly connected, FastEthernet0

C 192.168.1.0/24 is directly connected, Serial1

5. Match! S* 0.0.0.0/0 is directly connected, Serial1

RouterB#

Page 30: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 30

Classless and Classful Routing Behavior

Changing the default routing behavior, whether classful or classless, is simple. The command to enable classless routing behavior is:

 

RouterB(config)#ip classless

RouterB(config)#

 

The command to disable classless routing behavior, in other words, enable classful routing behavior is:

 

RouterB(config)#no ip classless

RouterB(config)#

 

Use show running-config to verify which command is in affect.

Page 31: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 31

/16 Classful Routes

RouterC(config)#interface loopback1

RouterC(config-if)#ip add 172.20.0.1 255.255.0.0

RouterC(config-if)#exit

RouterC(config)#interface loopback2

RouterC(config-if)#ip add 172.30.0.1 255.255.0.0

RouterC(config-if)#exit

 

RouterC#show ip inter brief

Interface IP-Address OK? Method Status Protocol

FastEthernet0 172.16.4.1 YES NVRAM up up

Loopback1 172.20.0.1 YES manual up up

Loopback2 172.30.0.1 YES manual up up

Serial0 192.168.1.2 YES NVRAM up up

RouterC#

s0 s0 s0s1

fa0 fa0 fa0

172.16.1.0/24

172.16.2.0/24

172.16.3.0/24 172.16.4.0/24

192.168.1.0/24.1

.1 .2

.1

.1

.1

.2

172.16.10.0/24 lo1

172.16.20.0/24 lo2

172.16.30.0/24 lo3

172.16.40.0/24 lo4

Page 32: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 32

/16 Classful Routes

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

<text omitted>

 

Gateway of last resort is not set

 

172.16.0.0/16 is variably subnetted, 6 subnets, 2 masks

C 172.16.4.0/24 is directly connected, FastEthernet0

S 172.16.0.0/16 is directly connected, Serial0

C 172.20.0.0/16 is directly connected, Loopback1

C 172.30.0.0/16 is directly connected, Loopback2

C 192.168.1.0/24 is directly connected, Serial0

RouterC#

s0 s0 s0s1

fa0 fa0 fa0

172.16.1.0/24

172.16.2.0/24

172.16.3.0/24 172.16.4.0/24

192.168.1.0/24.1

.1 .2

.1

.1

.1

.2

172.16.10.0/24 lo1

172.16.20.0/24 lo2

172.16.30.0/24 lo3

172.16.40.0/24 lo4

Page 33: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 33

Static Routes to Supernets

RouterB(config)#ip route 172.0.0.0 255.0.0.0 serial1

RouterB(config)#ip route 160.0.0.0 240.0.0.0 serial1

RouterB(config)#end

RouterB#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

<text omitted>

 

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

 

172.16.0.0/24 is subnetted, 3 subnets

R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:20, Serial0

C 172.16.2.0 is directly connected, Serial0

C 172.16.3.0 is directly connected, FastEthernet0

C 192.168.1.0/24 is directly connected, Serial1

S 172.0.0.0/8 is directly connected, Serial1

S 160.0.0.0/4 is directly connected, Serial1

S* 0.0.0.0/0 is directly connected, Serial1

RouterB#

Page 34: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 34

Supernets

RouterB#show ip route 

172.16.0.0/24 is subnetted, 3 subnets

R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:20, Serial0

C 172.16.2.0 is directly connected, Serial0

C 172.16.3.0 is directly connected, FastEthernet0

C 192.168.1.0/24 is directly connected, Serial1

S 172.0.0.0/8 is directly connected, Serial1

S 160.0.0.0/4 is directly connected, Serial1

S* 0.0.0.0/0 is directly connected, Serial1

RouterB#

IP Packet

172.16.4.10

10101100

00010000

00000100

00001010

No match!

Child Route

172.16.3.0

10101100

00010000

00000011

00000000

Child Route

172.16.1.0

10101100

00010000

00000001

00000000

Child Route

172.16.2.0

10101100

00010000

00000010

00000000

Page 35: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 35

Supernets – 172.0.0.0 best match

RouterB#show ip route  172.16.0.0/24 is subnetted, 3 subnetsR 172.16.1.0 [120/1] via 172.16.2.1, 00:00:20, Serial0C 172.16.2.0 is directly connected, Serial0C 172.16.3.0 is directly connected, FastEthernet0C 192.168.1.0/24 is directly connected, Serial1S 172.0.0.0/8 is directly connected, Serial1S 160.0.0.0/4 is directly connected, Serial1S* 0.0.0.0/0 is directly connected, Serial1RouterB#

IP Packet

172.16.4.10

10101100

00010000

00000100

00001010

Longest-bit-match! (11 bits match, 8 bits minimum)

Supernet

172.0.0.0/8

10101100

00000000

00000000

00000000

Supernet

160.0.0.0/4

10100000

00000000

00000000

00000000

Default

0.0.0.0/0

00000000

00000000

00000000

00000000

Page 36: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 36

Supernets – 160.0.0.0 best match

RouterB#show ip route 

172.16.0.0/24 is subnetted, 3 subnets

R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:20, Serial0

C 172.16.2.0 is directly connected, Serial0

C 172.16.3.0 is directly connected, FastEthernet0

C 192.168.1.0/24 is directly connected, Serial1

S 160.0.0.0/4 is directly connected, Serial1

S* 0.0.0.0/0 is directly connected, Serial1

RouterB#

IP Packet

172.16.4.10

10101100

00010000

00000100

00001010

Longest-bit-match! (4 bits)

Supernet

160.0.0.0/4

10100000

00000000

00000000

00000000

Default

0.0.0.0/0

00000000

00000000

00000000

00000000

Page 37: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 37

The last of the Supernets – 0.0.0.0/0

RouterB#show ip route 

172.16.0.0/24 is subnetted, 3 subnets

R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:20, Serial0

C 172.16.2.0 is directly connected, Serial0

C 172.16.3.0 is directly connected, FastEthernet0

C 192.168.1.0/24 is directly connected, Serial1

S* 0.0.0.0/0 is directly connected, Serial1

RouterB#

IP Packet

172.16.4.10

10101100

00010000

00000100

00001010

Match! Zero bits needed to match, which still makes it a

match! Default

0.0.0.0/0

00000000

00000000

00000000

00000000

Page 38: Understanding The Routing Table Part 1: The Routing Table Structure Part 2: The Lookup Process Rick Graziani Cabrillo College

Rick Graziani [email protected] 38

The Routing Table on PDF

• Complete information explanations associated with this PowerPoint can be found on my web site.

Understanding the Routing Table

• The Routing Table: Part 1 or 2 - The Routing Table Structure (PDF) 

• The Routing Table: Part 2 or 2 - The Routing Table Lookup Process (PDF) 

• Discard Routes - Avoiding Routing Loops (PowerPoint)