E&CE 418: Tutorial 1
Instructor: Prof. Xuemin (Sherman) Shen
TA Ning
TA:
Ni Zhang
Zh
Email:
[email protected]Office Hours: Tue 1:00pm
1:00pm-3:00pm
3:00pm or by appointment
1
Roadmap
OSI Model
TCP/IP protocol suite
Data encapsulation and transmission
Communication at each layer
Network protocol analyzer
OSI Model
Layers
Description
Application
Allows useraccesstonetwork,provideservicestousers.
user access to network provide services to users
Presentation
Datarepresentation,encryptionanddecryption, etc
Session
Setupconnection,login,etc(startand endconversation)
Transport
Reliable transmissionofpacketsfromsourceto
destination(endtoend).
Network
Routing:guidesthepacket fromsourcetodestination
Data Link
Reliable transmissionfromnodetonode
Physical
Transmits raw bit stream over channel
Transmitsrawbitstreamoverchannel
OSI Model
Layers
Dataunit
Application
pp ca o
Data
aa
Presentation
Data
Session
Data
Transport
Segments
Network
Packet/
Datagram
g
Data Link
Frame
Physical
Bit
Data encapsulation
p
and decapsulation
p
a) Header and trailer attached at each layer aim to perform certain functions at each layer.
b) Headers are added while a packet is going down the stack at each layer.
c) Each protocol on the different layer has its own format
format.
4
TCP/IP Model
7
Application
Presentation
Session
S i
Application
Transport
Transport
Network
Internet
DataLink
Data Link
Data Link
Physical
OSI Model Layers
Host to network
Physical
TCP/IP Protocol Suite
The application layer in TCP/IP is equivalent to the combined session,
session
presentation, and application layers in the OSI model.
5
TCP/IP Protocol Suite
Application layer : responsible for providing services to the user.
e.g.,
g , FTP,, SMTP,, Http,
p, etc
Transport layer : responsible for the delivery of application data from
source to destination. e.g., TCP(reliable delivery), UDP.
I t
Internet
t layer
l
: responsible
ibl for
f the
th delivery
d li
off individual
i di id l packets
k t from
f
the source host to the destination host. Main functions:
forwarding and routing. e.g., IP, etc
Data link layer: responsible for hop-to-hop (node-to-node) delivery
Major duties: framing, flow control, error control,
access control . e.g., Ethernet, 802.11(Wireless lan), etc
Physical layer : responsible for movements of individual bits from one hop
(node) to the next over a physical medium
medium.
It maps incoming bits from the data link layer into signals
appropriate to the channel.
6
Data encapsulation and transmission
source
data
segment
packet
frame
data
Ht
TCP
data
IPn TCP data
H
MAC
IP
TCP
data
application
transport
internet
link
physical
MAC
IP
TCP
data
link
physical
p
y
switch
destination
data
segment
packet
frame
MAC
data
Ht
TCP
data
IPn TCP data
H
IP
TCP
data
application
transport
internet
link
physical
IPn TCP data
H
MAC
M
IP
TCP
data
internet
link
physical
Hn Ht
router
7
Communication at each layer
Application
Application protocol
Application
TCP
TCP protocol
TCP
IP
Data Link
IP
IP protocol
Data
Link
Data
Link
IP
IP protocol
Data
Link
Data
Link
Data
Link
IP protocol
Data
Link
Data
Link
IP
Network
Access
Communication at application layer
A
Application
Transport
B
Legend
Source
R1
Destination D Data
R3
H Header
R4
Application
Transport
Network
Network
Data link
Data link
Physical
Physical
D5 D5
Message
g
The unit of communication at the application layer is a message.
D5 D5
Message
Communication at transport layer
The port number is used in the transport layer header to indicate to which
application that piece of data is associated.
Sequence numbers are assigned in the header of each packet to reassemble
th segments
the
t into
i t the
th original
i i l order.
d
10
Communication at transport layer
A
Transport
Source
Legend
R1
Destination D Data
R3
H Header
R4
B
Transport
Network
Network
Data link
Data link
Ph i l
Physical
Ph i l
Physical
D4 H4
Segment
The unit of communication at the transport layer is a segment.
D4 H4
Segment
11
Communication at the internet layer
Networklayerreceivethedatafromthetransportlayer,ie.,thesegment,andadd
IPheadertocreatethepacket/datagram.
Network layer provides services to guide/direct the packet to the destination host.
Networklayerprovidesservicestoguide/directthepackettothedestinationhost.
12
Communication at the internet layer
Legend
Source
R1
Destination D Data
R3
H Header
R4
Network
Network
Data link
Data link
Physical
Physical
D3 H3
Datagram
D3 H3
Datagram
g
The unit
Th
i off communication
i i at the
h internet
i
layer
l
is
i a datagram/packet.
d
/ k
The IP address of source and destination never change in transmission.
13
Communication at the data link layer
DataLinklayerprotocolsgovernshowtoformataframeforuseondifferentmedia(e.g.,
copper,fiber,andwirelessnetworkmedia.).
Differentprotocolsmaybeinusefordifferentmedia.
(ethernet frame,802.11wirelessframe,etc)
14
Communication at the data link layer
Source
Legend
R1
Destination D Data
R3
H Header
R4
Data link
Data link
Physical
Physical
Link 1
Link 3
Link 5
Link 6
D2 H2
Frame
H2
D2 ame
Fr
The unit
Th
i off communication
i i at
the data link layer is a frame.
D2 H2
Frame
D2 H2
Frame
At each hop along the path,
path an intermediary device accepts frames from one
medium, decapsulates the frame and then forwards the packets in a new frame.
15
Communication at the physical layer
The Physical layer controls how data is transmitted on the communication
media.
media
The role of the Physical layer is to encode the binary digits that represent Data
Li k layer
Link
l
frames
f
into
i t signals
i l andd to
t transmit
t
it andd receive
i these
th
signals
i l across
the physical media - copper wires, optical fiber, and wireless - that connect
network devices.
It is also the job of the Physical layer to retrieve these individual signals from
the media, restore them to their bit representations, and pass the bits up to the
Data Link layer as a complete frame.
16
Communication at the physical layer
Legend
R1
Source
Destination
R3
R4
Physical
layer
Physical
layer
Link 3
Link 1
Link 5
Link 6
011 ... 101
011 ... 101
011 ... 101
1.
01
1
10
..
Th unit
The
i off communication
i i at the
h physical
h i l layer
l
is
i a bit.
bi
17
Network protocol analyzer
Wireshark is the world's foremost network pprotocol analyzer.
y
It
lets you capture and interactively browse the traffic running on
p
network.
a computer
Lets use Wireshark to analyze the frames and understand how
the layers
y work in real life.
18
Summary
Layering
TCP/IP protocol suite
Data encapsulation (head, trailer)
Communication at each layer
y
hop by hop: physical layer, data link layer
end to end: application layer,
layer transport layer
19