Sie sind auf Seite 1von 46

(Contd.

Carrier Sense Multiple Access (CSMA)


Improve the performance of a simple network
Each host listens to the data being transmitted over the cable A host will only transmit its own frames when it cannot hear any data being transmitted by other hosts When a frame finishes, an interframe gap of about 9.6sec is allowed to pass before another host starts transmitting its frame. Collision may still occur due to propagation delay.
2

Carrier Sense Multiple Access (CSMA)...


Due to propagation delay, two Stations may not hear each others transmission, resulting in a Collision. In Case of Collision, entire transmission time is wasted. Longer the propagation delay, higher the chance of collision.
3

Carrier Sense Multiple Access (CSMA)...


Persistent CSMA (or 1-Persistent CSMA)
When a station wants to send data, it listens to channel. If channel is busy, then it continually sense and waits

for channel to be free. Sends the frame as soon as channel becomes idle. Collision may occur even if propagation delay is 0. Its because two stations may be waiting for channel to be idle and may start transmitting at exactly same time. If collision occurs, stations waits for random amount of time and starts over again.
4

Carrier Sense Multiple Access (CSMA)...


Non-Persistent CSMA
Less Greedy than the persistent CSMA Before Sending, station Sense the Channel. If no one else is sending, it begins its transmission. However, if channel is in use, it waits for random

amount of time rather than continually sensing and waiting the channel to be free. It leads to better channel utilization but longer delays than 1-Persistent CSMA.
5

Carrier Sense Multiple Access (CSMA)...


p-Persistent CSMA
Applies to slotted channels If channel is busy, waits for it to be idle. If channel is idle, station transmits with probability p

(ie. It defers untill next slot with probability q = 1-p) If next slot is also idle, it transmits or defers with probabilities p and q. Same process is repeated untill either frame has been transmmitted or another station starts transmission.
6

Carrier Sense Multiple Access (CSMA)...


p-Persistent CSMA
If another station begun transmitting, the unlucky

station acts as if there has been a collision (ie. It waits for random amount of time and starts over again) Better trade-off between non-persistent and 1-persistent CSMA

Comparison of the channel utilization versus load for various random access protocols.
8

CSMA with Collision Detection (CSMA/CD)


Widely Used on LANs in MAC Sub-layer
Basis of Popular Ethernet LANs Detects Collision within short period and quickly aborts

transmission in case of collision, thus reducing channel wastage. Detects collision by comparing transmitted and received signal. Easy in wired LANs but difficult to implement in wireless LANs(as in WLANs receiver shuts off while transmitting)
9

CSMA with Collision Detection (CSMA/CD)...

Transmission is aborted as soon as Collision is detected.


10

CSMA with Collision Detection (CSMA/CD)...


Let, be time for signal to propagate between two farthest stations.

Collision Detection can take as long as 2.


11

CSMA with Collision Detection (CSMA/CD)...


CSMA/CD can be in one of the three states : Transmission : Frame being transmitted Contention : Failed Transmission due to Collision Idle : Free Channel

12

CSMA with Collision Avoidance (CSMA/CA)


Used for Wireless LANs where Collision Detection is not possible (as Receiver shuts off while transmitting).
Device wanting to transmit senses the medium (Air)

If medium is busy defers for random time


If medium is free for certain period (DIFS) - transmits frame

Problems:
Hidden Station Problem Exposed Station Problem
13

CSMA with Collision Avoidance (CSMA/CA)

(a) The hidden station problem. (b) The exposed station problem.

14

Media Access Collision Avoidance for Wireless (MACAW)


CSMA/CA with RTS-CTS Scheme Virtual Channel Sensing If channel is idle, Station broadcasts an RTS(Request to

Send) All other stations, except the one requested, will now temporarily shuts off. Time to shut off can be estimated through RTS sent. The receiver then broadcasts CTS(Clear to Send) CTS will be received by stations in range of receiver that might be hidden to transmitter, so now these hidden terminals also keeps quiet temporarily. These stations will be functional again after receiver sends ACK to the Transmitter. 15

Media Access Collision Avoidance for Wireless (MACAW)...


A

Range B of A

Range of B

The use of virtual channel sensing using CSMA/CA.


*NAV (Network Allocation Vector) : Internal Reminder to keep quiet for certain time

16

IEEE Standards
IEEE 802.3 (Ethernet)
IEEE 802.4 (Token Bus) IEEE 802.5 (Token Ring) IEEE 802.11(Wireless LAN) Defines the Physical Layer and Data Link Layer Protocols

to be followed.

17

The Ethernet
IEEE 802.3 : CSMA/CD Bus LAN (Old Ethernet) Physical Layer :

Ethernet Cabling

Manchester Coding Technique

18

The Ethernet
IEEE 802.3 : CSMA/CD Bus LAN (Old Ethernet) MAC Sub-Layer

Uses CSMA/CD for Multiple Access Senses Carrier before Transmitting Listens for Collision while Transmitting Upon Collision Detection, backs-off for random time and retransmit Uses Binary Exponential Back-off Algorithm NOTE: is the time for signal to propagate Time divided into slots of 2 between two farthest stations. Exponentially increase domain for choosing random backoff time eg. after first Collision, choose random number from 0 and 1 (ie. out of 21 numbers) and multiply by 2 to get backoff time. 2nd time choose from 0, 1, 2 and 3 (ie. out of 22 numbers) and so on until the range reaches 0 to 1023.
19

The Ethernet...
IEEE 802.3 : CSMA/CD Bus LAN (Old Ethernet)

MAC Sub-Layer Frame Format

Preamble (Pre) : 7 Bytes bit pattern 10101010 used for synchronization Start-of-frame delimiter(SFD) : 10101011 indicates Start of Frame DA,SA : 6 bytes Destination and Source MAC Addresses Length/Type : Length of data Field in bytes (but in Ethernet II, this field identifies the Type of Network Layer Protocol used.) Data : Upper Layer Data (min. 46 bytes, max.1500 bytes) FCS : 4 Bytes error detection CRC Calculated over DA,SA,Length and Data Fields
20

The Ethernet...
Switched Ethernet Each host in separate collision Domain If two hosts transmits data at the same time, data is buffered in input port of the switch to prevent from collision. Widely Used LAN Technology due to increased efficiency and speed.

A simple example of switched Ethernet.

21

IEEE 802.4 : Token Bus


Physical Layer Coaxial Cable Analog modulation Scheme

Phase continuous freq. shift keying Phase coherent freq. shift keying Multi-Level, Duo Binary Amplitude modulated freq. shift keying

Physical Bus but Logical Ring Topology Stations are Aware of their Logical left and right Stations Physical layer totally incompatible with IEEE 802.3

Token, that authorize a node to transmit data, is passed from

one node to the adjacent node(either logical left or right). At any time only one node (the token holder) is allowed to transmit data. 22

IEEE 802.4 : Token Bus...


Physical Bus but Logical Ring Topology
Direction of Motion of Token

MAC Sub-Layer Frame format


Bytes

Preamble: used for synchronization Frame Control distinguishes data from control frame (eg. Token) If the frame is data frame, FC contains priority
*Other Fields as in IEEE 802.3 23

IEEE 802.5 : Token Ring


Physical Layer
4 and 16 Mbps using twisted-pair cabling
differential Manchester line encoding.

Media Access By Token Passing Token Circulates around ring when all stations are idle 1 token => only one transmitter, ie. no collision
Time limit for token holding : 10 ms (Default)

24

IEEE 802.5 : Token Ring...


Token Ring Frame Format

Access Control with token bit distinguishes token from data Control Frame distinguish data from control frame

End Delimiter indicates end of frame

*Other Fields as in IEEE 802.4

Good Performance in High Load Disadvantage one link or node failure results in Network Failure

25

IEEE 802.11 : Wireless LAN


Protocol Stack

Part of the 802.11 protocol stack.

Physical Layer Medium is obviously free space (Air)


26

IEEE 802.11 : Wireless LAN


Physical Layer Infrared

Uses Diffused infrared (ie. Not line of sight) 1 Mbps and 2 Mbps Speeds Not popular option 79 channels of 1 MHz each starting at low end of 2.4 GHz Pseudo random number generator produce sequence of frequencies Each station stays in one freq. for fixed time (called dwell time) As long as all stations use same seed, they stay tuned to each other. Secured due to freq. hopping and dwell time But bandwidth is low
27

FHSS(Frequency Hopping Spread Spectrum)


IEEE 802.11 : Wireless LAN


Physical Layer DSSS(Direct Sequence Spread Spectrum)

Restricted to 1 or 2 Mbps as FHSS Some similarity with CDMA system Each bit transmitted as 11 chips (called Baker Sequence) Uses phase shift modulation at 1Mbaud 1 bit per baud => 1 Mbps 2 bit per baud => 2 Mbps

OFDM (Orthogonal FDM) used in IEEE 802.11a HR-DSSS(High Rate DSSS) used in IEEE 802.11b

28

IEEE 802.11 : Wireless LAN


MAC Sub-Layer 802.11 supports two modes of operation

DCF(Distributed Coordination Function) No central control (as in Ethernet) Ad-hoc wireless LAN Normal CSMA/CA or CSMA/CA based on MACAW is used PCF(Point Coordination Function) Base station to control all activities Communicate via Central Station eg. Using Access Points Central station periodically broadcast Beacon frame containing Hopping sequence and dwell times(for FHSS), Clock Sync. Also invites new station to sign up polling service
29

IEEE 802.11 : Wireless LAN


MAC Sub-Layer

Interframe spacing in 802.11.

SIFS (Short Inter Frame Spacing) : Send RTS, CTS, ACK PIFS (PCF Inter Frame Spacing) DIFS (DCF Inter Frame Spacing) EIFS (Extended Inter Frame Spacing) : Report bad Frame
30

IEEE 802.11 : Wireless LAN


802.11 Data Frame Structure

Frame Control: Contains following


Version: Protocol version Type : data, control or mgmt. Subtype : RTS or CTS To/From DS: Going to or Coming from intercell distribution (eg. ethetnet) MF: More fragments to follow Retry: Retransmission of earlier frame Pwr: used by base station to sleep or wake receiver More: sender has more frames for receiver W: WEP Encryption O : sequence of frames must be processed in order

Duration : time to occupy channel, used by other stations to manage NAV Addresses : Two are source and destn. Add. of sender and receiver, other

two are that of base stations for intercell traffic.

31

FDDI (Fiber Distributed Data Interface)


Transmission Media: Optical Fiber

Ring Topology and Token passing for Media Access Two complete counter-rotating rings(Primary and Secondary) to

overcome failures Supports extension up to 100 Km (Max. Total Length of ring). Allows a maximum of 500 stations with maximum node-to-node distance of 2 Km for multimode, 40 Km for single mode.
32

FDDI (Fiber Distributed Data Interface)...


Data rate 100Mbps, used as a high speed backbone technology As LLC protocol matches, FDDI is compatible with Token Ring and

Ethernet as well.

33

FDDI (Fiber Distributed Data Interface)...


Stations can be attached as Single Attachment Station (SAS) or Dual

Attachment Station (DAS)

FDDI SAS

34

FDDI (Fiber Distributed Data Interface)...


SAS attaches to only one ring (Primary) through the Dual

Attachment Concentrator(DAC) directly or via Single Attachment Concentrator(SAC). FDDI ring is not affected even if SAS is powered off or disconnected.

35

FDDI (Fiber Distributed Data Interface)...


Fault Tolerance Features
Dual Ring Environment If Station in Dual ring fails or is powered off or if the cable is damaged, the dual ring is automatically wrapped into a single ring.

Cable Failure

Station Failure 36

FDDI (Fiber Distributed Data Interface)...


Fault Tolerance Features
Optical Bypass Switch Upon Failure of DAS, optical bypass switch will pass light through itself, thereby maintaining the rings integrity. Ring will not wrap up into single, ie dual ring will be maintained

37

FDDI (Fiber Distributed Data Interface)...


Dual-Homing support Critical devices (like routers, mainframe hosts) are connected to two concentrators. One pair of link is declared active while another one passive Passive line stays in backup mode. In case, if active link (or DAC attached to it) is damaged, Passive link automatically activates.

38

FDDI (Fiber Distributed Data Interface)...


Frame Format

Frame controlIndicates the size of the address eld, whether the

frame contains asynchronous or synchronous data, and other control information. InfoContains either information destined for an upper-layer protocol or control information. Frame check sequence (FCS)4 byte CRC Frame statusAllows the source station to determine if an error occurred and if the frame was recognized and copied by a receiving station. *Other Fields as mentioned in
previous MAC Sub-Layer Protocols

39

VLAN (Virtual LAN)


Uses Intelligent, High Speed Switches Computers are assigned a LAN Segments by Switch Standardized as IEEE 802.1q and 802.1p Two Basic Designs
Single-Switch VLANs

Multiple-Switch VLANs

Computers are connected through large physical switch Assignments of computers to VLANs can be done as:
Port Based VLANs : According to VLAN switch port

MAC Based VLANs : According to Computers MAC Address


IP Based VLANs : According to IP address (by Layer 3 Switches)

40

VLAN (Virtual LAN)...


Port Based VLAN
Disadvantage of this method is that it

Port

VLAN

1
2 3 4

1
1 2 1

does not allow user mobility

MAC Based VLAN


Advantage : no reconfiguration needed Disadvantage : VLAN membership must be

MAC Address 1A-2B-3C-4D 23-01-DA-D3 5D-6A-7C-BB 34-55-DC-BF

VLAN 1 2 2 1
41

assigned initially. performance degradation as members of different VLANs coexist on a single switch port

VLAN (Virtual LAN)...


IP Based VLAN Advantage: Good for application-based VLAN strategy User can move workstations eliminate the need for frame tagging Disadvantage : Performance/ looking for L3 address in packet
IP Subnet VLAN

23.2.24.0/24
26.21.35 .0/24

1
2

42

VLAN (Virtual LAN)...

(a) Four physical LANs organized into two VLANs, gray and white, by two bridges. (b) The same 15 machines organized into two VLANs by switches.
43

VLAN (Virtual LAN)...

Transition from legacy Ethernet to VLAN-aware Ethernet. The shaded symbols are VLAN aware. The empty ones are not.
44

VLAN (Virtual LAN)...


The 802.3 (legacy) and 802.1Q Ethernet frame formats

VLAN protocol ID : always 0x8100 (>1500) indicating that it is a type

and not to be confused as length. Pri- Priority of frame CFI Canonical Format Indicator , originally indicate little/big endian MAC Address , now to indicate 802.5 frame VLAN Identifier : Determines the VLAN that the frame belongs to.
45

MAC Address
Media Access Control MAC A unique 48-bit address assigned to each network card IEEE Standard also allow 16 bit MAC address but are rarely

used. Encoded into the firmware of cards during manufacture. The most significant bit is set to 0 to indicate an ordinary address and 1 to indicate a group address (Multicasting) All 48 bits set to 1 indicates the broadcast address. A broadcasted frame is received by all devices in network. Eg MAC Address : 2A-4B-B3-45-C3-B4

46

Das könnte Ihnen auch gefallen