Lecture 3: Link Layer - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

Lecture 3: Link Layer

Description:

ECS 152B Computer Networks. IP Where do we stand? two or more ... all relegated to higher layers!| Demet Aksoy. 29. ECS 152B Computer Networks. PPP Data Frame ... – PowerPoint PPT presentation

Number of Views:57
Avg rating:3.0/5.0
Slides: 33
Provided by: xinliuandd
Category:

less

Transcript and Presenter's Notes

Title: Lecture 3: Link Layer


1
Lecture 3 Link Layer
  • Prev. summary
  • Networks
  • Protocols
  • Layers
  • 4 layers of IP protocol stack

Application
Transport
Network
Link
  • Todays lecture
  • Link Layer

2
IP Where do we stand?
  • A network can be defined recursively as...
  • two or more nodes connected by a link, or
  • two or more networks connected by two or more
    nodes

3
Switched Networks
telecommunication networks
circuit-switched packet-switched
FDM TDM networks datagram with
VCs networks
e.g., ATM, X.25
e.g., the Internet ( TCP,UDP )
4
Switching Strategies
  • Circuit Switching carry bit streams
  • reserve a path (bandwidth, buffers) bw 2 hosts
  • e.g., original telephone networks
  • Packet Switching (e.g. Internet)
  • no path is reserved no guarantees, best effort
  • store and forward

Host2
Host1
R
Host3
5
Circuit Switching
  • resources are reserved for the complete session

limited resources (buffers, bandwidth) need to
support multiple simultaneous sessions
host A
host B
FDM (Frequency Division Multiplexing)
TDM (Time Division Multiplexing)

6
Packet Switching
  • resources are not reserved
  • similar to postal service
  • store-and-forward delays

host B
host A
host C
Statistical Multiplexing (NOT like TDM)
7
Packet-Switching Delays - I
  • nodal processing delay
  • check bit errors
  • determine output link
  • queuing delay
  • time waiting at output link for transmission
  • depends on congestion level of router
  • four sources of delay at each hop
  • nodal processing
  • queuing
  • transmission
  • propagation

8
Packet-Switching Delays - II
  • Transmission delay
  • Rlink bandwidth (bps)
  • Lpacket length (bits)
  • time to send bits into link L/R
  • Propagation delay
  • s propagation speed in medium (2x108 m/sec)
  • d length of physical link
  • propagation delay d/s

Note s and R are very different quantities!
9
Store and Forward Delays Example
hostA
hostB
S
B bps
B bps
F bits total data
consider transmission delay only ( all other
delays are negligible
h
h
F bits total data, 2 packets each packet
F/2h bits
10
Store and Forward Delays Example
hostA
hostB
S
B bps
B bps
t_time (h F/2) / B
11
Store and Forward Delays Example
hostA
hostB
S
B bps
B bps
t_time 2 (h F/2) / B
12
Store and Forward Delays Example
hostA
hostB
S
B bps
B bps
t_time 3 (h F/2) / B
13
Switching Summary
circuit switching packet switching
  • better resource sharing, more efficient
  • less costly to initiate
  • real time services
  • links underutilized during silent periods
  • requires reservation, complex start-up

14
Link Layer Services
  • Framing, link access
  • encapsulate datagram into frame, adding header,
    trailer
  • implement channel access if shared medium,
  • physical addresses used in frame headers to
    identify source, dest
  • different from IP address!
  • Flow Control
  • pacing between sender and receivers
  • Error Detection
  • errors caused by signal attenuation, noise.
  • receiver detects presence of errors
  • signals sender for retransmission or drops frame
  • Error Correction
  • receiver identifies and corrects bit error(s)
    without resorting to retransmission

15
Ethernet
  • dominant LAN technology
  • cheap 5 for 100Mbs!
  • first widely used LAN technology
  • Simpler, cheaper than token LANs and ATM
  • Kept up with speed race 10, 100, 1000 Mbps
  • 10-base T (Twisted Pair)
  • 100-base T
  • Gigabit Ethernet

Ethernet uses CSMA/CD
Metcalfes Etheret sketch
16
Ethernet Frame Structure
  • Sending adapter encapsulates IP datagram (or
    other network layer protocol packet) in Ethernet
    frame
  • Preamble
  • 7 bytes with pattern 10101010 followed by one
    byte with pattern 10101011
  • used to synchronize receiver, sender clock rates

17
Ethernet Frame Structure
  • Addresses 6 bytes, frame is received by all
    adapters on a LAN and dropped if address does not
    match
  • Type indicates the higher layer protocol, mostly
    IP but others may be supported such as Novell IPX
    and AppleTalk)
  • CRC checked at receiver, if error is detected,
    the frame is simply dropped

18
IEEE 802.3 Frame Structure
19
IEEE 802.11 Wireless LAN
  • wireless LANs untethered (often mobile)
    networking
  • IEEE 802.11 standard
  • MAC protocol
  • unlicensed frequency spectrum 900Mhz, 2.4Ghz
  • Basic Service Set (BSS) (a.k.a. cell) contains
  • wireless hosts
  • access point (AP) base station
  • BSSs combined to form distribution system (DS)

20
IEEE 802.11 MAC Protocol CSMA/CA
  • 802.11 CSMA sender
  • - if sense channel idle for DIFS sec.
  • then transmit entire frame (no collision
    detection)
  • -if sense channel busy then binary backoff
  • 802.11 CSMA receiver
  • if received OK
  • return ACK after SIFS

21
IEEE 802.11 MAC Protocol
  • 802.11 CSMA Protocol others
  • NAV Network Allocation Vector
  • 802.11 frame has transmission time field
  • others (hearing data) defer access for NAV time
    units

22
Hidden Terminal effect
  • hidden terminals A, C cannot hear each other
  • obstacles, signal attenuation
  • collisions at B
  • goal avoid collisions at B
  • CSMA/CA CSMA with Collision Avoidance

23
Collision Avoidance RTS-CTS exchange
  • CSMA/CA explicit channel reservation
  • sender send short RTS request to send
  • receiver reply with short CTS clear to send
  • CTS reserves channel for sender, notifying
    (possibly hidden) stations
  • avoid hidden station collisions

24
Collision Avoidance RTS-CTS exchange
  • RTS and CTS short
  • collisions less likely, of shorter duration
  • end result similar to collision detection
  • IEEE 802.11 alows
  • CSMA
  • CSMA/CA reservations
  • polling from AP

25
Encapsulation
26
Ad Hoc Networks
  • Ad hoc network IEEE 802.11 stations can
    dynamically form network without AP
  • Applications
  • laptop meeting in conference room, car
  • interconnection of personal devices
  • battlefield
  • IETF MANET (Mobile Ad hoc Networks) working
    group

27
Point to Point Data Link Control
  • one sender, one receiver, one link easier than
    broadcast link
  • no Media Access Control
  • no need for explicit MAC addressing
  • e.g., dialup link, ISDN line
  • popular point-to-point DLC protocols
  • PPP (point-to-point protocol)
  • HDLC High level data link control (Data link
    used to be considered high layer in protocol
    stack!

28
PPP RFC 1557
  • packet framing encapsulation of network-layer
    datagram in data link frame
  • carry network layer data of any network layer
    protocol (not just IP) at same time
  • ability to demultiplex upwards
  • bit transparency must carry any bit pattern in
    the data field
  • error detection (no correction)
  • connection liveness detect, signal link failure
    to network layer
  • network layer address negotiation endpoint can
    learn/configure each others network address

Error recovery, flow control, data re-ordering
all relegated to higher layers!
29
PPP Data Frame
  • Flag delimiter (framing)
  • Address does nothing (only one option)
  • Control does nothing in the future possible
    multiple control fields
  • Protocol upper layer protocol to which frame
    delivered (eg, PPP-LCP, IP, IPCP, etc)
  • info upper layer data being carried
  • check cyclic redundancy check for error
    detection

30
MTU
  • Maximum transmission unit (MTU) is a
    characteristic of the link layer.
  • Ethernet 1500 bytes
  • FDDI 4352 bytes
  • Point-to-point (low delay) 296 bytes
  • Path MTU
  • Smallest MTU in the path between a source and a
    destination

31
Determining MTU
  • For Ethernet and IEEE 802.3 there is a maximum
    limit on the size of frame.
  • Over 11455 bytes 32bits CRC is not adequate
  • Current standard is 1492 bits
  • For point-to-point links
  • Logical limit to provide adequate response time
    for interactive use

32
Determining MTU Serial Line
  • Consider a line speed of 9.6Kbps
  • Asynchronous communication with 8 bit data and 1
    start and 1 stop bit
  • If we have a 1024 byte packet, it will take 1066
    ms to transmit
  • A small telnet packet has to wait on the average
    533 ms
  • Reducing MTU to 256 bytes means that the maximum
    transmission time is 266ms and hence the average
    wait time is 133ms.
  • Having very small MTU results in high overhead.
Write a Comment
User Comments (0)
About PowerShow.com