application transport network data link physical application - PowerPoint PPT Presentation

Loading...

PPT – application transport network data link physical application PowerPoint presentation | free to download - id: 3bafde-MDQxN



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

application transport network data link physical application

Description:

application transport network data link physical application transport network data link physical application transport network data link physical Chapter 4 The ... – PowerPoint PPT presentation

Number of Views:108
Avg rating:3.0/5.0
Slides: 134
Provided by: rangerUt2
Learn more at: http://ranger.uta.edu
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: application transport network data link physical application


1
Chapter 4 The Network Layer Routing
  • The network layer moves transport layer segments
    from host to host in the network, to deliver them
    to their destination. This layer involves each
    and every host and router in the network. We
    will study the key principles and algorithms of
    routing, with a focus on the Internet Protocol
    (IP) service model.

2
Network layer functions
  • transport packet from sending to receiving hosts
  • network layer protocols in every host, router
  • three important functions
  • path determination route taken by packets from
    source to destination - routing algorithms
  • switching move packets from routers input to
    appropriate router output
  • call setup some network architectures require
    router call setup along path before data flows
    (what types?)

3
Virtual circuits
  • the source-to-destination path behaves much like
    a telephone circuit
  • performance-wise
  • network actions along source-to-destination path
  • call setup, teardown for each call before data
    can flow
  • each packet carries VC identifier (not
    destination host ID)
  • every router/switch on source-destination path
    maintains a state for each passing connection
  • Recall transport-layer connection only involved
    two end systems
  • link and router resources (bandwidth, buffers)
    may be dedicated to the VC
  • to get circuit-like performance
  • but what about start-up delay?

4
Virtual circuits signaling protocols
  • used to setup, maintain and teardown the VC
  • used in ATM, frame-relay and X.25
  • not used in the Internet (why?)

6. Receive data
5. Data flow begins
4. Call connected
3. Accept call
1. Initiate call
2. incoming call
5
Datagram networks the Internet model
  • no call setup at network layer
  • routers do not maintain state for the end-to-end
    connections
  • no network-level concept of a connection
  • packets are typically routed using only
    destination host ID which is carried in the
    packet
  • packets between same source-destination pair may
    take different paths

1. Send data
2. Receive data
6
Summary Datagram or VC network why?
  • Internet
  • data exchange among computers
  • elastic service, no strict timing required
    (data delivery)
  • smart end systems (computers)
  • can adapt, perform control, error recovery
  • complexity at edge, simple in network core
  • many link types
  • different characteristics
  • uniform service difficult
  • ATM
  • evolved from telephony
  • human conversation
  • strict timing, reliability requirements
  • need for guaranteed service
  • dumb end systems
  • telephones, videophones
  • complexity inside the network

Consider IP over ATM (more later)
7
Routing
Goal determine a good path (sequence of
routers) thru the network from the source to the
destination
  • Graph abstraction for routing algorithms
  • graph nodes are routers
  • graph edges are physical links
  • link cost delay, distance, of hops, rate
    structure or congestion level
  • Other costs??
  • good path
  • typically means minimum cost path
  • other definitions also possible

8
A Link-State Routing Algorithm
  • Dijkstras algorithm
  • net topology, link costs known to all nodes
  • accomplished via link state broadcast
  • all nodes have same info
  • computes least cost paths from one node
    (source) to all other nodes
  • yields a routing table for that node
  • iterative after k iterations, know least cost
    path to k destinations
  • Notation
  • c(i,j) link cost from node i to node j. Cost is
    initially infinite if not a direct neighbor
  • D(v) current computed value of cost of the path
    from the source to destination v
  • p(v) predecessor node, that is a neighbor of v,
    along the path from the source to v
  • N set of nodes whose least cost path is
    definitively known

9
Dijsktras Algorithm
1 Initialization 2 N A //
Source node is A 3 for all nodes v 4
if v adjacent to A 5 then D(v) c(A,v)
6 else D(v) infinity 7 8 Loop 9
find w not in N such that D(w) is a minimum 10
add w to N 11 update D(v) for all v
adjacent to w and not in N 12 D(v) min(
D(v), D(w) c(w,v) ) 13 / new cost to v is
either old cost to v or known 14 shortest
path cost to w plus cost from w to v / 15
until all nodes in N
10
Dijkstras algorithm example
D(B),p(B) 2,A 2,A 2,A - -
D(D),p(D) 1,A - - - -
Step 0 1 2 3 4 5
D(C),p(C) 5,A 4,D 3,E 3,E -
D(E),p(E) infinity 2,D - - -
start N A AD ADE ADEB ADEBC ADEBCF
D(F),p(F) infinity infinity 4,E 4,E 4,E
11
Distance Vector Routing Algorithm
  • iterative
  • continues until no nodes exchange info.
  • self-terminating no signal to stop
  • asynchronous
  • nodes need not exchange info/iterate in lock
    step!
  • distributed
  • each node communicates only with
    directly-attached neighbors
  • Distance Table data structure
  • each node has its own
  • row for each possible destination
  • column for each directly-attached neighbor to
    node
  • example in node X, for destination Y via
    neighbor Z

distance from X to Y, via Z as next hop

DX(Y,Z)
c(X,Z) minw DZ(Y,w)

12
Distance Table example
loop back through E!
loop back through E!
13
Distance table gives routing table
Outgoing link to use, cost
A,1 D,5 D,4 D,2
E A B C D
destination
Routing table
Distance table
14
Distance Vector Algorithm(Bellman-Ford)
At all nodes, X
1 Initialization 2 for all adjacent nodes v
3 D (,v) infinity / the
operator means "for all rows" / 4 D (v,v)
c(X,v) 5 for all destinations, y 6
send min D (y,w) to each neighbor / w over
all X's neighbors /
X
X
X
w
15
Distance Vector Algorithm (cont.)
8 loop 9 wait (until I see a link cost
change to neighbor V 10 or until I
receive update from neighbor V) 11 12 if
(c(X,V) changes by d) 13 / change cost to
all dest's via neighbor v by d / 14 /
note d could be positive or negative / 15
for all destinations y D (y,V) D (y,V) d
16 17 else if (update received from V wrt
destination Y) 18 / shortest path from V to
some Y has changed / 19 / V has sent a
new value for its min DV(Y,w) / 20 /
call this received new value is "newval" /
21 for the single destination y D (Y,V)
c(X,V) newval 22 23 if we have a new min
D (Y,w)for any destination Y 24 send new
value of min D (Y,w) to all neighbors 25 26
forever
X
X
w
X
X
w
X
w
16
Distance Vector link cost changes
  • Link cost changes
  • node detects local link cost change
  • updates distance table (line 15)
  • if cost change in least cost path, notify
    neighbors (lines 23,24)

algorithm terminates
good news travels fast
17
Distance Vector link cost changes
  • Link cost changes
  • good news travels fast
  • bad news travels slowly - count to infinity
    problem!

algorithm continues on!
18
Distance Vector poisoned reverse
  • If Z routes through Y to get to X
  • Z tells Y its (Zs) distance to X is infinite (so
    Y wont route to X via Z)
  • will this completely solve count to infinity
    problem?

algorithm terminates
19
Comparison of LS and DV algorithms
  • Message complexity
  • LS with n nodes, E links, O(nE) msgs
    sent/broadcast
  • DV exchange between neighbors only
  • convergence time varies
  • Speed of Convergence
  • LS O(n2) algorithm requires O(nE) msgs
  • may have oscillations
  • DV convergence time varies
  • may be routing loops
  • count-to-infinity problem
  • poisoned reverse is sometimes successful
  • Robustness what happens if router malfunctions?
  • LS
  • node can advertise incorrect link cost
  • each node computes only its own table
  • DV
  • DV node can advertise incorrect path cost
  • each nodes table used by others
  • errors propagate through the network

20
Hierarchical Routing
  • Our routing study thus far an idealization
  • all routers are identical
  • the network is flat
  • not true in practice
  • Why?
  • administrative autonomy
  • internet network of networks
  • each network admin may want to control routing in
    its own network
  • scale with 55 million destination hosts
  • cant store all destinations in routing tables!
  • routing table exchange would swamp links!

21
Hierarchical Routing
  • aggregate routers into regions, called
    autonomous systems (AS)
  • routers in same AS run same routing protocol
  • intra-AS routing protocol
  • routers in different AS can run different
    intra-AS routing protocol
  • special routers in AS
  • run intra-AS routing protocol with all other
    routers in AS
  • also responsible for routing to destinations
    outside AS
  • run inter-AS routing protocol with other gateway
    routers

22
Intra-AS and Inter-AS routing
  • Gateways
  • perform inter-AS routing amongst themselves
  • perform intra-AS routers with other routers in
    their AS

network layer
inter-AS, intra-AS routing in gateway A.c
data link layer
physical layer
23
Intra-AS and Inter-AS routing
Host h2
Intra-AS routing within AS B
Intra-AS routing within AS A
  • Well examine specific inter-AS and intra-AS
    Internet routing protocols shortly (section 4.5)

24
The Internet Network layer
  • Host, router network layer functions three major
    components

Transport layer TCP, UDP
Network layer
Link layer
Physical layer
25
IP Addressing introduction
223.1.1.1
  • IP address 32-bit identifier for host or router
    interface
  • interface connection between host or router and
    the physical link
  • routers typically have multiple interfaces
  • hosts typically have only one
  • IP addresses are associated with the interface,
    not the host or the router

223.1.2.9
223.1.1.4
223.1.1.3
dotted-decimal notation
223.1.1.1 11011111 00000001 00000001 00000001
223
1
1
1
26
IP Addressing
223.1.1.1
  • IP address
  • network part (high order bits)
  • host part (low order bits)
  • Whats a network ? (from the IP address
    perspective)
  • device interfaces with the same network part of
    their IP address
  • hosts can physically reach each other without an
    intervening router

223.1.2.1
223.1.1.2
223.1.2.9
223.1.1.4
223.1.2.2
223.1.1.3
223.1.3.27
LAN
223.1.3.2
223.1.3.1
Example network consisting of 3 IP networks (for
IP addresses starting with 223, the first 24 bits
are the network address more later)
27
IP Addresses
  • Given the notion of a network, lets look
    closer at IP addresses

classful addressing -
class
1.0.0.0 to 127.255.255.255
A
network
0
host (24 bits)
128.0.0.0 to 191.255.255.255
B
network
10
host (16 bits)
192.0.0.0 to 223.255.255.255
C
110
network
host (8 bits)
224.0.0.0 to 239.255.255.255
D
32 bits
What is the address space size (number of hosts)
for each class?
28
IP addressing CIDR
  • classful addressing
  • inefficient use of address space, address space
    exhaustion
  • e.g., class B network is allocated enough
    addresses for 65K hosts, even if only 2K hosts
    exist in that network
  • CIDR Classless InterDomain Routing
  • network portion of address of arbitrary length
  • address format a.b.c.d/x, where x is bits in
    the network portion of an address

29
IP addresses how to get one?
  • Hosts (host portion)
  • hard-coded by system admin in a file
  • DHCP Dynamic Host Configuration Protocol
    dynamically get address (RFC 2131)
    plug-and-play
  • host broadcasts DHCP discover msg
  • DHCP server responds with DHCP offer msg
  • host requests IP address DHCP request msg
  • DHCP server sends address DHCP ack msg

30
IP addresses how to get one?
  • Network (network portion)
  • get allocated portion of ISPs address space

ISP's block 11001000 00010111 00010000
00000000 200.23.16.0/20 Organization 0
11001000 00010111 00010000 00000000
200.23.16.0/23 Organization 1 11001000
00010111 00010010 00000000 200.23.18.0/23
Organization 2 11001000 00010111 00010100
00000000 200.23.20.0/23 ...
..
. . Organization
7 11001000 00010111 00011110 00000000
200.23.30.0/23
31
Getting a datagram from source to dest.
routing table in A
  • IP datagram
  • addresses remain unchanged, as the datagram
    travels from source to destination
  • address fields of interest here (provided by the
    source host A)

Note more on this later
32
Getting a datagram from source to dest.
  • Starting at A, given an IP datagram addressed to
    B
  • look up network address of B
  • find B is on same network as A
  • link layer will send datagram directly to B
    inside link-layer frame
  • B and A are directly connected

33
Getting a datagram from source to dest.
misc fields
data
223.1.1.1
223.1.2.2
  • Starting at A, destination E
  • look up network address of E
  • E on different network
  • A, E not directly attached
  • routing table next hop router to E is 223.1.1.4
  • link layer sends datagram to router 223.1.1.4
    inside link-layer frame
  • datagram arrives at 223.1.1.4
  • continued..

34
Getting a datagram from source to dest.
misc fields
data
223.1.1.1
223.1.2.2
  • Arriving at 223.1.1.4, destined for 223.1.2.2
  • look up network address of E
  • E on same network as routers interface 223.1.2.9
  • router, E directly attached
  • link layer sends datagram to 223.1.2.2 inside
    link-layer frame via interface 223.1.2.9
  • datagram arrives at 223.1.2.2!!!

35
IP datagram format
IP protocol version number
32 bits
total datagram length (bytes)
header length (bytes)
type of service
head. len.
ver.
datagram length
for fragmentation/ reassembly
fragment offset
type of data
flgs
16-bit identifier
max number of remaining hops (decremented at
each router)
upper layer
time to live
header checksum
32 bit source IP address
32 bit destination IP address
upper layer protocol to deliver payload to (e.g.
TCP, UDP, see RFC 1700)
e.g. timestamp, record route taken, specify list
of routers to visit (field is rarely used in
practice).
Options (if any)
data (variable length, typically a TCP or UDP
segment)
36
IP Fragmentation Reassembly
  • network links have MTU (Max. Transfer Unit) size
    - largest possible link-level frame.
  • different link types, different MTUs
  • large IP datagram divided (fragmented) within
    net
  • one datagram becomes several datagrams
  • reassembled only at final destination
  • IP header bits used to identify and order related
    fragments

fragmentation in one large datagram out 3
smaller datagrams
reassembly
37
IP Fragmentation and Reassembly
One large datagram becomes several smaller
datagrams
38
Internet AS Hierarchy
Inter-AS border (exterior gateway) routers
Intra-AS interior (gateway) routers
39
Intra-AS Routing
  • Also known as Interior Gateway Protocols (IGP)
  • Most common IGPs
  • RIP Routing Information Protocol (legacy)
  • OSPF Open Shortest Path First (common)
  • EIGRP Enhanced Interior Gateway Routing Protocol
    (proprietary Cisco Systems)

40
RIP ( Routing Information Protocol)
  • Distance vector algorithm
  • Included in BSD-UNIX Distribution in 1982
  • RFC 1058 (version 1), RFC 1723 (version 2)
  • Distance metric of hops (max 15 hops)
  • Can you guess why?
  • Distance vectors exchanged every 30 seconds via
    Response Message (also called advertisement)
  • Each advertisement routing info for maximum of
    25 destination nets within the AS

41
RIP Table processing
  • RIP routing tables managed by application-level
    process called route-d (UNIX daemon)
  • advertisements sent in UDP packets, periodically
    repeated

42
RIP Table example (continued)
  • Router giroflee.eurocom.fr

Destination Gateway
Flags Ref Use Interface
-------------------- -------------------- -----
----- ------ --------- 127.0.0.1
127.0.0.1 UH 0 26492 lo0
192.168.2. 192.168.2.5 U
2 13 fa0 193.55.114.
193.55.114.6 U 3 58503 le0
192.168.3. 192.168.3.5 U
2 25 qaa0 224.0.0.0
193.55.114.6 U 3 0 le0
default 193.55.114.129 UG
0 143454
  • Three attached class C networks (LANs)
  • Router only knows routes to attached LANs
  • Default router used to go up to next logical
    level
  • Route multicast address 224.0.0.0
  • Loopback interface (for debugging)

43
OSPF advanced features (not in RIP)
  • Security all OSPF messages are authenticated (to
    prevent malicious intrusion) TCP connections
    used
  • Multiple same-cost paths allowed (only one path
    in RIP)
  • For each link, multiple cost metrics for
    different Types Of Service (e.g., satellite link
    cost set low for best effort high for real
    time)
  • Integrated uni- and multicast support
  • Multicast OSPF (MOSPF) uses same topology data
    base as OSPF
  • Hierarchical OSPF in large domains.

44
Hierarchical OSPF
45
Hierarchical OSPF
  • Two-level hierarchy local area and backbone.
  • link-state advertisements only in local area
  • each node has detailed area topology only know
    direction (shortest path) to nets in other areas.
  • Area border routers summarize distances to
    nets in own area, advertise to other Area Border
    routers.
  • Backbone routers run OSPF routing, limited to
    backbone.
  • Boundary routers connect to other ASs. (Note
    synonymous with the gateway routers we
    discussed in section 4.3)

46
Internet inter-AS routing BGP
  • BGP (Border Gateway Protocol) the de facto
    standard
  • Path Vector protocol
  • similar to Distance Vector protocol
  • each Border Gateway broadcasts to neighbors
    (peers) the entire path (I.e, sequence of ASs) to
    destination
  • E.g., Gateway X may send its path to destination
    Z
  • Path (X,Z) X,Y1,Y2,Y3,,Z

47
Internet inter-AS routing BGP
  • Suppose gateway X send its path to peer gateway
    W
  • W may or may not select a path offered by X
  • cost, policy (dont route via competitors AS),
    loop prevention reasons.
  • If W selects a path advertised by X, then
  • Path (W,Z) W, Path (X,Z)
  • Note X can control incoming traffic by
    controlling its route advertisements to peers
  • e.g., dont want to route traffic to Z -gt dont
    advertise any routes to Z

48
Internet inter-AS routing BGP
  • BGP messages exchanged using TCP.
  • BGP messages
  • OPEN opens TCP connection to peer and
    authenticates sender
  • UPDATE advertises new path (or withdraws old)
  • KEEPALIVE keeps connection alive in absence of
    UPDATES also ACKs OPEN request
  • NOTIFICATION reports errors in previous message
    also used to close connection

49
Why different Intra- and Inter-AS routing ?
  • Policy
  • Inter-AS admin wants control over how its
    traffic is routed, who routes through its net.
  • Intra-AS single admin, so no policy decisions
    needed
  • Scale
  • hierarchical routing saves table size, reduces
    update traffic
  • Performance
  • Intra-AS can focus on performance
  • Inter-AS policy may dominate over performance

50
Router Architecture Overview
  • Two key router functions
  • run routing algorithms/protocol (RIP, OSPF, BGP)
  • switch datagrams from incoming to outgoing link

51
Input Port Functions
Physical layer bit-level reception
  • Decentralized switching
  • given datagram dest., lookup output port using
    routing table in input port memory
  • goal complete input port processing at line
    speed
  • queuing if datagrams arrive faster than
    forwarding rate into switch fabric (i.e., the
    packet is blocked)

Data link layer e.g., Ethernet see chapter 5
Problem how long does it take to perform a
lookup?
52
Input Port Queuing
  • If routing fabric is slower than input ports
    combined -gt queuing may occur at input queues
  • Head-of-the-Line (HOL) blocking queued datagram
    at front of queue prevents others in queue from
    moving forward
  • queuing delay and loss due to input buffer
    overflow!

53
Three types of switching fabrics
(interconnection network)
54
Switching Via Memory
  • First generation routers
  • packet copied by systems (single) CPU
  • speed limited by memory bandwidth (2 system bus
    accesses per datagram)
  • Modern routers
  • input port processor performs lookup, copy into
    shared memory
  • Cisco Catalyst 8500

55
Switching Via Bus
  • datagram from input port memory
  • to output port memory via a shared bus
  • bus contention switching speed limited by bus
    bandwidth (only one packet at a time can use bus)
  • 1 Gbps bus - Cisco 1900 sufficient speed for
    access and enterprise routers (not regional or
    backbone)

56
Switching Via An Interconnection Network
(commonly Crossbar)
  • overcomes bus bandwidth
  • limitations
  • Banyan networks, other
  • interconnection nets initially
  • developed to connect processors
  • in multiprocessor design
  • advanced design fragments
  • datagram into fixed length cells, switches cells
  • through the fabric.
  • Cisco 12000 switches up to 60 Gbps through the
  • interconnection network

57
Output Ports
  • Buffering required when datagrams arrive from the
    fabric faster than the transmission rate
  • Scheduling discipline chooses among queued
    datagrams for transmission

58
Output port queuing
  • buffering when arrival rate via switching fabric
    exceeds output line speed
  • queuing (delay) and loss due to output port
    buffer overflow!

Question where is queuing most likely to occur?
59
IPv6
  • Initial motivation 32-bit address space
    completely allocated (gone!) by 2008 (maybe
    sooner maybe later!).
  • Additional motivation
  • header format changes were needed to improve
    speed of processing and forwarding
  • header changes were required to facilitate QoS
  • a new anycast address was needed route to
    best of several replicated servers
  • IPv6 datagram format
  • fixed-length 40 byte header (32 for addresses)
  • no fragmentation allowed

60
IPv6 Header
Priority identify priority among datagrams in
flow Flow Label identify datagrams in same
flow. (concept of flow
not well defined). Next header identify upper
layer protocol for data
8 bytes
32 bytes
61
Other Changes from IPv4
  • Fragmentation not allowed/supported
  • Checksum removed entirely to reduce processing
    time at each hop
  • Options allowed, but outside of header,
    indicated by Next Header field
  • ICMPv6 new version of ICMP
  • additional message types, e.g. Packet Too Big
  • multicast group management functions (IGMP)

62
Transition From IPv4 To IPv6
  • Not all routers can be upgraded simultaneous
  • no flag days (e.g. NCP to TCP attempt in c.
    1981)
  • How will the network operate with mixed IPv4 and
    IPv6 routers?
  • Two proposed approaches (RFC 1933)
  • Dual Stack some routers with dual stack (v6, v4)
    can translate between formats
  • Tunneling IPv6 carried as payload in IPv4
    datagram among IPv4 routers

63
Dual Stack Approach
64
Tunneling
IPv6 inside IPv4 where needed
65
Multicast routing
  • IGMP message types
  • membership queries general or specific
  • membership report host wants to join
  • leave group host leaves a specific group
  • message format
  • Carried in IP datagram
  • IP protocol of 2
  • Internet multicast routing algorithms
  • DVMRP distance vector
  • MOSPF open shortest path first
  • CBT core-based trees
  • PIM protocol independent
  • Inter-autonomous routing
  • DVMRP de facto standard for multicast

66
Chapter 5 Link Layer Local AreaNetworks
  • The link layer is responsible for the
  • transport of network layer datagrams from node to
    node via established physical links. In this
    chapter well study the principal services of
    this layer, and look at specific protocols
    employed in the LANs, hubs, bridges and switches
    in the Internet. Well also investigate
    Ethernet, ATM, X.25 and Frame Relay.

67
Link Layer setting the context
  • two physically connected devices
  • host-router, router-router, host-host
  • unit of data frame

data link protocol
frame
phys. link
adapter card
68
Link Layer Implementation
  • implemented in adapter
  • e.g., PCMCIA card, Ethernet card
  • typically includes RAM, DSP chips, host bus
    interface, and physical link interface

network link physical
data link protocol
M
frame
phys. link
adapter card
69
Error Detection
  • EDC Error Detection and Correction bits
    (redundancy)
  • D Data protected by error checking, may
    include header fields
  • Error detection not 100 reliable!
  • protocol may miss some errors, but rarely
  • larger EDC field yields better detection and
    correction

70
Parity Checking
Two Dimensional Bit Parity Detect and correct
single bit errors
Single Bit Parity Detect single bit errors
Whats the problem with this method?
0
0
What else can we do with this method?
71
Checksumming Cyclic Redundancy Check
  • view data bits, D, as a binary number
  • choose r1 bit pattern (generator), G
  • goal choose r CRC bits, R, such that
  • ltD,Rgt exactly divisible by G (modulo 2)
  • receiver knows G, divides ltD,Rgt by G.
  • non-zero remainder gt error detected!
  • can detect all burst errors less than r1 bits
    (Hamming)
  • ATM 5-byte header uses 8-bit CRC
  • IEEE GCRC-32 , 32-bit CRC for Ethernet, etc.
  • widely used in practice (ATM, HDLC)

72
CRC Example
Must be r1 bits long. High and low-order bits
must be 1s.
Yields 101110011
  • Want
  • D.2r XOR R nG
  • equivalently
  • D.2r nG XOR R
  • equivalently
  • if we divide D.2r by G, want reminder R

D.2r G
R remainder
73
Multiple Access Links and Protocols
  • Three types of links
  • point-to-point (single wire, e.g. PPP, SLIP,
    HDLC)
  • broadcast (shared wire or medium e.g, Ethernet,
    Wavelan, etc.)
  • switched (e.g., switched Ethernet, ATM, etc.)

74
Multiple Access protocols
  • single shared communication channel
  • two or more simultaneous transmissions by nodes
    interference
  • generally, only one node can send successfully at
    a time
  • multiple access protocol
  • distributed algorithm that determines how
    stations share channel, i.e., determine when a
    station can transmit
  • communication about channel sharing must use
    channel itself!
  • what to look for in multiple access protocols
  • synchronous or asynchronous
  • information needed about other stations
  • robustness (e.g., tolerance of channel errors)
  • performance and efficiency

75
Multiple Access protocols
  • Desirable characteristics of a MAP channel of
    rate R bps
  • only one node sending throughput is R bps
  • M nodes sending average throughput is R/M bps
  • decentralized control no master nodes that
    control sending/receiving
  • the protocol is simple and inexpensive to
    implement
  • MAC protocols Media Access Control
  • often called the MAC sub-layer (of the data link
    layer)

76
MAC Protocols a taxonomy
  • Three broad classes
  • Channel Partitioning
  • divide channel into smaller pieces (time slots,
    frequency)
  • allocate piece to node for exclusive use
  • Random Access
  • allow transmitted frames to collide
  • recover from collisions
  • Taking turns
  • tightly coordinate shared access to avoid
    collisions

Goal efficient, fair, simple, decentralized
77
Channel Partitioning MAC protocols TDMA
  • TDMA time division multiple access
  • access to channel in "rounds"
  • each station gets fixed length slot (length pkt
    transmission time) in each round
  • unused slots go idle
  • example 6-station LAN hosts 1,3,4 have
    packets, time slots 2,5,6 idle

efficient?
simple?
fair?
decentralized?
78
Channel Partitioning MAC protocols FDMA
  • FDMA frequency division multiple access
  • channel spectrum divided into frequency bands
  • each station assigned fixed frequency band
  • unused transmission time in frequency bands goes
    idle
  • example 6-station LAN - hosts 1,3,4 have
    packets, frequency bands 2,5,6 idle

time
1
2
3
frequency bands
4
5
6
79
Channel Partitioning (CDMA)
  • CDMA (Code Division Multiple Access)
  • unique code assigned to each user i.e., code
    set partitioning
  • used mostly in wireless broadcast channels
    (cellular, satellite,etc)
  • all users share same frequency/medium, but each
    user has own chipping sequence (i.e., code) to
    encode data
  • encoded signal (original data) X (chipping
    sequence)
  • decoding inner-product of encoded signal and
    chipping sequence
  • allows multiple users to coexist and transmit
    simultaneously with minimal interference (if
    codes are pairwise orthogonal)

80
CDMA two-sender interference
81
CDMA 4-sender example
Chipping Sequences for 4 nodes A 00011011 A
(-1 1 1 1 1 1 1 1) B 00101110 B (-1 1
1 1 1 1 1 1) C 01011100 C (-1 1 1 1
1 1 1 1) D 01000010 D (-1 1 1 1 1 1
1 1)
Note for all S and T, S?T 0
Example recovery of node Cs signal S1 ? C
(1 1 1 1 1 1 1 1 )/8 1 S2 ? C (2 0
0 0 2 2 0 2)/8 1 S3 ? C (0 0 2 2 0
2 0 -2)/8 0 S4 ? C (1 1 3 3 1 1 1
-1)/8 1 S5 ? C (4 0 2 0 2 0 2 2)/8
1 S6 ? C (2 2 0 2 0 2 4 0)/8 -1
82
Slotted Aloha efficiency
  • Q what is max fraction of slots successful?
  • A Suppose N stations have packets to send
  • each transmits in slot with probability p
  • probability of successful transmission S is
  • by single node S p (1-p) (N-1)
  • S Prob (only one
    transmits)
  • by any arbitrary node of the N nodes
  • N p (1-p) (N-1)
  • choosing optimum p as N -gt
    infinity ...
  • 1/e .37 as N -gt infinity

83
CSMA Carrier Sense Multiple Access
  • CSMA listen before transmit
  • If channel sensed as idle transmit entire packet
  • If channel sensed as busy defer transmission
  • Persistent CSMA retry immediately with
    probability p when channel becomes idle (may
    cause instability)
  • Non-persistent CSMA retry after random interval
  • human analogy be polite and wait your turn,
    dont interrupt others!

84
CSMA collisions
spatial layout of nodes along Ethernet
collisions can occur propagation delay means
two nodes may not hear each others transmission
collision entire packet transmission time wasted
note role of distance and propagation delay in
determining collision prob.
85
CSMA/CD (Collision Detection)
  • CSMA/CD carrier sensing, deferral as in CSMA
  • collisions detected within short time
  • colliding transmissions aborted, reducing wasted
    channel bandwidth
  • persistent or non-persistent retransmission
  • collision detection
  • easy in wired LANs measure signal strengths,
    compare transmitted, received signals
  • difficult in wireless LANs receiver shut off
    while transmitting
  • human analogy the polite conversationalist

86
CSMA/CD collision detection
87
Taking Turns MAC protocols
  • channel partitioning MAC protocols
  • share channel efficiently at high load
  • inefficient at low load delay in channel access,
    1/N bandwidth allocated even if only 1 active
    node!
  • random access MAC protocols
  • efficient at low load single node can fully
    utilize channel
  • high load collision overhead
  • taking turns protocols
  • look for best of both worlds!

88
Taking Turns MAC protocols
  • Token passing
  • control token passed from one node to next
    sequentially.
  • token message
  • concerns
  • token overhead
  • latency
  • single point of failure (token)
  • Polling
  • master node invites slave nodes to transmit in
    turn
  • Request to Send, Clear to Send msgs
  • concerns
  • polling overhead
  • latency
  • single point of failure (master)

89
Summary of MAC protocols
  • What do you do with a shared media?
  • Channel Partitioning, by time, frequency or code
  • Time Division,Code Division, Frequency Division
  • Random partitioning (dynamic),
  • ALOHA, S-ALOHA, CSMA, CSMA/CD
  • carrier sensing easy in some technologies
    (wire), hard in others (wireless)
  • CSMA/CD used in Ethernet
  • Taking Turns
  • polling from a central cite, token passing

90
LAN Addresses and ARP
  • 32-bit IP address
  • network-layer address
  • used to get a datagram to a destination network
    (recall IP network definition)
  • LAN (or MAC, or physical) address
  • used to get datagram from one interface to
    another physically-connected interface (same
    network)
  • 48 bit MAC address (for most LANs) permanent
    address, burned into the adapter ROM

How many possible LAN/Physical addresses?
91
LAN Address (more)
  • MAC address allocation administered by IEEE
  • manufacturer buys a portion of the MAC address
    space (to assure uniqueness) see current
    assignments
  • Analogy
  • (a) MAC address like Social Security
    Number
  • (b) IP address like postal address
  • MAC flat address gt portability
  • can move LAN card from one LAN to another
  • IP hierarchical address NOT portable
  • depends on network to which one attaches

92
Recall earlier routing discussion
  • Starting at A, given an IP datagram addressed to
    B
  • look up network address of B, find B on same
    network as A
  • link layer sends a datagram to B inside
    link-layer frame

frame source, destination address
datagram source, destination address
As IP address
Bs IP address
Bs MAC address
As MAC address
IP payload
datagram
frame
93
ARP Address Resolution Protocol
  • Each IP node (Hosts Routers) on a LAN has an
    ARP module and table
  • ARP Table IP/MAC address mappings for some LAN
    nodes
  • lt IP address MAC address TTLgt
  • TTL (Time To Live) time after which address
    mapping will be forgotten (typically lt 20 minutes)

Question how can we determine the MAC address of
B given Bs IP address?
94
ARP protocol (RFC 826)
  • A knows B's IP address, wants to learn physical
    address of B
  • A broadcasts ARP query packet, containing B's IP
    address
  • all machines on LAN receive ARP query
  • B receives the ARP packet, replies to A with its
    (B's) physical layer (MAC) address
  • A caches (saves) IP-to-physical address pairs
    until information becomes old (times out TTL)
  • soft state information that times out (goes
    away) unless refreshed

Side effects performance implications?
95
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 (frame delimiter)
  • used to synchronize receiver, sender clock rates

(802.3 Data Length)
Note IEEE 802.3 specifies that frame length,
excluding preamble, must be between 64 and 1518
bytes. Data is padded, if necessary, to ensure
minimum length achieved
96
Ethernet Frame Structure (more)
  • Addresses 6 bytes, frame is received by all
    adapters on a LAN and dropped if address does not
    match
  • Type (Length) 2 bytes, indicates the higher
    layer protocol, mostly IP but others may be
    supported such as Novell IPX and AppleTalk). If
    802.3 compliant, this field is length of data
    segment (min. 46 bytes)
  • CRC 4 bytes, checked at receiver, if error
    detected, the frame is simply dropped

97
Ethernet uses CSMA/CD
  • A sense channel, if idle (96 clock ticks/bit
    times)
  • then
  • transmit and monitor the channel
  • If detect another transmission
  • then
  • abort and send jam signal
  • update collisions
  • delay as required by exponential backoff
    algorithm
  • goto A
  • else done with the frame set collisions to
    zero
  • else wait until ongoing transmission is over and
    goto A

98
Ethernets CSMA/CD Efficiency
  • Recall that the probability of successful
    transmission in a slot is P Np(1-p)(N-1)
  • which yields a mean probability of success
    (efficiency) of P 1/e, for an optimal p1/N
    as N -gt infinity.
  • Note that each 802.3 slot has a duration of the
    one-bit RTT (max) for the LAN (51.2 ?sec)
    2tprop
  • The average contention interval length (i.e., how
    long you must wait) is the duration of the
    interval divided by the probability, or 2tprop
    / 1/e 2etprop
  • Taking ttrans to be the time it takes to
    transmit an average frame, channel efficiency can
    then be expressed as

ttrans ttrans 2e tprop
1 1 5.4 tprop /ttrans
?
99
Ethernets CSMA/CD Efficiency
1.0 0.9 0.8 0,7 0.6 0.5 0.4 0.3 0.2 0.1
1024 byte frames
512 byte frames
256 byte frames
Channel Efficiency
128 byte frames
64 byte frames
0 1 2 4 8
16 32 64 128 256
512
Number of Stations Trying to Send
100
Ethernet Technologies 10Base2
  • 10 10Mbps 2 under 200 meters (actually 185)
    max. cable length per segment
  • thin coaxial cable in a bus topology
  • repeaters used to connect up to multiple segments
  • repeater repeats bits it hears on one interface
    to its other interfaces physical layer device
    only!

101
10BaseT and 100BaseT
  • 10/100 Mbps rate latter called fast ethernet
  • T stands for Twisted Pair
  • Nodes are connected to hubs by twisted pair, thus
    star topology
  • CSMA/CD monitoring can be implemented at hub

102
10BaseT and 100BaseT (more)
  • Max. distance from node to Hub is 100 meters
  • max. between any two nodes is 200 meters
  • Hub can disconnect jabbering adapter
  • Hub can gather monitoring information, statistics
    for display to LAN administrators
  • Fiber links can be used to expand geographical
    reach (per IEEE 802)

Q How do you calculate the time it takes to send
a datagram from one node to another via a hub?
103
Token Passing IEEE802.5 standard
  • 4 Mbps
  • max token holding time 10 ms, limiting frame
    length

ED
  • SD, ED mark start, end of packet (each 8 bits)
  • AC access control byte (8bits)
  • token bit value 0 means token can be seized,
    value 1 means data follows FC
  • priority bits priority of packet
  • reservation bits station can write these bits to
    prevent stations with lower priority packet from
    seizing token after token becomes free

104
Interconnecting LANs
  • Q Why not just one big LAN?
  • Limited amount of supportable traffic on single
    LAN, all stations must share bandwidth
  • limited length 802.3 specifies maximum cable
    length
  • large collision domain (can collide with many
    stations)
  • limited number of stations 802.5 have token
    passing delays at each station

105
Devices for Interconnecting LANs
  • Hubs (repeaters)
  • physical-layer bit-level repeaters
  • extend physical reach of a LAN
  • 10/100BaseT interconnection (repeaters for
    10Base2)
  • Bridges
  • link-layer, frame switches
  • extend physical reach and scale of a LAN
  • allow logical segregation of a LAN
  • Switches
  • Link-layer, high performance bridge

106
Hub limitations
  • single collision domain results in no increase in
    max throughput
  • multi-tier throughput same as single segment
    throughput
  • individual LAN restrictions pose limits on number
    of nodes in same collision domain and on total
    allowed geographical coverage
  • cannot connect different Ethernet types (e.g.,
    10BaseT and 100baseT

Hub Bit In, Bit Out
107
Bridges
  • Link Layer devices operate on Ethernet frames,
    examining frame header and selectively forwarding
    frame based on its destination
  • Bridge isolates collision domains since it
    buffers frames
  • When frame is to be forwarded on segment, bridge
    uses CSMA/CD to access segment and transmit

108
Bridges frame filtering, forwarding
  • bridges filter packets
  • same-LAN -segment frames not forwarded onto other
    LAN segments
  • forwarding
  • how to know which LAN segment on which to forward
    frame?
  • looks like a routing problem (more shortly!)

109
Bridge Filtering
  • bridges learn which hosts can be reached through
    which interfaces maintain filtering tables
  • when frame received, bridge learns location of
    sender incoming LAN segment
  • records sender location in filtering table
  • filtering table entry
  • (Node LAN Address, Bridge Interface, Time Stamp)
  • stale entries in Filtering Table dropped (TTL can
    be 60 minutes)

110
Bridge Filtering
  • filtering procedure
  • if destination is on LAN on which frame was
    received
  • then drop the frame
  • else lookup filtering table
  • if entry found for destination
  • then forward the frame on interface indicated
  • else flood / forward on all but the
    interface
  • on which the frame
    arrived/

111
Bridge Learning example
  • Suppose C sends frame to D and D replies back
    with frame to C

C 1 ltltlt added
  • C sends frame, bridge has no info about D, so
    floods to other attached LANs (on ports 2 and 3)
  • bridge notes that C is on port 1
  • frame ignored on upper LAN (port 3)
  • frame received by D (port 2)

112
Bridge Learning example
C 1 D 2 ltltlt added
  • D generates reply to C, sends
  • bridge sees frame from D
  • bridge notes that D is on interface 2
  • bridge knows C on interface 1, so selectively
    forwards frame out via interface 1

113
Bridges vs. Routers (or layer-3 switches)
  • both are store-and-forward devices
  • routers network layer devices (examine network
    layer headers)
  • bridges are link layer devices
  • routers maintain routing tables, implement
    routing algorithms
  • bridges maintain filtering tables, implement
    filtering, learning and spanning tree algorithms

114
Ethernet Switches
  • cut-through switching frame forwarded from input
    to output port without awaiting for assembly of
    entire frame
  • not a store-and-forward operation
  • slight reduction in latency over
    store-and-forward
  • combinations of shared/dedicated, 10/100/1000
    Mbps interfaces

115
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)

116
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

117
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 exponential backoff
    (like Ethernet)
  • 802.11 CSMA receiver
  • if received OK
  • return ACK after SIFS

118
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

119
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

120
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

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

122
Point to Point Data Link Control
  • one sender, one receiver, one link easier than
    broadcast link
  • bit-oriented transmission stream
  • 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 a high layer in
    the protocol stack!
  • also SDLC, ADCCP, LAP, LAPB

123
PPP Design Requirements 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

124
PPP non-requirements (explicit in the
specification)
  • no error correction/recovery
  • no flow control
  • no ordering out of order delivery OK
  • no need to support multipoint links (e.g.,
    polling)

Error recovery, flow control, data
re-ordering/sequencing all relegated to higher
layers!
125
PPP Data Frame
  • Flag delimiter (framing)
  • Address does nothing (only one option in PPP)
  • Control does nothing in the future possible
    multiple control fields
  • Protocol upper layer protocol to which frame
    delivered (e.g., C021x PPP-LCP, 8021x IPCP,
    0021x IP, 0029x AppleTalk, etc.)

126
PPP Data Frame
  • info upper layer data being carried
  • check cyclic redundancy check (CRC) for error
    detection


Maximum payload length is negotiated by link
control protocol at link establishment, or
default is 1500 bytes.
127
Byte Stuffing
  • data transparency requirement data/info field
    must be allowed to contain special bit
    patterns, such as flag lt01111110gt
  • Q is received lt01111110gt data or flag?
  • Sender adds (stuffs) a special control escape
    byte lt 01111101gt byte before each lt 01111110gt
    data byte
  • Q what about lt01111101gt in the data?
  • Receiver
  • when lt01111101gt received discard it, then
    continue data reception
  • single 01111110 flag byte

128
ATM architecture
  • adaptation layer only at edge of ATM network
  • data segmentation/reassembly
  • roughly analogous to Internet transport layer
  • ATM layer network layer
  • cell switching, routing
  • physical layer

129
ATM Layer
  • Service transport cells across ATM network
  • analogous to IP network layer
  • very different services than IP network layer

Guarantees ?
Network Architecture Internet ATM ATM ATM ATM
Service Model best effort CBR VBR ABR UBR
Congestion feedback no (inferred via
loss) no congestion no congestion yes no
Bandwidth none constant rate guaranteed rate gua
ranteed minimum none
Loss no yes yes no no
Order no yes yes yes yes
Timing no yes yes no no
130
ATM Layer ATM cell
  • Core of ATM standard
  • 5-byte ATM cell header
  • 48-byte payload
  • Why? small payload -gt short cell-creation delay
    for digitized voice
  • halfway between 32 and 64 (compromise!)

Cell header
Cell format
131
ATM cell header
  • VCI virtual channel ID
  • will change from link to link thru net
  • PT Payload type (e.g. RM cell, idle cell, data
    cell)
  • CLP Cell Loss Priority bit
  • CLP 1 implies low priority cell, can be
    discarded if congestion
  • HEC Header Error Checksum (8-bit)
  • cyclic redundancy check

132
IP-Over-ATM
  • Issues
  • Conversion of IP datagrams into ATM AAL5 PDUs
  • Conversion from IP addresses to ATM addresses
  • just like IP addresses to 802.3 MAC addresses!

ATM backbone network
Ethernet LANs
133
Datagram Journey in IP-over-ATM Network
  • at Source Host/Gateway
  • IP layer finds mapping between IP and ATM
    destination address (using ARP)
  • passes datagram to AAL5
  • AAL5 encapsulates data, segments to cells, passes
    to ATM layer
  • ATM network moves cell along Virtual Circuit
    (permanent?) to destination
  • at Destination Host/Gateway
  • AAL5 reassembles cells into original datagram
  • if CRC OK, datagram is passed to IP
About PowerShow.com