Tải bản đầy đủ
4 Ethernet LAN datalink layer protocols ¡ª LLC and MAC

4 Ethernet LAN datalink layer protocols ¡ª LLC and MAC

Tải bản đầy đủ


Figure 4.4

Local area networks (LANs)

Ethernet (10baseX), fast ethernet (100baseX) and Gigabit ethernet (1000baseX) standards
and layers.

Figure 4.5

Ethernet layer 2 canonical frame format according to IEEE 802.3.

Ethernet LAN datalink layer protocols — LLC and MAC


the two ends. If some of the preamble goes missing while the receiver ‘adjusts its hearing
aid to the right volume’, this doesn’t matter. The pattern itself is 7 identical bytes with value
‘0101 0101’ [55H].
The start byte is the equivalent of the HDLC SYN byte: it provides for character- or
byte-synchronisation 3 and delimitation of the frame. The bit pattern used, however, is slightly
different. The start of frame (SOF) or start of frame delimiter (SFD) is set to the binary value
‘1101 0101’ [C5] (but is transmitted, as is the case with all ethernet header fields, in the
canonical format 4 (i.e., least significant bit first).)
The MAC address is the datalink address which identifies the stations within the LAN. The
addresses themselves have a 6-byte (48-bit) format and are typically programmed into LAN
network interface cards (NICs) at their time of manufacture. The destination MAC address
identifies the intended destination of the packet while the source MAC address identifies
the originating station. The first 3 bytes (24 bits) of the address value (last three bytes sent)
form the organizational unique identifier (OUI), some well-known examples of which are
listed in Table 4.1. The first bit of the OUI (last bit sent) is the I/G bit. When set to ‘1’ it
indicates that the MAC address is a group address. Otherwise it is an individual address. The
second bit (second-to-last bit sent) is the U/L bit. When set to ‘1’ it means that the address
is locally administered (i.e., configured by the LAN administrator). But more usual nowadays
are ethernet NIC (network interface cards) with their addresses already pre-configured (with
IEEE unique identifiers) and ‘burned in’ to the card. In this case, the U/L bit is set to ‘0’
(meaning that the address is universally recognised). The last three bytes of the address are
set uniquely by the manufacturer.
The length field describes the total length of the frame fields which follow, but precede the
frame check sequence. This includes the LLC header and the transmission unit (or user data).
Together these make up the LLC PDU (protocol data unit). The minimum length is 64 bytes.
The maximum length is 1518 bytes. Since the LLC header has a length of 18 bytes, this
means that the minimum transmission unit length is 46 bytes. In cases where the actual user
data is less than this minimum length it is filled out with padding. Meanwhile the maximum
transmission unit (MTU) is 1500 bytes. When the maximum size is exceeded, multiple frames
need to be sent.
The service address point (SAP) header fields are used to help direct the other protocol
fields in the header to their correct process or application (i.e., to the application or higher
Table 4.1

IEEE Unique identifiers (48-bit) used in the MAC-address field: well known
examples of the organisation unique identifier (OUI)

Apple computer
Compaq (ex-Digital)
Hewlett Packard (HP)
IANA (Internet Assigned Numbers Authority)
IANA multicast (RFC 1054)


Organisational unique identifier (OUI)
value in hexadecimal (3 bytes total)
08-00-2B and 00-00-F8

See Chapter 2.
Though the ethernet header is always sent in canonical format, the user data field may be transmitted either
in canonical format (like X.25) or in non-canonical format like IP (Internet protocols are always sent most
significant bit first).


Local area networks (LANs)

layer protocol using the LLC datalink service). The SAP field thus allows multiple protocols
(multiprotocols) to share the same LAN.
The seventh bit (but transmitted second) is the U/L bit (= universally/locally) of a destination SAP (DSAP). It is set to ‘1’ for universally assigned protocol addresses; ‘0’ indicates
that the protocol addresses are locally assigned. The eighth bit (but transmitted first as the
least significant bit) is the I /G bit (individual / group bit). When when set to ‘1’ I/G indicates
that a group address is in use, otherwise value ‘0’ indicates an individual address. In the
source SAP field, the least significant bit indicates whether the control field is a command or
a response.
‘Globally assigned’ SAP values identify different higher layer protocols in the user data
field. Commonly used values are 04, 08 and 0C (or 05, 09 and 0D as group addresses) for
IBM SNA (systems network architecture) over ethernet. 7E identifies ISO 8208 (X.25 over
ethernet), F0 is NetBEUI, E0 is ‘Novell’ and 42 identifies IEEE 802.1D transparent bridging
(about which we shall talk later).
The SAP-field value ‘AA’ indicates an extended SAP address. In this case, a slightly
amended LLC frame format is used to accommodate the longer SAP address. This format is
called the SNAP (subnetwork access protocol) format (Figure 4.6). In effect SNAP is itself a
‘higher protocol sublayer’ inserted above the LLC SAP. The additional fields in the SNAPframe format allow a much wider range of SAP addresses to be allocated (i.e., many more
higher layer protocols to be used in association with ethernet) than the 255 limit of a standard 1byte SAP field. This gives the potential for network and computer equipment manufacturers to
develop their own ‘proprietary’ networking and routing protocols and still have them carried by
multiprotocol ethernet LANs. Table 4.2 lists some of the better known SNAP protocol types.
The control field of LLC contains I-frames (information frames), s-frames (supervisory
frames) and u-frames (unnumbered frames) which serve the same purpose of sequence

Figure 4.6

IEEE 802.2 SNAP(subnetwork address protocol)-format of LLC.

Ethernet LAN datalink layer protocols — LLC and MAC
Table 4.2


Protocol types supported by ethernet SNAP-format


Address resolution protocol (ARP)
Appletalk ARP (address resolution
DECnet maintenance operations
protocol (MOP)
DECnet local area transport (LAT)
DECnet routing
IBM SNA over ethernet
IEEE 802.1Q (VLANs, virtual LANs)
Internet protocol version 4 (IP v4)
Internet protocol version 6 (IP v6)
Novell IPX (Internetwork packet
exchange) protocol
Reverse address resolution protocol
Simple network management protocol
Xerox network system (XNS)

Protocol type (PT)
value in hexadecimal
(2 bytes total)

numbering and flow control as the equivalent frames in HDLC (higher level datalink
control — see Chapter 3).
The frame check sequence (FCS) used by ethernet is a 4 byte (32 bit) cyclic redundancy
check (CRC) code.
The term canonical format used to describe the layer 2 format used in 802.3-based ethernet
refers to the fact that each of the bytes is sent least significant bit (LSB) first. The canonical
format is sometimes also referred to as the little end-ian or hexadecimal representation format.
In contrast to the canonical format, the non-canonical format refers to the transmission of the
bytes most significant bit (MSB) first. The non-canonical format is used for the frame headers in
token ring LANs (IEEE 802.5) and for the user data field of all link-layer protocols (including
ethernet) when sending IP-related protocols. The non-canonical format is also known as the
big end-ian or bit-reversed representation. Naturally, data which traverses both a canonical
and non-canonical network along the course of a ‘connection’ must be converted in format at
each of the network boundaries.
Depending upon the service needs of the higher layer protocol being carried by LLC,
there are two different variant forms of the protocol, called LLC type 1 (LLC1) and LLC
type 2 (LLC2).
LLC1 uses only u-frames (unnumbered frames) with a 1 byte control field. It is suited to
providing an unacknowledged connectionless service, as is suited to the carriage of IP (Internet
protocol). In the LLC1 format, there are only three different types of frame: UI (unnumbered
information: control field value = 03H); XID (exchange information: control field value = AF
or BF) and test frames (control field value = E3 or F3).
In contrast to LLC1, LLC2 provides a connection mode service very similar to HDLC. It is
based on a 2-byte control field (1 byte for u-frames) as illustrated in Figure 4.7 and Table 4.3.
This format is used for connection-oriented network, transport or session protocols such as
IBM’s SNA (systems network architecture), X.25 over ethernet or NetBEUI. Under LLC2,
frames need to be acknowledged.


Local area networks (LANs)

Figure 4.7

LLC control field (canonical) format (for coding see Table 4.3).

Table 4.3

LLC type 2 (LLC2) control field signals and coding



Signal purpose





Sequence numbers of
sent frames N(S)
and next frame
number expected to
be received N(R),
effectively an
of all previously
received frames
Receive ready and
of all frames up to
and including
Receive not ready, but
of all frames up to
and including
Reject, requests
retransmission of
all frames from and
including N(R)th
Set asynchronous
balanced mode;
secondary stations
may send at any






Control field coding



1st byte value: 7 bit
N(S), then 0 (sent
0 then N(S), LSB
2nd byte value: 7 bit
N(R) then Poll bit

P = Poll bit

1st byte value: ‘0000
2nd byte value: 7 bit
N(R), then P/F bit

P = Poll bit
F = Final bit

1st byte value: ‘0000
2nd byte value: 7 bit
N(R), then P/F bit

P = Poll bit
F = Final bit

1st byte value: ‘0000
2nd byte value: 7 bit
N(R), then P/F bit
1st byte value: ‘011P

P = Poll bit
F = Final bit

1st byte value: ‘010P

P = Poll bit

P = Poll bit

Ethernet physical layer — basic functions of the physical layer signalling (PLS)
Table 4.3




Signal purpose

(continued )
Control field coding

having received a
U-frame with a
‘set’ command
Disconnected mode;
notification of a
protocol error
Frame reject




1st byte value: ‘011F

F = Final bit

1st byte value: ‘000F

F = Final bit

1st byte value: ‘100F

F = Final bit

4.5 Ethernet physical layer — basic functions of the physical layer
signalling (PLS)
The basic mode of operation of the physical layer of ethernet is reflected in the original name
used for the IEEE 802.3 standard: CSMA/CD (carrier sense multiple access with collision
detection). It is said to be a contention protocol. The various functions carried out are divided
into sublayers within layer 1 (physical layer) as illustrated in Figure 4.4.
The basic principle is that stations should always listen on the bus for transmissions. Each
transmission ‘heard’ on the bus must have its destination MAC address inspected to check
whether it matches the station’s own address. If the two addresses match (that in the ‘heard’
frame and that of the station itself), then the station reads the frame into its receive buffer.
Otherwise the frame is ignored.
When a station wishes to send data, it must wait until the bus (Figure 4.1c or Figure 4.3a)
is free. It may then transmit a frame onto the bus. While doing so, the transmitter must check
that the frame does not collide with a frame sent almost simultaneously from another station.
The possibility of collision arises because all the stations contend equally for the use of the
bus. To check for a collision, a station compares the actual signal received on the bus with the
signal it is transmitting. If the two differ, then the station knows that there has been a collision,
and stops transmitting immediately (it is said to back-off ). It then sends a jam signal of at
least 32 bits in length, which all stations will receive and interpret as a signal to cease any
concurrent transmission attempts. An algorithm called truncated binary exponential back-off
ensures that different waiting times (chosen at random using a back-off algorithm) are adopted
by the individual stations before the renewed transmission of the frame is attempted.
In order that collisions can be reliably detected, transmissions are required to last a minimum
duration of one slot (MAC slot) period of 512 bit periods (or 4096 bit periods in the case
of 1000baseX). This sets the minimum transmission unit length of 64 bytes we encountered
earlier when discussing the layer 2 (LLC/MAC) frame format. (The actual minimum frame
size including all the preamble, MAC-header and FCS is 72 bytes). Between slots or frames
sent, an interframe gap (IFG) of 96 bit periods ensures that other stations get a chance to
‘butt in’ and thus also get use of the bus. Otherwise one station could dominate the use of
the LAN.
Among other parameters (see Table 4.4), a maximum round-trip delay is defined for different types of ethernet LAN. This value limits the maximum physical size of the LAN (i.e.,
the maximum length of the bus). If the round trip delay were too long, then a reflection of the


Local area networks (LANs)
Table 4.4

Ethernet physical layer signalling parameters and constraints

Bit duration
Slot duration
Minimum frame
Max. Round trip
Maximum frame
Interframe gap
Maximum number
of stations
Usual physical

(fast ethernet)

(gigabit ethernet)

100 ns
512 bits
64 bytes
(72 bytes with all
51.2 µs

10 ns
512 bits
64 bytes
(72 bytes with all
5.12 µs

1 ns
4096 bits
64 bytes

1500 (MTU only)
(1530 with all PCI)
9.6 µs

1500 (MTU only)
(1530 with all PCI)
0.96 µs

1500 (MTU only)
(1530 with all PCI)
0.96 µs




2-pair Cat 5 copper

Cat 5 copper cable
(2-pair for
100baseTX or
4-pair for
100baseT4) or
multimode fibre
100 m (unshielded
twisted pair
copper cable)
400 m (half
duplex fibre)
2 km (full
duplex fibre)
250 m

Multimode fibre or
monomode fibre or
150 ohm twinax or cat 5
cable(1000baseT — IEEE


100 m

domain size

500 m

512 ns

320 m (half duplex [HDX]
fibre) 3 km (full duplex
[FDX] monomode fibre)
200 m copper cable

25 m (1000baseCX) 200 m
(1000baseT) 320 m (half
duplex [HDX] fibre)

transmitting station’s own signal from the most remote end of the LAN would be interpreted
by that station as a signal different to that which it was transmitting, and the collision back-off
procedure would be commenced. Another effect of too long a round-trip delay is that remote
stations would not start to receive a frame of the minimum size until after the sender had completed sending it. In other words, it would not be possible to detect and avert a collision fast
enough: the sender of the packet would not repeat the transmission in the case of a collision
(since it did not detect the collision).
The maximum transmission unit (MTU) size of 1500 bytes (giving a total frame size including preamble of 1530 bytes — see Figure 4.5) is stipulated to ensure that a given station does
not dominate the use of the LAN; and to assist the network interface card (NIC) designers
determine the appropriate size of data buffers.

4.6 Ethernet hubs (half duplex repeaters)
Originally, ethernet was conceived as a bus topology (Figure 4.1 c and Figure 4.3a), but
with the emergence of office structured cabling systems based on twisted pair cabling (either
unshielded twisted pair, UTP or shielded twisted pair (STP) and often to Category 5 (Cat.