livellorete indizzamentoip (v4) e...
TRANSCRIPT
![Page 1: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/1.jpg)
Reti(già “Reti di Calcolatori”)
Livello ReteIndizzamento IP (v4) e inoltro dei pacchetti
RenatoLoCigno
http://disi.unitn.it/locigno/teaching-duties/reti
![Page 2: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/2.jpg)
Acknowledgement
• Credits– Partof thematerialis based onslides provided by thefollowing authors
• JimKurose,KeithRoss,“ComputerNetworking:ATopDownApproach,”4thedition,Addison-Wesley,July2007
• DouglasComer,“ComputerNetworksandInternets,”5thedition,PrenticeHall
• Behrouz A.Forouzan,Sophia Chung Fegan,“TCP/IPProtocolSuite,”McGraw-Hill,January 2005
• Latraduzione,sepresente,èingeneraleopera(eresponsabilità)deldocente
[email protected] LivelloRete- IPv4 2
![Page 3: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/3.jpg)
Contenuto e temi
• Spaziodiindirizzamento
• IndirizziIPelorouso
• Consegnadeipacchetti
• ConfigurazionedeiPCedellereti
• InstradamentoeRouting
[email protected] LivelloRete- IPv4 3
![Page 4: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/4.jpg)
1- Fisico
Livello Rete
Livellidiapplicazione(utente)
Livellidirete2- Collegamentodati
Fisico
3- Rete
4- Trasporto
5- Sessione
6- Presentazione
7- Applicazione
Collegamentodati:Ethernet,PPP,ATM,...
Rete:IP
Trasporto:TCP- UDP
Applicaz.:HTTP,E-mail
[email protected] LivelloRete- IPv4 4
![Page 5: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/5.jpg)
[email protected] LivelloRete- IPv4 5
Consegna Diretta e Indiretta
NtwA165.5.1.0/24
NtwB98.23.0.0/16
NtwC201.12.82.0/24
HostA
HostC
165.5.1.5
201.12.82.4
NtwD201.12.83.0/24
NtwE198.35.112.0/24
Questo router è non è collegato allarete C, come fa a conoscere l’host201.12.82.4? E come fa a inoltrare i pacchetticorrettamente verso ques’ultimo?
![Page 6: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/6.jpg)
Prospettiva globale
• Trasportodeipacchettidasorgentearicevitore.Ipacchetticontengonounsegmentodilivellotrasporto
• IpacchettisonoincapsulatiintrameL2
• Alricevitoreisegmentisonoestrattidaipacchettieconsegnatiallivellotrasporto
• Iprotocollidiretesonointuttiglihost erouter
• Unrouterdeveesaminarel’intestazionedituttiipacchetticheloattraversano
Applicaz.
Trasporto
Rete
DataLink
Fisico
Applicaz.
Trasporto
Rete
DataLink
Fisico
Rete
L2
L1
L2
L1
Rete
L2
L1
L2
L1
IPL2
IP
IPL2
IPL2
IP
IPL2
IPL2
IPL2IPL2
IP
IPL2
IPL2
IP
[email protected] LivelloRete- IPv4 6
![Page 7: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/7.jpg)
Funzioni fondamentali del livello rete
• Instradamento(Routing)– Trovareilpercorsodallasorgentealladestinazioneè AlgoritmidiRouting
• Simileapianificareunviaggio:devodeterminarelestradedafareegliincrociincuicambiarelamiastrada
• Inoltro(Forwarding)– Funzionecheesegueiltrasportodeipacchettidagliingressialleuscitedeirouter...datocheilpercorsoègiànoto
• Simileaprenderel’uscitagiustadiunarotonda,sapendochedevoandareinunaspecificadirezione
• Entramberichiedonounospaziodiindirizzamentoappropriato...eirelativiindirizzi
[email protected] LivelloRete- IPv4 7
![Page 8: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/8.jpg)
1
23
0111
valore dell’indirizzonel pacchetto in arrivo
routing algorithm
local forwarding tableheader value output link
0100010101111001
3221
Relazione tra routing e forwarding
[email protected] LivelloRete- IPv4 8
![Page 9: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/9.jpg)
Schema di architettura dei Router
• duefunzionifondamentali:– eseguireiprotocolliealgoritmidiinstradamento(RIP,OSPF,BGP)– inoltrareidatagrammi(pacchetti)dagliingressialleuscite
[email protected] LivelloRete- IPv4 9
![Page 11: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/11.jpg)
Il Datagramma IP
• TCP/IPusailtermine“IPdatagram”peridentificareunpacchettodilivellorete
• Ciascundatagrammaècompostodaunaintestazione (header)– da20a60bytes checontengonoleinformazioniessenzialiperl’instradamentoelaconsegna
• seguitadaidatitrasportati (payload)– Ladimensionedeipayload nonèfissa– Ladimensioneeffettivaèdeterminatadall’applicazionee/odalprotocolloditrasporto
– C’e` unadimensionemassimadi64kB(65536)
[email protected] LivelloRete- IPv4 11
![Page 12: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/12.jpg)
Formato del Datagramma IP
• L’headercontieneinformazioniutiliperl’instradamentodeldatagramma:– L’indirizzodellasorgente(chihainviatoperprimoildatagramma)
– L’indirizzodelladestinazione(chiriceveràildatagrammasetuttovabene)
– Iltipodiprotocollochehageneratoidati– ...
• GliindirizzisonoditipoIP(ovvio)• GliindirizziMACsono“esterni”aldatagramma• Icampisonodidimensionefissaperefficienzadimanipolazione
[email protected] LivelloRete- IPv4 12
![Page 14: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/14.jpg)
The IP Datagram Header Format
• VERS:Eachdatagrambeginswitha4-bitprotocolversionnumber• H.LEN:4-bitheaderspecifiesthenumberof32-bitquantitiesinthe
header– Ifnooptionsarepresent,thevalueis5
• TypeofService(ToS)– 8-bitfieldthatcarriesaclassofserviceforthedatagram
• potentiallyusedforDiffServ andECN(ExplicitCongestionNotification)
• seldomusedinpractice• TOTALLENGTH:16-bitintegerthatspecifiesthetotalnumberof
bytesincludingboththeheaderandthedata
[email protected] LivelloRete- IPv4 14
![Page 15: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/15.jpg)
The IP Datagram Header Format
• IDENTIFICATION– 16-bitnumber(usuallysequential)assignedtothedatagram
• usedtogatherallfragmentsforreassemblytothedatagram• FLAGS
– 3-bitfieldwithindividualbitsspecifyingwhetherthedatagramisafragment
• Ifso,thenwhetherthefragmentcorrespondstothelastpieceoftheoriginaldatagram
• FRAGMENTOFFSET– 13-bitfieldthatspecifieswhereintheoriginaldatagramthedatainthisfragmentbelongs
– thevalueofthefieldismultipliedby8toobtainanoffset
[email protected] LivelloRete- IPv4 15
![Page 16: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/16.jpg)
The IP Datagram Header Format
• TIMETOLIVE(TTL)– 8-bitintegerinitializedbytheoriginalsender– itisdecrementedbyeachrouter thatprocessesthedatagram– ifthevaluereacheszero(0)thedatagramisdiscarded andanerrormessageissentbacktothesource
• PROTOCOL– 8-bitfieldthatspecifiesthetypeofthepayload,i.e.,theprotocolabove(e.g.,6forTCP,17forUDP)
• HEADERCHECKSUM– 16-bitones-complementchecksumofheaderfields
• SOURCEIPADDRESS– 32-bitInternetaddressoftheoriginalsender
[email protected] LivelloRete- IPv4 16
![Page 17: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/17.jpg)
The IP Datagram Header Format
• DESTINATIONIPADDRESS– The32-bitInternetaddressoftheultimatedestination
• IPOPTIONS– Optionalheaderfieldsusedtocontrolroutinganddatagramprocessing
– Mostdatagramsdonotcontainanyoptions• PADDING
– Ifoptionsdonotendona32-bitboundary• zerobitsofpaddingareaddedtomaketheheaderamultipleof32bits
[email protected] LivelloRete- IPv4 17
![Page 18: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/18.jpg)
FRAMMENTAZIONE DEI PACCHETTI IP
L’USO DELLA FRAMMENTAZIONE È “DEPRECATO”. MOLTI ROUTER SEMPLICEMENTE NON LA IMPLEMENTANOE SCARTANO IL PACCHETTO.
[email protected] LivelloRete- IPv4 18
![Page 19: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/19.jpg)
MTU and Datagram Fragmentation
• Eachhardwaretechnologyspecifiesthemaximumamountofdatathataframecancarry– ThelimitisknownasaMaximumTransmissionUnit (MTU)
• NetworkhardwareisnotdesignedtoacceptortransferframesthatcarrymoredatathantheMTUallows– AdatagrammustbesmallerorequaltothenetworkMTU
• oritcannotbeencapsulatedfortransmission• Inaninternetthatcontainsheterogeneousnetworks,MTU
restrictionscreateaproblem• AroutercanconnectnetworkswithdifferentMTUvalues
– adatagramthatarouterreceivesoveronenetworkcanbetoolargetosendoveranothernetwork
[email protected] LivelloRete- IPv4 19
![Page 21: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/21.jpg)
MTU and Datagram Fragmentation
• Example:arouterinterconnectstwonetworkswithMTUvaluesof1500and1000– HostH1 attachestoanetworkwithanMTUof1500
• andcansendadatagramthatisupto1500octets– HostH2 attachestoanetworkthathasanMTUof1000
• whichmeansthatitcannotsend/receiveadatagramlargerthan1000octets
– IfhostH1 sendsa1500-octetdatagramtohostH2
• routerRwillnotbeabletoencapsulateitfortransmissionacrossnetwork2
[email protected] LivelloRete- IPv4 21
![Page 22: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/22.jpg)
MTU and Datagram Fragmentation
• WhenadatagramislargerthantheMTUofthenetworkoverwhichitmustbesent– therouterdividesthedatagramintosmallerpiecescalledfragments
– andsendseachfragmentindependently• Afragmenthasthesameformatasotherdatagrams
– abitintheFLAGSfieldoftheheaderindicateswhetheradatagramisafragmentoracompletedatagram
• Otherfieldsintheheaderareassignedinformationfortheultimatedestinationtoreassemblefragments– toreproducetheoriginaldatagram
• TheFRAGMENTOFFSETspecifieswhereintheoriginaldatagramthefragmentbelongs
[email protected] LivelloRete- IPv4 22
![Page 23: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/23.jpg)
MTU and Datagram Fragmentation
• ArouterusesthenetworkMTUandtheheadersizetocalculate– themaximumamountofdatathatcanbesentineachfragment– andthenumberoffragmentsthatwillbeneeded
• Theroutercreatesthefragments– Itusesfieldsfromtheoriginalheadertocreateafragmentheader
– Itcopiestheappropriatedatafromtheoriginaldatagramintothefragment
– Transmitstheresult
[email protected] LivelloRete- IPv4 23
![Page 25: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/25.jpg)
Reassembling a Datagram
• Example:packetssentfromH1toH2– ifhostH1sendsa1500-octetdatagramtohostH2,routerR1willdividethedatagramintotwofragments,whichitwillforwardtoR2
– RouterR2doesnotreassemblethefragments• InsteadRusesthedestinationaddressinafragmenttoforwardthefragmentasusual
– Theultimatedestinationhost,H2,collectsthefragmentsandreassemblesthemtoproducetheoriginaldatagram
[email protected] LivelloRete- IPv4 25
![Page 26: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/26.jpg)
Reassembling a Datagram
• Requiringtheultimatedestinationtoreassemblefragmentshastwoadvantages:– Itreducestheamountofstateinformationinrouters
• Whenforwardingadatagram,arouterdoesnotneedtoknowwhetherthedatagramisafragment
– Itallowsroutes tochangedynamically• Ifanintermediaterouterweretoreassemblefragments,allfragmentswouldneedtoreachtherouter
• Bypostponingreassemblyuntiltheultimatedestination– IPisfreetopasssomefragmentsfromadatagramalongdifferentroutesthanotherfragments
[email protected] LivelloRete- IPv4 26
![Page 27: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/27.jpg)
The Consequence of Fragment Loss
• Adatagramcannotbereassembleduntilallfragmentsarrive• Thereceivermustsave(buffer)thefragments
– Incasemissingfragmentsareonlydelayed– Areceivercannotholdfragmentsanarbitrarilylongtime
• IPspecifiesamaximumtimetoholdfragments• Whenthefirstfragmentarrivesfromagivendatagram
– thereceiverstartsareassemblytimer• Ifallfragmentsofadatagramarrivebeforethetimerexpires
– thereceivercancelsthetimerandreassemblesthedatagram• Otherwisethereceiverdiscardsthefragments
[email protected] LivelloRete- IPv4 27
![Page 29: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/29.jpg)
Gli indirizzi di Internet
• Lospaziodiindirizzamentoèuncomponentecritico• Tuttiglihost eirouterdevonousareunoschemadiindirizzamento
uniforme• GliindirizziUnicast,cheidentificanounaspecificainterfacciadevono
essereunici• EsistonoduespazidiindirizzamentospecificatiperInternet
– IPv4:quelloattualmenteinusoconindirizzia32bit– IPv6:ilsistemadiindirizzamentocheavrebbedovutosostituireIPv4,machecontinuaanonfarlo
• indirizzia128bit• funzioni“avanzate”• esistonomolte“isole”IPv6eormaituttiirouterdeimaggiorivendor losupportano
[email protected] LivelloRete- IPv4 29
![Page 30: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/30.jpg)
The IP Addressing Scheme
• IPaddressesaresuppliedbyprotocolsoftware
• Eachnetworkinterfaceisassignedaunique32-bitnumber– TheinterfaceIPaddress orInternetaddress
• WhensendingapacketacrosstheInternet,sender’sprotocolsoftwaremustspecify– itsown32-bitIPaddress(thesourceaddress)– andtheaddressoftheintendedrecipient(thedestinationaddress)
• Routersonlyusethedestinationaddressforforwrding androuting
[email protected] LivelloRete- IPv4 30
![Page 31: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/31.jpg)
Dotted Decimal Notation
• Insteadofwriting32bits,anotationmoreconvenientforhumanstounderstandisused,knownasdotteddecimalnotation– expresseach8-bitsectionofa32-bitnumberasadecimalvalue– useperiodstoseparatethesections
• Dotteddecimaltreatseachoctet(byte)asanunsignedbinaryinteger– thesmallestvalue,0
• occurswhenallbitsofanoctetarezero(0)– thelargestvalue,255
• occurswhenallbitsofanoctetareone(1)– dotteddecimaladdressesrange
0.0.0.0through255.255.255.255
[email protected] LivelloRete- IPv4 31
![Page 33: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/33.jpg)
The IP Address Hierarchy
• IPaddressisdividedintotwoparts:• Aprefixè identifiesthephysicalnetworktowhichthehostis
attached(alsoknownadNetID)– EachnetworkintheInternetisassignedauniquenetworknumber
• Asuffixè identifiesaspecificinterfaceonthenetwork(alsoknownadHostID)– EachNIConagivennetworkisassignedauniquesuffix
• IPaddressschemeguaranteestwoproperties:– Eachcomputerisassignedauniqueaddress– Networknumbers(prefix)mustbecoordinatedglobally– Suffixesareassignedlocallywithoutglobalcoordination
[email protected] LivelloRete- IPv4 33
![Page 34: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/34.jpg)
INDIRIZZAMENTO CON CLASSI (OBSOLETO)
Schemadiorganizzazionedegliindirizziusatofinoallametàdeglianni‘90ebasatosuunadivisionestaticatraNetID eHostID
Èusoancoraoggiriferirel’organizzazionedegliindirizziadunconcetto(eterminologia)diclasse
[email protected] LivelloRete- IPv4 34
![Page 35: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/35.jpg)
Original Classes of IP Addresses
• Internetcontainsafewlargephysicalnetworksandmanysmallnetworks– thedesignerschoseanaddressingschemetoaccommodateacombinationoflargeandsmallnetworks
• Theoriginalclassful IPaddressingdividedtheIPaddressspaceinto3primaryclasses– eachclasshasadifferentsizeprefixandsuffix
• ThefirstfourbitsofanIPaddressdeterminedtheclasstowhichtheaddressbelonged– Itspecifieshowtheremainderoftheaddresswasdividedintoprefixandsuffix
[email protected] LivelloRete- IPv4 35
![Page 37: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/37.jpg)
Division of the Address Space
• Theclassful schemedividedtheaddressspaceintounequalsizes• Thedesignerschoseanunequaldivisiontoaccommodateavariety
ofscenarios– Forexample,althoughitislimitedto128networks,classAcontainshalfofalladdresses
• ThemotivationwastoallowmajorISPstoeachdeployalargenetworkthatconnectedmillionsofcomputers
• ButAclasseswereassignedtosmallnetworksallintheUS...– Similarly,themotivationforclassCwastoallowanorganizationtohaveafewcomputersconnectedonaLAN
[email protected] LivelloRete- IPv4 37
![Page 39: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/39.jpg)
Authority for Addresses
• InternetCorporationforAssignedNamesandNumbers(ICANN)authorityhasbeenestablished– tohandleaddressassignmentandadjudicatedisputes
• ICANNdoesnotassignindividualprefixes– Instead,ICANNauthorizesasetofregistrars todoso
• RegistrarsmakeblocksofaddressesavailabletoISPs– ISPsprovideaddressestosubscribers
• Toobtainaprefix– acorporationusuallycontactsanISP
[email protected] LivelloRete- IPv4 39
![Page 40: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/40.jpg)
INDIRIZZAMENTO SENZA CLASSI E CIDR
SchemainusoattualecondivisionedinamicatraNetID eHostID
CIDR(Classless Inter-DomainRouting)consentel’instradamentoglobalesenzausarelanozionediclasse
[email protected] LivelloRete- IPv4 40
![Page 41: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/41.jpg)
Subnets and Classless Addressing
• AstheInternetgrewtheoriginalclassfuladdressingschemebecamealimitation
• EveryonedemandedaclassAorclassBaddress– Sotheywouldhaveenoughaddressesforfuturegrowth
• butmanyaddressesinclassAandBwereunused• Twomechanisms,closelyrelated,weredesignedtoovercomethe
limitation– Subnetaddressing– Classlessaddressing
• Insteadofhavingthreedistinctaddressclasses,allowthedivisionbetweenprefix/suffixonanarbitrarybitboundary
[email protected] LivelloRete- IPv4 41
![Page 42: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/42.jpg)
Classless Addressing: Motivation
• ConsideranISPthathandsoutprefixes.SupposeacustomeroftheISPrequestsaprefixforanetworkthatcontains55hosts– classfuladdressingrequiresacompleteclassCprefix– only6bitsofsuffixareneededtorepresentallpossiblehostvalues
• means190ofthe254possiblesuffixeswouldneverbeassigned
– mostoftheclassCaddressspaceiswasted• Fortheaboveexample
– classlessaddressingallowstheISPtoassign• aprefixthatis26bitslong• asuffixthatis6bitslong
[email protected] LivelloRete- IPv4 42
![Page 43: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/43.jpg)
Classless Addressing: Example
• AssumeanISPownsaclassCprefix– Classfuladdressingassignstheentireprefixtooneorganization
• Withclasslessaddressing– theISPcandividetheprefixintoseverallongerprefixes
• Forinstance,theISPcandivideaclassCprefixinto4longerprefixes– eachonecanaccommodateanetworkofupto62hosts
• all0sandall1sarereserved• TheoriginalclassCaddresshas8bitsofsuffix
– andeachoftheclasslessaddresseshas6bitsofsuffix• Thus,insteadofwastingaddresses
– ISPcanassigneachofthe4classlessprefixestoasubscriber
[email protected] LivelloRete- IPv4 43
![Page 45: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/45.jpg)
Address (subnet) Masks
• HowcananIPaddressbedividedatanarbitraryboundary?• Theclasslessandsubnetaddressingschemesrequirehostsand
routerstostoreanadditionalpieceofinformation:– avaluethatspecifiestheexactboundarybetweenprefixandsuffix
• Tomarktheboundary,IPusesa32-bitvalue– knownasanaddressmask,alsocalledasubnetmask
• Whystoretheboundarysizeasabitmask?– Amaskmakesprocessingefficient
• Hostsandroutersneedtocomparethenetworkprefixportionoftheaddresstoavalueintheirforwardingtables– Thebit-maskrepresentationmakesthecomparisonefficient
[email protected] LivelloRete- IPv4 45
![Page 46: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/46.jpg)
Address Masks
• Supposearouterisgiven– adestinationaddress,D– anetworkprefixrepresentedasa32-bitvalue,N– a32-bitaddressmask,M
• AssumethetopbitsofNcontainanetworkprefix,andtheremainingbitshavebeensettozero
• Totestwhetherthedestinationliesonthespecifiednetwork,therouterteststhecondition:
N==(D&M)• Therouter
– usesthemaskwitha“logicaland(&)”operationtosetthehostbitsofaddressDtozero(0)
– andthencomparestheresultwiththenetworkprefixN
[email protected] LivelloRete- IPv4 46
![Page 47: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/47.jpg)
Address Masks: Example
• Considerthefollowing32-bitnetworkprefix:10000000000010100000000000000000 à 128.10.0.0
• Considera32-bitmask:11111111111111110000000000000000 à 255.255.0.0
• Considera32-bitdestinationaddress,whichhasa10000000000010100000001000000011 à 128.10.2.3
• Alogical &betweenthedestinationaddressandtheaddressmaskextractsthehigh-order16-bits10000000000010100000000000000000 à 128.10.0.0
[email protected] LivelloRete- IPv4 47
![Page 48: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/48.jpg)
CIDR Notation
• ClasslessInter-DomainRouting(CIDR)• Considera maskdefiningasubnetwith26 nodes
– Ithas26bitsof1sfollowedby6bitsof0s– Indotteddecimal,themaskis:255.255.255.192
• ThegeneralformofCIDRnotationis:ddd.ddd.ddd.ddd/m– ddd isthedecimalvalueforanoctetoftheaddress– m isthenumberofonebitsinthemask
• Thus,onemightwritethefollowing:192.5.48.69/26– whichspecifiesamaskof26bits
[email protected] LivelloRete- IPv4 48
![Page 49: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/49.jpg)
A CIDR Example
• AssumeanISPhasthefollowingblock128.211.0.0/16• SupposetheISPhas2customers
– onecustomerneeds12IPaddressesandtheotherneeds9• TheISPcanassign
– customer1CIDR:128.211.0.16/28– customer2CIDR:128.211.0.32/28– bothcustomershavethesamemasksize(28bits),theprefixesdiffer
[email protected] LivelloRete- IPv4 49
![Page 50: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/50.jpg)
A CIDR Example (cont’d)
• Thebinaryvalueassignedtocustomer1is:– 10000000110100110000000000010000
• Thebinaryvalueassignedtocustomer2is:– 10000000110100110000000000100000
• Thereisnoambiguity– Eachcustomerhasauniqueprefix– Moreimportant,theISPretainsmostoftheoriginaladdressblock
• itcanthenallocatetoothercustomers
[email protected] LivelloRete- IPv4 50
![Page 51: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/51.jpg)
CIDR Host Addresses
• OnceanISPassignsacustomeraCIDRprefix– thecustomercanassignhostaddressesforitsnetworkusers
• Supposeanorganizationisassigned128.211.0.16/28– theorganizationwillhave4-bitstouseasahostaddressfield
• Disadvantageofclasslessaddressing– Becausethehostsuffixcanstartonanarbitraryboundary,valuesarenoteasytoreadindotteddecimal
[email protected] LivelloRete- IPv4 51
![Page 53: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/53.jpg)
INDIRIZZI PRIVATI, SPECIALI E INDIRIZZI DEI ROUTERNontuttigliindirizziIPsonoutilizzabili,alcuniindirizzihannosignificatosolointernoalcomputerealtriconsentonodifareilbootstrap dellemacchineprimacheabbianounindirizzoIPconcuicomunicare.IRoutersonomacchineconpiùindirizziIP...anchesenonsempreconpiùinterfaccefisichedicomunicazione.
[email protected] LivelloRete- IPv4 53
![Page 54: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/54.jpg)
Indirizzi pubblici e privati
• NontuttigliindirizziIPUnicast validisonouguali• Alcuniindirizzisonostatidefiniti“privati”enonsonoinstradabiliin
Internet– PossonoessereusatipercostruireIntra-netprivate
• Unhost conindirizzoIPprivatohabisognodiunaapparatoattivochetraducaopportunamenteisuoipacchettiperaccedereaInternet
• NAT:NetworkAddress Translator– Mappala5-tuplacheidentificaunflussosuun’altra5-tuplaconindirizzopubblico,lavoraalivelloL3/L4
• Proxy– GatewaydiL7,cheinterconnettealivellodisingolaapplicazione
[email protected] LivelloRete- IPv4 54
![Page 55: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/55.jpg)
Indirizzi Privati
• 10.0.0.0– 10.255.255.255• 172.16.0.0– 172.31.255.255• 192.168.0.0– 192.168.255.255
• Unindirizzoprivatopuòessereriutilizzatoinmoltipostidiversi• All’internodiunastessaretedevonoessereuniciepossonoessere
“routati”finoaun“border router”cheinveceimpediscediandareversoInternet
• NormalmentesonoassegnatitramiteDHCPenonsonoassegnatistaticamenteaunhost
• Nonc’è una reale differenza tra i tre gruppi diindirizzi,maingenere i router“domestici”usano 192.168.x.y/24
[email protected] LivelloRete- IPv4 55
![Page 56: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/56.jpg)
Special IP Addresses
• IPdefinesasetofspecialaddressformsthatarereserved– Thatis,specialaddressesareneverassignedtohosts
• Examples:– NetworkAddress– DirectedBroadcastAddress– LimitedBroadcastAddress– ThisComputerAddress– LoopbackAddress– Multicastaddresses
[email protected] LivelloRete- IPv4 56
![Page 57: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/57.jpg)
Network Address
• Itisconvenienttohaveanaddressthatcanbeusedtodenotetheprefix assignedtoagivennetwork
• IPreserveshostaddresszero– andusesittodenoteanetwork
• Thus,theaddress128.211.0.16/28denotesanetwork– becausethebitsbeyondthe28arezero– 10000000110100110000000000010000
• Anetworkaddressshouldneverappearasthedestinationaddressinapacket
[email protected] LivelloRete- IPv4 57
![Page 58: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/58.jpg)
Directed Broadcast Address
• Tosimplifybroadcasting(sendtoall)– IPdefinesadirectedbroadcastaddressforeachphysicalnetwork
• Whenapacketissenttoanetwork'sdirectedbroadcast– asinglecopyofthepackettravelsacrosstheInternet
• untilitreachesthespecifiednetwork– thepacketisthendeliveredtoallhostsonthenetwork
• Thedirectedbroadcastaddressforanetworkisformedbyaddingasuffixthatconsistsofall1bitstothenetworkprefix– 10000000110100110000000000011111
[email protected] LivelloRete- IPv4 58
![Page 59: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/59.jpg)
Limited Broadcast Address
• Limitedbroadcastreferstoabroadcastonadirectly-connectednetwork:– informally,wesaythatthebroadcastislimitedtoa“singleLAN”meaningthatitwillneverbeforwardedbyarouter,evenifthe“LAN”canbeahugeCampusLANwithhundredsofcomputers
• Limitedbroadcastisusedduringsystemstartup– byacomputerthatdoesnotyetknowthenetworknumber
• IPreservestheaddressconsistingof32-bitsof1s– 11111111111111111111111111111111
• Thus,IPwillbroadcastanypacketsenttotheall-1saddressacrossthelocalnetwork
[email protected] LivelloRete- IPv4 59
![Page 60: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/60.jpg)
This Computer Address
• AcomputerneedstoknowitsIPaddress– beforeitcansendorreceiveInternetpackets
• TCP/IPcontainsprotocolsacomputercanusetoobtainitsIPaddressautomaticallywhenthecomputerboots– …butthestartupprotocolsalsouseanIPtocommunicate
• Whenusingsuchstartupprotocols– acomputercannotsupplyacorrectIPsourceaddress– TohandlesuchcasesIPreservestheaddressthatconsistsofall0stomeanthiscomputer
– 00000000000000000000000000000000
[email protected] LivelloRete- IPv4 60
![Page 61: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/61.jpg)
Loopback Address
• Loopbackaddressusedtotestnetworkapplications– e.g.,forpreliminarydebuggingafteranetworkapplicationhasbeencreated
• Aprogrammermusthavetwoapplicationprogramsthatareintendedtocommunicateacrossanetwork
• Insteadofexecutingeachprogramonaseparatecomputer– theprogrammerrunsbothprogramsonasinglecomputer– andinstructsthemtousealoopbackaddresswhencommunicating
• Whenoneapplicationsendsdatatoanother– datatravelsdowntheprotocolstacktotheIPsoftware– thenforwardsitbackupthroughtheprotocolstacktothesecondprogram
[email protected] LivelloRete- IPv4 61
![Page 62: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/62.jpg)
Loopback Address (cont’d)
• IPreservesthenetworkprefix127/8 forusewithloopback• Thehostaddressusedwith127isirrelevant
– allhostaddressesaretreatedthesame– programmersoftenusehostnumber1– soitmakes127.0.0.1 themostpopularloopbackaddress
• Duringloopbacktestingnopacketseverleaveacomputer– theIPsoftwareforwardspacketsfromoneapplicationtoanother
• Theloopbackaddressneverappearsinapackettravelingacrossanetwork
[email protected] LivelloRete- IPv4 62
![Page 64: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/64.jpg)
Indirizzo Multicast
• Internetammettel’inviodipacchettia“molti”• Iroutersipreoccupano(complesso,nonlovediamoinquesto
corso)dicapireilpuntoottimodoveduplicarel’informazione• Unpacchettomulticast è inviato aunindirizzo di“gruppo”• InIPv4:ClassD,iniziano per1110• 224.0.0.0– 239.255.255.255• Esistonogruppimulticast “well known”• 224.0.0.1:All Hosts onthis Subnet• 224.0.0.2:All Routers onthis Subnet• Glialtripossonoessereusatiperapplicazioniproprietarieonuove• PurtropponontuttigliISPpermettonotrafficomulticast senonper
lagestionedeiprotocollidirouting stessi
[email protected] LivelloRete- IPv4 64
![Page 65: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/65.jpg)
Multicast Routing
• Multicast:deliveryofsamepackettoagroupofreceiverswiththeminimumoverhead
• Multipleunicastvs.multicast– Hostbasedvs.networkbased
[email protected] LivelloRete- IPv4 65
![Page 66: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/66.jpg)
Routers and IP Addresses
• EachrouterisassignedtwoormoreIPaddresses– oneaddressforeach logicalnetworktowhichtherouterattaches
• Tounderstandwhy,recalltwofacts:– Arouter connectsmultipleIPnetworks(bydefinition)– EachIPaddresscontainsaprefixthatspecifiesa logicalnetwork
• AsingleIPaddressdoesnotsufficeforarouter– becauseeachrouterconnectstomultiplenetworks– andeachnetworkhasauniqueprefix
• TheIPschemecanbeexplainedbyaprinciple:– AnIPaddressdoesnotidentifyaspecificcomputer– eachaddressidentifies ininterface,i.e.,alogicalconnectionbetween
acomputerandanetwork– Acomputerwithmultiplenetworkconnections(e.g.,arouter)must
beassignedoneIPaddressforeachconnection
[email protected] LivelloRete- IPv4 66
![Page 68: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/68.jpg)
Un altro esempio
[email protected] LivelloRete- IPv4 68
Campus LAN con 4 reti IP private: 192.168.1.0/24192.168.2.0/24192.168.3.0/24192.168.4.0/24
Routerdicampuscheinterconnettele4 retiedinoltraalRouterNATdicollegamentoversoInternet:5 indirizziIPtuttisullastessainterfacciafisicadellacampusLAN
192.168.1.1192.168.2.1192.168.3.1192.168.4.1192.168.5.1
Router,NATFirewallperaccessoaInternet2 indirizziIPsudueinterfaccediverse
153.18.125.1192.168.5.2
![Page 69: LivelloRete IndizzamentoIP (v4) e inoltrodeipacchettidisi.unitn.it/locigno/teaching-duties/reti/aa17-18/05.1...–IPv4: quello attualmente in uso con indirizzi a 32 bit –IPv6: il](https://reader033.vdocuments.mx/reader033/viewer/2022042105/5e8348b9cb484d70681dffd5/html5/thumbnails/69.jpg)
Un altro esempio (cont)
[email protected] LivelloRete- IPv4 69
Routerdicampuscheinterconnettele4retiedinoltraalRouterNATdicollegamentoversoInternet:5 indirizziIPtuttisullastessainterfacciafisicadellacampusLAN
168.192.1.1168.192.2.1168.192.3.1168.192.4.1168.192.5.1
Collegamentoalivelloethernet
153.18.125.1168.192.5.2
...