Download presentation
Presentation is loading. Please wait.
Published byReginald Harrington Modified over 9 years ago
1
Network Layer Kuang Chiu Huang TCM NCKU
2
Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and functions of the network layer, and compare different routing protocols. In addition, students can tell the differences between Diffserv and Intserv. 2
3
Outline of the Class IP address Routing protocols 3
4
Internet Reference Model
5
Motivation for the Network Layer How do I structure packets? How do I get a packet through the network? How do I find a host on a local subnet? How do I deal with the diversity of subnets?
6
Getting a Packet Through the Network Need addresses that are globally unique Need network devices that know about other network devices Need a routing algorithm for finding a path Need a mechanism for accommodating diverse networks
7
Internet (IP) Addresses When an organization connects to the Internet, it obtains a set of IP addresses for its computers The current addresses consist of 32 bit binary numbers (IPv4) (theoretically up to 2 32 = 4.29 billion addresses)
8
Internet (IP) Addresses Routing each address uniquely would –require enormous routing tables –take a lot of time –Solution: allocate addresses in blocks
9
IP Addresses Block sizes –Big users (Class A) - 128 available, each for 16 million hosts –Meduim users (Class B) - 16,384 available, each for 65,000 hosts –Small users (Class C) - 2 million available, each for 256 hosts
10
0 0 IP Addresses 1 1 0 0 1 1 1 1 0 0 Class A Class B Class C netidhostid netidhostid netidhostid
11
IP Addresses Binary numbers are hard to remember, so use decimal equivalents Divide decimal digit string into four sets of numbers separated by “dots”
12
Example 136.142.185.57 Translate into binary –Decimal to Binary –Convert decimal to sum of binary exponents (0-7): 2 7 =128, 2 6 =64, 2 5 =32, 2 4 =16, 2 3 =8, 2 2 =4, 2 1 =2, 2 0 =1 –136=128+8= 2 7 + 2 3 –142=128+8+4+2= 2 7 + 2 3 + 2 2 + 2 1 10001000 10001110 10111001 00111001
13
Networks, Subnets & Addresses
14
IP Addresses and Domain Names
15
Getting Through the Network: Routing Need routing strategies –Maximum throughput –Least cost –Minimum delay Implement via routing tables in nodes Routing tables must be computed by a routing algorithm
16
Autonomous System A set of routers and networks managed by a single organization That exchange information by a common protocol and A path exists between any pair of nodes
17
Types of Routing Interior router protocol –Within an AS –Constructs a detailed model of interconnectivity within an AS Exterior router protocol –Between ASs BGP Exchanges reachability information among ASs
18
Example Network
19
Routing Tables
20
Routing in the Internet Hierarchical and network specific (instead of host specific) to reduce the size of the routing tables Packet is first delivered to the AS The AS sends it to the right network The network sends it to the host
21
Autonomous Systems
22
Routing Protocols Used so that routers can exchange routing information Common routing protocols –RIP –OSPF –BGP
23
Border Gateway Protocol Exterior protocol “Path vector” algorithm Finds a path through the collection of autonomous systems –Neighbor acquisition –Neighbor reachability –Network reachability Assumes the existence of an interior protocol in each AS Reachability information is shared with neighboring AS’s
24
Neighbor Acquisition Neighbors are two routers that share the same network Acquisition occurs when the acquisition procedure results in the two routers agreeing to share routing information Acquisition procedure –One router sends Open –Other returns Keepalive if it accepts the request
25
Neighbor Reachability Needed to maintain acquired relationships Procedure: both routers periodically send Keepalive messages to each other
26
Network Reachability Each router maintains a database of –Networks it can reach –Preferred route for reaching each network When this changes, and Update is sent to the neighbor(s) This propagates the reachability information through the network
27
Open Shortest Path First (OSPF) Interior router protocol “Link state” algorithm Approach –Each router maintains descriptions of the state of the attached links –Periodically broadcasts updated state information to all routers it knows about –OSPF computes routes that minimize “cost” Distributed algorithm Each router maintains a database of the known topology
28
OSPF Autonomous System Directed Graph of AS
29
OSPF– Router 6’s view
30
Routing Information Protocol General –Interior protocol –“Distance vector” protocol: minimize distance to the destination Algorithm does the following –Share is knowledge about the AS with its neighbors –Shares only with its neighbors –Shares are regular intervals –Computes shortest distance based on its knowledge of the network
31
Open Shortest Path First General –Interior protocol –Link state algorithm –Find the least cost route for the current state of the network Algorithm does the following –Shares its knowledge about its neighborhood –Shares it with every other router (floods the network) –Shares whenever there are changes –Uses a complete picture of the network to calculate routes
32
Getting an IP address Static –Assigned and configured at startup –Permanently dedicated to a device Dynamic –IP Addresses are “leased” from a pool –Use Dynamic Host Configuration Protocol (DHCP)
33
DHCP Operations – I New Host broadcasts a Discover message via UDP to Port 67 –Destination address: 255.255.255.255 –Source address: 0.0.0.0 DHCP server responds with an Offer message –Transaction ID of Discover –Proposed IP address –Network mask –IP address lease time
34
DHCP Operations – II New Host responds with an DHCP Request –Mirrors information in Offer –Goes to selected DHCP server in the case of multiple servers Server responds with a DHCP ACK –Confirms parameters –Initiates lease Leases can be renewed upon expiration
35
The Internet Protocol
36
Internetworking Allow independently owned and administered networks to interconnect This was one of the key features of IP in the 1980s Internet Local (access) network RR
37
Dissimilar Networks Problem: –Different networks have different maximum packet sizes –Eg. Ethernet (1518 bytes max) and Token Ring (65kbits max) How do we enable these to communicate with each other?
38
Dissimilar Networks Solution –Fragment the large packets –Send each packet with its own IP header
39
IP (version 4) Header Version Flags IHLType of ServiceTotal Length IdentificationFragment Offset Time to LiveProtocolHeader Checksum Source Address Destination Address
40
IPv6 Began as an attempt in 1992 to address address space exhaustion As the Internet was commercialized, new capabilities were added RFC 1752 on the design was issued in 1995 Additional RFCs issued subsequently
41
Improvements over IPv4 Expanded address space –128 bit addresses –6*10 23 addresses/m 2 of the earth’s surface –Support for dynamic addressing –Support for anycasting Improved option mechanisms –Some not examined by routers –Allows for expansion of supported features Security Authentication Support for resource allocation –Enables QoS by labelling flows –Support for RSVP
42
IPv6 Header
43
Challenges with IPv6 End system conversion - Accomplished with recent Linux, Unix, Windows, Mac operating systems Need cutover of intermediate systems (eg., routers) –Difficult coordination problem –Interim support mechanisms for IPv4 exist
44
Quality of Service (QoS) Increasingly important on the Internet Types of QoS –Minimum throughput –Maximum delay –Bounds on delay variation (jitter) –Maximum packet loss
45
Categories of Traffic Elastic –Can adjust to changes in delay and throughput access –Examples: File transfer, e-mail, web access Inelastic –Does not adapt well, if at all, to changes –Examples: Real-time voice, audio and video
46
Supporting QoS in IPv4 Differentiated services (DiffServ) approach –Breaks traffic into different classes –Can only provide statistical performance guarantees Integrated services (IntServ) approach –Reserves resources on the network –Can provide absolute guarantees –Does not scale well
47
DiffServ Mechanism Use Type of Service (TOS) field The value of the TOS field reflects the precedence of the packet This precedence results in a “Per-Hop Behavior” (PHB)
48
DiffServ Operation
49
Classifier: Sorts packets into classes Meter –Measures traffic for conformance to a user profile –Users pay varying prices for different profiles
50
DiffServ Operation Marker –Mark/re-mark packets as needed, depending on the results of the meter –Out of bounds packets are marked as normal –Remarking may also be necessary at the boundary of a domain Shaper/Dropper –Drop packets for a given class when it exceeds the profile specification
51
DiffServ Operation Routers adapt to the ToS field information by selecting the appropriate –Route –Network service –Queueing discipline Service providers charge based on the ToS field parameters
52
IntServ Architecture
53
RSVP Used to establish reservations Can be initiated by the sender or receiver Reservations are assigned to flows from the sender to the receiver
54
IntServ Operation Reservations must be made before a flow can begin (i.e., admission control) Traffic for a flow follows the route along which the resources are available Traffic with similar requirements are grouped into classes and sent together Scheduler sorts the packets into the appropriate queues
55
Why Are QoS Not Offered? Uncertainty as to the “correct” network architecture Cost of upgrading networks to QoS capable routers in the face of uncertain demand Coordination between service providers Different meanings for different classes Lack of trust
56
Thank you! Q & A 56
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.