The Network Layer; Switching
The Network Layer
Basic concepts
Objective: Provide a packet delivery system for the transport layer, using the point-to-point links of the data link layer.Give up the assumption that every node is directly connected to every other node.
Instead, nodes are connected indirectly through a subnet of routers.
Routers use store-and-forward packet switching.
- Data is split into shorter "packets".
- Packets are sent from source to destination, and reassembled at the destination.
- Forwarding -- For each packet read on an input port, determine which output port should it be written to. (local)
- Routing -- Determine the end-to-end path along which to send a packet from host A to host B. (global)
Design Issues
- Class of service
- Connectionless vs connection-oriented
- Level of service
- Router design
- What's inside a router?
- Routing algorithms
- Congestion control algorithms
- Addressing
Connectionless vs. connection-oriented service
Two methods of packet switching::- Datagram (connectionless)
- Each packet is routed independently of all others.
- Each router has a routing table, mapping addresses to output ports. Q: How is the routing table populated? Q: There are lots of addresses. Answers determined by a routing algorithm and the addressing structure.
- example: IP
- Advantage: More adaptable to failures
- Disadvantage: Routing has to be recalculated for each packet.
- Virtual circuit (connection oriented)
- Connection is set up between sender and receiver
- The connection is essentially a path/route with an identifier.
- Every switch along the way knows about the virtual circuit
- Once established, all packets follow the same route.
- In order delivery
- examples: X.25, ATM
- SVC -- Switched virtual circuit
- PVC -- Permanent virtual circuit
-
Issue: how to assign unique identifiers? Answer: Don't. The VC can have
a different id on each leg between routers. This is called label-switching.
- VC requires setup time and protocols. All routers on the path implementing the VC must communicate to set up the VC.
- Datagram is stateless; better to survive router crashes, since router memory does not contain state infomration about connections
- VC is better able to provide quality of service guarantees and congestion control, since resources can be preallocated along the route.
Levels of service
- Guaranteed delivery
- Guaranteed delivery with bounded delay
- In-order delivery
- Guaranteed minimum bandwidth (data rate)
- Guaranteed minimum jitter
- Best-effort service (nothing is guaranteed)
- Internet:
- best effort
- no guaranteed bandwidth
- no guarantee against lost packets
- in-order delivery not guaranteed
- ATM (connection-oriented) provides two service levels:
- CBR (Constant bit rate):
- guaranteed constant bandwidth
- no lost packets
- in-order delivery
- ABR (Available bit rate):
- guaranteed minimum bandwidth
- no guarantee against lost packets
- in-order delivery guaranteed
Router design
What's inside a router?Basic functions: forwarding and routing
Structure:
- Input ports
- Output ports
- Switching fabric
- Memory
- Bus
- Crossbar
- Routing processor
- Packets may need to be queued at input ports or output ports. Why?
- Input: Packets may arrive faster than the switching network can process them.
- Output: Several packets arrive at the same time on different input ports, all addressed to the same desitination.