IP addressing Számítógép networkok gyakorlata ÓBUDAI EGYETEM 2011 TAVASZI FÉLÉV 3. LABORGYAKORLAT PRÉM DÁNIEL
IP address • Logical addressing • 32 bit integer • IP address can be split into two parts: network and host ID
IP address properties • Network ID is the same at each host inone network. Host ID has to be different • Routers use the network ID when forwarding packages. • One host can have multiple interfaces – each interface connects to a different network
History of IP classes • Back in the dark ages the first 8 bits were the network ID, the rest was the host id • It was realized soon how smal that number is. • In 1981 the Classful Network achitecture was created. It described 5 classes that were self explanatory from the IP address (A, B, C, D, E ) • Scalability was an issue even using this architecture, so in 1993 ”Classless Inter- Domain Routing” (CIDR) architecture was invented which uses variable length network ID
IP address classes Classful Network A class0networkhost B class10networkhost C class110networkhost D class1110multicast E class11110reserved ClassLeading bitsFirst octetNumber of networks Number of hosts A class00 – = = B class10128 – = = C class – = = 256 D class – 239–– E class – 255––
Private IP ranges • Often it is necessary to connect devices to the network, but not to the internet. RFC 1918 manages the private IP addresses that cannot appear on the internet, but are reserved for private use. • Private IP ranges managed by IANA: • example: /24 (mask: | 256 hosts) networks /16 (mask: | hosts) 256 networks ClassFromToNo. Of hosts 1 x A class = x B class = x C class =
Virtual network interface • Sometimes it is necessary for hosts to provide services that have to be used by itself. • Such services are provided through the loopback network. • The loopback device is implemented in software only • Canniot appear on the web • Speciális címe a localhost ami a IP cím. Classfirst network address last network address number of hosts 1 x A class =
Network and broadcast addresses • networki cím: IP address full of zeroes – xx.xx.xx.0 • Broadcast cím: IP address full of ones – xx.xx.xx.255
Subnet mask • Further subcategorize the network • 32 bit number
Subnet mask example • /24 [mask: ] • /22 [maszk: ] • /26 [maszk: ] network idrangeBroadcast addr. Állomások száma – network idrangeBroadcast addr Állomások száma – network idrangeBroadcast addr Állomások száma –
Címzési módok • Unicast: Egy az egynek kapcsolat Minden cím egyedi és központilag kiosztott, emiatt egyértelműen azonosítja a címzettet. • Multicast: Egy a többnek kapcsolat Lehetővé teszi az adó számára, hogy az üzenete több címzetthez is eljusson. • Broadcast: Egy mindenkinek kapcsolat A multicast speciális esete, ekkor mindenkinek szól az üzenet, így a network összes eleme beolvassa a csomagot.