Mac

95
1 What are going to be discussed Introduction to broadcast networks Overview of LANs: frame format & placement in OSI. Random access: ALOHA & CSMA-CD (Carrier Sensing Multiple Access with Collision Detection ) i.e., Ethernet. Scheduling: token-ring. LAN standards (brief view) LAN bridges: used to connect several LANs.

description

:)

Transcript of Mac

Page 1: Mac

1

What are going to be discussed Introduction to broadcast networks Overview of LANs: frame format &

placement in OSI. Random access: ALOHA & CSMA-CD

(Carrier Sensing Multiple Access with Collision Detection ) i.e., Ethernet.

Scheduling: token-ring. LAN standards (brief view) LAN bridges: used to connect several

LANs.

Page 2: Mac

OSIApplication

PresentationSession

Transport

Network

Data Link

Physical

Framing

Error control

Flow control

Transmission/reception of frames

MEDIA ACCESS sublayer

LOGICAL LINK sublayer

Page 3: Mac

3

LAN & MAC (Medium Access Control) protocols

Two basic types of networks: Switched networks: transmission lines,

multiplexers, and switches; routing. Broadcast networks: a single shared medium,

simpler, no routing, messages received by all stations, flat address; however, when users try to transmit messages into the medium, potential conflict, so MAC is needed to orchestrate the transmission from various users.

LAN is a typical broadcast network.

Page 4: Mac

Single communication channel that is shared by all the machines on the network

Broadcast Networks

1 2 3 4 5

computer

cable

Packets Short messages sent by any machine are received by all others

Fields

Address

General Rule: Smaller, geographically localized networks

Quick Review…

Page 5: Mac

Packets 1 2 3 4 5

ALL machines receive it, but one processes it

Also possible to address a packet to ALL machines (special code in the address field)

Mode of operation: Broadcasting

Also possible to address a packet to a SUBSET of machines(group number code in the address field)

Mode of operation: MulticastingQuick Review…

3

Page 6: Mac

BROADCAST NETWORKS AND THEIR PROTOCOLS

The Medium Access Sublayer

deals with

Page 7: Mac

12

34

5M

Shared MultipleAccess Medium

1. Any transmission from any station can be heard by any other stations

2. If two or more stations transmit at the same time, collision occurs

Multiple access communications

Page 8: Mac

Satellite Channel = fin

= fout

Satellite communication involves sharing of uplink and downlink frequency bands

Page 9: Mac

9

Multidrop telephone lines

Inbound line

Outbound line

Figure 6.4

Multi-drop telephone line requires access control

Host

Terminals

Page 10: Mac

10

Ring networks

Multitapped Bus

Figure 6.5

Ring networks and multi-tapped buses require MAC

Page 11: Mac

11Figure 6.6

Wireless LAN: share wireless medium and require MAC

Page 12: Mac

12

Medium Sharing Techniques

Static Channelization

Dynamic Medium Access Control

Scheduling Random Access

Figure 6.2

Approaches to sharing transmission medium

Partitioned channelsare dedicated to individual users, sono collision at all.Good for steady trafficand achieve efficient usage of channels

Good for bursty traffic.

Schedule a orderly accessof medium. Good for heaviertraffic.

Try and error. if no collision,that is good, otherwise wait a random time, try again. Good for light traffic.

Page 13: Mac

The Channel Allocation Problem

How to allocate a single broadcast channel among competing users?

Static FDM /TDM (Frequency/Time Division Multiplexing)

FDM : Radio/TV broadcasts TDM : POTS (Plain Old Telephone System)

GSM uses both (Global System for Mobile Communications)

Dynamic Pure/ Slotted ALOHA Carrier Sense Multiple Access (CSMA) Protocols Collision free protocols

Page 14: Mac
Page 15: Mac
Page 16: Mac

Dynamic Channel Allocation Technologies

1. Pure ALOHA

2. Slotted ALOHA

3. CSMA

4. CSMA/CD (old ETHERNET)

5. Switching (Fast ETHERNET)

6. Token passing (Token Ring )

Page 17: Mac

ALOHA Protocols

Anyone may transmit whenever they want. (Continuous time model.)

Each radio detects collisions by listening to its own signal. A collision is detected when a sender doesn't receive the signal that it just sent.

After a collision, wait a random amount of time and transmit the same frame again. This technique is known as backoff.

Basic idea:

Page 18: Mac

Pure ALOHA

Page 19: Mac

A Shared Medium Collision Domain

Page 20: Mac
Page 21: Mac
Page 22: Mac

Slotted ALOHA

Time is divided into slots… can only transmit at start of slot

Vulnerable period halved => max. eff is doubled

Requires sync of clocks

Still poor at hi-loads

Page 23: Mac
Page 24: Mac

Carrier Sense, Multiple Access (CSMA)

We can improve the performance of our simple network greatly if we introduce carrier sensing (CS). With carrier sensing, 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.

Communication Link

Page 25: Mac

Carrier Sense Multiple Access (CSMA)

Improves performance when higher medium utilisation When a node has data to transmit, the node first listens

to the cable (using a transceiver) to see if a carrier (signal) is being transmitted by another node.

Page 26: Mac

Persistent and Nonpersistent CSMA

Comparison of the channel utilization versus load for various random access

protocols.

Page 27: Mac

CSMA with Collision Detection

CSMA/CD can be in one of three states: contention, transmission, or idle.

Page 28: Mac

Wireless LAN Protocols

Wireless LAN. (a) A transmitting.

(b) B transmitting.

Page 29: Mac

Wireless LAN Protocols

The MACA protocol. (a)

A sending an RTS to B.

(B responding with a CTS to A.

Page 30: Mac

IEEE 802.3: CSMA/CD Bus LAN The 802.3 standard describes the operation of the MAC

sub-layer in a bus LAN that uses carrier sense, multiple access with collision detection (CSMA/CD). Beside carrier sensing, collision detection and the binary

exponential back-off algorithm, the standard also describes the format of the frames and the type of encoding used for transmitting frames.

The minimum length of frames can be varied from network to network. This is important because, depending on the size of the network, the frames must be of a suitable minimum length.

The standard also makes some suggestions about the type of cabling that should be used for CSMA/CD bus LANs.

The CSMA/CD Bus LAN is also widely called Ethernet.

Page 31: Mac

Ethernet MAC Sublayer Protocol

Frame formats. (a) DIX Ethernet,

(b) IEEE 802.3.

Page 32: Mac

IEEE 802.3: MAC Addresses Every network card in the world has a unique 46-bit serial

number called a MAC address. The IEEE allocates these numbers to network card manufacturers who encode them into the firmware of their cards. The destination and source address fields of the MAC

frame have 48 bits set aside (the standard also allows for 16-bit addresses but these are rarely used).

The most significant bit is set to 0 to indicate an ordinary address and 1 to indicate a group address (this is for multicasting, which means that frames are sent to several hosts). If all 48 bits are set to 1 then frames are broadcast to all the hosts.

If the two most significant bits are both zero then the 46 least significant bits contain the MAC addresses of the source and destination hosts.

Page 33: Mac

IEEE 802.3: Minimum Frame Length

When a host transmits a frame, there is a small chance that a collision will occur. The first host to detect a collision transmits a 48-bit jam sequence.

To ensure that any hosts involved with the collision realise that the jam sequence is associate with their frame, they must still be transmitting when the jam sequence arrives. This means that the frame must be of a minimum length.

The worse case scenario is if the two hosts are at far ends of the cable. If host A’s frame is just reaching host B when it begins transmitting, host B will detect the collision first and send a jam signal back to host A.

Page 34: Mac

CSMA/CD Minimum Ethernet Frame Size

To ensure that no node may completely receive a frame before the transmitting node has finished sending it, Ethernet defines a minimum frame size (i.e. no frame may have less than 46 bytes of payload).

The minimum frame size is related to the distance which the network spans, the type of media being used and the number of repeaters which the signal may have to pass through to reach the furthest part of the LAN.

Together these define a value known as the Ethernet Slot Time, corresponding to 512 bit times at 10 Mbps.

Page 35: Mac

IEEE 802.3: Minimum Frame Length

The longest time between starting to transmit a frame and receiving the first bit of a jam sequence is twice the propagation delay from one end of the cable to the other.

This means that a frame must have enough bits to last twice the propagation delay.

The 802.3 CSMA/CD Bus LAN transmits data at the standard rate of r = 10Mbps.

The speed of signal propagation is about v = 2108m/s.

A BPacket starts attime 0

A BPacket at time tp-

A BCollision occurs

at time tp

Jam sequence

A BJam sequence getsback to A at 2tp

Jam sequence

(a)

(c)

(b)

(d)

Page 36: Mac

IEEE 802.3: Minimum Frame Length

In order to calculate the minimum frame length, we must first work out the propagation delay from one end of the cable to the other.

Page 37: Mac

IEEE 802.3: Minimum Frame Length

Propagation delay time:sec2102

102

400 68

V

dtprop

The round-trip propagation delay is, of course, twice this. Thus the round trip delay is

sec42 propt

With a data rate of MbpsR 10 each bit has

duration

sec1.0000,000,10

11 R

tb

Example #1: Cable = 400m, transm. speed = 10 Mbit/sec, propagation speed = 2*10**8 m/sec

Page 38: Mac

IEEE 802.3: Minimum Frame Length

The number of bits we can fit into a round-trip propagation delay is

bitst

tn

b

pb 40

1.0

42

The minimum frame length is thus 40 bits (5 bytes).

A margin of error is usually added to this (often to make it a power of 2) so we might use 64 bits (8 bytes).

Example #1 – cont.

Page 39: Mac

Two nodes are communicating using CSMA/CD protocol.

Speed transmission is 100 Mbits/sec and frame size is 1500 bytes. The propagation speed is 3*10**8 m/sec.

Calculate the distance between the nodes such that the

time to transmit the frame = time to recognize that the collision have occurred.4

6102.1

10100

81500

R

Lt frame

propframetripround ttT 2_

54

1062

102.1

2

frameprop

tt

V

dtprop

kmVtd prop 181018103106 385

EEE 802.3: Minimum Frame LengthExample # 2

Page 40: Mac

IEEE 802.3: Minimum Frame Length

The standard frame length is at least 512 bits (64 bytes) long, which is much longer than our minimum requirement of 64 bits (8 bytes). We only have to start worrying when the LAN reaches

lengths of more than 2.5km.

802.3 CSMA/CD bus LANs longer than 500m are usually composed of multiple segments joined by in-line passive repeaters, which output on one cable the signals received on another cable. When we work out the minimum frame length for these

longer LANs, we also have to take the delays caused by the passive repeaters (about 2.5sec each) into account as well.

Page 41: Mac

Shortest Ethernet Frame

64 bytes sent at 10Mbps 51.2sec 500m/segment, 4 repeaters between nodes 2500m 25

sec propagation delay The frame should be longer enough for sender to detect

the collision(2x25 or about 50 sec )

Why specify a shortest frame of 64byte?

Node A Node BR1 R2 R3 R4

500m 25 sec propagation delay

Page 42: Mac

IEEE 802.3: Non-Deterministic The 802.3 CSMA/CD bus LAN is said to be a non-

deterministic network. This means that no host is guaranteed to be able to send its frame within a reasonable time (just a good probability of doing so). When the network is busy, the number of collisions rises

dramatically and it may become very difficult for any hosts to transmit their frames.

A real-time computing application (such as an assembly line) will demand that data is transmitted within a specified time period. Since the 802.3 bus LAN cannot guarantee this, its use for

real-time applications may not only be undesirable but potentially dangerous in some situations.

Page 43: Mac

Ethernet Performance

Page 44: Mac

Ethernet Physical Layer standards

10Base5 10 Mbps, Baseband transmission, 500m cable length

10Base2 10 Mbps, Baseband transmission, ~200m cable length

10Base-T 10 Mbps, Baseband transmission, UTP cable

100Base-TX 100 Mbps, Baseband transmission, UTP cable

Page 45: Mac

Ethernet 10Base-T & 100Base-TX

Wiring

Unshielded Twisted Pair (UTP)

Category 5 wiring is best Cat 3 and Cat 4 in some older

installations

Bundle of eight wires (only uses four)

Terminates in RJ-45 connector

Page 46: Mac

10Base-T & 100Base-TX hubs

UTP-based networks use hubs to interconnect NICs each UTP cable runs directly from a NIC to a hub

Page 47: Mac

10Base-T & 100Base-TX hubsHubs have many ports, each of which has one incoming network cable

Hubs are usually located in computer rooms, or network distribution cupboards a patch panel (or patch bay) is used to connect

between hubs and the wall sockets throughout a building

Page 48: Mac

10Base-T & 100Base-TX wiring Wiring

100 meters maximum distance hub-to-station

Can use multiple hubs (max 4) to increase the distance between any two stations

100 m 100 m

200 m

Page 49: Mac

10Base-T to 100Base-TX

Upgrading from 10Base-T to 100Base-TX

Need new hub May have some 10 Mbps ports to handle 10Base-T

NICs May have autosensing 10/100 ports that handle either

Need new NICs Only for stations that need more speed

No need to rewire This would be expensive

Page 50: Mac

Multiple Hubs in 10Base-T

Farthest stations in 10Base-T can be five segments (500 metres apart) 100 metres per segment

Separated by four hubs

100m

100m

100m

100m

100m

500m, 4 hubs

10Base-T hubs

Page 51: Mac

Multiple Hubs in 100Base-TX Limit of Two Hubs in 100Base-TX

Must be within a few metres of each other Maximum span ~200 metres Shorter distance span than 10Base-T

100m

100m2 Co-located

Hubs

100Base-TXHubs

Page 52: Mac

Latency and Congestion with hubs Ethernet is a shared media LAN

Only one station can transmit at a time Even in multi-hub LANs Others must wait This causes delay

One Station Sends

All OtherStationsMust Wait

Page 53: Mac

Fast EthernetThe original fast Ethernet cabling.

Page 54: Mac

Gigabit Ethernet Gigabit Ethernet cabling.

Page 55: Mac

IEEE 802.2: Logical Link Control

(a) Position of LLC. (b) Protocol formats.

Page 56: Mac

Repeaters

Regenerate the signal Provide more flexibility in network design Extend the distance over which a signal may

travel down a cable Example Ethernet HUB

Page 57: Mac

Ethernet Repeaters and Hubs

Connect together one or more Ethernet cable segments of any media type

If an Ethernet segment were allowed to exceed the maximum length or the maximum number of attached systems to the segment, the signal quality would deteriorate.

Page 58: Mac

Ethernet Repeaters and Hubs Used between a pair of segments

Provide signal amplification and regeneration to restore a good signal level before sending it from one cable segment to another

Page 59: Mac

Ethernet Bridge

Join two LAN segments (A,B), constructing a larger LAN

Filter traffic passing between the two LANs and may enforce a security policy separating different work groups located on each of the LANs.

Page 60: Mac

Local Internetworking

A configuration with four LANs and two bridges.

Page 61: Mac

Ethernet Bridges Simplest and most frequently used Transparent Bridge

(meaning that the nodes using a bridge are unaware of its presence).

Bridge could forward all frames, but then it would behave rather like a repeater

Bridges are smarter than repeaters!

Page 62: Mac

Ethernet Bridges

A bridge stores the hardware addresses observed from frames received by each interface and uses this information to learn which frames need to be forwarded by the bridge.

Page 63: Mac

Ethernet Switch Modern LANs

Fundamentally similar to a bridge Supports a larger number of connected LAN segments Richer management capability. Logically partition the traffic to travel only over the

network segments on the path between the source and the destination (reduces the wastage of bandwidth)

Page 64: Mac

Ethernet Switch Benefits

Improved security users are less able to tap-in into other user's data

Better management control who receives what information (i.e. Virtual

LANs) limit the impact of network problems

Full duplex rather than half duplex required for shared access

Page 65: Mac

Switched LAN• Hub and Switched LAN

– hub simulates a single shared medium– switch simulates a bridged LAN with one computer per

segment

Page 66: Mac

Ethernet Switches

Highly Scalable10Base-T switches Competitive with 100Base-TX hubs in

both cost and throughput Increasingly used to desktops

100Base-TX switches Higher performance (and price)

Gigabit Ethernet switches Very expensive

Page 67: Mac

Ethernet Switches No limit on number of Ethernet

switches between farthest stations So no distance

limit on size ofswitched networks

Page 68: Mac

Ethernet Switches Ethernet Switches must be Arranged in a

Hierarchy (or daisy chain) Only one possible path between any two stations,

switches

4

5 6

2 3

1

Path=4,5,2,1,3

Page 69: Mac

Repeaters, Hubs, Bridges, Switches, Routers and Gateways

(a) Which device is in which layer.

(b) Frames, packets, and headers.

Page 70: Mac

Repeaters, Hubs, Bridges, Switches, Routers and Gateways

(a) A hub. (b) A bridge. (c) a switch.

Page 71: Mac

Repeater HUBs

Page 72: Mac

Switches

Page 73: Mac

Switches

Repeater HUBs

Page 74: Mac
Page 75: Mac

Ethernet Switches and Multicast Traffic

Multicast Traffic from F is delivered to all output interfaces (ports) which asks for it

Page 76: Mac

Virtual LANs (VLANs)

Cisco Systems

Page 77: Mac

Cisco Systems

Page 78: Mac

Virtual LANs (VLANs)

Cisco Systems

Page 79: Mac

Virtual LANs (VLANs)

Cisco Systems

Page 80: Mac

Switches Versus Routers

Switches Fast Inexpensive No benefits of alternative

routing No hierarchical

addressing

Routers Slow Expensive Benefits of alternative

routing Hierarchical addressing

“Switch where you can; route where you must”

Page 81: Mac

Where Does Wireless RF Live?ISM Band: Industrial, Scientific, Medical

902-928 MHz 2400-2483.5 MHz 5725-5850 MHz

802.11/802.11b 802.11a

Bluetooth

Cordless Phones

Home RFBaby Monitors

Microwave Ovens

Old Wireless

Page 82: Mac

IEEE 802.11 – Wireless Ethernet

Two configurations:

Ad-hoc. No central control, no

connection to the outside world

Infrastructure. Uses fixed network

Access Point to connect to the

outside world

Page 83: Mac

IEEE 802.11 – Wireless Ethernet

Uses CSMA/CA protocol. CSMA part is

the same as in 802.3 Ethernet

CA stands for Collision Avoidance and works as follows:

If the carrier is present for a specific time period, transmitter sends a frame

If no collision receiver send ack

Transmitter can also reserve the channel by sending Request to Send (RTS)

Page 84: Mac

IEEE 802.11 – Wireless Ethernet

IEEE 802.11 does not implement

Collision Detection because it cannot

detect collisions at the receiver end

(hidden terminal problem)

To avoid collisions the frame contains

field indicating the length of transmission

Other stations defer transmission

Page 85: Mac

The 802.11 Protocol Stack

Page 86: Mac

Where does 802.11 live in the OSI?

Telnet, FTP, Email, Web, etc.

IP, ICMP, IPX

TCP, UDP

Logical Link Control - 802.2(Interface to the upper layer protocols)

MAC

802.3, 802.5, 802.11

LAN: 10BaseT, 10Base2, 10BaseFLWLAN: FHSS, DSSS, IR

Application

PresentationSession

Transport

Network

Data Link

Physical

Wireless lives at Layers 1 & 2 only!

Page 87: Mac

The 802.11 MAC Sublayer Protocol

(a) The hidden station problem.

(b) The exposed station problem.

Page 88: Mac

CSMA-CA + Acknowledgement

Carrier Sense Multiple Access with Collision Avoidance

• Device wanting to transmit senses the medium (Air)

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

How CSMA-CA works:

Latency can increase if “air” is very busy! Device has hard time finding “open air” to send frame!

* DIFS - Distributed Inter-Frame Space *(approx 128 µs)

Page 89: Mac

The 802.11 MAC Sublayer Protocol

The use of virtual channel sensing using CSMA/CA.

Page 90: Mac

The 802.11 Frame Structure

The 802.11 data frame.

Page 91: Mac

Summary

IEEE 802.11b (WiFi) is a wireless LAN technology that is rapidly growing in popularity

Convenient, inexpensive, easy to use Growing number of “hot spots”

everywhere airports, hotels, bookstores,

Starbucks, etc Estimates: 70% of WLANs are

insecure!

Page 92: Mac

IEEE 802.5 and Token Ring

Page 93: Mac

FDDI Fiber Distributed Data Interface

– data rate 100Mbps, use as a backbone– With multi-mode fiber any given ring segment can be up

to 200 km in length. A total of 500 stations can be connected with a maximum separation of 2 km.

– two complete rings to overcome failures

Page 94: Mac

High Speed LANs

• FDDI: Fiber Distributed Data Interface• 100Mbps, distance up to 200km, 100 hosts mainly used

as a backbone

Page 95: Mac

1000900800700600500400300200100

0

Mbps

FE

EthernetEthernetEthernetEthernet

Gigabit Ethernet(Switched)

ATM OC-12(Switched)

ATM OC-3(Switched)

Fast Ethernet(Switched)

FDDI(Switched)

Token Ring(Switched)

Ethernet(Switched)

Switched LAN Type

Bandwidth Scaling

Cisco Systems