Anda di halaman 1dari 50

Physical and Data Link Layers (1 & 2): Ethernet (Network Interfce Card)

The Medium Access Sublayer


IEEE Standard 802 for LANS and MANS
IEEE 802.1 High Level Interface IEEE 802.2 LLC (Logical Link Control) IEEE 802.3 CSMA/CD (Carrier Sense Multiple Access

with Collision Detection) IEEE 802.4 Token-Bus IEEE 802.5 Token-Ring IEEE 802.6 DQDB (Distributed Queue Dual Bus) IEEE 802.7 Broadband Technical Advisory Group IEEE 802.8 Fiber Optic Technical Advisory Group IEEE 802.9 Integrated Voice and Data LAN Working Group IEEE 802.10 LAN Security Working Group IEEE 802.11 Wireless LAN IEEE 802.12 Demand-Priority (100VG-AnyLAN) IEEE 802.14 Hybrid Fiber Coaxial Network

Physical and Data Link Layer


To which OSI layer does Ethernet belong? Ethernet belongs to both the Physical Layer (Layer 1) and the Data Link layer (Layer 2) in the OSI architecture. What are the standard data rates for Ethernet? The standard data rates for Ethernet are 10 Mbps, 100 Mbps, and 1 Gbps What are the IEEE standards that cover Ethernet? The following IEEE standards define Ethernet:

+--------+----------------------------------------------------+ |IEEE | Description | |Standard| | +--------+----------------------------------------------------+ |802.2 |Logical Link Control (LLC) Specification. Specifies| | |the general interface between the network layer | | |(IP, IPX, etc) and the data link layer (Ethernet, | | |Token Ring, etc). | +--------+----------------------------------------------------+ |802.3 |CSMA/CD Network (Ethernet) Specification. Specifies| | |the frame format, cabling and signaling standards. | +--------+----------------------------------------------------+

The Medium Access Sublayer


Connecting two Hosts (Bridging) Operation of a LAN bridge from 802.3 to 802.4

The Medium Access Sublayer


IEEE Standard 802 for LANS and MANS

IEEE Standard 802.2: Logical Link Control

The Medium Access Sublayer


IEEE Standard 802 for LANS and MANS IEEE Standard 802.3 and Ethernet 802.3 frame format

0 single address 1 group address 0 local address multicast (all 1's for broadcast) No significance outside

one of 246 unique address 1 global address

The Medium Access Sublayer


IEEE Standard 802 for LANS and MANS IEEE Standard 802.3 and Ethernet IEEE 802.3: 1-persistent CSMA/CD

The Medium Access Sublayer


IEEE Standard 802 for LANS and MANS IEEE Standard 802.3 and Ethernet

The Medium Access Sublayer


IEEE Standard 802 for LANS and MANS IEEE Standard 802.3 and Ethernet

To allow larger networks, multiple cables can be connected by repeaters. A repeater is a physical layer device. It receives, amplifies, and retransmits signals in both directions. As far as the software is concerned, a series of cable segments connected by repeaters is no different than a single cable.

The Medium Access Sublayer


10BASE5 Ethernet medium 10BASE2 Cheaper net 1BASE5 StarLAN 10BROAD36 Broadband coaxial cable 75ohms 10BASE-T Twisted-pair 2 simplex TP unshielded coaxial cable coaxial cable twisted-pair 50ohm-10mm 50ohms-5mm unshielded

signals
maximum segment maximum distance nodes per segment

10Mbps

10Mbps

1Mbps

10Mbps

10Mbps

500m 2.5km 100

185m 0.925km 30

500m 2.5km

1800m 3.6km

100m 1km 2

collision detection
Notes

excess current

2 active hub inputs

transmission =reception

activity on receiver and transmitter

slot time=512 bits; gap time=96 bits; jam=32 to 48 bits

Ethernet
What is Ethernet? Ethernet is a Local Area Network (LAN) cabling and signaling specification for baseband networks. Ethernet uses a bus or star topology for connecting different nodes in a network.

Ethernet Frame (MAC Packet)


The most popular physical layer implementation


Developed in 1982, by DEC, Xerox and Intel Uses Carrier sense, multiple access with collision detection (CSMA/CD) Initially a 10Mb/s signalling rate but developed to be as fast 1Gb/s. Nearly the same as IEEE 802.3

The Medium Access Sublayer


IEEE Standard 802 for LANS and MANS IEEE Standard 802.3 and Ethernet Ethernet Frame Structure (Ethernet Encapsulation) 7 1 6 6 2 Data 4 CRC

preamble SFD DA SA type synchronize the receiver start frame delimiter

60 to 1514 bytes
Cyclic Redundancy Check 0800: IPv4 datagram 0806: ARP request/reply 8035: RARP request/reply 86DD: IPv6 type

Ethernet Frame (contd)

An Ethernet frame:

2 byte type that indicates what kind of data follows, e.g., 0800 for an IP packet Then the data, maximum 1500 bytes, minimum 46 bytes

Data field must be padded with extra bytes if fewer than 46 bytes are supplied

Ethernet Frame (contd)

An Ethernet frame:

4 byte checksum, also called cyclic redundancy check (CRC) Used to check for errors in the frame

Ethernet Frame (contd)

Ethernet is a shared medium

A wishes to send to B

Ethernet Frame (contd)

Ethernet is a shared medium

A wishes to send to B

If C is already sending to D, then A must wait

Ethernet Frame (contd)

Ethernet is a shared medium

A sends packet, but keeps listening for a clash (collision detection)

Ethernet Frame (contd)

Ethernet is a shared medium

Random wait means one of A or C gets in next, the other sees this through its carrier sense

CSMA/CD
IEEE Standard 802 for LANS and MANS IEEE Standard 802.3 and Ethernet

1. How two systems in an Ethernet network communicate? In a Ethernet network, a system broadcasts the data using a Ethernet frame. The destination system is specified in the Ethernet frame using its Ethernet address. All the systems in the network listen for an Ethernet frame with their Ethernet address in it. When a system receives an Ethernet frame with its address in it, it processes the frame and sends it to the higher layers (like IP) for further processing. 2. What is a "collision"? At any one instance, in an Ethernet network, only one device can transmit. If two devices transmit at the same instance, then the signals from both devices will collide and a "collision" will occur. When a "collision" occurs, the signals will get distorted and the frame will be lost. Collisions are very common in a Ethernet network. 3. How is "collision" handled in Ethernet networks? Ethernet uses the Carrier Sense Multiple Access with Collision Detection (CSMA/CD) media access control mechanism to detect and recover from a collision.

What is CSMA/CD? CSMA/CD is a media access control mechanism used in Ethernet to recover from frame collision. The following steps are used to recover from a collision. Step 1: Before an Ethernet device sends a frame on the Ethernet cable, it listens to find if another device is already transmitting a frame (Carrier Sense). Step 2: Once the device finds that other devices are not transmitting any frame, it starts transmitting the frame. If two devices detect that the Ethernet cable is free at the same time, then both will start transmitting the frames (Multiple Access). This will result in collision. Step 3: The Ethernet devices while transmitting the frames, also listen for the collision. (Collision Detect). Step 4: If they detect a collision, both the devices stop sending the frame (back off). Step 5: They retry the transmission after a logarithmic time-out period. This process is repeated till the frame is transmitted successfully, for a maximum of 16 times. The frame is discarded after the 16th retry.

Physical Layer Adressing


1. What is an Ethernet address? Each device in an Ethernet network is uniquely identified by a 48 bit (6 bytes) address called Ethernet address. Ethernet address is also known as Media Access Control (MAC) address. Ethernet addresses are represented as six pairs of hexadecimal digits separated by a colon. Ethernet address are buried in the network adapter by the manufacturer. A Ethernet address of a device cannot be changed. Example: 00:60:08:11:B1:AB, 00:00:c0:5e:83:0e
2. What is a broadcast address? The Ethernet address in which all the bits are 1 is known as a broadcast address. It is represented as FF:FF:FF:FF:FF:FF. A frame with this address is received and processed by all the nodes in the network.

LAB: Format of an Ethernet frame


Destination MAC Address (6 bytes) Source MAC Address Frame type Data CRC

(6 bytes)

(2 bytes)

(1500 bytes)

(4 bytes)

Using TCPDUMP read the Ethernet frames into a text file and analyse them in order to identify the fields.

What is MTU?
Maximum Transmission Unit (MTU) is the maximum number of bytes that can be transmitted in a single transmission unit.

Every communication medium has a MTU. For Ethernet, the MTU of a frame is 1500.
DMTU changes for differenet physical networks

Ethernet Hardware

100BaseT4 100BaseT 100BaseF 1000BaseT

Twisted pair Twisted pair Fibre optic Twisted pair

100m 100m 2000m 100m

100Mb/s 100Mb/s 100Mb/s 1Gb/s

Plus several others ...

Ethernet Hardware

10Base5: fat coaxial cable (yellow) with vampire taps and drop cables (blue) to the hosts, AUI plugs 10Base2: Thinnet, simple coaxial cable, BNC connectors directly to the hosts
10BaseT: twisted pair (UTP), RJ45 plugs, each host connects to a central hub

Ethernet Hardware
Unshielded Twisted Pair (UTP)

Category 1: No performance criteria Category 2: Rated to 1 MHz (used for telephone wiring) Category 3: Rated to 16 MHz (used for Ethernet 10BaseT) Category 4: Rated to 20 MHz (used for TokenRing, 10BaseT)

Category 5: Rated to 100 MHz (used for 1000BaseT, 100BaseT, 10BaseT)

Ethernet Hardware
Unshielded Twisted Pair (UTP)

Enhanced Category 5: Rated to 200 MHz (used for 1000BaseT, 100BaseT, 10BaseT) Category 6: Rated to 250 MHz (used for 1000BaseT)

Category 7: for the future, but should be shielded twisted pairs (STP), new connectors (GG45), 600MHz

Ethernet Hardware: Hubs


A hub simply echoes all inputs to all outputs


Provides a single collision domain The available bandwidth shared between all the hosts

Ethernet Hardware: Switches

A switch understands the link layer and forwards a packet to the appropriate single output Each output cable is now a separate collision domain
The full bandwidth available on each output Collisions only if two hosts send to the same destination simultaneously

Ethernet Hardware: Switches


Switches can store and forward packets


Then there can be no collisions and we can do away with CSMA/CD Buffers can fill up, though, then packets will be dropped

Ethernet Hardware

Switches can cut through, sending the start of the packet onwards before the tail has arrived
Less latency through the switch, but would forward corrupted packets

Ethernet Hardware: Switches

Switches can run full duplex, with independent inward and outward traffic to each host
This gives twice the total bandwidth No collisions possible as inward and outward traffic runs over different twisted pairs

Ethernet Hardware: Switches


10Mb/s, 100Mb/s, 1Gb/s, ...


These can autonegotiate to select optimum speed Gigabit over copper: very complicated hardware Gigabit CSMA/CD requires carrier extension to make the packets big enough Compensates with packet bursting

Ethernet Hardware: Switches


10Gb/s Ethernet coming soon


Full duplex switched only, no CSMA/CD Mainly fibre optic, but copper is under consideration 40Gb/s and 100Gb/s Ethernet in the planning stages Proponents claim that Ethernet will take over the world!

ADSL

Another technology to send data down telephone lines, Asymmetric Digital Subscriber Line The current technology of choice for Internet to the home

ADSL Modems

Analogue modems are limited to 56Kb/s, the maximum speed available from a standard analogue telephone line: all frequencies apart from a 3KHz chunk centred on the human voice are filtered out and thrown away
The telephone cable is capable of more, ADSL tries to take advantage of this ADSL (one of a series of DSL standards) requires new hardware in the home and in the telephone exchange

ADSL Signaling

A certain amount of bandwidth is available on the wire: limited by the quality of the wire, its length, local electrical interference and so on

ADSL Signaling (contd)

ADSL splits this into uplink and downlink parts, e.g., 256Kb/s up and 2Mb/s down (appropriate for a home user) Also keep the voice channel (POTS: plain old telephone system) ADSL is permanently connected; no need to dial up

ADSL Signal Encoding

Often encoded using Discrete Multi Tone (DMT) This splits the available frequency range (0Hz to 1.104MHz) into 256 channels of 4kHz Channels 1-6 are used for telephony, including the voice channel

ADSL Signal Encoding (contd)

Each channel encodes as many bits as the current environment allows: possibly 0 to 15 bits/Hz A noisy channel (e.g., a nearby fluorescent light) might encode only one or two bits/Hz

ADSL Signal Encoding (contd)

Other channels outside the interference can encode at their full rates Encoding is using Quadrature Amplitude Modulation (QAM)

ADSL Frames

Data is transmitted in superframes containing 69 ADSL frames


Last is synchronisation; rest are data

ADSL Frames (contd)

ADSL frames contain


Fast byte contains CRCs or administrative flags An error correction field to aid against corruption

ADSL Features

Available bandwidth decreases as cable length increases: a practical limit of about 5-6km (3-3.5 miles) Typical ADSL allows up to 8Mb/s downstream and 960Kb/s upstream A common method of delivery of ADSL to the home is to use a modem that plugs into the USB port on a computer
Then a Web browser will use HTML over HTTP over TCP over IP over PPP over AAL5 over ATM over ADSL over USB over copper!

The Medium Access Sublayer


IEEE Standard 802 for LANS and MANS IEEE Standard 802.5: Token Ring

The Medium Access Sublayer


IEEE Standard 802 for LANS and MANS IEEE Standard 802.5: Token Ring

How to release token after transmission


RAT:release after transmission more efficient RAR:release after reception

IEEE 802.5 standard 1. RAR 2. 1 or 4 or 16 Mbps 3. token holding time=10ms 4. can enforce priority (none in 802.3) 5. centralize control (a monitor station) 6. sender removes the frame (ack is easy)

The Medium Access Sublayer


IEEE Standard 802 for LANS and MANS IEEE Standard 802.5: Token Ring frame format 1 1 1 2 or 6 2 or 6 4 SD AC FC DA SA LLC frame E:error bit F:final bit 1 1 token 1 1 1

CRC ED FS

SD AC ED

3 priority empty of full monitor bit

monitor_present purge (reinitialize the ring) claim token (I_want_to_be_monitor) ...

A bit:address present C bit:copy bit (All duplicate 1 bit.)

reservation priority

SD:start delimiter,FS:frame status AC:access control,ED:end delimiter FC:frame control

The Medium Access Sublayer


IEEE Standard 802 for LANS and MANS IEEE Standard 802.5: Token Ring

Anda mungkin juga menyukai