Chapters 1-4 Midterm Review - PowerPoint PPT Presentation

About This Presentation
Title:

Chapters 1-4 Midterm Review

Description:

Chapters 14 Midterm Review – PowerPoint PPT presentation

Number of Views:39
Avg rating:3.0/5.0
Slides: 49
Provided by: profri
Category:

less

Transcript and Presenter's Notes

Title: Chapters 1-4 Midterm Review


1
Chapters 1-4Midterm Review
  • Professor Rick Han
  • University of Colorado at Boulder
  • rhan_at_cs.colorado.edu

2
Announcements
  • HW 2 up front
  • Solutions to HW 2 and 3 available by March 12
    evening
  • Programming Assignment 2 due Friday March 22 by
    1159 pm
  • Midterm March 14
  • Through Chapter 4 Network Layer
  • Excluding 2.9 (network adaptors), 3.4 (switching
    hardware), and 4.4 (multicast)
  • Next, review

3
Format of Midterm
  • 75 minutes
  • In class
  • Closed book
  • Calculator OK
  • 4-5 long questions (multiple sections)
  • maybe some short-answer/multiple-choice questions
  • About 15 minutes for each long question

4
Potential Topics for Midterm
  • List is not all-inclusive some topics may appear
    on midterm not listed here
  • How does ___ work? Why is it used?
  • Physical
  • Propagation delay, bandwidthdelay product
  • Byte stuffing
  • Checksums
  • Data-link
  • Reliable protocols
  • Stop-and-Wait
  • Sliding Window
  • Go-Back-N cumulative ACKs
  • Selective Repeat selective ACKs

5
Potential Topics for Midterm (2)
  • MAC
  • Aloha, Slotted Aloha
  • CSMA Listen before talk
  • CSMA/CD Ethernet Listen while talk
  • exponential backoff
  • CSMA/CA wireless Ethernet
  • Token Ring
  • Ethernet Hubs/Repeaters
  • Ethernet Bridges/Switches
  • How do bridges build their forwarding tables?
  • How are Spanning Trees constructed?

6
Potential Topics for Midterm (3)
  • Network
  • Virtual circuit routing
  • IP
  • Addressing, CIDR
  • ARP
  • First, Broadcast on Ethernet
  • DHCP
  • DHCP Relay to a DHCP Server
  • ICMP
  • How do ping and traceroute use ICMP?

7
Potential Topics for Midterm (4)
  • Network
  • IP
  • Distance-vector routing (RIP)
  • Distributed Bellman-Ford
  • Bouncing effect, counting-to-infinity, split
    horizon
  • Link-state routing (OSPF)
  • Flooding of LSPs Dijkstra
  • Link-state cost metrics
  • Inter-domain routing (BGP)
  • Path vector exchanged between ASs

8
Problems With Bridges
  • Bridges can interconnect LANs and have multiple
    paths between every node
  • Inadvertent

Layer 2 Bridge
Bridge
  • Purposely for robustness, in case highest tier
    fails

Bridge
  • Problem Frames can cycle forever in a loop and
    multiply to crash LAN!

Bridge
9
Problems With Bridges Packet Multiplication
Effect
  • Suppose all bridges have just booted
  • Suppose A wants to send to Z

Bridge 4
Bridge 1
  • Bridge 1 sends As frame to LAN 5 4
  • These two frames propagate to Bridge 3, where
    they multiply into 4 copies

LAN4
Z
LAN1
A
LAN3
LAN5
Bridge 2
LAN2
Bridge 3
  • Exponentially multiplying copies!

10
Problems With BridgesEndless Looping
  • Suppose all bridges have just booted
  • Suppose A wants to send to Z

Bridge 4
Bridge 1
  • Bridge 2 sends frame to LAN 2
  • Bridge 3 sends frame to LAN 3
  • Bridge 4 -gt LAN 4
  • Back to LAN 1

LAN4
A
Z
LAN1
LAN3
Bridge 2
LAN2
Bridge 3
  • Frames can cycle forever!

11
Solution Spanning Tree Algorithm
  • Invented by Radia Perlman, modified into 802.1d
    spanning tree standard
  • Bridges communicate with each other to set up a
    spanning tree that has no loops

Bridge 4
Bridge 1
  • Disconnect some interfaces, though physical link
    exists
  • Some frames may take long route though shorter
    direct route exists

LAN4
A
Z
LAN3
LAN1
Bridge 2
LAN2
Bridge 3
  • Some bridges may become orphans

12
Rules to Build Spanning Tree
  1. Elect a root bridge with the smallest global id
  2. Each bridge computes its shortest distance to
    root
  3. Each LAN selects a forwarding/designated bridge
    closest to root

Bridge 4
Bridge 3
  • Spanning tree root forwarding bridges
  • Root forwards frames on all outgoing ports
  • If dest. not on LAN, send via forwarding bridge
  • Eliminates loops!

LAN A
LAN C
LAN D
LAN E
Bridge1
Bridge 2
Root
13
More Intuition on Constructing Spanning Trees
  • The 3 basic mechanisms for constructing 802.1d
    spanning trees (as defined in standard)
  • A Bridge that believes itself to be the Root
    (all Bridges start by believing themselves to be
    the Root until they discover otherwise)
    originates Configuration Messages on all the LANs
    to which it is attached, at regular intervals.
  • A Bridge that receives a Configuration Message
    on what it decides is its Root Port conveying
    better information (i.e., highest priority Root
    Identifier, lowest Root Path Cost, highest
    priority transmit-ting Bridge and Port), passes
    that information on to all the LANs for which it
    believes itself to be the Designated Bridge.
  • A Bridge that receives inferior information, on
    a Port it considers to be the Designated Port on
    the LAN to which it is attached, transmits its
    own information in reply, for all other Bridges
    attached to that LAN to hear.

14
Control Messages to Build Spanning Tree
  • Each bridge creates a configuration message
  • ltbridge source id, distance to root, root bridge
    idgt
  • Each bridge floods its initial configuration
    message on each of its ports/LANs
  • ltsrcmy id, dist.0, rootmy idgt
  • Each bridge stores best config msg for each
    port/LAN
  • A config msg C1 is better than stored config msg
    C2 if
  • Root id of C1 lt root id of C2
  • Root ids equal and distance of C1 lt distance of
    C2
  • If root ids and distances equal, C1 is better
    than C2 if transmitting bridge on C1 is lower
    than C2

15
First, Elect the Root
  • If advertised root of new config msg C1 has
    smaller id, then
  • Stop sending out its own bridge id config msgs
  • Forward new smaller id on all outgoing ports
  • Higher id config messages are discarded.
  • Eventually, lowest ID bridge suppresses all other
    bridges config msgs
  • Root bridge knows it is the root because the
    lowest ID is its own

Bridge 4
Bridge 3
LAN A
LAN C
LAN D
LAN E
Bridge1
Bridge 2
16
First, Elect the Root (2)
  • Example
  • Regardless of the config msgs exchanged by
    Bridges 2,3, and 4, as soon as Bridge 1 floods
    its config msg to Bridge 2 and 4, they both
  • stop sending out their own bridge id config msgs
    and
  • Begin forwarding Bridge 1s config msg on all
    outgoing ports
  • Eventually, Bridge 3 also stops sending its
    config msgs

Bridge 4
Bridge 3
LAN A
LAN C
LAN D
LAN E
Bridge1
Bridge 2
17
More Intuition on Constructing Spanning Trees (1)
  • Each bridge thinks its the root initially.
  • Each bridge begins by periodically broadcasting
    on its attached LANs a config message saying I
    know who the root is and Im closest to the
    root.
  • On each LAN, all connected bridges exchange these
    messages and try to convince their neighbors that
    theyre correct.

18
More Intuition on Constructing Spanning Trees (2)
  • Think of each bridge as a person connected to
    many rooms (LANs).
  • If a person P in room 1 said I know who the root
    is. to you, then youd want to verify this
    statement by comparing it to what youd heard
    everyone else say in all the other rooms that
    youre connected/listening to.
  • If person P was correct, then youd remember what
    they said.
  • If another room had a better root, then youd
    correct person P by sending a new config message
    saying I really know who the root is.

19
More Intuition on Constructing Spanning Trees (3)
  • At any given time, each person (bridge) will be
    able to identify the lowest ID root heard from
    all of the announcements in all of its attached
    rooms, and will remember from which room X (LAN)
    the lowest ID announcement came
  • The person will think that room X offers the
    shortest path to the root.
  • The door into room X (LAN port) is called the
    root port.

20
More Intuition on Constructing Spanning Trees (4)
  • As the true root bridge (lowest ID) broadcasts
    onto its attached LANs, its immediate radius-1
    neighbors are quickly convinced that this is the
    root.
  • Each bridge between a radius-1 and radius-2 LAN
    will initially hear periodic false announcements
    on each radius-2 LAN claiming to know the root,
    and will reply with a new config message saying
    I really know who the root is, and Im one hop
    from the root (and therefore closest on this
    LAN).
  • As the radius-2 bridges hear this, theyll stop
    sending their false claims. Also, theyll
    respond to and stop the false claims of radius-3
    bridges, propagating knowledge of the root bridge
    outward.

21
Next, Build Shortest-Path Forwarding Tree to Root
  • Conceptually, build shortest-path forwarding tree
    after electing the root
  • But, as the roots config msg floods the network,
    notice that the shortest-path tree can
    simultaneously be calculated
  • Thus, piggyback on Bridge 1s config msg flooding
    to set up the shortest path tree to root
  • Each bridge increments by one the distance, as it
    receives Bridge 1s config msg, and forwards
    config msg with Bridge 1 as root to all outgoing
    ports

22
Next, Build Shortest-Path Forwarding Tree to Root
(2)
  • When a bridge receives a config message from
    another bridge on same LAN with Bridge 1 as root,
    it stops sending config messages on that port/LAN
    if
  • Other bridge is closer to root
  • Other bridge is same distance from root, but has
    a lower ID
  • Thus, a bridge de-selects itself as the
    designated forwarding bridge for that port/LAN

23
Next, Build Shortest-Path Forwarding Tree to Root
(3)
  • Bridge 1 floods its config message
  • Bridge D is part of a loop, and will receive
    multiple config msgs from Bridge 1
  • Bridge D deselects itself from both LANs because
    Bridges 2 3 are closer to root Bridge 1

Bridge 1
Bridge 2
Bridge 3
Bridge D
24
Next, Build Shortest-Path Forwarding Tree to Root
(4)
  • Bridge 4 is designated forwarding bridge for LAN
    A, since it closer to root than Bridge 3 on LAN A
  • Bridge 3 removes itself
  • For LAN B, Bridge 2 is designated forwarding
    bridge
  • Bridge 3 removes itself

Bridge 4
Bridge 3
LAN A
LAN C
LAN D
LAN E
Bridge1
Bridge 2
25
More Intuition on Constructing Spanning Trees (5)
  • As a result, the roots lowest ID will propagate
    outward from the root bridge until all bridges
    become aware of the global roots lowest ID
  • Thus far, weve only identified the root bridge.
    The shortest-path spanning tree still needs to be
    built.
  • Remember, the full claim is I know who the root
    is, and Im closest to the root.
  • Resolving the 2nd claim Im closest to the root
    is the key to building the shortest path spanning
    tree

26
More Intuition on Constructing Spanning Trees (6)
  • When a bridge A hears the claim on a LAN from a
    bridge B that Im closest to the root., it must
    verify this claim.
  • Recall that at any given time, each bridge can
    calculate what it believes is the root and the
    LAN from which the announcement came
  • The root announcement also contained a distance
    from the root. Thus, each bridge A knows its
    distance from the root dist(A,root) is the root
    announcements advertised distance 1.
  • When a new claim arrives from a bridge B that
    Im closest to the root., and contains a
    distance dist(B,root), then bridge A compares
    dist(B,root) to dist(A,root) to verify the
    truthfulness of the claim

27
More Intuition on Constructing Spanning Trees (7)
  • If bridge Bs claim Im closest to the root.
  • is correct, then bridge B should be the
    designated bridge forwarding towards the root for
    that LAN and bridge A will abstain from
    forwarding data to/from LAN
  • is false, then bridge A will send a reply saying,
    No, Im closest to the root., and assign itself
    to be the designated forwarding bridge for that
    LAN

28
More Intuition on Constructing Spanning Trees (8)
  • The root ID will propagate outwards, in response
    to periodic false claims of root ID. The
    distance-to-root will piggyback and will be
    incremented by one at each bridge.
  • all bridges will have a correct distance estimate
    to the root
  • Bridges with multiple paths from root will
    receive conflicting claims, and will follow rules
    of slide (7) to decide who is the designated
    bridge for that LAN

29
More Intuition on Constructing Spanning Trees (9)
  • The method of correcting false distance claims
    will propagate outward from the root bridge,
    until
  • Each bridge will have a root port facing towards
    the root, and some (possibly zero) ports facing
    away from the root on which it is the designated
    forwarding LAN
  • The root port will periodically be flooding its
    config messages to the root ports of radius-1
    bridges, who in turn will be flooding the config
    messages with distance incremented by one out of
    their designated ports toward the root ports of
    the radius-2 bridges in the spanning tree

30
Distance Vector Routing
  • Book assumes that only routing table is kept at
    each router
  • I (and Kuroses text and Perlmans text) assume
    that the entire distance table is kept at each
    router
  • For midterm, use textbooks assumption
  • For programming assignment 2, use
    my/Kurose/Perlman assumption of distance table in
    every router

31
Distance Vector Routing
  • Compare the following examples to see how the two
    interpretations of distance vector react
    differently to the same link failure

32
Distance Vector Routing (1)
25
B Via neighbor Via neighbor Via neighbor
dest A B C
A 25 inf 2
B 27 0 2
C 26 inf 1
A
B
Distance Table
A Via neighbor Via neighbor Via neighbor
dest A B C
A 0 27 2
B inf 25 2
C inf 26 1
1
1
C
A 2
B 0
C 1
C Via neighbor Via neighbor Via neighbor
dest A B C
A 1 3 inf
B 3 1 inf
C 2 2 0
Distance vector
A 1
B 1
C 0
A 0
B 2
C 1
33
Distance Vector Routing (2)
25
B Via neighbor Via neighbor Via neighbor
dest A B C
A 25 inf 2
B 27 0 2
C 26 inf 1
A
B
Distance Table
A B notice link failure and should reset columns
A Via neighbor Via neighbor Via neighbor
dest A B C
A 0 27 2
B inf 25 2
C inf 26 1
1
1
C
A 2
B 0
C 1
C Via neighbor Via neighbor Via neighbor
dest A B C
A 1 3 inf
B 3 1 inf
C 2 2 0
Distance vector
A 1
B 1
C 0
A 0
B 2
C 1
34
Distance Vector Routing (3)
25
B Via neighbor Via neighbor Via neighbor
dest A B C
A inf inf 2
B inf 0 2
C inf inf 1
A
B
Distance Table
A Via neighbor Via neighbor Via neighbor
dest A B C
A 0 inf 2
B inf inf 2
C inf inf 1
1
1
C
A 2
B 0
C 1
C Via neighbor Via neighbor Via neighbor
dest A B C
A 1 3 inf
B 3 1 inf
C 2 2 0
Same!
Distance vector
A 1
B 1
C 0
A 0
B 2
C 1
Same!
Same!
35
Books Distance Vector Routing
25
A
Cost Next hop
A 2 C
B 0 B
C 1 C
B
Routing Table
Cost Next hop
A 0 A
B 2 C
C 1 C
1
1
C
A 2
B 0
C 1
Cost Next hop
A 1 A
B 1 B
C 0 C
Distance vector
A 1
B 1
C 0
A 0
B 2
C 1
36
Books Distance Vector Routing (2)
25
A
Cost Next hop
A 2 C
B 0 B
C 1 C
B
Routing Table
Neither A nor B change their routing tables
because none of the next-hop paths go through the
broken link
Cost Next hop
A 0 A
B 2 C
C 1 C
1
1
C
Same
A 2
B 0
C 1
Cost Next hop
A 1 A
B 1 B
C 0 C
Same
Distance vector
A 1
B 1
C 0
A 0
B 2
C 1
Same
37
Books Distance Vector Routing (3)
25
A
Cost Next hop
A 2 C
B 0 B
C 1 C
B
Routing Table
A C should change routing tables because some
next-hop paths go through the broken link
Cost Next hop
A 0 A
B 2 C
C 1 C
1
1
C
A 2
B 0
C 1
Cost Next hop
A 1 A
B 1 B
C 0 C
Distance vector
A 1
B 1
C 0
A 0
B 2
C 1
38
Books Distance Vector Routing (4)
25
A
Cost Next hop
A 2 C
B 0 B
C 1 C
B
Routing Table
Cost Next hop
A 0 A
B inf -
C inf -
1
1
C
A 2
B 0
C 1
Cost Next hop
A inf -
B 1 B
C 0 C
Distance vector
A inf
B 1
C 0
A 0
B inf
C inf
39
Books Distance Vector Routing (5)
25
A
Cost Next hop
A 2 C
B 0 B
C 1 C
B
Routing Table
Cost Next hop
A 0 A
B inf -
C inf -
1
1
C
Same
A 2
B 0
C 1
Cost Next hop
A inf -
B 1 B
C 0 C
Distance vector
A inf
B 1
C 0
A 0
B Inf
C inf
40
Books Distance Vector Routing (6)
25
A
Cost Next hop
A inf -
B 0 B
C 1 C
B
Routing Table
Cost Next hop
A 0 A
B inf -
C inf -
1
1
C
A inf
B 0
C 1
Cost Next hop
A inf -
B 1 B
C 0 C
Distance vector
A inf
B 1
C 0
A 0
B Inf
C inf
41
Books Distance Vector Routing (7)
25
A
Cost Next hop
A 25 A
B 0 B
C 1 C
B
Routing Table
Cost Next hop
A 0 A
B inf -
C inf -
1
1
C
A 25
B 0
C 1
Cost Next hop
A inf -
B 1 B
C 0 C
Distance vector
A inf
B 1
C 0
A 0
B Inf
C inf
42
Books Distance Vector Routing (8)
25
A
Cost Next hop
A 25 A
B 0 B
C 1 C
B
Routing Table
Cost Next hop
A 0 A
B inf -
C inf -
1
1
C
Same
A 25
B 0
C 1
Cost Next hop
A 26 B
B 1 B
C 0 C
Distance vector
A 26
B 1
C 0
A 0
B Inf
C inf
43
Books Distance Vector Routing (9)
25
A
Cost Next hop
A 25 A
B 0 B
C 1 C
B
Routing Table
Cost Next hop
A 0 A
B 25 B
C 26 B
1
1
C
Same
A 25
B 0
C 1
Cost Next hop
A 26 B
B 1 B
C 0 C
Distance vector
A 26
B 1
C 0
A 0
B 25
C 26
44
Distance Vector Routing (4)
25
B Via neighbor Via neighbor Via neighbor
dest A B C
A 25 inf 2
B 27 0 2
C 26 inf 1
A
B
Distance Table
A C should update their distance tables
A Via neighbor Via neighbor Via neighbor
dest A B C
A 0 27 2
B inf 25 2
C inf 26 1
1
1
C
A 2
B 0
C 1
C Via neighbor Via neighbor Via neighbor
dest A B C
A 1 3 inf
B 3 1 inf
C 2 2 0
Distance vector
A 1
B 1
C 0
A 0
B 2
C 1
45
Distance Vector Routing (5)
25
B Via neighbor Via neighbor Via neighbor
dest A B C
A 25 inf 2
B 27 0 2
C 26 inf 1
A
B
Distance Table
A Via neighbor Via neighbor Via neighbor
dest A B C
A 0 27 inf
B inf 25 inf
C inf 26 inf
1
1
C
A 2
B 0
C 1
C Via neighbor Via neighbor Via neighbor
dest A B C
A inf 3 inf
B inf 1 inf
C inf 2 0
Distance vector
A 3
B 1
C 0
A 0
B 25
C 26
46
Distance Vector Routing (6)
25
B Via neighbor Via neighbor Via neighbor
dest A B C
A 25 inf 2
B 50 0 2
C 51 inf 1
A
B
Distance Table
A Via neighbor Via neighbor Via neighbor
dest A B C
A 0 27 inf
B inf 25 inf
C inf 26 inf
1
1
C
A 2
B 0
C 1
C Via neighbor Via neighbor Via neighbor
dest A B C
A inf 3 inf
B inf 1 inf
C inf 2 0
Distance vector
A 3
B 1
C 0
A 0
B 25
C 26
47
Distance Vector Routing (7)
25
B Via neighbor Via neighbor Via neighbor
dest A B C
A 25 inf 4
B 50 0 2
C 51 inf 1
A
B
Distance Table
A Via neighbor Via neighbor Via neighbor
dest A B C
A 0 27 inf
B inf 25 inf
C inf 26 inf
1
1
C
A 4
B 0
C 1
C Via neighbor Via neighbor Via neighbor
dest A B C
A inf 3 inf
B inf 1 inf
C inf 2 0
Distance vector
A 3
B 1
C 0
A 0
B 25
C 26
48
Distance Vector Routing (8)
25
B Via neighbor Via neighbor Via neighbor
dest A B C
A 25 inf 4
B 50 0 2
C 51 inf 1
A
B
Distance Table
A Via neighbor Via neighbor Via neighbor
dest A B C
A 0 27 inf
B inf 25 inf
C inf 26 inf
1
1
C
A 4
B 0
C 1
C Via neighbor Via neighbor Via neighbor
dest A B C
A inf 5 inf
B inf 1 inf
C inf 2 0
Distance vector
A 5
B 1
C 0
A 0
B 25
C 26
Bouncing Effect
Write a Comment
User Comments (0)
About PowerShow.com