TCS 222 Week - 2 - Routing - and - Packet - Forwarding
TCS 222 Week - 2 - Routing - and - Packet - Forwarding
3
Flash Back TCP/IP Protocol Suit
Data Encapsulation
4
Network Layer Functions
Network layer is responsible for the source-to-destination delivery of packets
possible across internetworks (interconnected networks) usually from LAN-LAN
Link layer is responsible of delivery of frames within same network or LAN.
5
Router and Routing
At the center of the network is the router.
o router connects one network to another network.
Router is responsible for the delivery of packets across different networks.
The destination of the IP packet might be a web server in another country or
an e-mail server on the local area network.
It is the responsibility of the routers to deliver those packets in a timely
manner.
The effectiveness of internetwork communications depends, to a large
degree, on the ability of routers to forward packets in the most efficient way
possible.
Routers are now being added to satellites in space. These routers will have
the ability to route IP traffic between satellites in space in much the same
way that packets are moved on Earth, thereby reducing delays and offering
greater networking flexibility.
6
Router Services
In addition to packet forwarding, a router provides other services
as well. To meet the demands on today's networks, routers are also
used to:
i. Ensure 24x7 (24 hours a day, 7 days a week) availability. To help
guarantee network reachability, routers use alternate paths in case
the primary path fails.
ii. Provide integrated services of data, video, and voice over wired
and wireless networks. Routers use Quality of service (QoS)
prioritization of IP packets to ensure that real-time traffic, such as
voice, video and critical data are not dropped or delayed.
iii. Mitigate the impact of worms, viruses, and other attacks on the
network by permitting or denying the forwarding of packets.
7
Routers are Computers
A router is a computer, just like any other computer including a PC.
The very first router, used for the Advanced Research Projects Agency
Network (ARPANET), was the Interface Message Processor (IMP).
Routers have many of the same hardware and software components that
are found in other computers including:
i. CPU
ii. RAM
iii. ROM
iv. Operating System
The router uses its routing table to determine the best path to
forward the packet
8
Router Components and their Functions I
1. Central Processing Unit (CPU)
The CPU executes operating system instructions, such as system initialization, routing functions, and
switching functions.
2. Random-Access Memory (RAM)
RAM is volatile memory and loses its content when the router is powered down or restarted. However, the
router also contains permanent storage areas, such as ROM, flash and NVRAM.
RAM stores the instructions and data needed to be executed by the CPU. RAM is used to store these
components:
Operating System: The Cisco IOS (Internetwork Operating System) is copied into RAM during
bootup.
Running Configuration File: This is the configuration file that stores the configuration commands
that the router IOS is currently using. With few exceptions, all commands configured on the router are
stored in the running configuration file, known as running-config.
IP Routing Table: This file stores information about directly connected and remote networks. It is used
to determine the best path to forward the packet.
ARP Cache: This cache contains the IPv4 address to MAC address mappings, similar to the ARP cache
on a PC. The ARP cache is used on routers that have LAN interfaces such as Ethernet interfaces.
Packet Buffer: Packets are temporarily stored in a buffer when received on an interface or before they
exit an interface.
9
Router Components and their Functions II
3. Read Only Memory (ROM)
ROM uses firmware, which is software that is embedded inside the integrated circuit.
Firmware includes the software that does not normally need to be modified or upgraded, such as the bootup instructions
ROM does not lose its contents when the router loses power or is restarted.
ROM is a form of permanent storage that store:
The bootstrap instructions
Basic diagnostic software
Scaled-down version of IOS
a) Flash Memory
o Flash memory is non volatile computer memory that can be electrically stored and erased.
o Flash is used as permanent storage for the operating system.
o Flash memory does not lose its contents when the router loses power or is restarted.
b) NVRAM
NVRAM (Non-volatile RAM) does not lose its information when power is turned off.
This is in contrast to the most common forms of RAM, such as DRAM, that requires continual power to maintain its
information.
NVRAM is used as permanent storage for the startup configuration file (startup-config).
All configuration changes are stored in the running-config file in RAM,
To save those changes in case the router is restarted or loses power, the running-config must be copied to NVRAM, where it is
stored as the startup-config file.
NVRAM retains its contents even when the router reloads or is powered off.
10
AS
Routing
Routing: Selecting the
best route to the
destination.
Intra Domain: within the
same Autonomous Systems
(AS)
Inter domain Routing :
Between Autonomous AS
Systems (AS)
AS
11
Routing Process I
I. The router uses its routing table to determine the best path to forward
the packet.
II. When the router receives a packet, it examines its destination IP
address and searches for the best match with a network address in the
router's routing table.
III. The routing table also includes the interface to be used to forward the
packet.
IV. Once a match is found, the router encapsulates the IP packet into the
data link frame of the outgoing or exit interface, and the packet is then
forwarded toward its destination.
V. It is very likely that a router will receive a packet that is encapsulated in one
type of data link frame, such as an Ethernet frame and when forwarding the
packet, the router will encapsulate it in a different type of data link frame,
such as Point-to-Point Protocol (PPP).
12
Delivery, Forwarding and Routing
Delivery: the way the packet is
handled by the network
Direct vs Indirect
Direct Delivery
Indirect Delivery
13
Packet Forwarding
Placing the packet
in its route to its Forwarding
destination. This
requires routing
tables
1. Network
Specific vs
Host Specific
2. Next Hop
Method vs
Route Method
15
Tutorial Questions
1. What is the difference between a protocol and a service?
2. Which protocol layers support data transfer in a:
i. Host?
ii. Router?
iii. Switch/bridge?
iv. Hub/repeater?
3. What are piggybacking and encapsulation?
4. What is the purpose of packet encapsulation?
5. Give four functions of the Network Layer.
6. What is flow control in the context of a Network Layer service element. How is flow control performed in the IP suite?
7. How does an IP host differentiate between a destination host on its own LAN and a destination host on a different LAN?
8. Give an examples of a pair of protocols where:
i. The higher-layer protocol is connection-oriented and the lower-layer connectionless;
ii. The higher-layer protocol is connectionless and the lower-layer connection-oriented
9. Differentiate with examples between connection oriented and connectionless protocols and give which type of applications
each is suited
16
Study Questions
1) Describe the internal and external route hardware components and the purpose of each.
2) Describe the router bootup process from power on to final configuration.
3) What important features does a router add to the network?
4) Describe the steps necessary to apply a basic configuration to a router.
5) Describe the importance of the routing table. What purposes does it serve?
6) What are the three basic ways a router learns about networks?
7) What are the most important fields in the IP header and why are they important?
8) Describe the encapsulation and decapsulation process as a packet travels from source to
destination.
9) If you could design your own routing protocol algorithm to route packets, what would its
main features be? How would your protocol decide on the best route? Remember, a
computer is going to implement your idea, therefore, be specific.
10) Although the Internet Protocol is now considered the only protocol to use for Layer 3
addressing, this was not always the case. Investigate and report on some other Layer 3
protocols that serve the same purpose. What features do they share in common with IP?
How are they different?
17
General Reading List
Charles M. Kozierok (2005), “TCP/IP guide “
K.V Prasad (2003) “Principle of digital communication systems and computer Networks”, Charles River
Media, ISBN: 1584503297
Behrouz A. Forouzan, “Data communication and Networking” Third Edition, McGrawHill Higher
Education.
Andrew Tanenbaum, A.S. “Computer Networks”. 2003. ISBN 0-13-038488-7
"Cisco Response to Dictionary Attacks on Cisco LEAP," at
http://www.cisco.com/en/US/products/hw/wireless/ps430/prod_bulletin09186a00801cc90
1.html#wp1002291
"Strong passwords: How to create and use them," at
http://www.microsoft.com/athome/security/privacy/password.mspx
"Troubleshooting Cisco 1800 Series Routers (Modular),"
http://www.cisco.com/en/US/docs/routers/access/1800/1841/hardware/installation/guide
/18troub.html
Cisco, CCNA 2 “Routing Protocols and Concepts”
18