Presentation is loading. Please wait.

Presentation is loading. Please wait.

Layer 3 The Network Layer

Similar presentations


Presentation on theme: "Layer 3 The Network Layer"— Presentation transcript:

1 Layer 3 The Network Layer
Slides adapted from Tanenbaum

2 Purpose of Internetworking
As we have seen, Layer 1 and Layer 2 networks are satisfactory for LAN level networks Bridges (layer2 switches) are used to match different Layer 2 protocols Bridges can also create Virtual LANs (VLANS) by grouping Hosts on different LAN segments through MAC level addressing.

3 Limitations of Layer2 switching
Even with complex bridges, NIC cards (hosts) never know the MAC address of all their possible destinations. Frames get broadcast to everyone on the segment Bridges filter somewhat, but may not know the exact host that should receive the Ethernet Frame (ends up wasting lots of bandwidth) Layer 2 “Virtual LANs” (VLANs) only partially solve this. Layer 2 networks don’t scale. Complexity increases faster than number of nodes There’s got to be a better way.

4 Network Layer Design Issues
Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation of Connectionless Service Implementation of Connection-Oriented Service Comparison of Virtual-Circuit and Datagram Subnets

5 Store-and-Forward Packet Switching
The environment of the network layer protocols. fig 5-1

6 Implementation of Connectionless Service
Routing within a diagram subnet. Key point: Packet’s destination address is used to determine the required output port. Routing tables can change over time and packets can take different routes between the same two routers.

7 Implementation of Connection-Oriented Service
Routing within a virtual-circuit subnet. Each switch looks at VCI and input port to determine the output port. Does not look at destination. This is like X.25, Frame and ATM VC switching that we saw before.

8 Comparison of Virtual-Circuit and Datagram Subnets
5-4

9 Routing Algorithms The Optimality Principle Shortest Path Routing
Flooding Distance Vector Routing Link State Routing Hierarchical Routing Broadcast Routing Multicast Routing Routing for Mobile Hosts Routing in Ad Hoc Networks

10 Conflict between fairness and optimality.
Routing Algorithms (2) Conflict between fairness and optimality. If traffic flows between A and A’, B and B’, and C and C’, the utilization of the network will be good, but flow between X and X’ will be severely restricted. Fairness must often be imposed at the expense of overall utilization.

11 Optimality Principle Optimality principle: This means:
If router J is on the optimal path from router I to router K, then the optimal path from J to K also falls along the same route. This means: Given the final destination, routers only need to know the optimal route to the next router. This entails a lookup-table correlating destination address and output port. The following figure: Shows the sink tree for destination “B” There would be different sink trees for each final destination. Note there are no loops in this tree.

12 The Optimality Principle
(a) A subnet. (b) A sink tree for router B.

13 Shortest Path Routing The first 5 steps used in computing the shortest path from A to D. The arrows indicate the working node.

14 Shortest path routing Algorithms that efficiently compute the shortest path Dijkstra Bellman Another approach -- flooding may be used to send packets to all adjacent routers. Packets that arrive at desired destination first are considered to have taken the “best”route. (this route is then chosen for subsequent packets.)

15 Distance Vector Routing
In a network of routers, the trick is to Adapt these algorithms to run in a distributed fashion. Each router only needs to know who it’s connected to. Doesn’t know the complete topology of the entire network. Defining the “cost” of each link is an important consideration Delay?? Bandwidth?? Real-cost?? Queue-depth at input port of next router??

16 Distance Vector Routing
Each node builds up route tables with best output port and cost for all destinations of the network In following slide J receives vectors from each neighbor Also receives cost to those immediate neighbors Looks at each possible route to every destination and selects lowest Creates and stores the table locally The “Count to Infinity” problem exists with distance vector routing Each node is slow to realize a node has failed. Split-horizon is a modification to alleviate this problem Still doesn’t work perfectly RIP is an example of Distance Vector Routing Protocol

17 Distance Vector Routing
(a) A subnet. (b) Input from A, I, H, K, and the new routing table for J.

18 Distance Vector Routing (2)
The count-to-infinity problem, these vectors are the hops to A In (a), the router A has just come up, B learns then C, etc. (b) Shows what happens when A fails, each node is very slow to realize the cost to A is INFINITY.

19 Link State Routing Each router must do the following:
Discover its neighbors, learn their network address. Measure the delay or cost to each of its neighbors. Construct a packet telling all it has just learned. Send this packet to all other routers. Compute the shortest path to every other router.

20 Learning about the Neighbors
(a) Nine routers and a LAN. (b) A graph model of (a).

21 A subnet in which the East and West parts are connected by two lines.
Measuring Line Cost A subnet in which the East and West parts are connected by two lines. If link status is reported based congestion and distance, oscillations can occur. CF may be the best route so all traffic is moved over there. Then EI becomes a much better route, etc., etc., etc.

22 Building Link State Packets
With link-state routing, packets are created by each node that describe its adjacent links. The AGE of the update and the sequence number are also included. This allows changes in the network to be considered. (a) A subnet. (b) The link state packets for this subnet.

23 Distributing the Link State Packets
The packet buffer for router B in the previous slide Flooding is used to distribute link-state packets. As the link-state packets are flowing around the network, they must be managed. New ones are used to update and also sent on to adjacent nodes. Old ones are ignored and not forwarded. Using both Age and Sequence # prevents problems when routers reboot and lose sequence.

24 Hierarchical Routing Hierarchical routing.
This type of architecture allows the routing protocols to scale. For example, all the flooded Link-state messages don’t have to propagate outside the areas.

25 Congestion Control Algorithms
General Principles of Congestion Control Congestion Prevention Policies Congestion Control in Virtual-Circuit Subnets Congestion Control in Datagram Subnets Load Shedding Jitter Control

26 Basic Queuing Theory Arrivals Servicing In a queue, things stack up as they are waiting to be serviced Infinite length queues where the service rate is greater than the arrival rate produce a stable system. The average waiting time for a M/M/1 queue is well known In reality, things are different Arrivals are not exponentially distributed Data tends to be more bursty and “self-similar” (what is this?) Real Queues can’t hold infinite number of messages (not enough memory, too much delay) Multiple queues and priorities are implemented for QoS

27 Congestion When queues in the Routers begin to be congested, measures must be taken to manage this. Why not just let the queues overflow?? Often this makes the problem worse Flow control algorithms will try to resend further compounding the problem Delay in the network would be maximum Longer queues introduce more chance for Jitter Lots of work has been done on congestion management

28 Congestion When too much traffic is offered, congestion sets in and performance degrades sharply.

29 General Principles of Congestion Control
Monitor the system . detect when and where congestion occurs. Pass information to where action can be taken. Adjust system operation to correct the problem.

30 Congestion Prevention Policies
Policies that affect congestion. 5-26 From “Congestion control in Computer Networks, Issues and Trends”, Raj Jain, IEEE Network Magazine May/June 1990.

31 Congestion prevention policies
Layers 2-4 are all involved in congestion control and prevention Bits errors at layer 1 can even become an issue Interaction between the layers can be a problem Data Link Layer Can request info too quick Can send too many (or not enough) ACKs Etc. Network Layer Responsible for Queueing and routing the data through large network Lots of potential to introduce delay Transport Layer TCP Window size can be important Flow Control

32 Congestion Control in Virtual-Circuit Subnets
A congested subnet. (b) A redrawn subnet, eliminates congestion and a virtual circuit from A to B. With VC based networks, it may be possible to dynamically set up a new VC that takes an uncongested route.

33 Hop-by-Hop Choke Packets
Choke packets are send in the reverse direction to slow down the transmitter (a) A choke packet that affects only the source. (b) A choke packet that affects each hop it passes through.

34 Jitter Control (a) High jitter (b) Low jitter.

35 Quality of Service Requirements
Techniques for Achieving Good Quality of Service Integrated Services Differentiated Services Label Switching and MPLS

36 How stringent the quality-of-service requirements are.
5-30 Different applications need different QoS characteristics to function well.

37 Smoothing the output stream by buffering packets.
A major factor in packet networks is variance in the time each packet takes to traverse the network. This jitter can be removed by playout buffers but they introduce additional delay.

38 The Leaky Bucket Algorithm
(a) A leaky bucket with water. (b) a leaky bucket with packets. Variants of the the leaky bucket are used in protocols besides Frame Relay – Often combined with the TOKEN BUCKET

39 The Leaky Bucket Algorithm
(a) Input to a leaky bucket. (b) Output from a leaky bucket. Output from a token bucket with capacities of (c) 250 KB, (d) 500 KB, (e) 750 KB, (f) Output from a 500KB token bucket feeding a 10-MB/sec leaky bucket.

40 The Token Bucket Algorithm
5-34 (a) Before (b) After.

41 An example of flow specification.
Admission Control An example of flow specification. 5-34

42 Packet Scheduling (a) A router with five packets queued for line O.
Fair queuing is used so that longer frames don’t take an unfair amount of capacity. Here, A is 6 units long and Frame C is only 2 units long. C should get completely sent first. (a) A router with five packets queued for line O. (b) Finishing times for the five packets.

43 Reserving capacity in Layer 3 networks
For real-time streaming media applications, the required bandwidth can be significant Packet networks may eventually be used to distribute movies and things cable is providing today Lots of these applications are Multicasting There are sources sending the same content to many receivers RSVP, Resource reSerVation Protocol is a well-known protocol for this scenario RSVP support the ability to RESERVE bandwidth in a packet network It’s important that the network have a way to enforce that reservation How does know whether it can Admit the request? (Admission Control?)

44 RSVP-The ReSerVation Protocol
(a) A network, (b) The multicast spanning tree for host 1. (c) The multicast spanning tree for host 2.

45 RSVP Note that when two sources subscribe to the same source, links that they share in common don’t need to reserve 2X the amount of bandwidth. RSVP has evolved into a popular mechanism for receivers to request resources in a network. It is an entire Protocol and will be discussed in more detail later during the MPLS discussion.

46 RSVP-The ReSerVation Protocol (2)
(a) Host 3 requests a channel to host 1. (b) Host 3 then requests a second channel, to host 2. (c) Host 5 requests a channel to host 1.

47 Expedited packets experience a traffic-free network.
Expedited Forwarding Expedited packets experience a traffic-free network. Expedited Forwarding is a concept where Packet networks can achieve very high performance because the network is lightly loaded. This can be accomplished by building a separate network or carving a “virtually” separate network within existing switches Just like the HOV lane on 635

48 A possible implementation of the data flow for assured forwarding.
Often, different applications are classified before they enter the network. An edge router than breaks them out to separate queuing systems based on their class. It may also shape the traffic to reduce congestion VOIP may get high priority could get the lowest

49 Internetworking How Networks Differ How Networks Can Be Connected
Concatenated Virtual Circuits Connectionless Internetworking Tunneling Internetwork Routing Fragmentation

50 A collection of interconnected networks.
Connecting Networks A collection of interconnected networks.

51 Some of the many ways networks can differ.
How Networks Differ Some of the many ways networks can differ. 5-43

52 How Networks Can Be Connected
(a) Two Ethernets connected by a switch. (b) Two Ethernets connected by routers.

53 Concatenated Virtual Circuits
Internetworking using concatenated virtual circuits.

54 Connectionless Internetworking
A connectionless internet. Here, the internetworking is done by just forwarding Datagrams. Packets might take different routes.

55 Tunneling a packet from Paris to London.
Tunneling makes the network seem to be all one Layer 3 cloud. The Multiprotocol routers likely have either Frame or ATM interfaces

56 Tunneling a car from France to England.

57 (a) An internetwork. (b) A graph of the internetwork.
Internetwork Routing (a) An internetwork. (b) A graph of the internetwork. Note that 1,2,3,4 and 5 are actually networks themselves

58 Internetwork routing (cont)
Note in previous slide This is a hierarchical network i.e. Within the subnetworks there is separate routing occurring An ‘exterior’ routing protocol is used at the coarse level. Within each subnetwork, an ‘interior’ routing protocol is used. (RIP-- distance vector or OSFP-- link-state) These subnetworks could be service providers, enterprises, or regions. Essentially, this can be considered a rough model of the Internet. The internet is a loose coalition of several different networks. Not really any centralized control

59 Typical Internet node Source: RHK Layer 1 or 2 Layer3 Layer 2 Layer 3
ATM switch Backbone Router Frame Relay or ATM connections to POPs or large customers FDDI ring SONET LTE OXC WDM transponder Layer 2 Layer3 Layer 1 or 2 Layer 3 Layer 1 Layer 0 Source: RHK

60 (a) Transparent fragmentation. (b) Nontransparent fragmentation.

61 Fragmentation (2) Fragmentation when the elementary data size is 1 byte. (a) Original packet, containing 10 data bytes. (b) Fragments after passing through a network with maximum packet size of 8 payload bytes plus header. (c) Fragments after passing through a size 5 gateway.

62 The Network Layer in the Internet
The IP Protocol IP Addresses Internet Control Protocols OSPF – The Interior Gateway Routing Protocol BGP – The Exterior Gateway Routing Protocol Internet Multicasting Mobile IP IPv6

63 Design Principles for Internet
Make sure it works. Keep it simple. Make clear choices. Exploit modularity. Expect heterogeneity. Avoid static options and parameters. Look for a good design; it need not be perfect. Be strict when sending and tolerant when receiving. Think about scalability. Consider performance and cost.

64 Collection of Subnetworks
The Internet is an interconnected collection of many networks.

65 The IPv4 (Internet Protocol) header.
The IP Protocol The IPv4 (Internet Protocol) header.

66 The IP Protocol (2) Some of the IP options. 5-54

67 IP Addresses IP address formats.

68 IP Addresses (2) Special IP addresses.

69 A campus network consisting of LANs for various departments.
Subnets A campus network consisting of LANs for various departments.

70 A class B network subnetted into 64 subnets.

71 CDR – Classless InterDomain Routing
A set of IP address assignments. 5-59

72 NAT – Network Address Translation
Placement and operation of a NAT box.

73 Internet Control Message Protocol
The principal ICMP message types. 5-61

74 ARP– The Address Resolution Protocol
Three interconnected /24 networks: two Ethernets and an FDDI ring.

75 Dynamic Host Configuration Protocol
Operation of DHCP.

76 OSPF – The Interior Gateway Routing Protocol
(a) An autonomous system. (b) A graph representation of (a).

77 The relation between ASes, backbones, and areas in OSPF.

78 The five types of OSPF messages.
5-66

79 Problems with Distance-Vector and Link-State Routing
Neither distance-vector (RIP) nor link state (OSPF) protocols effective for exterior routing Distance vector and link state protocols assume all routers share common metric Priorities and restrictions may differ between ASs Flooding of link state information may become unmanageable

80 Path Vector Routing Dispense with routing metrics
Provide information about: Which networks can be reached by given router Which ASs must be crossed to get there No distance or cost element Routing information includes all Ass visited to reach destination Allows policy routing

81 BGP – The Exterior Gateway Routing Protocol
(a) A set of BGP routers (b) Information sent to F.

82 Boarder Gateway Protocol (BGP)
Allows routers (gateways) in different ASs to exchange routing information Messages sent over TCP See next slide Three functional procedures Neighbor acquisition Neighbor reachability Network reachability

83 BGP v4 Messages Open Update Keepalive Notification
Start neighbor relationship with another router Update Transmit information about single route List multiple routes to be withdrawn Keepalive Acknowledge open message Periodically confirm neighbor relationship Notification Send when error condition detected

84 Neighbor Acquisition Neighbors attach to same subnetwork
If in different ASs routers may wish to exchange information Neighbor acquisitionis when two neighboring routers agree to exchange routing information regularly Needed because one router may not wish to take part One router sends request, the other acknowledges Knowledge of existence of other routers and need to exchange information established at configuration time or by active intervention

85 Neighbor Reachability
Periodic issue of keepalive messages Between all routers that are neighbors

86 Network Reachability Each router keeps database of subnetworks it can reach and preferred route When change made, router issues update message All BGP routers build up and maintain routing information

87 BGP Message Formats Marker: Length: Type: Reserved for authentication
In octets Type: Open, Update, Keepalive, Notification

88 Neighbor Acquisition Detail
Router opens TCP connection with neighbor Sends open message Identifies sender’s AS and gives IP address Includes Hold Time As proposed by sender If recipient prepared to open neighbor relationship Calculate hold time min [own hold time, received hold time] Max time between keepalive/update messages Reply with keepalive

89 Keepalive Detail Header only
Often enough to prevent hold time expiring

90 Update Detail Information about single route through internet
Information to be added to database of any recipient router Network layer reachability information (NLRI) List of network portions of IP addresses of subnets reached by this route Total path attributes length field Path attributes field (next slide) List of previously advertised routes being withdrawn May contain both

91 Path Attributes Field Origin AS_Path Next_Hop Multi_Exit_disc
Interior (e.g. OSPF) or exterior (BGP) protocol AS_Path ASs traversed for this route Next_Hop IP address of boarder router for next hop Multi_Exit_disc Information about routers internal to AS Local_Pref Tell other routers within AS degree of preference Atomic_Aggregate, Aggregator Uses subnet addresses in tree view of network to reduce information needed in NLRI

92 Withdrawal of Route(s)
Route identified by IP address of destination subnetwork(s)

93 Notification Message Error notification Message header error
Includes authentication and syntax errors Open message error Syntax errors and option not recognised Proposed hold time unacceptable Update message error Syntax and validity errors Hold time expired Finite state machine error Cease Close connection in absence of any other error

94 Diagram for BGP Routing Information Exchange

95 BGP Routing Information Exchange
R1 constructs routing table for AS1 using OSPF R1 issues update message to R5 (in AS2) AS_Path: identity of AS1 Next_Hop: IP address of R1 NLRI: List of all subnets in AS1 Suppose R5 has neighbor relationship with R9 in AS3 R9 forwards information from R1 to R9 in update message AS_Path: list of ids {AS2,AS1} Next_Hop: IP address of R5 NLRI: All subnets in AS1 R9 decides if this is prefered route and forwards to neighbors

96 The IPv6 fixed header (required).
The Main IPv6 Header The IPv6 fixed header (required).


Download ppt "Layer 3 The Network Layer"

Similar presentations


Ads by Google