Академический Документы
Профессиональный Документы
Культура Документы
A Lab-Based Approach
A Single Segment
Network -- Data Link
Layer
Thanasis Korakis
Application Layer
Transport Layer
Network Layer
Data Link Layer
Physical Layer
TCP/IP Suite
Types of Networks
Point-to-point network
Point-to-Point Network
Broadcast network
Broadcast Network
Point-to-Point Networks
The Point-to-Point Protocol (PPP) is a
data link protocol.
The main purpose of PPP is encapsulation
and transmission of IP datagrams, or other
network layer protocol data, over a serial
link.
Currently, most dial-up Internet access
service are provided using PPP.
Network
PPP Encapsulation
Ring LAN
to Network Layer
Data Link
Layer
Logical Link
Control
Medium Access
Control
to Physical Layer
LLC
connectionless service
unacknowledged connectionless service
connection-oriented service
Framing
Error control
Addressing
9
MAC
Carrier
Ethernet
An
Collisions in Ethernet
Collisions in Ethernet
A Begins Transmission
t0
A
t 0+a-
B Begins Transmission
B Detects Collision
t 0+a
A
t 0 +2a
A
CSMA/CD
Backoff:
13
14
Ethernet Switches
to a common cable, or
Connected by Ethernet switches.
15
Ethernet Encapsulation
Dest.
Addr
.
Src.
Addr
Type
2
Type
0800
2
Type
0806
2
Type
8035
2
Data
CRC
46-1500
IP datagram
46-1500
ARP request/reply
28
RARP request/reply
28
PAD
18
PAD
18
16
Data rates:
17
18
No access point.
Hosts communicate with
each other directly.
19
Priorities:
Defined
PIFS
(PCF IFS)
DIFS(DCF,
DIFS
Medium Busy
Direct access if the medium is free DIFS
Contention
Next Frame
SIFS
21
Contention-free Period
Contention Period
A Super Frame
Contention-free Period
Contention Period
time
22
CSMA/CA
CA:
carrier sensing
collision avoidance
random backoff
priority ack protocol
24
CSMA/CA : Backoff
CSMA/CA : Backoff
DIFS
DIFS
CWindow
DIFS
CWindow
DIFS
Frame
DIFS
Frame
defer
Frame
B
defer
Frame
defer
Channel idle
Resume backoff
Cwindow:
Frame
Generate a random,
Channel busy
number
suspend backoff
begin backoff
counting
Increases after each failure: 31, 63, 127, 255, 511, 1023, then
give up
Source
Dest.
DIFS
data
ACK
Contention Window
Others
Next frame
W
Y
Z
X
RTS/CTS
The sender send Request-to-Send (RTS):
20bytes
Receiver returns Clear-to-Send (CTS): 14
bytes
Then transmission begins
Solves hidden terminal problem
29
30
ARP Process
When a source host wants to send an IP
packet to a destination, it first broadcasts
an ARP request asking for the MAC
address corresponding to the destination
IP address.
The destination host will return an ARP
reply with its MAC address.
32
28bytes long.
An ARP request or ARP reply is encapsulated in
an Ethernet frame.
Protocol Type: set to 0x0806 for ARP messages.
Operation field: specifies ARP request (1), ARP
reply (2), RARP request (3), or RARP reply (4).
33
ARP Request
34
ARP Reply
The ARP reply is sent by the node whose IP address matches the
target IP address in the ARP request.
It fills its MAC address into the target Ethernet address field of
the ARP request.
It then swaps the two sender addresses (Ethernet and IP
addresses) with the two target addresses, sets the op field to 2.
The ARP reply is sent back to the source host only.
All other nodes receiving the broadcast ARP ignore the request,
since their IP addresses do not match the target IP address.
35
ARP Cache
36
IP address
A MAC address
Flags
37
Proxy ARP
38
Gratuitous ARP
Loopback Interface
Ethernet:
1500
FDDI: 4352
42
ICMP
43
Many ICMP packet types exist, each with its own format.
44
Host unreachable
Source quench
Time exceeded
Parameter problem
45
46
Code
0
1
2
3
4
5
6
7
Message Type
Network unreachable
Host unreachable
Protocol unreachable
Port unreachable
Fragmentation needed
but bit not set
Source route failed
Destination network
unknown
Destination node unknown
Code
8
9
10
11
12
13
14
15
Message Type
Source host isolated
Destination network
administratively prohibited
Destination host
administratively prohibited
Network unreachable for TOS
Host unreachable for TOS
Communication administratively prohibited by filtering
host precedence violation
precedence cutoff in effect
47
Client
Server
Port
No process
is waiting at
Port 1234
able
h
c
a
unre
48
PING
PING (Packet InterNet Gopher) is a
program that utilizes the ICMP echo
request and echo reply messages.
PING is used to verify if a certain host is
up and running. It is used extensively for
fault isolation in IP networks.
PING can be used with a wide variety of
options.
49
O REQUE
ST
Host 2
Host 1
PLY
E
R
CHO
E
P
IC M
50
51
client
Interactive server
Source client
Sink server
52