Transcript Document

Connecting Devices

and Multi-Homed Machines

Layer 1 (Physical) Devices

Repeater:   Extends distances by repeating a signal Any slight variations in the carrier wave for individual bits is corrected when the carrier wave is reproduced Hub:  As above, but re-creates the carrier wave on multiple ports   Hubs do not decide whether or not to copy data, they do it (necessary or unnecessary) All ports are part of the same collision domain With a hub as the centre of the star, any 2 hosts can have frame collisions

Layer 2 (Data Link) Devices

Layer 2 switch:      Serves the same purpose as a hub Can dynamically determine if a frame should be placed on a port (and which one) The data link layer (e.g. MAC) address is used to make this determination A table of MAC addresses and corresponding ports is built using incoming frames Each LAN segment (port) becomes its own collision domain Only 2 hosts on the same LAN segment can have frame collisions Layer 2 bridge  As above, but the connected networks do not necessarily have to be of the same type

Layer 2/3 Devices

Broadband (Cable/DSL) or Wireless Router   Primarily operates as a layer 2 switch / access point However, these

routers

which are in layer 3): often have additional features (some of Dynamic host configuration (DHCP) – IP address assignment for network hosts, for example DNS capability (local or distributed) – Provides naming of hosts inside the network IP masquerading network – The

router

can use one IP given by a broadband provider, but allow all of its hosts to use different IPs inside the Layer 3 Switch   Uses layer 3 routing to determine a path for packets Once a path is found, subsequent packets are switched This switching typically occurs on layer 2 These devices will be discussed in more detail later

Layer 3 (Network) Devices

Layer 3 Bridge    A bridge that uses network layer addresses (e.g. IP) in its forwarding database, instead of data link layer addresses (e.g. MAC) This type of bridge more readily allows different types of network to be joined, since they need not share an address type Cannot handle multiple paths effectively/efficiently: a host is either on a given port or it is not Router    Determines routes for each packet using network layer addresses (e.g. IP) Can connect any type of network together Is capable of determining preferred paths where multiple paths exist

Routers

What is a Router Made of?

A router has many of the same components as your computer:  CPU  Memory  I/O Interfaces (mostly network interfaces)  Operating System

Routers Through History

Gateways:   A computer with installed software to forward packets These are obsolete, but were common in the early days of ARPANet Routers:  A computer with specialized hardware and operating system designed for forwarding packets Switching Routers:   A computer with specialized hardware (switching fabric) that allows packets to be forwarded directly in hardware The specialized hardware is, in many respects, similar to that of a switch (e.g. ATM switch)

Router Hardware

Input buffers (one for each network interface):  Used to store incoming packets before they are processed Routing processor:   This is often software running on a CPU which: Maintains and exchanges routing data with other routers Controls the switching fabric to forward packets With high-end routers, each network interface may have a local routing processor (for forwarding) so that each can forward the packets in its own input buffer independently Switching fabric:  A network of connections between network interfaces (and their input and output buffers) Output buffers (one for each network interface):  Used to store outgoing packets after they are processed, but before the network is available for transmission

Routers: Network Interfaces

Often, routers have modularized network interfaces  One can add/remove/replace network interfaces as needs change   Some routers can accept network interface modules of different types (e.g. Ethernet, Token Ring) Each network interface would have its own: Input buffer Output buffer Routing processor (in high-end routers)

Routers: Input Buffers

The incoming packets of a network interface are placed in input buffers   These are banks of very high speed memory for packet queuing prior to processing The packet is stored here until the routing processor is available The network interface may have a routing processor, which would:    … have a copy of the forwarding table (to prevent concurrent access) … lookup the destination address in this forwarding table, to determine the correct output port … configure the switching fabric to forward the packet to the correct output buffer Low-end routers would share one routing processor

Routers: Routing Processors

1.

2.

Routing processors have two functions: Maintain and exchange routing data with other routers in the network Often this involves computing the forwarding table from data received by other routers Use the forwarding table data to configure the switching fabric to forward the packet to the correct output port

Routers: Routing Processors

  A routing processor is software which executes on a CPU: Off-the-shelf CPU These are very inexpensive However, the performance of these CPUs is low since they are not optimized for the types of operations a router typically needs to perform Application-Specific Integrated Circuit (ASIC) These are expensive to design (time and money) They are optimized for typical routing operations High-end routers use these to achieve higher performance levels

Routers: Switching Fabric

Switching fabric’s job is to move packets from the input buffer into the correct output buffer  The routing processor determines the correct output port, using the forwarding table

Routers: Switching Fabric

Switching fabric comes in 3 major types:    In-memory switching fabric: The packets are input into the routing processor’s memory, and output into the correct output buffer Bus-based switching fabric: The packets move along a shared bus (similar to a network bus) to the correct output buffer Crossbar switching fabric: The packets move along a grid of redundant buses If any bus fails, alternate paths exist so that forwarding can continue

Routers: Output Buffers

The switching fabric gets the packet to the right output port  However, that port’s network may not be immediately available  The packets are stored in the output buffer until the network is available

Router Performance

Several methods to improve router performance have been discussed:  Use application-specific integrated circuits Optimized for routing operations Include much routing functionality otherwise executed as software (in memory) Many routing functions can execute in parallel, adding new functionality without decreasing throughput  Use efficient switching fabric Bus or crossbar-based switching fabrics reduce the need for in-memory processing

MPLS

Multi-Protocol Label Switching

MPLS

MPLS is another way to improve router performance Label switching tries to leverage some of the performance of virtual circuit switched networks (e.g. ATM) Packets are assigned a label upon entering an MPLS network This label is used (instead of the IP address) for making forwarding decisions

MPLS Labels

An MPLS label is an arbitrary value     This value is typically a numeric identifier However, labels could also be the frequency (i.e. colour) of light used in multi-mode optical fibre The label can change from one label-switching router (LSR) to the next The label must only be unique for the sending and receiving router IP addresses, in contrast, are usually unique across the network A value could even be chosen to help the routing processor choose the correct output port

User

MPLS: Simplified

MPLS LSR MPLS LSR E-Mail Server MPLS LSR MPLS LSR MPLS LSR MPLS LSR Web Server

MPLS: Simplified

MPLS LSR MPLS LSR E-Mail Server User MPLS LSR MPLS LSR MPLS LSR • Here, the label is shown as colour • Notice the simplicity of the router’s job: • Red: Up • Blue: Right MPLS LSR Web Server

MPLS: Simplified

MPLS LSR MPLS LSR E-Mail Server User MPLS LSR MPLS LSR MPLS LSR • Notice that two labels can be directed down the same link MPLS LSR Web Server

User

MPLS: Label Values

31 31 MPLS LSR MPLS LSR E-Mail Server 7 15 7 MPLS LSR MPLS LSR MPLS LSR 47 MPLS LSR • Notice that label values are not globally unique • Each pair of routers agrees on a label Web Server

MPLS Packets

MPLS adds a small pre-header to the start of any IPv4 (or IPv6, IPX, etc.) packet  In other words, between the data link and network headers 20 bits Label The label value 3 bits 1 bit Class of Service Stack The QoS class of the packet attached (e.g. discardable?) Is there a stack of labels?

8 bits Hop Limit The hop limit, copied from/to the IP header

MPLS and ATM

LSRs can be ATM-enabled   An LSR can forward a packet (as cells) through an ATM network This can be for any number of hops through the ATM network In this situation the source and destination ATM switches must be LSRs Other switches in between can be normal ATM switches, however The source LSR will use AAL segmentation to send the cells on the ATM network using a VPI/VCI for the destination LSR The destination LSR will extract the packet and continue transmission using MPLS