Chapter 4 Introduction to Network Layer -...
Transcript of Chapter 4 Introduction to Network Layer -...
1Kyung Hee University
Chapter 4Introduction to Network Layer
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
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
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
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.
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
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
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
9Kyung Hee University
Delay in a Connectionless network
Time Time Time Time
SouceDestination
1
2
3
To
tal
del
ay
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
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
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
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
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
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
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
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
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
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
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
21Kyung Hee University
Services Provided at the Source Computer
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
23Kyung Hee University
Processing at Each Router
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
25Kyung Hee University
Processing at the Destination Computer
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
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
28Kyung Hee University
Note
No flow control is provided for the current version of Internet network layer
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.
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.
31Kyung Hee University
Q and A