Chapter 3 Switching and Forwarding - PowerPoint PPT Presentation

1 / 63
About This Presentation
Title:

Chapter 3 Switching and Forwarding

Description:

15,000 packets-per-second is an achievable number. example: 64-byte packets implies 7.69Mbps ... Type: management, congestion control, AAL5 (later) CLP: Cell ... – PowerPoint PPT presentation

Number of Views:121
Avg rating:3.0/5.0
Slides: 64
Provided by: larry307
Category:

less

Transcript and Presenter's Notes

Title: Chapter 3 Switching and Forwarding


1
Chapter 3 - Switching and Forwarding
2
Problems
  • 2500m limit on length of network
  • Contention, collisions
  • Limited number of hosts
  • Communicate between hosts that do not have a
    direct connection

3
Scalable Networks
  • Switch Forwards packets from input port to
    output port
  • port selected based on destination address in
    packet header.

4
Advantages
  • Can build networks that cover large geographic
    area
  • Can build networks that support large numbers of
    hosts
  • Can add new hosts without affecting performance
    of existing hosts

5
Source Routing
  • Address contains sequence of ports on path from
    source to destination.

2 1 1
Where does it go?
6
Source Routing
  • Source host must know entire topology
  • Variable size header causes switches to be slow
  • Approaches include rotation, stripping, pointers
  • Impractical for large networks

7
Rotation, stripping and pointer
8
Virtual Circuit Switching
  • Explicit connection setup (and tear-down) phase
  • Subsequent packets follow same circuit
  • Analogy phone call
  • Sometimes called connection-oriented model
  • Each switch maintains a VC table.
  • Each circuit can be identified and handled
    differently (buffers, QoS)

9
Virtual Circuit Switching
10
Virtual Circuits
  • ATM
  • X.25
  • Allocates buffers before connecting
  • Frame Relay

11
Datagrams
  • No connection setup phase
  • Each packet forwarded independently
  • Analogy postal system
  • Sometimes called connectionless model
  • Each switch maintains a forwarding (routing)
    table

12
Datagrams
13
Virtual Circuit versus Datagram
  • Virtual Circuit Model
  • Typically wait full RTT for connection setup
    before sending first data packet.
  • While the connection request contains the full
    address for destination, each data packet
    contains only a small identifier, making the
    per-packet header overhead small.
  • If a switch or a link in a connection fails, the
    connection is broken and a new one needs to be
    established.
  • Connection setup provides an opportunity to
    reserve resources.

14
Datagram Model
  • There is no round trip time delay waiting for
    connection setup a host can send data as soon as
    it is ready.
  • Source host has no way of knowing if the network
    is capable of delivering a packet or if the
    destination host is even up.
  • Since packets are treated independently, it is
    possible to route around link and node failures.
  • Since every packet must carry the full address of
    the destination, the overhead per packet is
    higher than for the connection-oriented model.

15
Congestion vs Contention
  • Contention occurs when multiple packets are
    queued on same output port
  • Congestion when switch runs out of buffers and
    must drop a packet
  • Virtual Circuits avoid congestion by negotiating
    on setup
  • Datagrams use buffers more efficiently

16
Performance
  • Switches can be built from a general-purpose
    workstations will consider special-purpose
    hardware later.

17
Performance
  • Aggregate bandwidth
  • 1/2 of the I/O bus bandwidth
  • capacity is shared among all hosts connected to
    switch
  • example 800Mbps bus can support 8 T3 ports
  • Packets-per-second
  • must be able to switch small packets
  • 15,000 packets-per-second is an achievable number
  • example 64-byte packets implies 7.69Mbps

18
Bridges and Extended LANs
19
Overview
  • LANs have physical limitations (e.g., 2500m
    Ethernet)
  • Connect two or more LANs with a bridge
  • accept and forward strategy
  • level 2 connection (does not add packet header)
  • Collection of LANs connected by bridges called an
    exteneded LAN

20
Problems
  • Heterogeneity
  • Different Host types
  • Different protocols
  • Different hardware medium (FDDI, Ethernet)
  • Scale
  • Internet has doubled in size each year for the
    last 20 years

21
Bridges vs Switches
  • A Bridge is a link-level node that forwards
    frames
  • Connect two or more multi-access networks
  • A Switch is a multi-input, multi-output device,
    which transfers packets from an input to one or
    more outputs.
  • So, a Bridge meets the definition of a switch,
    but some switches dont use spanning tree and
    arent bridges

22
Seven Layer Model
Application Presentation Session Transport
Some Switches add network header for routing
information)
Routing address framing errors electrical signal
s
Network Data Link Physical
Bridge (Uses spanning tree to learn routing
information
23
Learning Bridges
  • Do not forward when unnecessary
  • Maintain forwarding table
  • Learn table entries based on source address
  • Table is an optimization need not be complete
  • Always forward broadcast frames

Host A B C X Y Z
Port 1 1 1 2 2 2
24
Algorithm
  • If the address is in the tables then
  • Forward the packet onto the necessary port.
  • If the address is not in the tables, then
  • Forward the packet onto every port except for the
    port that the packet was received on, just to
    make sure the destination gets the message.
  • Add an entry in your internal tables linking the
    Source Address of the packet to whatever port the
    packet was received from.

25
Bridging Functionality
26
Bridging Loops
27
Spanning Tree Algorithm
  • Extended LANs sometimes have loops

28
Example
B1
3
4
G
H
0
7
8
B6
B4
1
6
I
J
29
Spanning Tree
  • Bridges run a distributed spanning tree algorithm
  • Select which bridges actively forward frames
  • Developed by Radia Perlman at DEC
  • Now IEEE 802.1 specification

30
Algorithm Overview
  • Each bridge has a unique id (e.g., B1, B2, B3)
  • Select bridge with smallest id as root
  • Select bridge on each LAN that is closest to the
    root as that LAN's designated bridge (use id to
    break ties)
  • Each bridge forwards frames over each LAN for
    which it is the designated bridge

31
Example
32
Algorithm Detail
  • Bridges exchange configuration messages
  • id for bridge sending the message
  • id for what the sending bridge believes to be
    root bridge
  • distance (hops) from sending bridge to root
    bridge
  • Each bridge records current best configuration
    message for each port
  • Initially, each bridge believes it is the root
  • When learn not root, stop generating
    configuration message
  • in steady state, only root generates
    configuration messages

33
Continued...
  • When learn not designated bridge, stop forwarding
    configuration messages
  • in steady state, only designated bridges forward
    configuration messages
  • Root bridge continues to send configuration
    messages periodically
  • If any given bridge does not receive
    configuration message after a period of time,
    starts generating configuration messages claiming
    to be the root

34
Example
A
(3,3,0)
B
B3
(5,5,0)
(7,7,0)
(3,3,0)
(5,5,0)
C
B5
(2,2,0)
(5,5,0)
D
B7
K
B2
(7,7,0)
(2,2,0)
(7,7,0)
E
F
(1,1,0)
(1,1,0)
(1,1,0)
B1
(1,1,0)
G
H
(6,6,0)
(4,4,0)
(4,4,0)
B6
B4
(6,6,0)
(4,4,0)
I
J
35
Next Phase
A
(3,2,1)
B
B3
(5,1,1)
(7,1,1)
(5,1,1)
C
B5
(2,1,1)
D
B7
K
B2
(7,1,1)
E
F
(1,1,0)
(1,1,0)
(1,1,0)
B1
(1,1,0)
G
H
(4,1,1)
B6
B4
(6,1,1)
(4,1,1)
I
J
36
Next Phase
A
B
B3
(5,1,1)
(5,1,1)
C
B5
(2,1,1)
(7,1,1)
D
B7
K
B2
E
F
(1,1,0)
(1,1,0)
(1,1,0)
B1
(1,1,0)
G
H
(4,1,1)
B6
B4
(4,1,1)
I
J
37
Broadcast and Multicast
  • Forward all broadcast/multicast frames (current
    practice)
  • Learn when no group members downstream
  • Accomplished by having each member of group G
    send a frame to bridge multicast address with G
    in source field

38
Limitations of Bridges
  • Do not scale
  • spanning tree algorithm does not scale
  • broadcast does not scale
  • Do not accommodate heterogeneity
  • Since dont have own header, cant join
    dissimilar networks, address formats
  • Caution beware of transparency
  • Congestion can cause dropped frames
  • Additional delay
  • frame reordering

39
Asynchronous Transfer Mode (ATM)
40
Overview
  • Connection-oriented packet-switched network
  • Used in both WAN and LAN settings
  • Signaling (connection setup) Protocol Q.2931
  • Specified by ATM Forum
  • Packets are called cells 5-byte header 48-byte
    payload
  • Commonly transmitted over SONET (but not
    necessarily)

41
Cells
  • Variable versus Fixed-Length
  • no optimal fixed-length
  • if small high header-to-data overhead
  • if large low utilization for small messages
  • fixed-length are easier to switch in hardware
  • simpler
  • enables parallelism

Transmission Cable
5 Bytes
48 Bytes
Data Payload
Header
42
Small size improves queue behavior
  • finer-grained pre-emption point for scheduling
    link
  • maximum packet 4KB
  • link speed 100Mbps
  • transmission time 4096 x 8 / 100 327.68 ? s
  • high priority packet may sit in the queue 327.68
    ? s
  • in contrast, 53 x 8 / 100 4.24 ?s for ATM

43
near cut-through behavior
  • two 4KB packets arrive at same time
  • link idle for 327.68?s while both arrive
  • at end of 327.68 ? s, still have 8KB to transmit
  • in contrast, can transmit first cell after 4.24 ?
    s
  • at end of 327.68 ? s, just over 4KB left in queue

44
Carrying Voice in Cells
  • voice digitally encoded at 64Kbps (8-bit samples
    at 8KHz)
  • need full cell's worth of samples before sending
    cell
  • example 1000-byte cells implies 125ms per cell
    (too long)
  • smaller latency implies no need for echo
    cancellation
  • Settled on compromise of 48 bytes (3264)/2

45
Cell Format
  • User-Network Interface (UNI)
  • host-to-switch format
  • GFC Generic Flow Control (still being defined)
  • VCI Virtual Circuit Identifier
  • VPI Virtual Path Identifier
  • Type management, congestion control, AAL5
    (later)
  • CLP Cell Loss Priority
  • HEC Header Error Check (CRC-8)

46
Network-Network Interface (NNI)
  • switch-to-switch format
  • GFC becomes part of VPI field

header
payload
Fixed length packet cell
47
What is ATM?
Conventional LAN
Conventional Telecom
ATM
Traffic Type Transmission Unit Switching Connec
tion Type Delivery Access Rate Media
Data Variable Packet Packet Connectionless Bes
t Effort Shared Protocol Dependent
Voice Fixed Frame Circuit Connection-oriented
Guaranteed Dedicated Channel Dependent
Data, Voice, Video Fixed Cell Cell Connection-o
riented Defined Classes Dedicated Application
Dependent
48
Segmentation and Reassembly
  • ATM Adaptation Layer (AAL)
  • AAL 1 and 2 designed for applications that need
    guaranteed rate (e.g., voice, video)
  • AAL 3/4 designed for packet data
  • AAL 5 is an alternative standard for packet data

49
AAL 3/4
  • Convergence Sublayer Protocol Data Unit (CS-PDU)
  • CPI common part indicator (version field)
  • Btag/Etag beginning and ending tag
  • BAsize hint on amount of buffer space to
    allocate
  • Length size of whole PDU

50
Cell Format
  • Type
  • BOM beginning of message
  • COM continuation of message
  • EOM end of message
  • SEQ sequence number
  • MID message id
  • Length number of bytes of PDU in this cell

51
AAL5
  • CS-PDU Format
  • pad so trailer always falls at end of ATM cell
  • Length size of PDU (data only)
  • CRC-32 (detects missing or misordered cells)
  • Cell Format
  • end-of-PDU bit in Type field of ATM header

52
VPI/VCI
  • Host treat as 24-bit circuit identifier
  • if cheap one-per application use for
    demultiplexing
  • if expensive multiplex several applications onto
    one VCI
  • Network aggregate multiple circuits into one path

53
Switching Hardware
54
Overview
  • Terminology n x m switch has n inputs and m
    outputs
  • Design Goals
  • throughput (depends on traffic model)
  • scalability (a function of n)
  • Ports and Fabrics
  • ports
  • circuit management (e.g., map VCIs, route
    datagrams)
  • buffering (input and/or output)
  • fabric
  • as simple as possible
  • sometimes do buffering (internal)

55
Switching Fabric
56
Buffering
  • Wherever contention is possible
  • input port (contend for fabric)
  • internal (contend for output port)
  • output port (contend for link)
  • Head-of-Line Blocking
  • input buffering

57
Crossbar Switches
58
Knockout Switch
  • Example of Crossbar
  • Concentrator select one of n packets
  • Complexity n2

59
Knockout Switch
  • Output Buffers

60
Self-Routing Fabrics
  • Banyan Network
  • constructed from simple 2 x 2 switching elements
  • self-routing header attached to each packet
  • elements arranged to route based on this header
  • no collisions if input packets sorted into
    ascending order
  • complexity n log2 n

61
Banyan Network
010
010
62
Contention
1010
1000
63
Shared Media Switches
Write a Comment
User Comments (0)
About PowerShow.com