Upload
corey-wood
View
216
Download
0
Embed Size (px)
Citation preview
11
Kyung Hee University
Chapter 4Chapter 4Introduction to Introduction to Network LayerNetwork Layer
22
Kyung Hee University
4.1 Introduction4.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
Physical
Data link
Network
Transport
Application
Physical
Data link
Network
Transport
Application
Internet
33
Kyung Hee University
Internet as a combination of LAN and WANsInternet as a combination of LAN and WANs
Internet is made of many networks (or links) connected together
through the connecting device
Internet is an internetwork, a combination of LANs and WANs
44
Kyung Hee University
4.2 Switching4.2 Switching Circuit Switching
A physical circuit is established between the source and destination of the message before the delivery of the message
The source informs the network that transmission is complete
The network opens all switched for another devices
A good example of circuit-switched network early telephone system
Packet Switching
The network layer in the Internet today : packet-switched network
A message from the upper layer is divided into the packets
The source sends packets to destination one-by-one
The packet switched network decides the route of the message from source to final destination
Classification : Datagram, Virtual Circuit
55
Kyung Hee University
4.2 Switching (con’t)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.
66
Kyung Hee University
4.3 Packet Switching4.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
77
Kyung Hee University
Connectionless Packet-Switched NetworkConnectionless 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
3
42
3 31
4 43 21
88
Kyung Hee University
Forwarding Process in Connectionless NetworkForwarding 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
HDestinationaddress
SA DA Data
Send the packetout of interface 2
SA DA Data
LegendSA: Source addressDA: Destination address
99
Kyung Hee University
Delay in a Connectionless networkDelay in a Connectionless network
Time Time Time Time
SouceDestination
1
2
3
Tot
alde
lay
1010
Kyung Hee University
Connection-Oriented ServiceConnection-Oriented Service
Connection 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
1111
Kyung Hee University
Connection-Oriented Packet Switched NetworkConnection-Oriented Packet Switched Network
Each packet is forwarded through virtual pathEach 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
1212
Kyung Hee University
Setup Phase of Connection-Oriented ServiceSetup 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
1313
Kyung Hee University
Forwarding Process in Connection-Oriented NetworkForwarding 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 Label
OutgoingIncomingLegendSA: Source addressDA: Destination addressL1, L2: Labels
Incominglabel
SA DA DataL1
Outgoinglabel
SA DA DataL2
1414
Kyung Hee University
Sending Request Packet in a Virtual-Circuit NetworkSending 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 B
1
A to B2
A to B3
A to B
4
LabelPort Port3141
Label
OutgoingIncoming
A to B
Port Port3661
Label Label
OutgoingIncoming
A to B
Label
A to B
Port Port4221
Label
OutgoingIncoming
1515
Kyung Hee University
Setup Acknowledgment in a Virtual-Circuit NetworkSetup Acknowledgment in a Virtual-Circuit Network
Port Port3
1
1
1
4
4
2
2 2
3
3
3
141
Label Label
Label Label
OutgoingIncoming
Port Port3661
Label
OutgoingIncoming
A
B
A to B
A to B A to B
Network
Network
R3
R5
Port Port4221
Label
OutgoingIncoming
R4
R1 R2
Acknowledge packet
Virtual circuit
Legend
77
1
22
2
663
14
4
7722
66
1616
Kyung Hee University
Flow of One Packet in an Established Virtual CircuitFlow 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 Label
OutgoingIncoming
22
LabelPort Port3661
Label
OutgoingIncoming
A to B
A to B A to B
LabelPort Port4221
Label
OutgoingIncoming
77
DataBA Datagram
Virtual circuit
Legend
DataBA14
DataBA66
DataBA22 DataBA77
1717
Kyung Hee University
Delay in a Connection-Oriented NetworkDelay in a Connection-Oriented Network
Time Time Time Time
Source Destination
1
2
Transmissiontime
3
4
5
Setup
Teardow
n
Total
delay
6
7
1818
Kyung Hee University
4.4 Network Layer Services4.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
1919
Kyung Hee University
An Imaginary part of the InternetAn 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
R8
Bob
Bob
National ISP
Cable
DSL
ATM
Regional ISP
BestNet
ServeNet
Regional ISP
I II
III
2020
Kyung Hee University
Service Provided at the Source ComputerService 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
2121
Kyung Hee University
Services Provided at the Source ComputerServices Provided at the Source Computer
2222
Kyung Hee University
Services Provided at Each RouterServices 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
2323
Kyung Hee University
Processing at Each RouterProcessing at Each Router
2424
Kyung Hee University
Services Provided at the Destination ComputerServices 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
2525
Kyung Hee University
Processing at the Destination ComputerProcessing at the Destination Computer
2626
Kyung Hee University
4.5 Other Network Layer Issues4.5 Other Network Layer Issues
Error Control
Mechanism for detecting corrupted, lost or duplicate datagram
Checksum, ICMP
Flow Control
Regulate the amount of data a source can send without overwhelming the receiver
Congestion Control
Congestion in the network layer is a situation in which too many datagrams are presented in an area of the internet
Choke protocol in connectionless network and ICMP
Advanced 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
2727
Kyung Hee University
Error Checking at the Data Link LayerError 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
2828
Kyung Hee University
NoteNote
No flow control is provided for the current No flow control is provided for the current
version of Internet network layerversion of Internet network layer
2929
Kyung Hee University
Summary(1)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.
3030
Kyung Hee University
Summary(2)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.
3131
Kyung Hee University
Q and AQ and A