Chp - PolyU

advertisement
1
3. INTERNETWORKING
(PART 1)
Rocky K. C. Chang
Department of Computing
The Hong Kong Polytechnic University
18 February 2016
2
1. The problem statement
• How do two hosts that are not directly connected
communicate with each other?
• Some “intelligent” packet forwarding (or switching) engines have to
be in place between the two hosts.
• Part 2 and part 3:
• Part 2 handles the problem on connected networks of the same or
very similar type, e.g., both hosts on a switched Ethernet LAN (or
ATM).
• Part 3 handles the problem on connected heterogeneous networks,
e.g., one host on an ATM network and the other on an Ethernet
LAN.
3
1. The problem statement
Host D
Host E
0 Switch 1
3
Host C
Host F
1
2 Switch 2
2
3
1
0
Host A
Host G
1
0 Switch 3 Host B
3
2
Host H
4
2. The problem statement
• Layer-two or layer-three switches
• Switching based on the layer-two or layer-three information
(headers).
• The switches between a source and a destination “work
together” to deliver packets between them.
• Approaches to switching packets:
• Packet switching (a pure connectionless approach), e.g., switched
LANs and IP.
• Virtual circuit (or cell) switching (need connection setup), e.g. ATM.
5
3. Switching and forwarding
• A switch is a multi-input, multi-output device, which
transfers packets from an input to one or more outputs.
• LAN (layer-two) switches, e.g., switched Ethernet, switched token-
ring, switched FDDI,
• ATM switches, and
• routers (layer-three switches).
• In addition to switches, need network protocols for
switches to make forwarding decisions.
6
3.1 Packet switching
• Packet switching refers to a pure connectionless
approach.
• Each packet (header) contains enough information for the routers
to make forwarding decisions.
• When a packet is received, the switch attempts to match it
with an entry in its forwarding table.
• Each entry in the forwarding table mainly consists of
• destination address, and
• the interface (or port) where this packet should be forwarded to.
7
3.1 Packet switching
Host D
Host E
0 Switch 1
3
Host C
Host F
1
2 Switch 2
2
3
1
0
Host A
Host G
1
0 Switch 3 Host B
3
2
Host H
8
3.1.1 Properties of packet switching
• Forwarding decision is made packet by packet, even
when several packets belonging to the same “stream.”
• Each packet should contain sufficient information for forwarding
purposes.
• No connection set-up is required before sending packets.
• The design for the source is very simple.
• The intelligence lies with the switches.
• Intermediate switches do not keep any “states” about a certain
“connection.”
9
3.1.2 Routing problem in packet switching
• Routing problem: How do the switches construct their
forwarding tables?
• For example,
• Ethernet LAN switches are required to “remember” the frames they
saw and to run a spanning tree protocol among themselves.
• IP routers are required to run a distributed routing protocol among
themselves.
• The forwarding tables are sometimes are called routing tables.
10
3.2 Virtual circuit switching
• Before sending packets, a source needs to set-up a
“connection” to the destination.
• States about the connection are stored in the switches on the path
between the source and destination.
• An explicit connection set-up and an explicit connection tear-down are
required.
• Unlike the circuit switching, packets from different
connections are statistically multiplexed on a link.
• Need identifiers (Virtual Circuit Identifier, VCI) to distinguish them.
11
3.2 Virtual circuit switching
• An entry in the forwarding table usually consists of
• The VCI of an incoming packet,
• The interface from where the packet is received,
• The interface where the packet should be forwarded to, and
• The VCI for the outgoing packet.
• On a given link, packets belonging to a certain connection
should be uniquely identified by a VCI.
12
3.2 Virtual circuit switching
0 Switch 1
1
3
2
5
3
2 Switch 2
1
11
0
Host A
7
1
0 Switch 3
3
4
2
Host B
13
3.2.1 Routing problem in V. C. switching
• Two types of virtual circuits:
• Permanent Virtual Circuits (PVCs): A long-lived VC, usually preconfigured by administrators.
• Switched Virtual Circuits (SVCs): An on-demand VC, set-up by a
source through signalling.
• Routing problem: How do the switches know how to forward
a “connection set-up” message to the destination?
• The switches also need to run a distributed routing protocol for this
purpose, e.g., P-NNI in ATM.
14
3.2.2 Properties of virtual circuit switching
• A source needs to wait for at least one RTT before sending
packets.
• Same as the packet switching, virtual circuit switching also
needs a routing protocol for the connection setup.
• Unlike the destination address for packet switching, the
VCI has only local significance.
• The length of a VCI usually is a lot smaller than that of a complete
destination address.
• A new connection needs to be set up in midst of link/node
failures.
Download