Data Link
Data Link
Data Link
RCDA
Ing. Marco A. Ortiz N.
Switch
Features
• Elimination of collisions
• Heterogeneous link
• Management
Switch (conmutador de paquetes)
Switch table:
• Initialy empty
• For each incoming frame received on an interface, the switch
updates its table with the source MAC address and the
interface from which the frame arrived.
Switch
Two functions
•Filtering
• If destination mac address is attached to the same interface (switch table),
drop the frame
•Forwarding
• if there is no entry for the destination address, broadcast frame.
• If destination mac address is a different interface (switch table), forward
frame to destination interface.
Ejercicio
Condiciones iniciales:
Tablas ARP vacias
Tabla de switch vacia
Enrutamiento estático en routers
Enumere todos los pasos (capa por capa) del envío de un segmento TCP.
Switch
VLAN
• Port based
• MAC based
VLAN trunking
• IEEE 802.1Q
Extended Ethernet frame format
Switch
802.1Q
• Tag protocol identifier
• Fixed 81-00
• Tag control information
• 12-bit VLAN identifier bit
Data-link: two categories
• A data-link layer that uses only part of the capacity of the link.
• Broadcast link: link is shared between several pairs of devices.
Data-link: two sublayers
two data-link addresses are added to the frame header. These two
addresses are changed every time the frame moves from one link to
another.
A frame can be very large, making flow and error control very inefficient.
When a message is carried in one very large frame, even a single-bit error
would require the retransmission of the whole frame.
Framing – frame size
Fixed or variable size
Fixed-size framing: no need for defining the boundaries
of the frames
• ATM WAN
Variable-size framing: prevalent in local-area networks.
• Two ways to define the end of one frame and the beginning of the next:
• Character-oriented approach
• Bit-oriented approach.
Framing – Character-Oriented Framing
Was popular when only text was exchanged by the data-link
layers.
20
HLDC - Framing
21
HLDC - Framing
Flag field. This field contains synchronization pattern 01111110, which
identifies both the beginning and the end of a frame.
Address field. If a primary station created the frame, it contains a to
address. If a secondary station creates the frame, it contains a from
address. address field can be one byte or several bytes long
The Control field is one or two bytes used for flow and error control.
determines the type of frame and defines its functionality.
Information field. The information field contains the user’s data from
the network layer or management information. Variable length.
FCS field. The frame check sequence (FCS) is the HDLC error detection
field. It can contain either a 2- or 4-byte CRC.
22
HLDC – Framing – Control field
I-frames
I-frames are designed to carry user data from the
network layer. In addition, they can include flow-
and error-control information.
23
HLDC – Framing – Control field
7 6 5 4 3 2 1 0
I-frame
24
HLDC – Framing – Control
field
S-frames
Supervisory frames are used for flow and error
control. S-frames do not have information fields.
25
HLDC – Framing – Control field
7 6 5 4 3 2 1 0
S-Frame
• Receive ready (RR). If the value of the code subfield is 00, it is an RR S-frame. This kind of frame
acknowledges the receipt of a safe and sound frame or group of frames. In this case, the value of the
N(R) field defines the acknowledgment number.
• Receive not ready (RNR). If the value of the code subfield is 10, it is an RNR Sframe. This kind of
frame is an RR frame with additional functions. It acknowledges the receipt of a frame or group of
frames, and it announces that the receiver is busy and cannot receive more frames. It acts as a kind of
congestion-control mechanism by asking the sender to slow down. The value of N(R) is the
acknowledgment number.
• Reject (REJ). If the value of the code subfield is 01, it is an REJ S-frame. This is a NAK frame, but not
like the one used for Selective Repeat ARQ. It is a NAK that can be used in Go-Back-N ARQ to improve
the efficiency of the process by informing the sender, before the sender timer expires, that the last frame
is lost or damaged. The value of N(R) is the negative acknowledgment number.
• Selective reject (SREJ). If the value of the code subfield is 11, it is an SREJ Sframe. This is a NAK frame
used in Selective Repeat ARQ. Note that the HDLC Protocol uses the term selective reject instead of
selective repeat. The value of N(R) is the negative acknowledgment number.
26
HLDC – Framing – Control
field
7 6 5 4 3 2 1 0
S-Frame
27
HLDC – Framing – Control
field
U-Frame
28
HLDC – Framing – Control
field
a 2-bit prefix before the P/F bit and a 3-bit suffix after
the P/F bit. Together, these two segments (5 bits) can be
used to create up to 32 different types of U-frames.
29
Examples
30
Examples
two exchanges
using
piggybacking
31
Layer 2 Leased Lines with HDLC
32
Layer 2 Leased Lines with HDLC
33
Implementing Leased Lines with
HDLC
34
Implementing Leased Lines with
HDLC
show running-config
show controllers serial 0/0/0
show interfaces s0/0/0
show ip interface brief
show interfaces description
35
PPP
36
PPP - services
37
PPP - Framing
Flag 01111110
The address field in this protocol is a constant value and set to 11111111 (broadcast address).
This field is set to the constant value 00000011
The protocol field defines what is being carried in the data field
38
PPP - Framing
Payload field. This field carries either the user data or other information.
• The data field is a sequence of bytes with the default of a maximum of 1500 bytes; but
this can be changed during negotiation.
• byte-stuffed if the flag byte pattern appears in this field
• Because there is no field defining the size of the data field, padding is needed if the size
is less than the maximum default value or the maximum negotiated value.
FCS. The frame check sequence (FCS) is simply a 2-byte or 4-byte standard CRC
39
PPP
40
PPP
Transition Phases:
When one of the two nodes starts the communication, the
connection goes into the establish state
• If the two parties agree that they need authentication (for example, if they
do not know each other), then the system needs to do authentication
• otherwise, the parties can simply start communication.
The system remains in the terminate state until the carrier (physical-
layer signal) is dropped, which moves the system to the dead state
again.
41
PPP - Multiplexing
42
PPP - Multiplexing
43
PPP
44
PPP - Link Control Protocol
(LCP)
45
PPP - Link Control Protocol
(LCP)
46
PPP - Link Control Protocol
(LCP)
The length field defines the length of the entire LCP packet.
47
PPP - Link Control Protocol
(LCP)
48
PPP - Authentication Protocols
49
PPP - Authentication Protocols
50
PPP - Authentication Protocols
51
PPP - Authentication Protocols
52
Marco A. Ortiz N.
CHAP
53
PPP - Network Control Protocols
54
PPP - Network Control Protocols
IPCP
55
PPP
56
PPP - Example
57
References
W. Odom, Cisco Cisco CCNA Rounting and Switching ICND2
200-101: Academic Edition, USA: Pearson Education, 2013,
pp. 621.
• Ch. 12, 13, 14
58