ppt

advertisement
Introduction to Computer
Networks
CMPE 150
Fall 2005
Lecture 20
CMPE 150- Introduction to Computer Networks
1
Announcements
• Homework 4 up by the end of the week.
• Lab this week:
– Layer 2.
– Ethernet.
• Holiday this Friday (11.11).
• Monday, 11.14 class meets in E2 room 506.
CMPE 150- Introduction to Computer Networks
2
Today
• Finish DLL!
CMPE 150- Introduction to Computer Networks
3
Last Class…
•
•
•
•
•
•
DLL Switching.
Interconnecting multiple LANs.
Bridges.
Transparent Bridges.
Backward Learning.
Spanning Tree.
CMPE 150- Introduction to Computer Networks
4
Spanning Tree Algorithm (1)
1. Determine root bridge.
2. Determine root port on all bridges.
3. Determine designated bridges.
CMPE 150- Introduction to Computer Networks
5
Spanning Tree Algorithm (2)
• Initially all bridges assume they are the
root and broadcast message with its ID,
root path cost.
• Eventually, lowest-ID bridge will be known
to everyone and will become root.
• Root bridge periodically broadcasts it’s the
root.
CMPE 150- Introduction to Computer Networks
6
Spanning Tree Algorithm (3)
• Directly connected bridges update their cost to
root and broadcast message on other LANs
they are attached.
• This is propagated throughout network.
• On any (non-directly connected) LAN, bridge
closest to root becomes designated bridge.
CMPE 150- Introduction to Computer Networks
7
Spanning Tree: Example
LAN 2
LAN 2
10
10
B3
10
B1
10
5
LAN 3
5
B4
5
LAN 5
5
B5
5
LAN 1
10
5
B2
LAN 4
CMPE 150- Introduction to Computer Networks
10
10
B3
10
B1
10
5
LAN 3
5
B4
5
LAN 5
5
B5
5
LAN 1
10
5
B2
LAN 4
8
Spanning Tree: Example
B1
. Only designated bridges
on each LAN allowed to
forward frames.
LAN 2
LAN 1
B4
B3
. Bridges continue
exchanging info to react
to topology changes.
B5
LAN 5
B2
LAN 3
LAN 4
CMPE 150- Introduction to Computer Networks
9
Remote Bridges
• Remote bridges can be used to interconnect distant
LANs.
CMPE 150- Introduction to Computer Networks
10
Repeaters, Hubs, Bridges,
Switches, Routers, Gateways
• How do they differ?
– Operate in different layers.
– I.e., they look at different information to
perform switching/routing/forwarding.
CMPE 150- Introduction to Computer Networks
11
Repeaters, Hubs, Bridges,
Switches, Routers, Gateways
CMPE 150- Introduction to Computer Networks
12
Repeaters
• Operate at the PHY.
• Connect 2 cable segments.
• Amplify signal in order to extend LAN’s range.
CMPE 150- Introduction to Computer Networks
13
Hubs, Bridges, Switches
. Also operates
at the PHY.
. Joins several lines.
. Similar to repeater?
. Bridges operate at the
DLL.
. Connects 2+ LANs.
. Route on DLL addresses.
CMPE 150- Introduction to Computer Networks
. Also operate
at the DLL.
. Typically
connect computers.
14
Cut-Through Switching
• Instead of store-and-forward.
• Start frame forwarding as soon as destination
header field has arrived.
– Before whole frame has arrived.
– Assumes outgoing interface available.
– Typically handled in hardware.
CMPE 150- Introduction to Computer Networks
15
Routers and Gateways
• Routers operate at the network layer.
– They look at network-layer addresses (e.g., IP
addresses) to route packets.
• Gateways typically operate at higher layers,
i.e., transport and above.
CMPE 150- Introduction to Computer Networks
16
The Network Layer
CMPE 150- Introduction to Computer Networks
17
Main Functions
• Routing.
• Forwarding.
CMPE 150- Introduction to Computer Networks
18
Design Issues
• Services provided to transport layer.
• How to design network-layer protocols.
CMPE 150- Introduction to Computer Networks
19
Store-and-Forward Packet Switching
Subnet
fig 5-1
. Host sends packet to nearest router.
. Packet forwarded to next router.
. Until packet reaches destination.
CMPE 150- Introduction to Computer Networks
20
Services
• What kind of services provided to transport
layer?
• Connection-oriented versus connectionless
service?
CMPE 150- Introduction to Computer Networks
21
Connectionless Service
• Datagram network.
• “Move all intelligence to the edges”.
– Routers just route.
– Everything else should be done end-to-end.
• No ordering, no flow/congestion control, no
reliable delivery.
• Best-effort service model.
• Packets are routed independently…
• E.g., Internet.
CMPE 150- Introduction to Computer Networks
22
Connection-Oriented Service
•
•
•
•
Virtual circuit networks.
`A la telephone network.
Reliable, ordered service.
Virtual connection established from source to
destination.
• E.g., X-25, ATM.
CMPE 150- Introduction to Computer Networks
23
Datagram Network Operation
• How does it work?
• Data from transport layer is broken into
packets, or datagrams.
• Network layer at host adds network-layer
header and forwards packets to directlyconnected router.
CMPE 150- Introduction to Computer Networks
24
Datagram Network: Example
• Routing within a diagram subnet.
CMPE 150- Introduction to Computer Networks
25
Virtual Circuit Network Operation
• Connection-establishment before sending
data.
– All traffic for that connection follows same
route.
CMPE 150- Introduction to Computer Networks
26
Virtual Circuit Network: Example
• Routing within a virtual-circuit subnet.
CMPE 150- Introduction to Computer Networks
27
Virtual-Circuit versus Datagram Subnets
5-4
CMPE 150- Introduction to Computer Networks
28
Download