chapter 4 introduction to network layer -...

31
1 Kyung Hee University Chapter 4 Introduction to Network Layer

Upload: others

Post on 25-Jun-2020

5 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

1Kyung Hee University

Chapter 4Introduction to Network Layer

Page 2: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

2Kyung Hee University

4.1 Introduction

At the conceptual level, we can think of the global Internet as a black box network that connects millions of computers

A B

PhysicalData linkNetwork

TransportApplication

PhysicalData linkNetworkTransportApplication

Internet

Page 3: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

3Kyung Hee University

Internet as a combination of LAN and WANs Internet is made of many networks (or links) connected together

through the connecting device

Internet is a internetwork, a combination of LANs and WANs

Page 4: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

4Kyung Hee University

4.2 Switching Circuit Switching

A physical circuit is established between the source and destination of the message before the delivery of the messageThe source informs the network that transmission is completeThe network opens all switched for another devicesA good example of circuit-switched network early telephone system

Packet Switching The network layer in the Internet today : packet-switched networkA message from the upper layer is divided into the packetsThe source sends packets to destination one-by-oneThe packet switched network decides the route of the message from source to final destinationClassification : Datagram, Virtual Circuit

Page 5: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

5Kyung Hee University

4.2 Switching (con’t)

In circuit switching, the whole message is sent from the source to the destination without being divided into packets.

In packet switching, the message is first divided into manageable packets at the source before being transmitted. The packets are assembled at the destination.

Page 6: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

6Kyung Hee University

4.3 Packet Switching

The network layer is designed as a packet-switched network

The packet at the source is divided into manageable packets, called datagram

Individual datagrams are transferred from source to the destination

The received datagrams are assembled at the destination before recreating original message

Provided services

Connectionless service

Connection-oriented service

Page 7: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

7Kyung Hee University

Connectionless Packet-Switched Network

Each packet is routed based on the information contained in its header

There is no relationship between packets

The switches in this type of network are called routers

Sender Network

Network

ReceiverOut of orderR3

R4

R5

R1 R2

A connectionlesspacket-swtiched network

4 3 2 1

1

2

34 2

3 31

4 43 21

Page 8: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

8Kyung Hee University

Forwarding Process in Connectionless Network

The router routes the packet based only on the destination address

1 2

43

Outputinterface

Destinationaddress

Routing table

12

3

AB

HDestination

address

SA DA Data

Send the packetout of interface 2

SA DA Data

LegendSA: Source addressDA: Destination address

Page 9: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

9Kyung Hee University

Delay in a Connectionless network

Time Time Time Time

SouceDestination

1

2

3

To

tal

del

ay

Page 10: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

10Kyung Hee University

Connection-Oriented ServiceConnection setup, data delivery, teardown processes are

used to provide the service

There is a relationship between all packets belonging to a message

A virtual connection should be set up to defines the virtual path the packet should follow

After connection setup, the datagrams can follow the same path

The packet must contain a flow label, a virtual circuit identifier

Each packet is forwarded based on the label in the packet

Page 11: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

11Kyung Hee University

Connection-Oriented Packet Switched Network Each packet is forwarded through virtual path

Sender

Network

Network

ReceiverR4

R5

R1 R2

R3

A connection-orientedpacket-switched network

Packets

Virtual circuit

Legend

4 3 2 1

4 3 2 1

4

3

2

1

4 3 2 1 4 3 2 1

Page 12: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

12Kyung Hee University

Setup Phase of Connection-Oriented Service Setup Phase

A router creates an entry for virtual circuit

A request packet carries the source and destination address

An acknowledgement packet complete the entries in the switching tables

Data Transfer Phase : the network-layer packets belonging to one message can be sent one after another

Teardown Phase

After sending all packets to destination, source sends a special packet called a teardown packet

A destination responds with a confirmation packet

All routers delete the corresponding entry from their tables

Page 13: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

13Kyung Hee University

Forwarding Process in Connection-Oriented Network

Forwarding decision is based on the label in the packet

1 2

3 4

Routing Table

Port Port2L1 L21

Label LabelOutgoingIncoming

LegendSA: Source addressDA: Destination addressL1, L2: Labels

Incominglabel

SA DA DataL1

Outgoinglabel

SA DA DataL2

Page 14: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

14Kyung Hee University

Sending Request Packet in a Virtual-Circuit Network

1

1

1

4

4

2

2 2

3

3

3

A

B

Network

Network

R3

R5

R4

R1 R2

Request packet

Virtual circuit

Legend

A to B

A to B1

A to B2

A to B3

A to B4

LabelPort Port3141

LabelOutgoingIncoming

A to B

Port Port3661

Label LabelOutgoingIncoming

A to B

Label

A to B

Port Port4221

LabelOutgoingIncoming

Page 15: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

15Kyung Hee University

Setup Acknowledgment in a Virtual-Circuit Network

Port Port3

1

1

1

4

4

2

2 2

3

3

3

141Label Label

Label Label

OutgoingIncoming

Port Port3661

LabelOutgoingIncoming

A

B

A to B

A to B A to B

Network

Network

R3

R5

Port Port4221

LabelOutgoingIncoming

R4

R1 R2

Acknowledge packet

Virtual circuit

Legend

77

1

22

2

663

14

4

7722

66

Page 16: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

16Kyung Hee University

Flow of One Packet in an Established Virtual Circuit

1

1

1

4

4

2

2 2

3

3

3

ANetwork

Network

R3

R5

R4

R1 R2

Port Port314 661

Label LabelOutgoingIncoming

22LabelPort Port

3661Label

OutgoingIncoming

A to B

A to B A to B

LabelPort Port4221

LabelOutgoingIncoming

77

DataBA Datagram

Virtual circuit

Legend

DataBA14

DataBA66

DataBA22 DataBA77

Page 17: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

17Kyung Hee University

Delay in a Connection-Oriented Network

Time Time Time Time

Source Destination

1

2

Transmission�time

3

4

5

Setu

pTe

ardo

wn

Tot

alde

lay

6

7

Page 18: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

18Kyung Hee University

4.4 Network Layer Services

Connectionless services are the dominant service in today’s Internet

Example : Alice, who working in a publishing company, Wonderful Publishing, needs to send a message to Bob, the manager of a flower shop, Just Flower, to inform him that the advertising brochure for the shop has been printed and is ready to be shipped

Logical Addressing

Identification provided in the network-layer through a uniform and global addressing mechanism

Page 19: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

19Kyung Hee University

An Imaginary part of the InternetLegend

Alice

Alice WonderfulPublishing

JustFlowers

Point-to-point WAN

Cable modemDSL modemNetwork layer

Transport layerApplication layer

Data link layerPhysical layer

R1

R1

R2

R3

R3

R4

T3

SONET

SONET

SONET

To other ISPs

To other ISPs

SONET

T3

T3

T3

R5

R5

R6

R6R7

R8

R8Bob

Bob

National ISP

Cable

DSL

ATM

Regional ISP

BestNet

ServeNet

Regional ISP

I II

III

Page 20: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

20Kyung Hee University

Service Provided at the Source Computer Packetizing

Encapsulate the data coming from the upper layer in a datagram

Finding Logical Address of Next Hop

Consult a routing table to find the logical address of the next hop

Finding MAC Address of Next Hop

Using ARP(Address Resolution Protocol)

Fragmentation

When the datagram is bigger then MTU(Maximum Transmission Unit) datagram needs to be fragmented to smaller units before being passed to the data link layer

Page 21: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

21Kyung Hee University

Services Provided at the Source Computer

Page 22: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

22Kyung Hee University

Services Provided at Each Router

A router is involved with two interface (the incoming interface and the outgoing interface)

Finding next-hop logical address

Finding next-hop MAC address

Fragmentation

Page 23: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

23Kyung Hee University

Processing at Each Router

Page 24: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

24Kyung Hee University

Services Provided at the Destination Computer

Reassemble the fragment (Validating each datagram)

Deliver the data to upper layer

Set a reassembly timer, if the timer is expired, all data fragments are destroyed and an error message is sent that all the fragmented datagram need to be resent

Page 25: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

25Kyung Hee University

Processing at the Destination Computer

Page 26: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

26Kyung Hee University

4.5 Other Network Layer Issues Error Control

Mechanism for detecting corrupted, lost or duplicate datagramChecksum, ICMP

Flow ControlRegulate the amount of data a source can send without overwhelming the receiver

Congestion ControlCongestion in the network layer is a situation in which too many datagrams are present in an area of the internetChoke protocol in connectionless network and ICMPAdvanced negotiation during connection setup in connection-oriented network

QoS (Quality of Service)For Multimedia communication(real-time communication of audio and video)

Routing - How a router creates its routing table

Security IPSec

Page 27: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

27Kyung Hee University

Error Checking at the Data Link Layer

The case of that there are some areas in the path of the datagram that some errors may occurs but never checked

Page 28: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

28Kyung Hee University

Note

No flow control is provided for the current version of Internet network layer

Page 29: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

29Kyung Hee University

Summary(1) At the conceptual level. We can think of the global Internet as a black box

network. The Internet, however, is not one single network; it is made of many networks (or links) connected together through the connecting devices.

In this Internet, a connecting device such as a router acts as a switch. Two types of switching are traditionally used in networking: circuit switching and packet switching.

The network layer is designed as a packet-switched network. Packet-switched network can provide either a connectionless service or a connection-oriented service. When the network layer provides a connectionless service, each packet traveling in the Internet is an independent entity; there is no relationship between packets belonging to the same message. In a connection-oriented service, there is a virtual connection between all packets belonging to a message.

Page 30: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

30Kyung Hee University

Summary(2) In a connectionless service, the packets are forwarded to the next hop using the

destination address in the packet. In a connection-oriented service, the packets are forwarded to the next hop using a label in the packet.

In a connection-oriented network, communication occurs in three phases: setup, data transfer, and teardown. After connection setup, a virtual circuit is established between the sender and the receiver in which all packets belonging to the same message are sent through that circuit.

We discussed existing services at the network layer in the Internet including addressing, services provided at the source computer, services provided at the destination computer, and services provided at the each router.

We also discussed some issues related to the network layer, services that are normally discussed for the network layer, but they are either partially implemented at the network layer or not implemented at all. Some of these services, such as routing and security are provided by other protocols in the Internet.

Page 31: Chapter 4 Introduction to Network Layer - khu.ac.krnetworking.khu.ac.kr/html/lecture_data/2010_09_internet... · 2015-06-12 · Introduction to Network Layer. 2 ... Logical Addressing

31Kyung Hee University

Q and A