This action might not be possible to undo. Are you sure you want to continue?
Developed by Capt Vijender Pal Singh 172 Fd Regt
Working with IP Addresses
• You can probably work with decimal numbers much easier than with the binary numbers needed by the computer. • Working with binary numbers is timeconsuming & error-prone.
Note. . a 32 bit address can have 232 UNIQUE values . • So. • If a Protocol uses N bits to define an address.the address space is 2N.because each bit can have two values (0 and 1) and N bits can have 2N values.
64. • An octet is a set of 8 bits & not a musical instrument.126.52 Peter Smith 5 .Octets • The 32-bit IP address is broken up into 4 octets. • Example of an IP version 4: 172. which are arranged into a dotteddecimal notation scheme.
• We all are accustomed to thinking & working in the decimal system. Peter Smith 6 .Thinking in Binary • The binary system uses only 2 values “0 & 1” to represent numbers in positions representing increasing powers of 2. which is based on the number 10.
which is 64 (26) + 32 (25) + 16 (24) + 8 (23) + 4 (22) + 0 + 0 Peter Smith 7 . this number is 1111100.Thinking in Binary (Cont.) • To most humans. • To the computer. the number 124 represents 100 + 20 + 4.
a power of two beginning with 20 & increasing by one power as it moves left: 20. 24. 21. Peter Smith 8 . etc. right to left.• Each position in a binary number represents. 22.
Peter Smith 9 . • So. • There are 8 bits in an octet & each bit can only be a 1 or a 0.Converting to Decimal • You’ll need to convert binary to decimal & vice versa to compute subnets & hosts. it’s time for a quick review lesson in binary-to-decimal conversion.
) • What then do you suppose is the largest decimal number that can be expressed in an octet? Eight 1’s (1111 1111) Peter Smith 10 .Converting to Decimal (Cont.
) • Now. for double the money. what is its equivalent decimal value? 27 1 128 26 1 64 25 1 32 24 1 16 23 1 8 22 1 4 21 1 2 20 1 1 The binary number 1111 1111 converts into the decimal number: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255 Peter Smith 11 .Converting to Decimal (Cont.
• The significance of this should become evident later in this presentation.Converting to Decimal (Cont. the largest decimal number that can be stored in an IP address octet is 255.) • Therefore. Peter Smith 12 .
each of which is designated with the alphabetic letters A to E. • Class D addresses are used for multicasting. the class of the address determines which part belongs to the network address.IP Address Classes • In the class system. and which part belongs to the host address • IP addresses are divided into 5 classes. Peter Smith 13 . • Class E addresses are reserved for testing & some mysterious future use.
IP Address Classes (Cont.) • The 5 IP classes are split up based on the value in the 1st octet: Peter Smith 14 .
Network & Host Representation By IP Address Class Class Class A Class B Class C Octet1 Network Network Network Octet2 Host Network Network Octet3 Host Host Network Octet4 Host Host Host Peter Smith 15 . with the octets assigned as a part of one or the other.Are You the Host or the Network? • The 32 bits of the IP address are divided into Network & Host portions.
• There are only 2 specific rules that govern the value of the address.) • Each Network is assigned a network address & every device or interface (such as a router port) on the network is assigned a host address.Are You the Host or the Network? (Cont. Peter Smith 17 .
• These are special addresses that are reserved for special purposes. Peter Smith 18 .) • A host address cannot be designated by all zeros or all ones.Are You the Host or the Network? (Cont.
IP Addressing : Classes .
2 is a Class B address.31.1.2. 172. Because 172 falls between 128 and 191. for example.Identification of IP Address Class – The class of address can be determined easily by examining the first octet of the address and mapping that value to a class range.1.31. – In an IP address of 172. the first octet is 172. .
Peter Smith 21 . is used to indicate the address as a Class A address & the remaining 7 bits are used to designate the Network.Class A Addresses • Class A IP addresses use the 1st 8 bits (1st Octet) to designate the Network address. • The 1st bit which is always a 0. • The other 3 octets contain the Host address.
B.0. D. and E.IP Addressing : Classes – IP addressing supports five different address classes: A.0.0 to 247.255. – The left-most (high-order) bits indicate the network class.C.0 to 223.255 240.0.255.0.0.0. and C are available for commercial use.255.0 to 239.0.255 0 10 110 1110 11110 Network Network Network Multicast Address Reserved for future use Host Host Host Class A B C D E .255.255 126.96.36.199 188.8.131.52 to 126.255.255. B.255.0 to 191.255 192. – Only classes A.0.255. 32 Bits Range of host addresses 1.
) • There are 128 Class A Network Addresses.Class A Addresses (Cont. Peter Smith 23 . but because addresses with all zeros aren’t used & address 127 is a special purpose address. 126 Class A Networks are available.
214 Host addresses available in a Class A address.Class A Addresses (Cont.777. • Rather than remembering this number exactly. where “n” represents the number of bits in the host portion: (2n – 2) = Number of available hosts Peter Smith 24 .) • There are 16. you can use the following formula to compute the number of hosts available in any of the class addresses.
255. . http://127.0-127.1.0.1. 127. and unless you have a web server running. you are actually trying to connect to your own computer. irrespective of connectivity to the network.0.0. 127.0. is the loopback address.0.1. and refers to your machine.0.Where is 127.1.255? • Address.255.0. • you should always be able to ping 127. you will get a connection error. you are actually referring to your own machine. Whenever you see.0. That means if you clicked on this link.0. as it represents your own machine.0.
) • For a Class A network. there are: 224 – 2 or 16.777.. so (27 – 2) = 126 or there can be 126 Class A Networks.214 hosts.Class A Addresses (Cont. • Eg. • This type of allocation is generally given to very large networks such as multi-national companies Peter Smith 26 . • Half of all IP addresses are Class A addresses. a Class A address uses 7 bits to designate the network. • You can use the same formula to determine the number of Networks in an address class.
0.0.255 128. B.IP Addressing : Classes – IP addressing supports five different address classes: A.0.255.255.255. – Only classes A. – The left-most (high-order) bits indicate the network class.0.0.0 to 126. and C are available for commercial use.255. and E. 32 Bits Range of host addresses 1.0.0 to 239.255 192.255 184.108.40.206.255.0 to 223.0 to 247.255 0 10 110 1110 11110 Network Network Network Multicast Address Reserved for future use Host Host Host Class A B C D E .255.0 to 191.255.0. B.255.C.255. D.255 240.0.
• The last 2 octets are used for the Host address. • The 1st 2 bit. designate the address as a Class B address & 14 bits are used to designate the Network. This leaves 16 bits (two octets) to designate the Hosts. Peter Smith 28 .Class B IP Addresses • Class B addresses use the 1st 16 bits (two octets) for the Network address. which are always 10.
534 Hosts.) • So how many Class B Networks can there be? • Using our formula. • These blocks are generally allocated to Internet Service Providers and large networks. (214 – 2).382 Class B Networks & each Network can have (216 – 2) Hosts. like a college or major hospital. there can be 16. or 65. Peter Smith 29 .Class B IP Addresses (Cont.
B.255. 32 Bits Range of host addresses 220.127.116.11.0.IP Addressing : Classes – IP addressing supports five different address classes: A.255 192.0 to 126.0.0 to 191. and C are available for commercial use.255.0. and E.0.255.255 0 10 110 1110 11110 Network Network Network Multicast Address Reserved for future use Host Host Host Class A B C D E .255.0.255 128.0.C.0.0 to 239.0. B.255.255. – Only classes A. – The left-most (high-order) bits indicate the network class.255. D.255 240.255.0 to 247.0.0 to 223.255 224.
097. • This type of class is generally given to small to mid-sized companies.Class C IP Addresses • Class C addresses use the 1st 24 bits (three octets) for the Network address & only the last octet for Host addresses.the 1st 3 bits of all class C addresses are set to 110.150 (221 – 2) Class C Networks. leaving 21 bits for the Network address. but only 254 (28 – 2) Hosts per Network. Peter Smith 31 . which means there can be 2.
0.255.C.0.255. B.0.0.0 to 247. – Only classes A.255 128. D.0 to 191. and C are available for commercial use.0.255.255 224. – The left-most (high-order) bits indicate the network class. 32 Bits Range of host addresses 1. B. and E.255 0 10 110 1110 11110 Network Network Network Multicast Address Reserved for future use Host Host Host Class A B C D E .255.255.0.0.0 to 223.0 to 126.255.255 18.104.22.168.255 240.0 to 239.0.0.IP Addressing : Classes – IP addressing supports five different address classes: A.255.255.
IP Addressing : Classes .
– In an IP address of 172.31. 172. .2.2 is a Class B address. for example.1. the first octet is 172. Because 172 falls between 128 and 191.Identification of IP Address Class – The class of address can be determined easily by examining the first octet of the address and mapping that value to a class range.1.31.
xx. 00000000000000000000000000000000 00 ….Special IP Addresses • Specific Notations – IP address 0.0.0 used by hosts when they boot and not used afterwards.zz used for debuging n/w software.yy.. – IP address 127. Pkts not sent on to the n/w but looped internally. 1111 (Anything) . 00 Host This Host A Host on This Network Broadcast on Local Network Broadcast on a Distant Network Loop Back 11111111111111111111111111111111 Network 127 1111 ……….0. Allow machines to refer to own n/w – IP address with all 1’s is a Broadcast address – IP address with n/w no and all 1’s in host address is broadcast for a distant LAN. – IP address with 0 as n/w no refer to the current n/w.
Special Addresses (Cont.) Peter Smith 36 .
) • A list of these addresses for each IP address class: Peter Smith 37 .Special Addresses (Cont.