connecting devices and multi-homed machines. layer 1 (physical) devices repeater: extends distances...

26
Connecting Devices Connecting Devices and Multi-Homed Machines and Multi-Homed Machines

Upload: erick-ferguson

Post on 22-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

Connecting DevicesConnecting Devices

and Multi-Homed Machinesand Multi-Homed Machines

Page 2: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

Layer 1 (Physical) DevicesLayer 1 (Physical) Devices

Repeater: Repeater: Extends distances by repeating a signalExtends distances by repeating a signal Any slight variations in the carrier wave for individual Any slight variations in the carrier wave for individual

bits is corrected when the carrier wave is reproducedbits is corrected when the carrier wave is reproduced

Hub:Hub: As above, but re-creates the carrier wave on multiple As above, but re-creates the carrier wave on multiple

portsports Hubs do not decide whether or not to copy data, they Hubs do not decide whether or not to copy data, they

do it (necessary or unnecessary)do it (necessary or unnecessary) All ports are part of the same collision domainAll ports are part of the same collision domain

With a hub as the centre of the star, any 2 hosts can have With a hub as the centre of the star, any 2 hosts can have frame collisionsframe collisions

Page 3: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

Layer 2 (Data Link) DevicesLayer 2 (Data Link) Devices

Layer 2 switch:Layer 2 switch: Serves the same purpose as a hubServes the same purpose as a hub Can dynamically determine if a frame should be placed on a port Can dynamically determine if a frame should be placed on a port

(and which one)(and which one) The data link layer (e.g. MAC) address is used to make this The data link layer (e.g. MAC) address is used to make this

determinationdetermination A table of MAC addresses and corresponding ports is built using A table of MAC addresses and corresponding ports is built using

incoming framesincoming frames Each LAN segment (port) becomes its own collision domainEach LAN segment (port) becomes its own collision domain

Only 2 hosts on the same LAN segment can have frame collisions Only 2 hosts on the same LAN segment can have frame collisions

Layer 2 bridgeLayer 2 bridge As above, but the connected networks do not necessarily have As above, but the connected networks do not necessarily have

to be of the same typeto be of the same type

Page 4: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

Layer 2/3 DevicesLayer 2/3 Devices

Broadband (Cable/DSL) or Wireless RouterBroadband (Cable/DSL) or Wireless Router Primarily operates as a layer 2 switch / access pointPrimarily operates as a layer 2 switch / access point However, these However, these routersrouters often have additional features (some of often have additional features (some of

which are in layer 3):which are in layer 3):Dynamic host configuration (DHCP) – IP address assignment for Dynamic host configuration (DHCP) – IP address assignment for network hosts, for examplenetwork hosts, for exampleDNS capability (local or distributed) – Provides naming of hosts DNS capability (local or distributed) – Provides naming of hosts inside the networkinside the networkIP masquerading – The IP masquerading – The routerrouter can use one IP given by a broadband can use one IP given by a broadband provider, but allow all of its hosts to use different IPs inside the provider, but allow all of its hosts to use different IPs inside the networknetwork

Layer 3 SwitchLayer 3 Switch Uses layer 3 routing to determine a path for packetsUses layer 3 routing to determine a path for packets Once a path is found, subsequent packets are switchedOnce a path is found, subsequent packets are switched

This switching typically occurs on layer 2This switching typically occurs on layer 2These devices will be discussed in more detail laterThese devices will be discussed in more detail later

Page 5: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

Layer 3 (Network) DevicesLayer 3 (Network) Devices

Layer 3 BridgeLayer 3 Bridge A bridge that uses network layer addresses (e.g. IP) in its A bridge that uses network layer addresses (e.g. IP) in its

forwarding database, instead of data link layer addresses (e.g. forwarding database, instead of data link layer addresses (e.g. MAC)MAC)

This type of bridge more readily allows different types of network This type of bridge more readily allows different types of network to be joined, since they need not share an address typeto be joined, since they need not share an address type

Cannot handle multiple paths effectively/efficiently: a host is Cannot handle multiple paths effectively/efficiently: a host is either on a given port or it is noteither on a given port or it is not

RouterRouter Determines routes for each packet using network layer Determines routes for each packet using network layer

addresses (e.g. IP)addresses (e.g. IP) Can connect any type of network togetherCan connect any type of network together Is capable of determining preferred paths where multiple paths Is capable of determining preferred paths where multiple paths

existexist

Page 6: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

RoutersRouters

Page 7: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

What is a Router Made of?What is a Router Made of?

A router has many of the same A router has many of the same components as your computer:components as your computer: CPUCPU MemoryMemory I/O Interfaces (mostly network interfaces)I/O Interfaces (mostly network interfaces) Operating SystemOperating System

Page 8: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

Routers Through HistoryRouters Through History

Gateways:Gateways: A computer with installed software to forward packetsA computer with installed software to forward packets These are obsolete, but were common in the early days of These are obsolete, but were common in the early days of

ARPANetARPANet

Routers:Routers: A computer with specialized hardware and operating system A computer with specialized hardware and operating system

designed for forwarding packetsdesigned for forwarding packets

Switching Routers:Switching Routers: A computer with specialized hardware (switching fabric) that A computer with specialized hardware (switching fabric) that

allows packets to be forwarded directly in hardwareallows packets to be forwarded directly in hardware The specialized hardware is, in many respects, similar to that of The specialized hardware is, in many respects, similar to that of

a switch (e.g. ATM switch)a switch (e.g. ATM switch)

Page 9: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

Router HardwareRouter Hardware

Input buffers (one for each network interface): Input buffers (one for each network interface): Used to store incoming packets before they are processedUsed to store incoming packets before they are processed

Routing processor:Routing processor: This is often software running on a CPU which:This is often software running on a CPU which:

Maintains and exchanges routing data with other routersMaintains and exchanges routing data with other routersControls the switching fabric to forward packetsControls the switching fabric to forward packets

With high-end routers, each network interface may have a local With high-end routers, each network interface may have a local routing processor (for forwarding) so that each can forward the routing processor (for forwarding) so that each can forward the packets in its own input buffer independentlypackets in its own input buffer independently

Switching fabric:Switching fabric: A network of connections between network interfaces (and their A network of connections between network interfaces (and their

input and output buffers)input and output buffers)

Output buffers (one for each network interface):Output buffers (one for each network interface): Used to store outgoing packets after they are processed, but Used to store outgoing packets after they are processed, but

before the network is available for transmissionbefore the network is available for transmission

Page 10: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

Routers: Network InterfacesRouters: Network Interfaces

Often, routers have modularized network Often, routers have modularized network interfacesinterfaces One can add/remove/replace network interfaces as One can add/remove/replace network interfaces as

needs changeneeds change Some routers can accept network interface modules Some routers can accept network interface modules

of different types (e.g. Ethernet, Token Ring)of different types (e.g. Ethernet, Token Ring) Each network interface would have its own:Each network interface would have its own:

Input bufferInput buffer

Output bufferOutput buffer

Routing processor (in high-end routers)Routing processor (in high-end routers)

Page 11: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

Routers: Input BuffersRouters: Input Buffers

The incoming packets of a network interface are placed The incoming packets of a network interface are placed in input buffersin input buffers

These are banks of very high speed memory for packet queuing These are banks of very high speed memory for packet queuing prior to processingprior to processing

The packet is stored here until the routing processor is availableThe packet is stored here until the routing processor is available

The network interface may have a routing processor, The network interface may have a routing processor, which would:which would:

… … have a copy of the forwarding table (to prevent concurrent have a copy of the forwarding table (to prevent concurrent access)access)

… … lookup the destination address in this forwarding table, to lookup the destination address in this forwarding table, to determine the correct output portdetermine the correct output port

… … configure the switching fabric to forward the packet to the configure the switching fabric to forward the packet to the correct output buffercorrect output buffer

Low-end routers would share one routing processorLow-end routers would share one routing processor

Page 12: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

Routers: Routing ProcessorsRouters: Routing Processors

Routing processors have two functions:Routing processors have two functions:

1.1. Maintain and exchange routing data with Maintain and exchange routing data with other routers in the networkother routers in the network

Often this involves computing the forwarding Often this involves computing the forwarding table from data received by other routerstable from data received by other routers

2.2. Use the forwarding table data to Use the forwarding table data to configure the switching fabric to forward configure the switching fabric to forward the packet to the correct output portthe packet to the correct output port

Page 13: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

Routers: Routing ProcessorsRouters: Routing Processors

A routing processor is software which executes A routing processor is software which executes on a CPU:on a CPU:

Off-the-shelf CPUOff-the-shelf CPUThese are very inexpensiveThese are very inexpensiveHowever, the performance of these CPUs is low since they However, the performance of these CPUs is low since they are not optimized for the types of operations a router are not optimized for the types of operations a router typically needs to performtypically needs to perform

Application-Specific Integrated Circuit (ASIC)Application-Specific Integrated Circuit (ASIC)These are expensive to design (time and money)These are expensive to design (time and money)They are optimized for typical routing operationsThey are optimized for typical routing operationsHigh-end routers use these to achieve higher performance High-end routers use these to achieve higher performance levelslevels

Page 14: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

Routers: Switching FabricRouters: Switching Fabric

Switching fabric’s job is to move packets Switching fabric’s job is to move packets from the input buffer into the correct output from the input buffer into the correct output bufferbuffer The routing processor determines the correct The routing processor determines the correct

output port, using the forwarding tableoutput port, using the forwarding table

Page 15: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

Routers: Switching FabricRouters: Switching Fabric

Switching fabric comes in 3 major types:Switching fabric comes in 3 major types: In-memory switching fabric:In-memory switching fabric:

The packets are input into the routing processor’s The packets are input into the routing processor’s memory, and output into the correct output buffermemory, and output into the correct output buffer

Bus-based switching fabric:Bus-based switching fabric:The packets move along a shared bus (similar to a The packets move along a shared bus (similar to a network bus) to the correct output buffernetwork bus) to the correct output buffer

Crossbar switching fabric:Crossbar switching fabric:The packets move along a grid of redundant busesThe packets move along a grid of redundant busesIf any bus fails, alternate paths exist so that If any bus fails, alternate paths exist so that forwarding can continueforwarding can continue

Page 16: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

Routers: Output BuffersRouters: Output Buffers

The switching fabric gets the packet to the The switching fabric gets the packet to the right output port right output port However, that port’s network may not be However, that port’s network may not be

immediately availableimmediately available The packets are stored in the output buffer The packets are stored in the output buffer

until the network is availableuntil the network is available

Page 17: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

Router PerformanceRouter Performance

Several methods to improve router performance Several methods to improve router performance have been discussed:have been discussed: Use application-specific integrated circuits Use application-specific integrated circuits

Optimized for routing operationsOptimized for routing operations

Include much routing functionality otherwise executed as Include much routing functionality otherwise executed as software (in memory)software (in memory)

Many routing functions can execute in parallel, adding new Many routing functions can execute in parallel, adding new functionality without decreasing throughputfunctionality without decreasing throughput

Use efficient switching fabricUse efficient switching fabricBus or crossbar-based switching fabrics reduce the need for Bus or crossbar-based switching fabrics reduce the need for in-memory processingin-memory processing

Page 18: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

MPLSMPLS

Multi-Protocol Label SwitchingMulti-Protocol Label Switching

Page 19: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

MPLSMPLS

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

Page 20: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

MPLS LabelsMPLS Labels

An MPLS label is an arbitrary valueAn MPLS label is an arbitrary value This value is typically a numeric identifierThis value is typically a numeric identifier

However, labels could also be the frequency (i.e. colour) of However, labels could also be the frequency (i.e. colour) of light used in multi-mode optical fibrelight used in multi-mode optical fibre

The label can change from one label-switching router The label can change from one label-switching router (LSR) to the next(LSR) to the next

The label must only be unique for the sending and The label must only be unique for the sending and receiving routerreceiving router

IP addresses, in contrast, are usually unique across the IP addresses, in contrast, are usually unique across the networknetwork

A value could even be chosen to help the routing A value could even be chosen to help the routing processor choose the correct output portprocessor choose the correct output port

Page 21: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

MPLS: SimplifiedMPLS: Simplified

MPLS LSR

MPLS LSR MPLS LSR

MPLS LSR

MPLS LSR

MPLS LSR

Web Server

E-Mail Server

User

Page 22: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

MPLS: SimplifiedMPLS: Simplified

MPLS LSR

MPLS LSR MPLS LSR

MPLS LSR

MPLS LSR

MPLS LSR

Web Server

E-Mail Server

User

• Here, the label is shown as colour• Notice the simplicity of the router’s job:

• Red: Up• Blue: Right

Page 23: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

MPLS: SimplifiedMPLS: Simplified

MPLS LSR

MPLS LSR MPLS LSR

MPLS LSR

MPLS LSR

MPLS LSR

Web Server

E-Mail Server

User

• Notice that two labels can be directed down the same link

Page 24: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

MPLS: Label ValuesMPLS: Label Values

MPLS LSR

MPLS LSR MPLS LSR

MPLS LSR

MPLS LSR

MPLS LSR

Web Server

E-Mail Server

User

• Notice that label values are not globally unique• Each pair of routers agrees on a label

7

15

31

7

31

47

Page 25: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

MPLS PacketsMPLS Packets

MPLS adds a small pre-header to the start of any IPv4 MPLS adds a small pre-header to the start of any IPv4 (or IPv6, IPX, etc.) packet(or IPv6, IPX, etc.) packet

In other words, between the data link and network headersIn other words, between the data link and network headers

Label20 bits

Class of Service3 bits

Stack1 bit

Hop Limit8 bits

The label value

The QoS class of the packet attached (e.g. discardable?)

Is there a stack of labels?

The hop limit, copied from/to the IP header

Page 26: Connecting Devices and Multi-Homed Machines. Layer 1 (Physical) Devices Repeater: Extends distances by repeating a signal Extends distances by repeating

MPLS and ATMMPLS and ATM

LSRs can be ATM-enabledLSRs can be ATM-enabled An LSR can forward a packet (as cells) through an An LSR can forward a packet (as cells) through an

ATM networkATM networkThis can be for any number of hops through the ATM This can be for any number of hops through the ATM networknetwork

In this situation the source and destination ATM In this situation the source and destination ATM switches must be LSRsswitches must be LSRs

Other switches in between can be normal ATM switches, Other switches in between can be normal ATM switches, howeverhoweverThe source LSR will use AAL segmentation to send the cells The source LSR will use AAL segmentation to send the cells on the ATM network using a VPI/VCI for the destination LSRon the ATM network using a VPI/VCI for the destination LSRThe destination LSR will extract the packet and continue The destination LSR will extract the packet and continue transmission using MPLStransmission using MPLS