Sunteți pe pagina 1din 12

LAN and Ethernet Basics

– Deepak George

OSI Network Layers:


(1) Physical Layer: Line drivers / receivers, Encoders / Decoders,
Timing. Used for physical channel access
(2) Data Link Layer: Framing, Link Addressing, Error Detection, Error
and Flow Control. Used for direct communication.
(3) Network Layer: Global Addressing, Routing, Lifetime control,
fragmentation and reassembly. Used for network wide communications.
(4) Transport Layer: Error control, flow control, sequenced delivery.
End-to-End communication.
(5) Session Layer: Process Multiplexing, registration and access
control. Process to process communication
(6) Presentation Layer: Independence of local data formats. Data
presentation
(7) Application Layer: File transfer, mail, terminal emulation etc.
Application program interfaces. Generic application functions.
For LAN switches the layers with particular concern are physical layer, data link
layer and network layer. Out of this for architecting advanced switches data link layer
and the network layer is of particular interest.

- Data Link Layer:


This layer provides services that allow direct communication between devices
transparently across the underlying physical layer. Depending on the
configuration it could be point-to-point or point-to-many.

- Network Layer:
This layer is responsible for station to station data delivery across multiple data
links. The network layer is responsible for routing of the packets across the
internetwork and for this they usually use ROUTERS. Network layer protocols
include IP used in TCP/IP, IPX used in Netware, DDP used in AppleTalk.

For most network architectures Transport Layer is where the buck stops. The underlying
communication layers may cause the packets to be dropped, delivered out of sequence or
corrupted by errors, but the transport layer deals with these nasty details of the network
behavior. It provides its clients with a perfect pipe: an error free, sequenced, guaranteed
delivery message service that allows process to process communications between stations
across an internetwork as long as there is a communication path available.

Eg: TCP of TCP/IP, Sequenced packet exchange (SPX) netware, appletalk transaction
protocol (ATP).

Data Link Layer: - Connectionless Vs Connection oriented:


A connection oriented link usually provides both error and flow control between
the link partners and operates a closed loop: once a connection is established there is a
continuous exchange of data and feedback control information in both directions.
A connection less link provides no guarantees regarding frame delivery to target
destinations. It is a best effort service. The advantage is it is less complicated and much
lesser data exchange between stations and therefore lower cost. LAN normally uses
connectionless data link protocols except for Token Ring which is connection oriented.

Data Link Sublayering:

The data link layer is further subdivided into two distinct sublayers:
(1) Logical Link Control
It is the upper sub-layer that connects to the higher layers so that they don’t have
to deal with the details of the particular LAN technology employed. The higher
OSI layer can use the same service interface to the Data Link Layer, whether it is
operating over Ethernet, token ring, FDDI or any other underlying technology.

(2) Medium Access Control


This is the sublayer that deals with the details of frame formats, arbitration
mechanism required etc for the particular LAN technology.
MAC Addresses:
There are two 48-bit addresses, source address and destination address. The 48 bit
address space is divided into two halves: unicast address and multicast address.

Unicast Address: It identifies a single device or network interface. When frames are sent
to a single station on a LAN the unicast address is used as the destination address. The
source addresses of the transmitted frames are always unicast.

Multicase Address: It identifies a group of logically related devices. This provides a


means to send frames to multiple stations with a single transmission. Multicast address
are sometimes called group addresses or logical addresses.

MAC Address = 48-bit = 6 bytes. Out of this the first 3 bytes are the Organizationally
Unique identifier (OUI) and the last 3 bytes the Organization Assigned Portion (OAP).

First Bit of destination address (DA) is called individual/ group or I/G bit in IEEE
standards indicates whether the target recipient is a individual station or a group of
stations.

I/G = 0 – Unicast
I/G = 1 – Multicast

So there can be 247 unicast address or multicast address. The source address is always a
unicast as transmission always emanates from a single device.

Destination Address: ff-ff-ff-ff-ff-ff is a special multicast address defined in the IEEE


standards called Broadcast Address, where one station can send a frame to all stations on
a LAN simultaneously.

Globally Unique/ Locally Unique Address:


Second bit of the MAC address (both source and destination) Global/Local or G/L
bit according to IEEE LAN standards and allows a means for network administrator to
have a Globally Administered Addresses or Locally Administered Addresses in their
LAN networks.

G/L = 0 – Globally Administered


G/L = 1 – Locally Administered

Globally Unique Address is assigned by the equipment manufacturers at a time a device


is produced. Locally Unique address is manually assigned by the network administrator
and it is his responsibility to make sure that the addresses on the given LAN are unique.
For globally unique addresses the 48-bit address is divided into 2 parts: first three bytes is
the OUI and this is administered by IEEE. When assigning OUI, IEEE ensures that the
G/L bit is 0.

Ethernet Basics:
Ethernet was originally conceived and implemented at Xerox cooperation in 1973
and the lab prototype was developed by Dr. Robert Metcalf who is generally regarded as
the father of Ethernet. The IEEE working group 802, in June 1983 introduced IEEE 802.3
the first IEEE standard for LANs based on Ethernet technology.

Ethernet Medium Access Control (MAC):


IEEE 802.3 provides two modes of operation for the MAC sublayer: Full Duplex and
Half Duplex.

Half Duplex uses CSMA/CD algorithm to allow stations to decide when it is permissible
for them to transmit on a shared physical channel. In IEEE 802.3 -1998-sec1.4.2 there is
a detailed description of the algorithm with a model in pascal. Bi-directional
communication is accomplished by rapid exchange of frames. Half duplex operation is
supported on all supported media. Below is the flow diagram for frame transmission and
reception. Transmit frame operations are independent from receive frame operations. For
a precise specification of CSMA/CD refer to IEEE 802.3 – 2002 clause 4.2.

Frame Transmission:
When a station has a frame queued for transmission it checks the physical channel to
determine if it is currently in use by another station. This process is called CARRIER
SENSING.

If the channel is busy the station defers the transmission to a later time to avoid
corrupting the ongoing transmission.

After of the end of the transmission in process the station waits for a period known as the
INTERFRAME GAP to allow the physical channel to stabilize and to additionally allow
time for receivers to perform housekeeping functions like adjusting buffer pointers,
updating management counters etc. After expiration of IFG the station begins its
transmission.

If it is the only station on the network with a frame queued for transmission at this time it
should be able to send the frame after the expiration of the IFG with no interference from
other stations.

On the other hand if there are multiple stations with frames queued for transmission, each
will start to transmit after expiry of IFG follow the deassertion of carrier sense, resulting
in COLLISION. In the event of a collision all the involved stations continue to transmit
for a short period to ensure that the collision is obvious to all parties. This process is
called JAMMING. After jamming the stations abort their current transfers and wait for a
random period of time. This is referred to as BACKOFF. After backoff the station goes
back to the beginning and starts the process again. If the station encounters 16
transmission attempts all resulting in collisions the frame is discarded by the MAC,
backoff counter is reset and the event is reported to management and the station proceeds
with the next frame in the transmit queue.

The backoff time for any transmission attempt is a random variable with an exponentially
increasing range for repeated transmission attempts. The range r of the random variable
selected after the n transmission attempt is:

0 <= r < 2k

Where k = MIN (n,10)

Thus the station starts with a range of 0 to 1 on first collision and increases to 0 to 3, 0 to
7, 0 to 15 and so on till a max range of 0 to 1023 with repeated collisions encountered on
the same frame. The backoff time is measured in terms of the worst case round-trip
propagation delay of the channel known as SLOT-TIME.

Slot-time is 512 bit times for all Ethernet data rates except 1Gb/s. This translates to a
quantum of 51.2 uS at 10Mb/s and 5.12 uS at 100Mb/s. On gigabit Ethernet port the slot-
time is defined as 4096 bit time and translates to 4.096 uS.

Frame Reception:
When a station gets an indication from the channel that a frame is being received, the
station begins receiving the bits from the channel looking for the preamble and start-of-
frame delimiter that indicates the beginning of the MAC frame. The station continues to
receive the frame as indicated by the underlying channel.

A receiving MAC discards any receive frames that is less than one slot-time in length
because by definition this is because of collision. Valid frames will always be greater
than the slot-time. If the frame meets the length requirement then it is checked for the
Frame Check Sequence (FCS- CRC) and is discarded if the FCS doesn’t match the proper
value for the frame.
If the frame length and the FCS is correct the station will check the destination address is
matching the address of the receiving station or it is one of the multicast address that the
station is programmed to receive. Once all these entities are matched the station will
accept this frame and then will continue with the receive process.

Parameterized values for 10 Mb/s CSMA/CD implementation:

Parameterized values for 100 Mb/s implementation:

Parameterized values for 1000 Mb/s implementation:

Full Duplex Mode can be used only when:


(a) The medium can support simultaneous transmission and reception with
interference.
(b) There are exactly two stations on the LAN. This allows the stations to be treated
as full-duplex point to point connections and since there is no contention for the
use of the shared medium MAC access algorithms are not necessary.
(c) Both Stations on the LAN are capable to be configured as full-duplex.

The operational mode of the MAC can be arrived through auto-negotiation functions
specified in IEEE 802.3 clause 28 and 37 or through manual configuration. When using
manual configuration the stations at both the ends of the link should be configured to
matching modes to ensure proper operation.

Ethernet Frame Formats:


There are two types of encapsulation for Ethernet: Type and Length. The preamble/SFD,
address and FCS are common to both types.

All Ethernet frames begin with a 8 byte field comprising of preamble and SFD. Preamble
comprises of 7 bytes of 0x55 and SFD is a single byte of 0xD5. The effect is to send an
alternating stream of 1010101010 .. for 62 bits, followed by 11, signifying the end of the
delimiter sequence and the beginning of the destination address. Rest of the frame is as
shown in the frame above.

FCS is a checksum computed on the contents of the frame from the DA through the end
of the data field, inclusive. It is a 32 bit CRC generator and the polynomial is:

The FCS bit is transmitted such that the first bit is the coefficient of the x31 term and the
last bit is the coefficient of the x0 term. Thus the bits of CRC are transmitted: x31, x30,
x29, …. x1, x0.

Type Encapsulation:
Type fields is a 16-bit value in the range of 0x0600 to 0xFFFF and used to identify the
nature of the client protocol running above Ethernet. Using type field, Ethernet can
upward multiplex among various higher level protocols. Type opcode assignments is
administered by IEEE.

Length Encapsulation:
In length encapsulation the 2-bytes following the SA indicate the number of valid bytes
in the data field. The valid bytes can be in the range 0x0 to 0x05DC. Since there is no
way now to indicate higher layer protocol information, length field is assumed to
encapsulate LLC data.
Ethernet Physical Layer Options:

There are different communications systems available today all called Ethernet. IEEE
802.3 developed shorthand notations that allows to refer to any particular standard
implementation of Ethernet. A given Ethernet flavor is referred to as:

n-signal-phy

n: data rate in Mb/s


signal: BASE/BROAD. Base if the signaling used on the channel is only Ethernet. Broad
if the physical medium can support Ethernet and other possibly non-ethernet services.
Phy: Is the nature of the physical medium. It is simply the code for particular media
type

Examples:
10BASE-T, 100BASE-T, 1000BASE-T – Stands for 2 pairs of Cat3 or better UTP for
10/100 Mb/s and 4 pairs of Cat5 UTP for 10000 Mb/s 100 m maximum.

1000BASE-X – Generic designation for 1000 Mb/s system using 8B/10B encoding.

Definitions and Terms:

Station: Any device that implements network services at data link layer or above is
called a station. It could be either a end station or an intermediate station. End stations are
the source and ultimate destinations of all user data communications across a network.
Intermediate stations are relay devices that forward the messages generated at end
stations across network so that they can reach their target end stations.

Bridge: Intermediate stations that relay frames among various data links (data link layer)
are called bridge.

Catenet: A collection of LANs bridged together is called a catenet or a bridged network.

Router: A collection of stations relaying packets across networks (network layer) is


called a router.

Internet: A collection of networks connected together by routers is called internet. The


network layer protocol that is used on an interwork is called an internetwork protocol or
internet protocol.

Gateway: Refers to a device that provides interconnection between dissimilar protocol


architectures.

************************************************************************
**************************************************
© Deepak George 21/05/2004
www.geocities.com/deepakgeorge2000

S-ar putea să vă placă și