1 sybex ccna 640-802 chapter 6: ip routing. chapter 6 objectives understanding ip routing static...

132
1 Sybex CCNA 640-802 Chapter 6: IP Routing

Upload: gillian-norman

Post on 14-Jan-2016

234 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

1

Sybex CCNA 640-802Chapter 6: IP Routing

Page 2: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Chapter 6 Objectives• Understanding IP routing• Static routing• Default routing• Dynamic routing

– RIP– RIPv2– IGRP– Verifying routing

– [Oddly, the exam topics covered in this chapter (6) are listed at the beginning of the chapter. Some of the topics listed are not really covered in this chapter at all. For example, OSPF and EIGRP are covered in chapter 7, not chapter 6. ]

22

Page 3: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

What is Routing?

3 - 329

In order to “route”, a router needs to know:– Remote Networks– Neighbor Routers– All Possible routes to remote network– The absolute best route to all remote networks– Maintain and verify the routing information– Remember: a router does not deal with hosts!– A router only deals with networks, and the best path to them– An IP address allows packets to move from network to network– Hardware (Mac) addresses move the packets to specific hosts

C B AD

Page 4: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Basic Path Selection

4

On what interface will the router send out a packet if it has destination address of 10.10.10.18?

Page 5: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Simple IP Routing

5

172.16.1.0

BA

172.16.2.0

172.16.2.2

172.16.1.2172.16.2.1 172.16.1.1

e0 e0

>ping 172.16.1.2>ping 172.16.1.2

B

172.16.3.1 172.16.3.2

s0s0

Host A

Host B

Page 6: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Routing/PDU Example:Host A Web browses to the HTTP Server….

S1S0

E0

2600

Lab_BLab_AE0

Host A

HTTP Server6

3. The destination port number in a segment header will have a value of 80 (the port number used by HTTP)

1. The destination address of a frame will be the: Host A address2. The destination IP address of a packet will be the IP address of the: Destination Router

Page 7: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Idea of routing (5 guest slides)

• Routers forward datagrams between connected networks

• They need to know via which interface to send a datagram

• Routing decisions are based on the information stored in the routing table

Page 8: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Routing table

• Tells where to send datagram for a particular network

Network Next-Hop Port Metric

194.181.200.0 194.181.208.1 Eth0 1193.2.1.0 194.181.208.320 Eth1 14153.5.0.0 194.181.214.25 Fddi0 80.0.0.0 194.181.210.1 S0 5

“Next-Hop” routers must be directly reachable

Page 9: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Routing table (cont.)

• Default Route - a special entry in the routing table:– “Pass all datagrams for unknown networks to this

router”– Represented by the entry for network 0.0.0.0

• Routing uses network part of the address!

Page 10: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Step-by-Step: IP Routing Process (book, pp 331-36)

• The IP routing process is fairly simple and doesn’t change, regardless of the size of your network.

• For an example, we’ll use Figure 6.2 to describe step-by-step what happens when Host_A wants to communicate with Host_B on a different network

12 / 331

Page 11: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Step 1• Internet Control Message Protocol (ICMP)

creates an “echo request” payload (which is just the alphabet in the data field).

– The echo request is the first part/half of what is commonly called a “Ping”; the second part is the echo reply, from the device being “pinged”.

• [So, A is going to “ping” B]

13

Page 12: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Step 2• ICMP hands that payload to Internet Protocol

(IP), which then creates a packet. • At a minimum, this packet contains an IP source

address, an IP destination address, and a Protocol field with 01h.

• (Remember that Cisco likes to use 0x in front of hex characters, so this could look like 0x01.)

• All of that tells the receiving host to whom it should hand the payload when the destination is reached—in this example, ICMP.

14

Page 13: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Step 3• Once the packet is created, IP determines

whether the destination IP address is on the local network or a remote one.

15

Page 14: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Step 4• Since IP determines that this is a remote

request, the packet needs to be sent to the default gateway so the packet can be routed to the remote network.

• The Registry in Windows is “parsed” to find the configured default gateway.

16

Page 15: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• The default gateway of host 172.16.10.2 (Host_A) is configured to 172.16.10.1. For this packet to be sent to the default gateway, the hardware address of the router’s interface Ethernet 0 (configured with the IP address of 172.16.10.1) must be known.

• Why? So the packet can be handed down to the Data Link layer, framed, and sent to the router’s interface that’s connected to the 172.16.10.0 network.

• Because hosts only communicate via hardware addresses on the local LAN, it’s important to recognize that for Host_A to communicate to Host_B, it has to send packets to the Media Access Control (MAC) address of the default gateway.

17

Step 5

Page 16: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• Next, the Address Resolution Protocol (ARP) cache of the host is checked to see if the IP address of the default gateway has already been resolved to a hardware address. Two possibilities ensue:

• 1. If it has, the packet is then free to be handed to the Data Link layer for framing. (The hardware destination address is also handed down with that packet.) To view the ARP cache on your host, use the following command:

• C:\>arp -a• Interface: 172.16.10.2 --- 0x3• Internet Address Physical Address Type• 172.16.10.1 00-15-05-06-31-b0 dynamic• 2. If the hardware address isn’t already in the ARP cache of the host, an ARP

broadcast is sent out onto the local network to search for the hardware address of 172.16.10.1. The router responds to the request and provides the hardware address of Ethernet 0, and the host caches this address.

18

Step 6

Page 17: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• Once the packet and destination hardware address are handed to the Data Link layer, the LAN driver is used to provide media access via the type of LAN being used (in this example, Ethernet). A LAN driver provides communication control between the NOS and NIC (network interface card).

• A frame is then generated, encapsulating the packet with control info.• Within that frame are the hardware destination and source addresses

plus, in this case, an Ether-Type field that describes the Network layer protocol that handed the packet to the Data Link layer—in this instance, IP.

• At the end of the frame is that Frame Check Sequence (FCS) field that houses the result of the cyclic redundancy check (CRC).

• The frame would look something like what is detailed in Figure 6.3. It contains Host_A’s hardware (MAC) address and the destination hardware address of the default gateway. It does not include the remote host’s MAC address—remember that!

19

Step 7

Destination MAC Source MACEther-Type

fieldPacket

 FCS

(CRC)(routers E0 MAC address) (Host_A MAC address)

FIGURE 6 . 3Frame used from Host_A to the Lab_A router when Host_B is pinged

Page 18: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Once the packet and destination hardware

address are handed to the Data

Link layer, the LAN driver is used to provide media

access via the type of LAN being

used (in this example,

Ethernet). A frame is then

generated, encapsulati

ng the packet with

control information.

Within that frame are the

hardware destination and source addresses

plus, in this case, an

Ether-Type field that

describes the Network

layer protocol that handed the packet to the

Data Link layer—in

this instance, IP.

At the end of the frame is the Frame

Check Sequence (FCS) field that houses the result of the cyclic

redundancy check (CRC).

The frame would look something like what is detailed in

Figure 6.3. It contains Host_A’s hardware

(MAC) address and

the destination hardware address of the default gateway. It does not

include the remote host’s

MAC address—remember

that!

20

Step 7

Destination MAC Source MACEther-Type

fieldPacket

 FCS

(CRC)(routers E0 MAC address) (Host_A MAC address)

FIGURE 6 . 3Frame used from Host_A to the Lab_A router when Host_B is pinged

Page 19: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Once the frame is completed, it’s handed down to the Physical layer to be put on the physical medium (in this example, twisted-pair wire) one bit at a time.

21

Step 8

Page 20: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Every device in the collision domain receives these bits and builds the frame. They each run a CRC and check the answer in the FCS field.

If the answers don’t match, the frame is discarded.

If the CRC matches, then the hardware destination address is checked to see if it matches too (which, in this example, is the router’s interface Ethernet 0).

If it’s a match, then the Ether-Type field is checked to find the protocol used at the

Network layer.

22

Step 9

Page 21: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

23

Step 10• The packet is pulled from the frame, and what

is left of the frame is discarded. • The packet is handed to the protocol listed in

the Ether-Type field — i.e., it’s given to IP.– [So now the packet is at the router, having entered at

interface E0, the default gateway for the 172.16.10.0 network.

– Next, the router will try to send the packet to its destination in the 172.16.20.0 network.

– To do so, it will have to find this network in its routing tables.]

Page 22: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• IP receives the packet and checks the IP destination address.

• Since the packet’s destination address doesn’t match any of the addresses configured on the receiving router itself, the router will look up the destination IP network address in its routing table.

24

Step 11

Page 23: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• The routing table must have an entry for the network 172.16.20.0 or the packet will be discarded immediately and an ICMP message will be sent back to the originating device with a “destination network unreachable” message.– [Note that 172.16.x.x is a Class B network. .10

and .20 would ordinarily be part of the same network and therefore couldn’t be set up on 2 networks. But this network is subnetted, i.e., the subnet mask is 255.255.255.0.

25

Step 12

Page 24: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• If the router does find an entry for the destination network in its table, the packet is switched to the exit interface—in this example, interface Ethernet 1.

• The output below (next slide) displays the Lab_A router’s routing table. The “C” means “directly connected.”

• No routing protocols are needed in this network since all (both) networks are directly connected.

26

Step 13

Page 25: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• Lab_A>sh ip route• Codes: C – connected , S – static , I - IGRP,R - RIP,M - mobile,

– 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 intearea * - candidate default, U - per-user static route, o – ODR P - periodic downloaded static route

• Gateway of last resort is not set• 172.16.0.0/24 is subnetted, 2 subnets• C 172.16.10.0 is directly connected, Ethernet0• C 172.16.20.0 is directly connected, Ethernet1

27

Step 13 (continued)

Page 26: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• The router packet-switches the packet to the Ethernet 1 buffer.– [OK, ready to go out to Host_B, but first …]

28

Step 14

Page 27: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• The Ethernet 1 buffer needs to know the hardware address of the destination host and first checks the ARP cache.– If the hardware address of Host_B has already been resolved and is in

the router’s ARP cache, then the packet and the hardware address are handed down to the Data Link layer to be framed.

– Let’s take a look at the ARP cache on the Lab_A router by using the “show ip arp” command:

• Lab_A#sh ip arp• Protocol Address Age(min) Hardware Addr Type Interface• Internet 172.16.20.1 - 00d0.58ad.05f4 ARPA Ethernet0• Internet 172.16.20.2 3 0030.9492.a5dd ARPA Ethernet0• Internet 172.16.10.1 - 00d0.58ad.06aa ARPA Ethernet0• Internet 172.16.10.2 12 0030.9492.a4ac ARPA Ethernet0

– The dash (-) means that this is the physical interface on the router.

29

Step 15

Page 28: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• From the output in the previous slide, we can see that the router knows the 172.16.10.2 (Host_A) and 172.16.20.2 (Host_B) hardware addresses. – Cisco routers will keep an entry in the ARP table for 4 hours.

• If the hardware address has not already been resolved, the router sends an ARP request out E1 looking for the hardware address of 172.16.20.2.

• Host_B responds with its hardware address, and the packet and destination hardware address are both sent to the Data Link layer for framing.

30

Step 15 (continued)

Page 29: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• The Data Link layer creates a frame with the destination and source hardware address, Ether-Type field, and FCS field at the end. – [Still a small packet – just four fields]

• The frame is handed to the Physical layer to be sent out on the physical medium one bit at a time.– [Now we see packets actually going to Host_B]

31

Step 16

Page 30: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• Host_B receives the frame and immediately runs a CRC. [finally!!]

• If the result matches what’s in the FCS field, the “hardware destination address” is then checked. If the host finds a match, the Ether-Type field is then checked to determine the protocol that the packet should be handed to at the Network layer — IP in this example.– [IP is by far the most common Layer 3 protocol.]– [Moving up the OSI model. Data Link to Network]

mas

s

Step 17

Page 31: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• At the Network layer, IP receives the packet and checks the IP destination address.

• Since there’s finally a match made, the Protocol field is checked to find out to whom the payload should be given.

33

Step 18

Page 32: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• The payload is handed to ICMP, which understands that this is an echo request.

• ICMP responds to this by immediately discarding the packet and generating a new payload as an echo reply.

34

Step 19

Page 33: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• A packet is then created, including the – source and destination addresses, – Protocol field, and – payload.

• The destination device is now Host_A

35

Step 20

Page 34: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• IP then checks to see whether the destination IP address is a device on the local LAN or on a remote network.

• Since the destination device is on a remote network, the packet needs to be sent to the default gateway.

36

Step 21

Page 35: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• The default gateway IP address is found in the Registry of the Windows device, and the ARP cache is checked to see if the hardware address has already been resolved from an IP address.– You can search the Registry by going into the

Registry Editor (start/Run/regedit), then searching for “DefaultGateway” (F3 – enter search parameters).

– See “Default” / “DHCP Default Gateway” next slide

37

Step 22

Page 36: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

38

Step 22 (continued)

Above is a view of my home computer’s Registry settings: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\longkey\Parameters\Tcpip

Page 37: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• Once the hardware address of the default gateway is found, the packet and destination hardware addresses are handed down to the Data Link layer for framing.

39

Step 23

Page 38: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• The Data Link layer frames the packet of information and includes the following in the header:1. The destination & source hardware addresses

2. The Ether-Type field [with 0x0800 (IP) in it]

3. The FCS field with the CRC result in tow

40

Step 24

Page 39: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• The frame is now handed down to the Physical layer to be sent out over the network medium one bit at a time.

41

Step 25

Page 40: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• The router’s Ethernet 1 interface receives the bits and builds a frame.

• The CRC is run, and the FCS field is checked to make sure the answers match.

42

Step 26

Page 41: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• Once the CRC is found to be okay, the hardware destination address is checked.

• Since the router’s interface is a match, the packet is pulled from the frame and the Ether-Type field is checked to see to what protocol at the Network layer the packet should be delivered.

43

Step 27

Page 42: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• The protocol is determined to be IP, so it gets the packet.

• IP runs a CRC check on the IP header first and then checks the destination IP address.– IP does not run a complete CRC as the Data Link

layer does—it only checks the header for errors.

44

Step 28

Page 43: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Since the IP destination address doesn’t match

any of the router’s interfaces, the routing table is checked to see

whether it has a route to 172.16.10.0.

If it doesn’t have a route over to the

destination network the packet will be

discarded immediately

This is the source-point of confusion for a lot of administrators—when a ping fails, most people think the packet never

reached the destination host.

But as we see here, that’s not always the

case!

All it takes is for just one of the remote routers to be lacking a route back

to the originating host’s network and

— poof ! — the packet is dropped on the return trip, not on its way to the host.

45

Informational note: Between 29 and 30

Page 44: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Just a quick note to mention that if the packet is lost on

the way back to the originating host, you will

typically see a “request timed out”

message, because it is an unknown

error.

If the error occurs because of a known

issue, (such as if a route is not in the routing table)

on the way to the destination device, you

will see a “destination

unreachable” message.

This should help you determine if the problem occurred on the way to

the destination or on the way back.

46

Troubleshooting note: Between 29 and 30

Page 45: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• In this case, the router does know how to get to network 172.16.10.0 — the exit interface is Ethernet 0 — so the packet is switched to interface Ethernet 0.

47

Step 29

Page 46: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• The router checks the ARP cache to determine whether the hardware address for 172.16.10.2 has already been resolved.

48

Step 30

Page 47: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• Since the hardware address to 172.16.10.2 is already cached from the originating trip to Host_B, the hardware address and packet are handed to the Data Link layer.

49

Step 31

Page 48: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• The Data Link layer builds a frame with the destination hardware address and source hardware address and then puts IP in the Ether-Type field.

• A CRC is run on the frame and the result is placed in the FCS field.

50

Step 32

Page 49: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• The frame is then handed to the Physical layer to be sent out onto the local network one bit at a time.

51

Step 33

Page 50: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• The destination host receives the frame, runs a CRC, checks the destination hardware address, and looks in the Ether-Type field to find out to whom to hand the packet.

52

Step 34

Page 51: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• IP is the designated receiver, and after the packet is handed to IP at the Network layer, it checks the protocol field for further direction.

• IP finds instructions to give the payload to ICMP, and ICMP determines the packet to be an ICMP echo reply.

53

Step 35

Page 52: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• ICMP acknowledges that it has received the reply by sending an exclamation point (!) to the user interface.

• ICMP then attempts to send four more echo requests to the destination host.

•The End

54

Step 36

Page 53: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• These steps are the basic routing process, no matter how large the network.– There would just be more hops in a big internetwork.

• Point to recap:– Moving from router to router in a big internetwork, at

each hop the hardware address changes; from one router’s Mac address to the next’s.

– But from hop to hop, the IP address remains the same!

– This reflects the fact that hardware addresses (Mac) are always local, while logical addresses (IP, for example), are always remote.

• I.e., in a local LAN, you always use a Mac addrss, not IP.55

Post Script

Page 54: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Example 1: pp 336-37 – Here, the point is that if you have multiple hosts communicating to the server using HTTP, they must all use a different source port number. That is how the server keeps the data separated at the Transport layer.

Example 2: p 337ff – Switches have nothing to do with routing!

Example 3: p 338 – ICMP error messages are sent by the router with the problem device, such as an interface which is down.

56

Exercises: Test IP Routing Understanding Key Points: pp 336 - 362

Page 55: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Look at the output of a corporate router’s routing table:

Corp#sh ip route

[output cut]

R 192.168.215.0 [120/2] via 192.168.20.2, 00:00:23, Serial0/0

R 192.168.115.0 [120/1] via 192.168.20.2, 00:00:23, Serial0/0

R 192.168.30.0 [120/1] via 192.168.20.2, 00:00:23, Serial0/0

C 192.168.20.0 is directly connected, Serial0/0

C 192.168.214.0 is directly connected, FastEthernet0/0

The corporate router received an IP packet with a source IP address of 192.168.214.20 and a destination address of 192.168.22.3, what do you think the Corp router will do with this packet?Since the routing table doesn’t show a route to network 192.168.22.0 (or a default route), the router will discard the packet and send an ICMP “destination unreachable” message back out interface FastEthernet 0/0

Normally, a router will have a default route set up, AKA a “gateway of last resort”. 57

Exercises: Test IP Routing Understanding Key Points: pp 338-39

Page 56: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• This is a project that runs from pp 336 to 362.• Setup: 5 Routers and an wireless Access Point• Neither of our network simulators has these

routers, so all we can do is read over the configurations.

• Notes:– P.345: With an ISR router, no need to use the

“clock rate” command; they automatically detect it.– P346: See the interface “serial 0/0/1”. The book

explains the way interfaces are labeled in a couple of places:

• Pg 184 and 195: “x/y/z Slot/Subslot/Port” (brief)58

Configuring IP Routing

Page 57: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Configuring IP Routing (continued)

• Notes: (continued)

– Page 205: Better explanation here:

– Some modular routers use three numbers instead of two.

– The first 0 is the router itself, and then you choose the slot, and then the port. Here’s an example of a serial interface on a 2811:

• Todd(config)#interface serial ?• <0-2> Serial interface number• Todd(config)#interface serial 0/0/?• <0-1> Serial interface number• Todd(config)#interface serial 0/0/0• Todd(config-if)# 59

Page 58: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Configuring IP Routing (continued)

• Notes: (continued)

– You should always view a running-config output first so you know what interfaces you have to deal with. Here’s a 2801 output:

– Todd(config-if)#do show run– Building configuration...– [output cut]– !– interface FastEthernet0/0– no ip address– Shutdown– duplex auto– speed auto– !– interface FastEthernet0/1 [continued on next

slide] 60

Page 59: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Configuring IP Routing (continued)

– no ip address– shutdown– duplex auto– speed auto– !– interface Serial0/0/0– no ip address– shutdown– no fair-queue– !– interface Serial0/0/1– no ip address– shutdown– !– interface Serial0/1/0– [continued in next column]

61

– no ip address– shutdown– !– interface Serial0/2/0– no ip address– shutdown– clock rate 2000000– !– [output cut]

Page 60: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Configuring IP Routing (continued)

62

• At other times you may see a x/x/x config for modular units (like WICs) where you have a slot, a subslot, and a port. From Cisco.com:– “The slot/subslot/port format only applies to WIC

interfaces. Interfaces that are native to the network modules still use only the slot/port format. That is:

• <interface-name> slot/port is used whenever the interfaces are native on the network module.

• <interface-name> slot/subslot/port is used whenever the interfaces are on the WIC slot of a network module (NM).”

• There are still more examples where the interface is a 3-part config.

Page 61: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Configuring IP Routing (continued)

• Notes: (continued)

– Pg 346-47: Just a command idiosyncrasy: – With ISR routers you can’t use “erase start”, you must enter

“erase startup-config”– This is so even though no other command begins with “S”:

• Eg: Router#erase s?• startup-config • So under the normal rules of the Cisco IOS, “erase s”

should work exactly like “erase startup-config”, but it doesn’t.

– This is probably just an oversight that will be corrected in the next IOS version. Just be aware that you will sometimes find anomalies like this.

63

Page 62: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Configuring IP Routing (continued)

• Notes: (continued)

– Pg 351 ff: Wireless interfaces: 2 things unique to them:• SSID #: “The Service Set Identifier that creates a

wireless network that hosts can connect to.”• DHCP Pool for wireless clients: Actually just like DHCP

with wired clients. More on this in Chapter 12.– Pg 352 ff: Author uses the SDM here – “Security Device

Manager” to configure interface R3 in the example. • The book goes through a series of steps using the SDM’s wizard –

through page 359.

64

Page 63: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

• Even after the previous pages/slides, we still we need to do some things to get our network up to speed.

• 3 things to do:1. Static Routing

2. Default Routing

3. Dynamic Routing

65/362

Configuring IP Routing in Our Network

Page 64: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

172.16.3.2

SO

Static Routes

172.16.1.0

B172.16.3.1

A B

Stub Network

172.16.2.0

SOA

Routes must be unidirectional

66 /364

Page 65: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

You can optionally add a distance if you want to change the metric of the route; for example, you may want to prefer any dynamic route

Router(config)#172.16.1.22 255.255.0.0 192.168.5.45

This means: to get here (ip address and mask) go here next (address only)

Router(config)#ip route remote_network mask next_hop

ip route remote network

[mask]

{address|interface}

[distance] - all static routes have a distance of “1”; very trustworthy

[permanent] - to keep the route in the table no matter what; even if the interface goes down.

Static Route Configuration

Page 66: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

ip route 172.16.1.0 255.255.255.0 172.16.3.2. orip route 172.16.1.0 255.255.255.0 s0

Static Route Example

68

172.16.3.2

SO

172.16.1.0

B172.16.3.1

A B

Stub Network

172.16.2.0

SO

Page 67: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Default Routes

69 / 374

172.16.3.2

SO

172.16.1.0

B172.16.3.1

A B

Stub Network

172.16.2.0

SO

To send packets with a remote destination network not in the routing table to the next-hop router, only used for stub networks.

ip route 0.0.0.0 0.0.0.0 172.16.3.1

ip classless

[Note: This configuration sends every packet out Router A’s 3.1 interface]

creates a wireless network that hosts can connect to.

Page 68: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Static Route Considerations

• When configuring static routes, consider the following:– By default, a static route will take precedence over

a dynamic route because of its lower administrative distance.

– Without additional configuration, a dynamic route to a network will be ignored if a static route is present in the routing table for the same network.

– To reduce the number of static route entries, define a summarized or default static route

Page 69: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Static Route Considerations

71

• The benefit of using static routes is that they do not require the router to spend CPU cycles and memory space to determine the best route to a destination. The route has already been placed in the routing table manually.

• This can work against the network, however, if a device in the static route’s path goes down. In this case, the packets may still attempt to use the path (especially if the “permanent” option is chosen), and in any event, no other route will be chosen, as in a dynamic routing network, because the static route has limited the choices.

Page 70: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Routing Protocols (Dynamic)• Routing protocols are used between routers to:

– Determine the path of a packet through a network– Maintain routing tables– Two types:

• Interior gateway protocols (IGPs)• exterior gateway protocols (EGPs)• Examples:

– IGP: RIP, IGRP, OSPF, IS-IS, EIGRP–EGP: Border Gateway Protocol (BGP)

• [Note: This is only one way to distinguish between routing protocols; others include: distance vector v. link state, and we’ve already begun to distinguish static v. dynamic]

72 / 377

Page 71: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Autonomous System 1 Autonomous System 2

IGPs: RIP, IGRP EGPs: BGP

Routing Protocols

73

• An autonomous system is a collection of networks under a “common administrative domain”, i.e., all routers sharing the same routing table are in the same AS.

• IGPs operate within an autonomous system.• EGPs connect different autonomous systems.

Page 72: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Classful Routing Overview

• “Classful” routing protocols do not include the subnet mask with the route advertisement.

–Within the same network, consistency of the subnet masks is assumed.

–Summary routes are exchanged between foreign networks.

–Examples of classful routing protocols:• RIP Version 1 (RIPv1)• IGRP

• [The problem with classful routes is that they don’t

74

Page 73: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Classless Routing Overview• Classless routing protocols include the subnet

mask with the route advertisement.– Classless routing protocols support variable-length

subnet masking (VLSM).– Summary routes can be manually controlled within the

network.– Examples of classless routing protocols:

• RIP Version 2 (RIPv2)• EIGRP• OSPF• IS-IS

75

Page 74: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Classful Versus Classless Routing Protocols

– A classful routing protocol always considers the IP network class

• Address summarization is automatic by major network number and discontiguous subnets are not visible to each other

– Classless protocols transmit prefix-length or subnet mask information with IP network addresses.

• The IP address can be mapped so that discontinuous subnets and VLSM are supported

76

Page 75: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

IGRPAdministrative Distance=100

Router D

Router BRouter A

Router C

RIPAdministrative Distance=120

Default Administrative DistanceDirectly Connected: 0Static Route: 1RIP: 120IGRP: 100EIGRP: 90OSPF: 110

Administrative Distance

77

The administrative distance (AD) is used to rate the trustworthiness of routing information received on a router from a neighbor router. An administrative distance is an integer from 0 to 255, where 0 is the most trusted and 255 means no traffic will be passed via this route.If a router receives two updates listing the same remote network, the first thing the router checks is the AD. If one of the advertised routes has a lower AD than the other, then the route with the lowest AD will be placed in the routing table.If both advertised routes to the same network have the same AD, then routing protocol will be used to find the best path to the remote network. The advertised route with the lowest metric will be placed in the routing table. If it’s a tie, load balancing is used.

77

Page 76: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

C B AD

RoutingTable

RoutingTable

RoutingTable

RoutingTable

RoutingTable

RoutingTable

RoutingTable

RoutingTable

Distance—How farVector—In which direction

Distance—How farVector—In which direction

All routers just broadcast their entire routing table out all active interfaces on periodic time intervals

Distance vector algorithms do not allow a router to know the exact topology of an internetwork.

Distance Vector

78 / 379

Page 77: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Discovering RoutesDiscovering Routes

79

Page 78: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Discovering Routes: Converged Routing TablesDiscovering Routes: Converged Routing Tables

By “converged” we mean that each of the routers above has the same view of the internetwork, i.e., each router sees the same number of links from one router to any other router.

Page 79: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Meaning of Distance Vector (1/2)

• A router using a distance vector routing protocol does not have the knowledge of the entire path to a destination network.

• The router only knows– The direction or interface in which packets should

be forwarded and– The distance or how far it is to the destination

network

Page 80: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Meaning of Distance Vector (2/2)

Page 81: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Operation of distance vector (1/4)

• Some distance vector routing protocols call for the router to periodically broadcast the entire routing table to each of its neighbors.

• This method is inefficient because the updates not only consume bandwidth but also consume router CPU resources to process the updates.

Page 82: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Operation of distance vector (2/4)

• Periodic Updates are sent at regular intervals (30 seconds for RIP and 90 seconds for IGRP).– Even if the topology has not changed in several

days, periodic updates continue to be sent to all neighbors.

– Neighbors are routers that (1) share a link and are configured to (2) use the same routing protocol.

– The router is only aware of the network addresses of its own interfaces and the remote network addresses it can reach through its neighbors

Page 83: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Operation of distance vector (3/4)

• Broadcast Updates are sent to 255.255.255.255– Neighboring routers that are configured with the

same routing protocol will process the updates. – All other devices will also process the update up

to Layer 3 before discarding it. – Some distance vector routing protocols use

multicast addresses instead of broadcast addresses.

Page 84: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Operation of distance vector (4/4)

• Entire Routing Table Updates are sent, periodically to all neighbors. – Neighbors receiving these updates must process

the entire update to find pertinent information and discard the rest.

– Some distance vector routing protocols like EIGRP do not send periodic routing table updates.

Page 85: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Routing Algorithm

• The algorithm used for the routing protocols defines the following processes:– Mechanism for sending and receiving routing

information.– Mechanism for calculating the best paths and

installing routes in the routing table. – Mechanism for detecting and reacting to topology

changes.

Page 86: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Routing protocol characteristics (1/3)

• Time to Convergence - Time to convergence defines how quickly the routers in the network topology share routing information and reach a state of consistent knowledge.– The faster the convergence, the more preferable

the protocol.– Routing loops can occur when inconsistent

routing tables are not updated due to slow convergence in a changing network.

Page 87: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Routing protocol characteristics (2/3)

• Scalability - Scalability defines how large a network can become based on the routing protocol that is deployed.– The larger the network is, the more scalable the routing

protocol needs to be.

• Classless (Use of VLSM) or Classful - Classless routing protocols include the subnet mask in the updates. – This feature supports the use of Variable Length Subnet

Masking (VLSM) and better route summarization. – Classful routing protocols do not include the subnet mask

and cannot support VLSM.

Page 88: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Routing protocol characteristics (3/3)

• Resource Usage - Resource usage includes the requirements of a routing protocol such as memory space, CPU utilization, and link bandwidth utilization– Higher resource requirements necessitate more powerful

hardware to support the routing protocol operation in addition to the packet forwarding processes.

• Implementation and Maintenance - Implementation and maintenance describes the level of knowledge that is required for a network administrator to implement and maintain the network based on the routing protocol deployed.

Page 89: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Distance Vector Routing Protocols

Page 90: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Comparison of Routing Protocol

Page 91: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Routing Loops (1/6)• A routing loop is a condition in which a packet

is continuously transmitted within a series of routers without ever reaching its intended destination network.

• A routing loop can occur when two or more routers have routing information that incorrectly indicates that a valid path to an unreachable destination exists.

Page 92: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Routing Loop (2/6)

• The loop may be a result of:– Incorrectly configured static routes– Incorrectly configured route redistribution

(redistribution is a process of handing the routing information from one routing protocol to another routing protocol)

– Inconsistent routing tables not being updated due to slow convergence in a changing network

– Incorrectly configured or installed “discard routes”

Page 93: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Routing Loop (3/6)

Page 94: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Routing Loop (4/6)

Page 95: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Routing Loop (5/6)

Page 96: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Routing Loop (6/6)

Page 97: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Routing Loops & Ways to Stop Them

99 / 380

• Maximum hop count, AKA, Counting to Infinity: RIP permits a hop count of up to 15. At 16 hops, a route is considered to be an infinite distance away.

• This is called counting to infinity, and it’s caused by gossip (broadcasts) and wrong information being communicated and propagated throughout the internetwork.

• Without some form of intervention, the hop count increases indefinitely each time a packet passes through a router.

Page 98: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Count to infinity (1/5)

• Count to infinity is a condition that exists when inaccurate routing updates increase the metric value to "infinity" for a network that is no longer reachable.

Page 99: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Count to infinity (2/5)

Page 100: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Count to infinity (3/5)

Page 101: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Count to infinity (4/5)

Page 102: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Count to infinity (5/5)

Page 103: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Routing Loops

105 / 380

Split Horizon: • Routing information cannot be sent back in the direction from

which it was received.

Page 104: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Split Horizon Rules (1/5)

• The split horizon rule says that a router should not advertise a network through the interface from which the update came.

Page 105: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Split Horizon Rules (2/5)

Page 106: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Split Horizon Rules (3/5)

Page 107: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Split Horizon Rules (4/5)

Page 108: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Split Horizon Rules (5/5)

Page 109: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Routing Loops

111 / 380

• Route poisoning: • Advertising the downed network as unreachable. • When one router receives a route poisoning from another, it sends an update,

called a poison reverse, back to the other router. • This ensures that all routes on the segment have received the poisoned route

information

Page 110: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Route Poisoning (1/4)

• Route poisoning is yet another method employed by distance vector routing protocols to prevent routing loops.

• Route poisoning is used to mark the route as unreachable in a routing update that is sent to other routers.

• Unreachable is interpreted as a metric that is set to the maximum. – For RIP, a poisoned route has a metric of 16.

Page 111: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Route Poisoning (2/4)

Page 112: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Route Poisoning (3/4)

Page 113: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Route Poisoning (4/4)

Page 114: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Split Horizon with Poison reverse (1/5)

• Now we can put Split Horizon together with Route Poisoning / Poison Reverse.

• The concept of split horizon with poison reverse is that explicitly telling a router to ignore a route is better than not telling it about the route in the first place.

Page 115: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Split Horizon with Poison reverse (2/5)

• The following process occurs:• Network 10.4.0.0 becomes unavailable due to a link

failure. • R3 poisons the metric with a value of 16 and then

sends out a triggered update stating that 10.4.0.0 is unavailable.

• R2 processes that update, invalidates the routing entry in its routing table, and immediately sends a poison reverse back to R3.

Page 116: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Split Horizon with Poison reverse (3/5)

Page 117: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Split Horizon with Poison reverse (4/5)

Page 118: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Split Horizon with Poison reverse (5/5)

Page 119: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Ways to Stop Router Loops• Holddowns: Prevents regular update messages

from reinstating a route that is going up and down (called flapping). Typically, this happens on a serial link that’s losing connectivity and then coming back up.

• Holddown timers introduce a certain amount of skepticism to reduce the acceptance of bad routing information.

• If the distance to a destination increases (for example, the hop count increases from 2 to 4), the router sets a holddown timer for that route.

• Until the timer expires, the router will not accept any new updates for the route.

• This is only one type of timer used with RIP – see next 3 slides:

Page 120: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

RIP Timers (1/3)

• In addition to the update timer, the IOS implements three additional timers for RIP:

• Invalid Timer. If an update has not been received to refresh an existing route after 180 seconds (the default), the route is marked as invalid by setting the metric to 16. – The route is retained in the routing table until the “flush

timer” expires.

• Flush Timer. By default, the flush timer is set for 240 seconds, which is 60 seconds longer than the invalid timer. When the flush timer expires, the route is removed from the routing table.

Page 121: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

RIP Timers (2/3)

• Holddown Timer: This timer stabilizes routing information and helps prevent routing loops during periods when the topology is converging on new information. – Once a route is marked as unreachable, it must

stay in holddown long enough for all routers in the topology to learn about the unreachable network.

– By default, the holddown timer is set for 180 seconds.

Page 122: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

RIP Timers (3/3)

Page 123: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

64kbps

T1

T1 T1

RIP Overview

– Hop count metric selects the path, 16 is unreachable– Full route table broadcast every 30 seconds– Load balance maximum of 6 equal cost paths (default = 4)– RIPv2 supports VLSM and Discontiguous networks

Page 124: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Router(config)#router rip

Router(config-router)#network network-number*

network 172.16.0.0network 192.168.10.0

router RIPnetwork 172.16.0.0network 10.0.0.0

router RIP

*Network is a classful network address.

Every device on network uses the same subnet mask

172.16.10.0 192.168.10.010.3.5.0

RIP Routing Configuration

126

Page 125: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

RIP Version 2• Allows the use of variable length subnet masks

(VLSM) by sending subnet mask information with each route update

• Distance Vector – same AD, and timers.• Easy configuration, just add the command “version

2” under the router rip configuration

127

router ripnetwork 10.0.0.0version 2

Page 126: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

128

RIPv1 vs. RIPv2RIPv1 RIPv2

Distance vector Distance vector

Maximum hop count 15

Maximum hop count 15

Classful Classless

Broadcast based Multicast 224.0.0.9

No support for VLSM Supports VLSM

No authentication MD5 authentication

No support for discontiguous networks

Supports discontiguous networks

Page 127: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

129

Interior Gateway Routing Protocol (IGRP)

• Maximum hop count: 255 for larger network, default 100

• Composite metric: bandwidth and delay of the line.– Those are the defaults– Also: Load and Reliability are optionally configurable

instead– MTU (Maximum Transmission Unit) is a “tiebreaker”

Config trouter igrp 10

Page 128: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

130

IGRP vs. RIPLarge network Small networkUses AS number for activation

Uses network address, with all subnet and host bits off

Full route table update per 90 sec

Full route table update per 30 sec

AD 100 AD 120

Uses bandwidth and delay of the line as metric, maximum hop count 255

Uses only hop count to determine the best path to a remote network, max 15

Page 129: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Discontiguous Addressing• Two networks of the same classful networks are separated by a

different network address

131

192.168.10.0/24

10.1.1.0/24

192.168.10.0/24

– RIPv1 and IGRP do not advertise subnet masks, and therefore cannot support discontiguous subnets.

– OSPF, EIGRP, and RIPv2 can advertise subnet masks, and therefore can support discontiguous subnets.

Page 130: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Passive Interface

Maybe you don’t want to send RIP updates out your router interface connected to the Internet. Use the passive-interface command:Router(config)#router rip

Router(config-router)#passive-interface serial0

132

This allows a router to receive route updates on an interface, but not send updates via that interface

S0 GatewayInternet

Updates

XX

Page 131: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Verifying RIP

Router#show ip protocols

Router#show ip route

Router#debug ip rip

Router#undebug all (un all)

133

Page 132: 1 Sybex CCNA 640-802 Chapter 6: IP Routing. Chapter 6 Objectives Understanding IP routing Static routing Default routing Dynamic routing –RIP –RIPv2 –IGRP

Summary

– Open your books and go through all the written labs and the review questions.

– Review the answers in class.

134134