51
Network Layer Network Layer Kuang Chiu Huang Kuang Chiu Huang TCM NCKU TCM NCKU

Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

Embed Size (px)

Citation preview

Page 1: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

Network LayerNetwork Layer

Kuang Chiu HuangKuang Chiu Huang

TCM NCKUTCM NCKU

Page 2: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

Goals of This LectureGoals 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

Page 3: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

Outline of the ClassOutline of the Class• IP address• Routing protocols

3

Page 4: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

Internet Reference Model

Page 5: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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?

Page 6: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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

Page 7: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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 232 = 4.29 billion addresses)

Page 8: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

Internet (IP) Addresses• Routing each address uniquely would – require enormous routing tables– take a lot of time– Solution: allocate addresses in blocks

Page 9: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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

Page 10: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

00

IP Addresses

11 00

11 11 00

Class A

Class B

Class C

netid hostid

netid hostid

netid hostid

Page 11: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

IP Addresses• Binary numbers are hard to remember, so use decimal equivalents

• Divide decimal digit string into four sets of numbers separated by “dots”

Page 12: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

Example• 136.142.185.57• Translate into binary

– Decimal to Binary– Convert decimal to sum of binary exponents (0-7): 27=128, 26=64, 25=32, 24=16, 23=8, 22=4, 21=2, 20=1

– 136=128+8= 27+ 23

– 142=128+8+4+2= 27+ 23+ 22+ 21

• 10001000 10001110 10111001 00111001

Page 13: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

Networks, Subnets & Addresses

Page 14: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

IP Addresses and Domain Names

Page 15: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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

Page 16: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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

Page 17: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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

Page 18: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

Routing Tables

Page 19: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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

Page 20: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

Routing Protocols• Used so that routers can exchange routing information

• Common routing protocols– RIP– OSPF– BGP

Page 21: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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

Page 22: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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

Page 23: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

Neighbor Reachability• Needed to maintain acquired relationships

• Procedure: both routers periodically send Keepalive messages to each other

Page 24: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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

Page 25: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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

Page 26: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

OSPF

Autonomous System Directed Graph of AS

Page 27: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

OSPF– Router 6’s view

Page 28: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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

Page 29: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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)

Page 30: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

The Internet Protocol

Page 31: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

Internetworking• Allow independently owned and administered networks to interconnect

• This was one of the key features of IP in the 1980s

InternetInternet

Local (access) network

Local (access) network

Local (access) network

Local (access) network

R R

Page 32: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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?

Page 33: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

Dissimilar Networks• Solution

– Fragment the large packets – Send each packet with its own IP header

Page 34: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

IP (version 4) Header

VersionFlags

IHL Type of Service Total LengthIdentification Fragment Offset

Time to Live Protocol Header ChecksumSource Address

Destination Address

Page 35: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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

Page 36: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

Improvements over IPv4• Expanded address space

– 128 bit addresses– 6*1023 addresses/m2 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

Page 37: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

IPv6 Header

Page 38: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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

Page 39: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

Quality of Service (QoS)

• Increasingly important on the Internet

• Types of QoS– Minimum throughput– Maximum delay– Bounds on delay variation (jitter)– Maximum packet loss

Page 40: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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

Page 41: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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

Page 42: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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)

Page 43: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

DiffServ Operation

Page 44: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

DiffServ Operation• Classifier: Sorts packets into classes

• Meter– Measures traffic for conformance to a user profile

– Users pay varying prices for different profiles

Page 45: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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

Page 46: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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

Page 47: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

IntServ Architecture

Page 48: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

RSVP• Used to establish reservations• Can be initiated by the sender or receiver

• Reservations are assigned to flows from the sender to the receiver

Page 49: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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

Page 50: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

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

Page 51: Network Layer Kuang Chiu Huang TCM NCKU. Goals of This Lecture Through the lecture and in-class discussion, students are enabled to describe role and

Thank you!Thank you!

Q Q & A& A

56