2. Router
• A router is an electronic device that
interconnects two or more computer
networks
• Works at Layer 3, Network Layer in an
intelligent manner
• Can connect different network
segments, whether they are in the same
building or even on the opposite side of
the globe
3. Router : Network Layer Interface
X MEDIUM X MEDIUM
PHYSICAL
LAYER
PHYSICAL
LAYER
DATA LINK
LAYER
DATA LINK
LAYER
NETWORK
LAYER
ROUTER
NETWORK
LAYER
4. Router
• Works in LAN, WAN environments
• Allows access to resources by selecting
the best path
• Can interconnect different networks
• Changes packet size and format to
match the requirements of the
destination network
5. Internetworking with a Router
IEEE 802.3
Sub-network IEEE 802.5
Sub-network
PC-NFS
Sub-network
Router
7. Difference Between Routers,
Switches and Hubs
• Hubs
– Simply provides the mechanical and
electrical connections between the nodes
• Switches
– Examine the data packet for the destination
address
– Do not alter the data packets
• Routers
– Examine and alter the data packets
– Perform protocol conversion
8. Delivery, Forwarding &
Routing
• Delivery
– Refers to the way a packet is handled by
the underlying networks under the control
of the network layer.
11. Functions of a Router
• Two primary functions:
• Determine the 'best path'
• Share details of routes with other
routers
12. Router has
• Routing Table - a database which
keeps track of the routes to networks
and the associated costs
• Routing Protocol - uses a special
algorithm to route data across a
network eg RIP
13.
14. Format of Routing Table
Mask Network
Address
Next-hop
Address
Interface Flags Reference
Count
Use
15. Format of Routing Table
• Mask
– This field defines the mask applied for the
entry.
16. Format of Routing Table
• Network Address
– Defines the network address to which the
packet is finally delivered.
17. Format of Routing Table
• Next-hop Address
– Defines the address of the next-hop router
to which the packet is delivered.
18. Format of Routing Table
• Interface
– Shows the name of the interface.
19. Format of Routing Table
• Flags
– U(up): If this flag is not present, it means
that the router is down.
– G(gateway): Destination is in another
network.
– H(host-specific): Indicates that the entry in
the Network Address field is a host-
specific address.
20. Flags Contd.
– D(added by redirection): Indicates that the
routing information for this destination has
been added to the host routing table by a
redirection message from ICMP.
– M(modified by redirection): Indicates that
the routing information for this destination
has been modified by a redirection
message from ICMP.
21. Format of Routing Table
• Reference Count
– Gives the number of users of this route at
the moment.
22. Format of Routing Table
• Use
– Shows the number of packets transmitted
through this router for the corresponding
destination.
23. Types of Routing Tables
• Static Routing Table –
– Routes are manually configured by a
network administrator
– Cannot update automatically when there is
a change in the internet
24. Types of Routing Tables
• Dynamic Routing Table
– Adjusts automatically to changes in
network topology
– Uses one of the dynamic routing protocols
such as RIP
25. RIP
• Stands for Routing Information
Protocol
• RIP implementation considerations:
– We are dealing with routers and
networks(links)
– Routers have routing tables; networks do
not
26. RIP Implementation
Considerations Contd.
– The destination in a routing table is a
network.
•This means the first column defines a network
address
– Metric used is very simple; distance
defined as no. of links to reach destination
27. RIP Implementation
Considerations Contd.
– Infinity is defined as 16
•Which means no route can have more than 15
hops
– Next-node column defines the address of
the router to which the packet is to be sent
to reach its destination.
28. Router Hardware
• Similarity with a PC:
– A CPU
– A memory
– Ports & interfaces
• Dissimilarity:
– Routers are diskless
30. Router CPU
• 50 MHz CPUs are generally used for
small offices & homes.
• For more powerful purposes,
processors from Motorola, Silicon
Graphics, etc. are used.
32. RAM/DRAM
• Stands for random access
memory/dynamic random access
memory
• Used by the router’s central processor
to do its work
• Cisco’s smallest router ships with a
minimum of 16MB of DRAM
33. NVRAM
• Stands for nonvolatile RAM
– retains information after losing power
• stores a copy of the router’s
configuration file
– enables the router to restart in its proper
configuration in case of accidental
shutdown
34. Flash memory
• Originally developed by Intel
• also nonvolatile
• differs from NVRAM in that it can be
erased and reprogrammed as needed
• used to store one or more copies of the
IOS software
– Helps in upgrading IOS on all routers
35. ROM
• Used to hold a so-called
bootstrapprogram
– which is a file that can be used to boot to a
minimum configuration state after a
catastrophe
36. Router Ports
• Port means a physical connection
through which I/O can pass
– a serial port, for example