Top Banner
15-441 Communications and Networking Lecture 7 Lecture 7 Gregory Kesden Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.
41

15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Dec 22, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

15-441 Communications and Networking

Lecture 7Lecture 7Gregory KesdenGregory Kesden

The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Page 2: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Real-World Link Layer Protocols:

“Original” Ethernet Wired physical layerWired physical layer 1-persistence CSMA/CD1-persistence CSMA/CD Manchester encodingManchester encoding Binary exponential backoff upon collisionBinary exponential backoff upon collision IEEE 802.3, the adopted standard, has a slightly different frame format IEEE 802.3, the adopted standard, has a slightly different frame format

than the original Ethernet – but the distinction is not drawn in than the original Ethernet – but the distinction is not drawn in conversation. conversation.

10Base5, “garden hose” wiring (now obsolete) – up to 500m and 100 10Base5, “garden hose” wiring (now obsolete) – up to 500m and 100 stationsstations

10Base2, “think coax” -- up to 185m and 30 stations10Base2, “think coax” -- up to 185m and 30 stations 10Base-T, “twisted pair”, up to 100m and 1024 stations10Base-T, “twisted pair”, up to 100m and 1024 stations

Page 3: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Real-World Link Layer Protocols Ethernet, cont.

Binary exponential backoff?Binary exponential backoff?

Upon a collision, wait and try again, up to 16 times.Upon a collision, wait and try again, up to 16 times.

How long to waitHow long to wait For the 0-9For the 0-9thth collisions, pick a random number between collisions, pick a random number between [0, 2[0, 2ii-1], and skip that number of -1], and skip that number of slots (opportunities to send)slots (opportunities to send).. For collisions 10-15, stick with [0, 2For collisions 10-15, stick with [0, 21010-1], which is 1023-1], which is 1023 Give up after that. Give up after that.

Page 4: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Real-World Link Layer Protocols Ethernet, cont.

What What exactly exactly is a is a slotslot??

The time to send a minimum frame. The time to send a minimum frame. The standard sets a maximum length of 2500mThe standard sets a maximum length of 2500m The reference configuration is a 10Mbps LAN with 4 repeatersThe reference configuration is a 10Mbps LAN with 4 repeaters Given this, the maximum round-trip propagation time is Given this, the maximum round-trip propagation time is

approximately 50 microseconds (10approximately 50 microseconds (10-6 seconds-6 seconds).). At the spec’d 10Mbps, this makes for a 500 bit minimum frame At the spec’d 10Mbps, this makes for a 500 bit minimum frame

size. Add a bit of padding for safety and round up to a power-of-size. Add a bit of padding for safety and round up to a power-of-two and get a minimum frame size of 512 bits. two and get a minimum frame size of 512 bits.

So the minimum frame time is 51.2 microseconds. This is a slot So the minimum frame time is 51.2 microseconds. This is a slot time. time.

Obviously, this increases as the speed of the underlying network Obviously, this increases as the speed of the underlying network increases, e.g. 6400 bytes for a 1Gbps network of up to 2500m in increases, e.g. 6400 bytes for a 1Gbps network of up to 2500m in length.length.

Page 5: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

IEEE 802.15 “Bluetooth”

M

S

SS

S

S

S

S

Piconet

M

SS

S

S

S

S

Piconet

Scatternet

Up to 7 active slaves/piconet, range 10m. Up to 255 parked slaves.

Page 6: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

IEEE 802.15 “Bluetooth”, cont

RF physical layer:RF physical layer: 2.4GHz Band2.4GHz Band 79 1MhZ bands79 1MhZ bands FSK, 1 bit/HzFSK, 1 bit/Hz Frequency hopping at 1600 hops/secondFrequency hopping at 1600 hops/second

Fairly allocates channelsFairly allocates channels Reduces multipath fadingReduces multipath fading Limited security benefitLimited security benefit Shares same bands as 802.1 and can interfere with each other. Shares same bands as 802.1 and can interfere with each other.

• Bluetooth hops aster, so it causes more damage to 802.11 than vice-Bluetooth hops aster, so it causes more damage to 802.11 than vice-versa. versa.

Page 7: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

IEEE 802.15 “Bluetooth”, cont.

““Baseband layer” is the lower piece of the data link layer.Baseband layer” is the lower piece of the data link layer. Defines slotsDefines slots Defines 625 microsecond timeslotsDefines 625 microsecond timeslots

even for self, odd for slaves.even for self, odd for slaves. 259 bits of 625 are “settling time”259 bits of 625 are “settling time” 366 are usable366 are usable

• 126 data access code and header126 data access code and header• 240 bits for data 240 bits for data

If five slots are combined for a single frame, 2781 of 3125 bits If five slots are combined for a single frame, 2781 of 3125 bits are available, since settling and other overhead are needed are available, since settling and other overhead are needed only once. only once.

A A linklink is a logical abstraction is a logical abstraction Synchronized Connection Oriented (SCO) for real-time dataSynchronized Connection Oriented (SCO) for real-time data Asynchronous Connection-Less (ACL) for packet-switched Asynchronous Connection-Less (ACL) for packet-switched

datadata

Page 8: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

IEEE 802.15 “Bluetooth”, cont.

L2CAP is top half of data linkL2CAP is top half of data link Breaks packets into framesBreaks packets into frames Multplexing and demultiplexing of packet sources (higher level Multplexing and demultiplexing of packet sources (higher level

senders and receivers)senders and receivers) Quality of service negotiation – for example, balancing needs of Quality of service negotiation – for example, balancing needs of

small packet and large-packet senders. small packet and large-packet senders.

Application/Profile layerApplication/Profile layer Defines 13 types of applications and higher-level stacks for themDefines 13 types of applications and higher-level stacks for them

Dial-up, fax, cordless telephony, file transfer, synchronization, Dial-up, fax, cordless telephony, file transfer, synchronization, link management, service discovery, &clink management, service discovery, &c

Page 9: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Building Bigger LANs

Page 10: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

A Bridge-based Network Switches are connected by point-point links. Packets are forwarded hop-by-hop by the switches

towards the destination.

– Forwarding is based on the address How do nodes exchange packets over a link? How does a switch work? How do adjacent switches manage the link?

PC atHome

SwitchPoint-Point

linkPCs atWork

Page 11: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Bridges Multiple LANS may be connected to form one logical Multiple LANS may be connected to form one logical

LAN LAN

Since bridges are at the link layer, they do not examine Since bridges are at the link layer, they do not examine network headers, &c.network headers, &c.

ReasonsReasons to increase scale, to increase scale, control load, control load, allow for long distances, allow for long distances, ease administration, ease administration, security/protectionsecurity/protection

Bridge

LAN

LAN

Page 12: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Bridge Architecture Takes in packets in one interface and

has to forward them to an output interface based on the address.

– A big intersection

– Same idea for bridges, switches, routers: address look up differs

Control processor manages the switch and executes higher level protocols.

– E.g. “which way?”, &c.

The switch fabric directs the traffic to the right output port.

The input and output ports deal with transmission and reception of packets.

SwitchFabric

InputPort

OutputPort

OutputPort

InputPort

OutputPort

InputPort

OutputPort

InputPort

ControlProcessor

Page 13: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Bridge Fabric Options

Crossbar switch.»Requires lots of hardware but good performance

»Multistage interconnection networks an alternative

Bus-based switches.»Fabric consists one (or more) fast shared buses

»Each input port has a slot time slot on the bus

Shared memory switch.»Switch is one large memory

»Input ports write packets to memory and output ports read packets from memory

»Does not scale well: need very fast memory

Hybrid solutions.

Page 14: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

I/O Port Functions Input port identifies the outgoing port and buffers packets if there is

contention for the switch fabric. Output port queues packets and a scheduler determines the order in

which packets are sent over the outgoing link. Many buffering options exist.

– Input buffering, output buffering, internal buffering

– Typically a combination is used

– Buffer management can limit throughput, e.g. head of line blocking

AddressLookup

Scheduler

SwitchFabric

AddressLookup

Page 15: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

A Simple Bus-based Architecture

OutputPorts

Bus

InputPorts

Page 16: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

A Crossbar Architecture

OutputPorts

InputPorts

Page 17: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

The Knockout Architecture

inputbuses

concentrators

buffers

Page 18: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Transparent Bridges Backward learningBackward learning ““Plug and go”Plug and go” Listen to traffic on all interfacesListen to traffic on all interfaces Store each machine that transmits in hash table along with Store each machine that transmits in hash table along with

interface.interface. Periodically purge old entries, just in case a machine Periodically purge old entries, just in case a machine

moves.moves. When a frame “hits the wire”, look it up in the hash table When a frame “hits the wire”, look it up in the hash table

and and forwardforward it to the correct LAN. it to the correct LAN. If it originated on the correct LAN, do not forward it. If it originated on the correct LAN, do not forward it. If the destination of the frame is not in the hashtable, flood If the destination of the frame is not in the hashtable, flood

all attached LANs. all attached LANs.

Page 19: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Transparent Bridges, cont.

Bridge

LAN

LAN

Bridge

Consider what can happen if a redundant bridge is used for “robustness”. Both bridges could copy the frame, creating a duplicate.Then, this duplicate could be copied twice, and so on…forever

framehost

frame1 frame2

frame12 frame22

Page 20: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Bridges with Spanning Trees The solution is for the bridges to communicate with each other and The solution is for the bridges to communicate with each other and

build spanning trees that represent the network.build spanning trees that represent the network.

One bridge is selected to be the root of the tree, perhaps by serial One bridge is selected to be the root of the tree, perhaps by serial

number “bullying” or other broadcast-based approach. number “bullying” or other broadcast-based approach.

Then, a minimum spanning tree is constructed from each LAN, Then, a minimum spanning tree is constructed from each LAN, through necessary bridges, to the root. through necessary bridges, to the root.

This spanning tree is used to determine how to forward a frame. This spanning tree is used to determine how to forward a frame. Connections that are not in the tree cannot be used – even if some Connections that are not in the tree cannot be used – even if some bridges are “left out”.bridges are “left out”.

The algorithm continues to run to stay up-to-date and detect bridge The algorithm continues to run to stay up-to-date and detect bridge failures, host moves, &c. failures, host moves, &c.

Page 21: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Switched Ethernet Ethernet switches are a type of bridge that have a many-to-one point-to-point Ethernet switches are a type of bridge that have a many-to-one point-to-point

relationship. relationship. Many low-bandwidth legs share a high-bandwidth common bus. Many low-bandwidth legs share a high-bandwidth common bus. Typically one leg, has a very high bandwidth – consider it to be the uplink. Typically one leg, has a very high bandwidth – consider it to be the uplink.

Imagine several floors or departments, each of which has its own leg, and then Imagine several floors or departments, each of which has its own leg, and then one leg going out to an intranet or the Internet.one leg going out to an intranet or the Internet.

Each port on the switch forms its own collision domain. If multiple stations Each port on the switch forms its own collision domain. If multiple stations are connected on the same port, as through a concentrator or hub, collisions are connected on the same port, as through a concentrator or hub, collisions can occur among them. can occur among them.

Among ports, collisions can be mitigated by buffering inputsAmong ports, collisions can be mitigated by buffering inputs

1Gbps

100Mbps switched legs

Page 22: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

The Network Layer

Presentation

Application

Session

Transport

Network

Data Link

Physical Transmits and receives via a particular media over a single network.

Packages data for transmission/reception over a single network.

Moves data from one network to another

Hides the network(s) from the user and provides ahost-to-host(s) abstraction.

Extends the host-to-host abstraction provided by the Transport layer to include more specific, complex features.

Hides host-specific and/or user-specific nuiances

The solution-specific protocol used by the application program.

You are here

Page 23: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

A Network Packet

Frame Header Frame PayloadLink Layer

Frame

Network Layer Packet Header Packet Payload

Packet

•Much as the physical layer wasn’t concerned with the framing performed by the link layer, the link layer just views the network layer’s headers, &c just as it does the user’s data – as payload.

•From the perspective of the link layer, the network layer packet is just data.

Page 24: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

The Network Layer

The physical layer is important, because we need The physical layer is important, because we need some way of transmitting and receiving signals some way of transmitting and receiving signals over the physical media. over the physical media.

The data link layer is important, because we need The data link layer is important, because we need some way of organizing the communication to some way of organizing the communication to allow multiple hosts to send and receive messages allow multiple hosts to send and receive messages given the ability of the media to carry them.given the ability of the media to carry them.

The network lay is important because hosts that The network lay is important because hosts that are members of separate but interconnected are members of separate but interconnected networks may want to communicate. networks may want to communicate.

Page 25: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Encapsulation

Presentation

Application

Session

Transport

Network

Data Link

Physical

Presentation

Application

Session

Transport

Network

Data Link

Physical

Presentation

Application

Session

Transport

Network

Data Link

Physicalcurrent current

Frame(packet) Frame(packet)

Packet (data) Packet (data)

data data

Page 26: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Network vs. InternetworkWhat distinguishes “separate, but interconnected networks” from a single “inter-What distinguishes “separate, but interconnected networks” from a single “inter-

network”?network”?

One trivial (and non-informative) answer: If a data link protocol is One trivial (and non-informative) answer: If a data link protocol is sufficient for the machines to communicate, they are part of a single sufficient for the machines to communicate, they are part of a single network. If a network-layer protocol is required, the machines are on network. If a network-layer protocol is required, the machines are on separate networks that, compose (at least in part) an inter-network. separate networks that, compose (at least in part) an inter-network.

A slightly better answer: If the machines are all connected to the same A slightly better answer: If the machines are all connected to the same communications channel, they are part of a single networkcommunications channel, they are part of a single network

An even better answer: If the machines are connected to a single An even better answer: If the machines are connected to a single communications channel, or several communications channels that communications channel, or several communications channels that logically form one communications channel (as through bridging), they logically form one communications channel (as through bridging), they are all part of the same network.are all part of the same network.

A yet better answer – If the answer to the question “How do I get there?” A yet better answer – If the answer to the question “How do I get there?” is interesting, the machines are not connected via one network – they are is interesting, the machines are not connected via one network – they are connected via an inter-network.connected via an inter-network.

Page 27: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

The Bottom Line

The job of the network layer is to answer The job of the network layer is to answer the famous question, the famous question, “How do I get there “How do I get there from here?”from here?”

Page 28: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Bridges “Know it All” Earlier today we discussed connecting communication Earlier today we discussed connecting communication

channels together using bridges to form a single network.channels together using bridges to form a single network.

The important thing to remember about bridges is that they The important thing to remember about bridges is that they are designed to combine to channels to make them operate are designed to combine to channels to make them operate like one. like one.

But think about what they must do: learn the location of But think about what they must do: learn the location of every host on the network. every host on the network.

Page 29: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Bridges: Too Much To Remember

On those occasions when they don’t know a host’s location, there is a On those occasions when they don’t know a host’s location, there is a very high price – the frame must be flooded to every machine on the very high price – the frame must be flooded to every machine on the network. network.

If there are too many machines, it is too costly to know the location of If there are too many machines, it is too costly to know the location of all of them – especially since the lookup must be very, very fast.all of them – especially since the lookup must be very, very fast.

If the network is large, traffic is likely to be very high – this makes If the network is large, traffic is likely to be very high – this makes flooding frames to all interfaces very, very costly.flooding frames to all interfaces very, very costly.

It would be impossible for one machine to know, and rapidly access, It would be impossible for one machine to know, and rapidly access, the location of every machine on the Internet, never mind manage it the location of every machine on the Internet, never mind manage it efficiently.efficiently.

Page 30: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Routers and Network Addresses

Routers are the network-level equivalent of bridges. They Routers are the network-level equivalent of bridges. They connect networks to allow communication between/among connect networks to allow communication between/among them.them.

But, unlike bridges, they do not attempt to know every But, unlike bridges, they do not attempt to know every machine. Instead, they take advantage of hierarchical machine. Instead, they take advantage of hierarchical addressing and only know how to get a packet to the right addressing and only know how to get a packet to the right network.network.

Once at the right network, the link-layer can deliver the Once at the right network, the link-layer can deliver the frame. frame.

Page 31: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Internetworks and Hierarchies

What is needed is some more extensible What is needed is some more extensible scheme for finding machinesscheme for finding machines

One way of dealing with scale is to One way of dealing with scale is to organize things into a hierarchy.organize things into a hierarchy.

Each level of the hierarchy can handle only Each level of the hierarchy can handle only one portion of the job.one portion of the job.

Page 32: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Consider a mailing addressGregory KesdenGregory KesdenSchool of Computer ScienceSchool of Computer ScienceCMUCMUPittsburgh, PA USAPittsburgh, PA USA

The letter carrier Brazil isn’t likely to know where I live! How does The letter carrier Brazil isn’t likely to know where I live! How does a letter get from Brazil to me?a letter get from Brazil to me?

International mail is directed to a sorting station in the U.S. This sorting station knows how to get the letter to a International mail is directed to a sorting station in the U.S. This sorting station knows how to get the letter to a sorting station in Pennsylvania. sorting station in Pennsylvania.

The Pennsylvania station knows how to get the mail to PittsburghThe Pennsylvania station knows how to get the mail to Pittsburgh

The Pittsburgh station knows how to get it to CMUThe Pittsburgh station knows how to get it to CMU

Etc, etc, etc. Etc, etc, etc.

By breaking things down into a hierarchy, we have to make more decisions, but each decision is more By breaking things down into a hierarchy, we have to make more decisions, but each decision is more manageable. manageable.

Page 33: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Network Level Addressing Data link layer addresses are “flat” not hierarchical. As discussed, these Data link layer addresses are “flat” not hierarchical. As discussed, these

don’t scale well and, as a result, limit the size of an individual network.don’t scale well and, as a result, limit the size of an individual network.

Network layer addresses, much like postal addresses are hierarchical. Network layer addresses, much like postal addresses are hierarchical.

The first part of the address identifies the network. The second part of The first part of the address identifies the network. The second part of the address identifies the individual host within the network.the address identifies the individual host within the network.

The network:host pair is globally unique, but the host id, without the The network:host pair is globally unique, but the host id, without the network id, is not necessarily unique. network id, is not necessarily unique.

Sub-networks (“sub nets”), or hierarchies with an individual network, Sub-networks (“sub nets”), or hierarchies with an individual network, are also possible.are also possible.

Page 34: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Internet Protocol (IP) Addresses

There are three different classes of IP addresses:There are three different classes of IP addresses:

Class A: Those used for large networks (typically very Class A: Those used for large networks (typically very large corporations. Exception: MIT has a class A large corporations. Exception: MIT has a class A address. Some other universities had them in the past, address. Some other universities had them in the past, but voluntarily gave them up, because there are very few but voluntarily gave them up, because there are very few – MIT didn’t give theirs up.)– MIT didn’t give theirs up.)

Class B: Those used for medium sized networks Class B: Those used for medium sized networks

Class C: Those used for small networksClass C: Those used for small networks

Page 35: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Address Resolution Protocol (ARP)

ARP is the protocol used to convert from an IP address to a MAC address.ARP is the protocol used to convert from an IP address to a MAC address.

A host that has an IP address, but needs to know the MAC address broadcasts a request A host that has an IP address, but needs to know the MAC address broadcasts a request to all machines on the LAN. This broadcast uses the LAN’s broadcast address. Each host to all machines on the LAN. This broadcast uses the LAN’s broadcast address. Each host on the LAN receives this request. The host associated with the request IP address replies.on the LAN receives this request. The host associated with the request IP address replies.

The host with the matching IP address unicasts its MAC address to the sender. The The host with the matching IP address unicasts its MAC address to the sender. The results of the ARP request are cached on the requestor. results of the ARP request are cached on the requestor.

Failure to flush the ARP cache after moving interface cards around is a common cause Failure to flush the ARP cache after moving interface cards around is a common cause of self-solving mysteries for novice sys. admins. of self-solving mysteries for novice sys. admins.

““ARP Storms” can result when many systems are turned on at the same time.ARP Storms” can result when many systems are turned on at the same time.

ARP includes no security – requestors believe whatever they are told from whomever ARP includes no security – requestors believe whatever they are told from whomever they are told.they are told.

There is a “reverse ARP”, RARP, that can convert a MAC address to a name, but it is There is a “reverse ARP”, RARP, that can convert a MAC address to a name, but it is complex and has largely been replaced by DHCP. complex and has largely been replaced by DHCP.

Page 36: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

IP Addresses

0 Network Host

1 7 24

Class A

10 Network Host

2 14 16

Class B

110 Network Host

3 21 8

Class C

Page 37: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

IP Addresses: A Few Thoughts

There are very few addresses for large networks and There are very few addresses for large networks and very many for small networks – this makes sense very many for small networks – this makes sense given the number of parties needing 2given the number of parties needing 22424 host LANs host LANs versus those needing 2versus those needing 288 host LANs. host LANs.

There are 2There are 23232 (about 4 billion) possible addresses, but (about 4 billion) possible addresses, but many are lost due to fragmentation – most groups get many are lost due to fragmentation – most groups get blocks of addresses for a whole network, but don’t blocks of addresses for a whole network, but don’t use nearly so many machines. This fragmentation has use nearly so many machines. This fragmentation has generated a shortage of network addresses. generated a shortage of network addresses.

Page 38: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

How Does a Host Get an IP Address?

Ethernet MAC addresses are “built in” serial numbers provided Ethernet MAC addresses are “built in” serial numbers provided by the manufacturer (in theory). by the manufacturer (in theory).

But this won’t work for IP addresses – their address must be But this won’t work for IP addresses – their address must be related to the network on which they live.related to the network on which they live.

A network’s administrators is assigned a block of addresses (a A network’s administrators is assigned a block of addresses (a whole network worth) from IANA (Internet Assigned Number whole network worth) from IANA (Internet Assigned Number Authority). Authority).

The administrator then assigns these addresses to individual The administrator then assigns these addresses to individual devices.devices.

Page 39: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Static Address Assignment

The easiest way to assign IP addresses is a “once and for all approach: the The easiest way to assign IP addresses is a “once and for all approach: the administrator statically assigns an IP address to each device. With luck, the administrator statically assigns an IP address to each device. With luck, the user will give it back when the device dies or is retired. user will give it back when the device dies or is retired.

This devices uses this address every time. This devices uses this address every time.

Static assignment isn’t particularly efficient for some types of devicesStatic assignment isn’t particularly efficient for some types of devices

Mobile hosts, home machines, &c may only require network connectivity Mobile hosts, home machines, &c may only require network connectivity during part of the day, but will require an IP address during this time. during part of the day, but will require an IP address during this time.

If an address is permanently assigned to these transient devices, it is wasted If an address is permanently assigned to these transient devices, it is wasted much of the time.much of the time.

Users often don’t return the address of dead or retired machines – this is also Users often don’t return the address of dead or retired machines – this is also wastage. wastage.

This is bad, since IP addresses are in short supply.This is bad, since IP addresses are in short supply.

Page 40: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

Dynamic Address Assignment and DHCP

In order to avoid the wastage associated with permanent, static IP In order to avoid the wastage associated with permanent, static IP address assignment, many networks use dynamic address assignment. address assignment, many networks use dynamic address assignment. One such protocol is DHCP (Dynamic Host Configuration Protocol)One such protocol is DHCP (Dynamic Host Configuration Protocol)

Each time a machine reboots, it sends out a discovery message via a Each time a machine reboots, it sends out a discovery message via a broadcast to a special IP address (255.255.255.255). broadcast to a special IP address (255.255.255.255).

The DHCP server, which hears this message, replies with the assigned The DHCP server, which hears this message, replies with the assigned IP address. The host then assumes this address.IP address. The host then assumes this address.

Since hosts may be transient, the address is leased to machine for a Since hosts may be transient, the address is leased to machine for a period of time. Unless the machine renews its lease, it will expire and period of time. Unless the machine renews its lease, it will expire and the address can be reassigned to another machine. the address can be reassigned to another machine.

Obviously, the DHCP server needs to be assigned a block of IP Obviously, the DHCP server needs to be assigned a block of IP addresses. This is done by the system administrator. addresses. This is done by the system administrator.

Page 41: 15-441 Communications and Networking Lecture 7 Gregory Kesden The switching portion of these slides evolved from Prof. Steenkiste’s slides circa 2000.

More about DHCP Broadcast messages to special addresses, such as the one used for DHCP are Broadcast messages to special addresses, such as the one used for DHCP are

not communicated by routers to other networks – if they were, only one DHCP not communicated by routers to other networks – if they were, only one DHCP server could exist in the world.server could exist in the world.

As a result, if the same administration is responsible for multiple networks (or As a result, if the same administration is responsible for multiple networks (or subnetworks), the available addresses would need to be partitioned among the subnetworks), the available addresses would need to be partitioned among the DHCP servers. This isn’t particularly efficient and is an administrative burden.DHCP servers. This isn’t particularly efficient and is an administrative burden.

To avoid this, DHCP relay servers can be used. To avoid this, DHCP relay servers can be used.

One DHCP server can be configured to handle multiple networks (or One DHCP server can be configured to handle multiple networks (or subnetworks).subnetworks).

One relay server can be placed within each network. One relay server can be placed within each network.

The relay server listens for the DHCP discovery broadcast and relays it to the The relay server listens for the DHCP discovery broadcast and relays it to the DHCP server, which then responds directly to the requesting host with its IP DHCP server, which then responds directly to the requesting host with its IP address. address.