Topics covered are Introduction, What’s Inside a Router?, The Internet Protocol (IP): Forwarding and Addressing in the Internet
Routing Algorithms,Routing in the Internet, Broadcast and Multicast Routing
1. Vidya Vardhaka College of Engineering, Mysuru
Department of Computer Science & Engineering
Computer Networks (15CS52)
Module-3: Network Layer
Gururaj H L
Assistant Professor,
Dept. of CSE, VVCE, Mysuru
gururaj1711@vvce.ac.in
gururajhl.blogspot.com
2. Contents
1. Introduction
2. What’s Inside a Router?
3. The Internet Protocol (IP): Forwarding and Addressing in the
Internet
4. Routing Algorithms
5. Routing in the Internet
6. Broadcast and Multicast Routing
30-07-2018 Dept. of CSE, VVCE, Mysuru 2
4. Input and Output Processing
30-07-2018 Dept. of CSE, VVCE, Mysuru 4
5. • Transfer packet from input buffer to appropriate output buffer
• Switching rate: Rate at which packets can be transfer from inputs to
outputs
• often measured as multiple of input/output line rate
• N inputs: switching rate N times line rate desirable
• Three types of switching fabrics.
Switching via Memory
• Traditional computers with switching under direct control of CPU.
• Packet copied to system’s memory.
• Speed limited by memory bandwidth (2 bus crossings per datagram).
30-07-2018 Dept. of CSE, VVCE, Mysuru 5
7. Switching via Bus
• Datagram from input port memory
• To output port memory via a shared bus
• bus contention: Switching speed limited by bus bandwidth
• 32 Gbps bus, Cisco 5600: sufficient speed for access and enterprise routers.
Switching via interconnection Network
• Overcome bus bandwidth limitations
• Banyan networks, crossbar, other interconnection nets initially developed to
connect processors in multiprocessor
• Advanced design: fragmenting datagram into fixed length cells, switch cells
through the fabric.
• Cisco 12000: switches 60 Gbps through the interconnection network
30-07-2018 Dept. of CSE, VVCE, Mysuru 7
8. Output port queueing
“Packet scheduler”
• QoS guarantees
• Active Queue Management
• RED (Random Early Detection)
• The buffering required
With N flows, buffering equal to
30-07-2018 Dept. of CSE, VVCE, Mysuru 8
RTT C.
N
9. HOL (Head Of Line)
30-07-2018 Dept. of CSE, VVCE, Mysuru 9
13. A Brief Foray into IP Security
• Cryptographic agreement
• Encryption of IP datagram payloads
• Data integrity
• Origin authentication
30-07-2018 Dept. of CSE, VVCE, Mysuru 13
18. Consider the following network. With the indicated link costs, use
Dijkstra’s shortest-path algorithm to compute the shortest path from x to
all network nodes. Show how the algorithm works by computing a table
30-07-2018 Dept. of CSE, VVCE, Mysuru 18
22. Consider the network shown below, and assume that each node initially
knows the costs to each of its neighbors. Consider the distance-vector
algorithm and show the distance table entries at node z.
30-07-2018 Dept. of CSE, VVCE, Mysuru 22
23. A Comparison of LS and DV Routing Algorithms
• Message complexity.
O(|N| |E|)
• Speed of convergence.
O(|N|2) Algorithm requiring O(|N| |E|)) Messages
DV also suffers from the count-to-infinity problem.
• Robustness.
30-07-2018 Dept. of CSE, VVCE, Mysuru 23
24. Hierarchical Routing
• All routers executing the same routing algorithms in the network
Scale
Administrative autonomy.
Autonomous System- A set of routers that are typically under the same
administrative control and runs with same routing algorithms.
30-07-2018 Dept. of CSE, VVCE, Mysuru 24
26. Routing in the Internet
• Intra-AS Routing in the Internet
RIP (Routing Information Protocol)
OSPF (Open Source Path First)
RIP (Routing Information Protocol)
• It follows the basic principles of Distance Vector Algorithm.
• The hop limit of RIP is 15.
• Each router in an AS forwards an advertisement messages to its
neighbor nodes in every 30 seconds.
30-07-2018 Dept. of CSE, VVCE, Mysuru 26
27. • Even after 30 seconds if the node doesn’t get reply and the time will be extended
up to 180 seconds. The nodes are considered as dead node if they wont receive
reply after 180 seconds and routing table will be updated.
• Routers sends RIP request and response messages to each other over UDP using
port number 520.
• The UDP segment is carried between routers in a standard IP datagram. The fact
that RIP uses a transport-layer protocol (UDP) on top of a network layer protocol
(IP) to implement network-layer functionality.
30-07-2018 Dept. of CSE, VVCE, Mysuru 27
29. Intra-AS Routing in the Internet: OSPF
• OSPF is a link-state protocol that uses Flooding of link-state
information and a Dijkstra least-cost path algorithm.
• In OSPF, the router broadcasts the routing information to all the other
routers of a network in every 30 seconds whenever links state changes.
• Some of the advances embodied in OSPF include the following:
• Security-MD5.
• Multiple same-cost paths.
• Integrated support for unicast and multicast routing.
• Support for hierarchy within a single routing domain.
30-07-2018 Dept. of CSE, VVCE, Mysuru 29
31. Inter-AS Routing: BGP
BGP provides each AS a means to
1. Obtain subnet reachability information from neighboring ASs.
2. Propagate the reachability information to all routers internal to
the AS.
3. Determine “good” routes to subnets based on the reachability
information and on AS policy.
“I exist and I am here”
30-07-2018 Dept. of CSE, VVCE, Mysuru 31
32. • eBGP: obtain subnet reachability information from neighboring ASs.
• iBGP: propagate reachability information to all AS-internal routers
Using eBGP session between 3a and 1c, AS3 sends prefix reachability info to AS1.
1c can then use iBGP do distribute new prefix info to all routers in AS1
1b can then re-advertise new reachability info to AS2 over 1b-to-2a eBGP session
When router learns of new prefix, it creates entry for prefix in its forwarding table.
30-07-2018 Dept. of CSE, VVCE, Mysuru 32
33. Path Attributes
Two important attributes:
• AS-PATH: contains ASs through which prefix advertisement has passed: e.g.,
AS 67, AS 17
• NEXT-HOP: indicates specific internal-AS router to next-hop AS. (may be
multiple links from current AS to next-hop-AS)
30-07-2018 Dept. of CSE, VVCE, Mysuru 33
34. BGP Route Selection
• Router may learn about more than 1 route to destination AS, selects
route based on:
• Local preference value attribute: policy decision
• Shortest AS-PATH
• Closest NEXT-HOP router: hot potato routing
• Additional criteria
30-07-2018 Dept. of CSE, VVCE, Mysuru 34
35. BGP Messages
• BGP messages exchanged between peers over TCP connection
• BGP messages:
• OPEN: opens TCP connection to peer and authenticates sender
• UPDATE: advertises new path (or withdraws old)
• KEEPALIVE: keeps connection alive in absence of UPDATES; also ACKs
OPEN request
• NOTIFICATION: reports errors in previous msg; also used to close
connection
30-07-2018 Dept. of CSE, VVCE, Mysuru 35
36. • BGP message contains “routes”
• “route” is a prefix and attributes: AS-PATH, NEXT-HOP,…
• Example: route:
Prefix:138.16.64/22 ; AS-PATH: AS3 AS131 ; NEXT-HOP: 201.44.13.125
• Router may receive multiple routes for same prefix
• Has to select one route
• Router selects route based on shortest AS-PATH
30-07-2018 Dept. of CSE, VVCE, Mysuru 36
37. BGP Routing Policy
• A,B,C are provider networks
• X,W,Y are customer (of provider networks)
• X is dual-homed: attached to two networks
• X does not want to route from B via X to C
• .. so X will not advertise to B a route to C
30-07-2018 Dept. of CSE, VVCE, Mysuru 37
38. Why Are There Different Inter-as And Intra-as Routing Protocols?
Policy:
• Inter-AS: admin wants control over how its traffic routed, who routes
through its net.
• Intra-AS: single admin, so no policy decisions needed.
Scale:
• Hierarchical routing saves table size, reduced update traffic.
Performance:
• Intra-AS: can focus on performance.
• Inter-AS: policy may dominate over performance.
30-07-2018 Dept. of CSE, VVCE, Mysuru 38
39. Broadcast and Multicast Routing
• Broadcast and Multicast Routing
• N-way unicast approach
• source duplication is inefficient
30-07-2018 Dept. of CSE, VVCE, Mysuru 39
40. • Flooding: when node receives broadcast packet, sends copy to all
neighbors
• problems: cycles & broadcast storm
• Controlled flooding: node only broadcasts packet if it has not
broadcast same packet before
• node keeps track of packet ids already broadcasted
• or reverse path forwarding (RPF): only forward packet if it arrived on shortest
path between node and source
• Spanning tree:
• no redundant packets received by any node
30-07-2018 Dept. of CSE, VVCE, Mysuru 40
41. • First construct a spanning tree
• Nodes then forward/make copies only along spanning tree
30-07-2018 Dept. of CSE, VVCE, Mysuru 41
42. • Center node
• Each node sends unicast join message to center node
• Message forwarded until it arrives at a node already belonging to spanning tree
30-07-2018 Dept. of CSE, VVCE, Mysuru 42
43. REFERENCES
Text Book:
[1]James F kurose, Keith W Ross “Computer Networking -A
top down approach” Sixth Edition, Pearson publication, 2017
[2] NPTEL videos on Computer Networks.
30-07-2018 Dept. of CSE, VVCE, Mysuru 43