cs716 advanced computer networks by mr. abdul wahid shaikh

33
1 CS716 Advanced Computer Networks By Mr. Abdul Wahid Shaikh

Upload: lavi

Post on 16-Mar-2016

53 views

Category:

Documents


2 download

DESCRIPTION

CS716 Advanced Computer Networks By Mr. Abdul Wahid Shaikh. 1. Lecture No. 9. Sequence Number Space. SeqNum field is finite; sequence numbers wrap around Sequence number space must be larger than number of outstanding frames ( SWS ). Sequence Number Space. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

1

CS716

Advanced Computer Networks

By Mr. Abdul Wahid Shaikh

Page 2: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

Lecture No. 9

Page 3: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

3

Sequence Number Space

•SeqNum field is finite; sequence numbers wrap around

• Sequence number space must be larger than number of outstanding frames (SWS)

Page 4: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

4

Sequence Number Space

•SWS <= MaxSeqNum-1 is not sufficient– Suppose 3-bit SeqNum field (0..7); SWS=RWS=7– Sender transmits frames 0..6; which arrive

successfully (receiver window advances)– ACKs are lost; sender retransmits 0..6– Receiver expecting 7, 0..5, but receives second

incarnation of 0..5 assuming them as 8th to 13th frame

Page 5: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

5

Required Sequence Number Space ?

• Assume SWS=RWS (simplest, and typical)– Sender transmits full SWS– Two extreme cases at receiver

• None received (waiting for 0…SWS-1)• All received (waiting for SWS…

2*SWS-1)

Page 6: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

6

Required Sequence Number Space ?

• All possible packets must have unique SeqNum

•SWS < (MaxSeqNum+1)/2 or SWS+RWS < MaxSeqNum+1 is the correct rule

• Intuitively, SeqNum “slides” between two halves of sequence number space

Page 7: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

7

What Next ?

• Arbitrating access to a shared medium

• After that: network adapters and example protocols

Page 8: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

8

Shared Access Networks

Outline• Bus (Ethernet)• Token ring (FDDI)• Wireless (802.11)• Network Adapter

Page 9: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

9

Shared Access Media

• Arbitrating access to a shared media– Multiple hosts on a single link

Page 10: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

10

Multiple Access Media

• Multiple senders on some media– Buses (Ethernet, including links in

switched form)– Radio, satellite– Token rings

Page 11: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

11

Multiple Access Media

• Need method to moderate access– Fair arbitration– Good performance

Page 12: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

12

Shared Media

• Communication needs vary– Over time– Between hosts

• Network is not fully utilized

Page 13: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

13

Shared Media

• Recall methods for multiplexing– Frequency-division multiplexing (FDM,

separate bands)– Time-division multiplexing (TDM,

synchronous time slots)– Statistical TDM (STDM, time slots on demand)

• STDM most appropriate with stated assumptions

Page 14: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

14

Shared Media: Problems• Problem: demands can conflict, e. g. ,

two hosts send simultaneously– STDM does not address this problem -

centralized– Solution is a medium access control

(MAC) algorithm

Page 15: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

15

Shared Media: Solutions• Three solutions (out of many)

– Carrier sense multiple access with collision detection (CSMA / CD)• Send only if medium is idle• Stop sending immediately if collision

detected– Token ring/FDDI pass a token around a

ring; only token holder sends– Radio / wireless (IEEE 802.11)

Page 16: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

16

Ethernet

Page 17: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

17

History of Ethernet

• Developed by Xerox PARC in mid-1970s• Roots in Aloha packet-radio network• Standardized by Xerox / DEC / Intel in 1978• Similar to IEEE 802.3 standard• IEEE 802.3u standard defines Fast Ethernet

(100 Mbps)• New switched Ethernet now popular

Page 18: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

18

Ethernet Topologies

• Bus— all nodes connected to a wire

• Star— all nodes connected to a central repeater

• Combinations thereof

. . .

Page 19: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

19

Ethernet Adaptor

• Segment of up to 500 m• Nodes tap into segments• Taps must be 2.5m apart• Transceiver performs

carrier sensing• Transceiver transmits

and receive signals• Protocol is implemented

in the adaptor

Adaptor

Transceiver

Host

Ethernet cable

Page 20: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

20

Ethernet – Alternative Technologies• Can be constructed from a thinner cable (10Base2)

rather than 50-ohm coax cable (10Base5)• Newer technology uses 10BaseT (twisted pair)

– Several point-to-point segments coming out of a multiway repeater called “hub”

Hub Hub

Page 21: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

21

Ethernet Components

10Base5 (ThickNet)

Controller (Ethernet Card)

Vampire Tap

Transceiver

Bus Topology

Page 22: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

22

Ethernet Components

10Base2 (ThinNet)

Controller (Ethernet Card)

BNC T-junctionTransceiver

Bus Topology

Page 23: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

23

Ethernet Components

10BaseT (Twisted Pair)

Controller (Ethernet Card)

Hub Star Topology

Page 24: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

24

Ethernet – Multiple Segments

• Repeaters forward the broadcast signal on all out going segments (10Base5)

• Maximum of 4 repeaters (2500m), 1024 hosts

Repeater

Host

Page 25: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

25

Ethernet Packet Frame

• Preamble allows the receiver to synchronize with signal

• Frame must contain at least 46 bytes to detect collision

• 802.3 standard substitutes length with type field– Type field (demux key) is the first thing in data portion– A device can accept both frames: type > 1500

Destaddr

64 48 32

CRCPreamble Srcaddr Type Body

1648

Page 26: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

26

Ethernet Address

• Addresses– Unique, 48-bit unicast address assigned to each adapter– Example: 8:0:e4:b1:2– Broadcast: all 1s– Multicast: first bit is 1– Promiscuous mode

• Problem remains: A distributed algorithm that provides fair access

Page 27: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

27

Ethernet MAC – CSMA/CD

• Multiple access– Nodes send and receive frames over a shared

link• Carrier sense

– Nodes can distinguish between an idle and busy link

• Collision detection– A node listens as it transmits to detect collision

Page 28: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

28

CSMA/CD MAC Algorithm

• If line is idle (no carrier sensed)–Send immediately–Upper bound message size of ~1500

bytes–Must wait 9.6µs between back-to-

back frames

Page 29: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

29

CSMA/CD MAC Algorithm

• If line is busy (carrier sensed) …– Wait until the line becomes idle and then

transmit immediately– Called 1-persistent (special case of p-

persistent)• If collision detected

– Stop sending data and jam signal– Try again later

Page 30: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

30

Collision Detection

How to ensure that my-machine knows about the collision?

Start transmission

at time 0

my-machine your-machine

Start transmission

at time T

Almost there at time T

Collision !!!

Page 31: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

31

Constraints on Collision Detection

• In our example, consider– my-machine’s message reaches your-

machine at T– your-machine’s message reaches my-

machine at 2T• Thus, my-machine must still be

transmitting at 2T

Page 32: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

32

Constraints on Collision Detection

• Specifics of IEEE 802.3– Bounds 2T to 51.2 microseconds– Packet must be at least 64B long

• Jam after the collision, for 32 bits, then stop transmitting frame (runt frame of 96 bits)– Ensures that all hosts notice collision

Page 33: CS716 Advanced Computer Networks By  Mr. Abdul Wahid Shaikh

33

Review Lecture 9• Shared access networks• Shared media: issues• Ethernet Topologies, technologies• Segments• Frame format, Addresses• MAC protocol: CSMA/CD