Computer Networks
description
Transcript of Computer Networks
![Page 1: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/1.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 1
Computer Networks
Chapter 4 – Source Routing Bridges
![Page 2: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/2.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 2
Why Source Routing?
• It exists– 802 standards– IP option– GWEN– MANETs
• Instructive alternative– Variety provides insight– Variety provides options
![Page 3: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/3.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 3
Pure Source Routing• Packet header contains route
• How does the source get the route?– Manually set– Cached from history– Discovered
• How to indicate source routed packet?– No field set aside for this in LAN header– Use “useless” bit…which one?
DataDest Addr Src Addr
![Page 4: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/4.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 4
Routing Information (RI)• Magic bit
– Multicast bit in source address field
(never send from a multicast address!)
DataDest Addr Src Addr
RIDest Addr Src Addr Data
Multicast bit = 0
Multicast bit = 1
Normal packet (transparent bridge routing):
Source routed packet with Routing Information field:
![Page 5: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/5.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 5
RI Fields
• Type (3 bits)– Specifically routed (route in header)– All paths explorer (collect route as traversed)– Spanning tree explorer (only traverse ST)
• Length (5 bits) = # bytes in RI field• Direction (1 bit) = traverse route L to R?• Largest Frame (3 bits)
– Represents one of a few popular packet sizes (516, 1500, 2052, 4472, 8144, 11407, 17800, 65535)
• Route (variable, multiple of 2 octets)
![Page 6: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/6.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 6
Route Designators
• 2-octet sub-fields of Route field in RI– 12-bit LAN number– 4-bit bridge number
• LAN numbers– Unique over all LANs in extended LAN
• Bridge Numbers– Unique for all bridges that connect the same
pair of LANs
![Page 7: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/7.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 7
Bridge Numbers
• Suppose route were only LAN numbers…
B1
B2
B3
B4
B5
LAN A LAN B
… How many copies show up on LAN B?
![Page 8: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/8.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 8
Bridge Numbers
• Suppose there were multiple layers…
LAN A LAN C
… now how many copies show up on LAN C?
LAN B
![Page 9: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/9.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 9
Bridge Numbers
• Single bridge number per bridge• Can duplicate, but not for two bridges connecting same
pair of LANs• Easier if bridge could have different number per pair of
LANs it connects, but– Not standard– Does not scale well (N2 bridge numbers for N port bridge)
• Can make due with “internal LAN” if needed– Pretend each port connects to hallucinated LAN– Internal LAN will always have unique number, so no collisions
across bridges!
• Last bridge number in route always “0”
![Page 10: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/10.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 10
Why Parallel Bridges?
• Robustness• Underpowered bridges• Low capacity links
– Need SR to use both– Best if both links between
same bridges
LAN A LAN B
LAN A LAN B
LAN A LAN B
![Page 11: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/11.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 11
SR Bridge Frames• 4 Frame types to handle
– Transparent frames (no RI field)– Specifically routed– All paths explorer– Spanning tree explorer
• To each his own– Transparent bridges ignore SR frames– Pure SR bridges ignore transparent frames
![Page 12: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/12.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 12
Specifically Routed Frames• SR Bridge B gets SR Frame on port P1
from LAN #X (to B, anyway)
• B sees SR frame, checks direction bit
• B forwards to port P2 iff– X is on the route, followed by Bridge # N,
followed by LAN #Y– B associates LAN #Y with P2– B’s bridge # w.r.t. (P1,P2) is N– Y appears only once on the route
![Page 13: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/13.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 13
All Paths Explorer Frames• Source host first sends with no route info• SR Bridge B gets APEx Frame on port P1 from
LAN #X (to B, anyway)• If no route info yet, B does for every port P
other than P1– Initialize route to [X,N,Y]
where Y is LAN on P, N is B’s bridge # w.r.t. (P1,P)– Update largest frame field – LF min= MF(P)– Recalculate CRC– Transmit on P
![Page 14: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/14.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 14
All Paths Explorer Frames• If length = 6-28 bytes of route info, B forwards
to every port P (to LAN Y) except P1 (from LAN X) iff– The final collected hop is X (else drop, log error)– Y is not yet in collected RI
• If port P is eligible, B does– Adjust RI += 2– Replace [X] with [X|N,Y] in RI– Update largest frame field – LF min= MF(P)– Recalculate CRC– Transmit on P
• If RI field is full, B discards
![Page 15: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/15.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 15
Spanning Tree Explorer Frames• Source host first sends with no route info
• Handled in same way as APEx Frame, except– Don’t check if output LAN repeated– Only forward if STEx Frame appears on a
spanning tree port– Only forward to other spanning tree ports
![Page 16: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/16.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 16
Hybrids LANs and Bridges• TB and SR LANs wish to interconnect• SR-TB Bridges
– TB frames– SR frames
• Pure SR and SR-TB declared “non-standard” … so 4 types of bridges
• SRT Bridges– TB frames treated as a TB– SR frames treated as an SR Bridge
![Page 17: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/17.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 17
End Systems• No standard• How to route – build cache• When to find a route
– Don’t keep trying if failed recently
• When to flush cache– Higher layer signals– No recent traffic from D on cached route– After some time, even if in use
• Be careful!
![Page 18: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/18.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 18
How to Find a Route• Would be nice if source could distinguish
– Destination down– Destination only available via transparent bridging– D reachable by SR, but SR worse than TB route– D reachable by SR, and SR better than TB route
• Strategy 1– S sends APEx frame to D– D replies with SR frame for each APEx frame, with
direction flipped– D does not modify its cache
• Strategy 2– S sends “need route” frame transparently first– D replies with “need route response” transparently– S then tries to find SR– Need standard!
![Page 19: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/19.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 19
How to Find a Route• Strategy 3
– S sends “need route” frame transparently first– D replies with APEx– S picks a route from APEx frames
• Strategy 4– Like 3, but D replies with two frames:
• APEx frame• Transparent “need route reply”
• Strategy 5– S sends APEx frame to D– D selects a single route, replies with SR frame for that route,
with direction flipped– S updates its cache
![Page 20: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/20.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 20
How to Find a Route• Strategy 6
– Always use transparent bridging!
![Page 21: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/21.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 21
How to Find a Route• Strategy 6
– Always use transparent bridging!
+ Simple
+ Always works
+ No route discovery overhead– Won’t find a better SR route– End STAs don’t find maximum frame size– Traffic only uses spanning tree paths
![Page 22: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/22.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 22
Destination Route Discovery• D can obtain information from APEx
– Route selected may not be same as S’s– No assurance route works
• D can wait until it has to send frames– Same issues, less efficient!
• D can learn from received data frames– Symmetric– Must examine all data frames– What to do if route differs?
![Page 23: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/23.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 23
Route Selection• End STA may have many options
• Criteria for route selection– First received APEx frame– Route with largest max frame size– Route with fewest hops– Combine the above– Most recently received route ()
![Page 24: Computer Networks](https://reader035.fdocuments.net/reader035/viewer/2022070406/56814044550346895dabb4e7/html5/thumbnails/24.jpg)
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 24
TB vs SR• Overhead
– Route discovery– RI field– Suboptimal routing (esp. TB)
• Configuration ease– LAN number assignment– Bridge number assignment
• Universality– End nodes must have compatible SR– TB does not find max frame size– Route change may change max frame size….