You are on page 1of 55

Chapter 4

Network Layer
A note on the use of these ppt slides:
Were making these slides freely available to all (faculty, students, readers).
Theyre in PowerPoint form so you see the animations; and can add, modify,
and delete slides (including this one) and slide content to suit your needs.
They obviously represent a lot of work on our part. In return for use, we only
ask the following:
If you use these slides (e.g., in a class) that you mention their source
(after all, wed like people to use our book!)
If you post any slides on a www site, that you note that they are adapted
from (or perhaps identical to) our slides, and note our copyright of this
material.
Thanks and enjoy! JFK/KWR
All material copyright 1996-2012
J.F Kurose and K.W. Ross, All Rights Reserved

Computer
Networking: A
Top Down
Approach
6th edition
Jim Kurose, Keith
Ross
Addison-Wesley
March 2012

Network Layer 4-1

Routing
chapter goals:

understand principles behind network


layer services:

network layer service models


forwarding versus routing
how a router works
routing (path selection)
broadcast, multicast

instantiation, implementation in the


Internet
Network Layer 4-2

Its a Matter of Protocol


To build big networks, you need to use routers and
they have to talk to each other.
Routers

need to exchange routes with each other.


They use various routing protocols to exchange
routes.
In today discussion, you will first see how to
manually enter a route, then you will learn how to
implement the simple RIP routing protocol.
Finally you will learn how to setup EIGRP (Interior
Gateway Routing Protocol (Cisco proprietary)), an
advanced routing protocol.
Network Layer 4-3

Example

So how do we get
routers to communicate
with
each other when theyre
not directlyNetwork
connected?
Layer 4-4

Network Layer 4-5

Network Layer 4-6

Network Layer 4-7

Routing Tables
Routing tables tell routers where to send packets.
Two routers can automatically route packets
when they share a common IP network space/
network address.
But

what about when routers arent connected


to each other directly?
They need to know how to send packets to the other
router.
They get this information from routing tables,
tables which are stored in the memory of the
router.
Network Layer 4-8

Routing Tables
In Cisco Router, we used show ip route command
to show the routing table.

Network Layer 4-9

Routing Tables
The route table is a type of address book for the
router. It looks at a packets destination IP
address, then looks that up in its routing table.
Based on that lookup, it sends the packet to the
right place.
Each

line in the routing table has two parts. The


first part is a letter which tells how the route was
established.
The second part tells the router how to get to
the route.
The route table is constantly kept up-to-date by
the router so it knows where to send packets.
Network Layer 4-10

Routing Tables

Network Layer 4-11

Routing Tables

Network Layer 4-12

Manually enter Routes

Network Layer 4-13

Exercise

Network Layer 4-14

Network Layer 4-16

Network Layer 4-17

Troubleshooting

How do we troubleshoot routes if the


data isnt getting through?
The ping command tells you if the network
and host are reachable.

Network Layer 4-18

Troubleshooting

So how does the ping command work?

Network Layer 4-19

Trobleshooting

Using Traceroute

Network Layer 4-20

Network Layer 4-21

Trobleshooting
Static routes dont change
automatically.
This means that if you have static routes
in your routing table, you need to change
them manually
When

there are changes to routes, you


have to modify those routes in your
routers route table to keep it current.

Network Layer 4-22

Network Layer 4-23

Network Layer 4-24

Network Layer 4-25

Routing Information
Protocol
Use RIP to get routes to update
themselves
If

you want to make your life easy, invest some


time in getting a dynamic routing protocol
running on your network.
RIP, or Routing Information Protocol, is one
such dynamic routing protocol.
RIP is a way for routers to share network
addresses.
Routers use RIP to talk to each other, sharing
their route information and allowing them to
keep their route tables up-to-date
Network Layer 4-26

Network Layer 4-27

Network Layer 4-28

Network Layer 4-29

Network Layer 4-30

Routing Information
Protocol
Use RIP to get routes to update
themselves
If

you want to make your life easy, invest some


time in getting a dynamic routing protocol
running on your network.
RIP, or Routing Information Protocol, is one
such dynamic routing protocol.
RIP is a way for routers to share network
addresses.
Routers use RIP to talk to each other, sharing
their route information and allowing them to
keep their route tables up-to-date
Network Layer 4-31

Network Layer 4-32

Network Layer 4-33

Network Layer 4-34

Network Layer 4-35

Network Layer 4-36

Network Layer 4-37

Network Layer 4-38

Network Layer 4-39

Network Layer 4-40

Network Layer 4-41

How we set up RIP?


Setting up RIP on a router is really
simple. You enter the config mode on
the router, then we enter the router
rip configuration

Network Layer 4-42

Network Layer 4-43

Network Layer 4-44

Troubleshooting

Output of Trace route command

Network Layer 4-45

Troubleshooting

Given a choice, the RIP protocol always


chooses the route with the fewest
number of routers in its path, or the
fewest number of hops.

Unfortunately, the maximum number


of hop-counts that the RIP protocol
allows is 15.

Network Layer 4-46

Troubleshooting

Network Layer 4-47

Troubleshooting

RIP can only use the hop count to find


the best route.

RIP doesnt know the speed of a


particular network line, so it treats all
lines equally.
This means that if there are two possible
routes to a particular network, RIP will
choose the one with the lowest hop
count, even if the other route is really fast.

Network Layer 4-48

Troubleshooting

RIP doesnt know the speed of a


particular network line, so it treats all
lines equally.
This means that if there are two possible
routes to a particular network, RIP will
choose the one with the lowest hop
count, even if the other route is really fast.

Network Layer 4-49

Network Layer 4-50

Network Layer 4-51

Network Layer 4-52

Network Layer 4-53

Network Layer 4-54

Network Layer 4-55

You might also like