Presentation is loading. Please wait.

Presentation is loading. Please wait.

LECTURE # 20 IP ADDRESSING 1. Binary 2  All digital electronics use a binary method for communication.  Binary can be expressed using only two values:

Similar presentations


Presentation on theme: "LECTURE # 20 IP ADDRESSING 1. Binary 2  All digital electronics use a binary method for communication.  Binary can be expressed using only two values:"— Presentation transcript:

1 LECTURE # 20 IP ADDRESSING 1

2 Binary 2  All digital electronics use a binary method for communication.  Binary can be expressed using only two values: 0 or 1.

3 Converting Binary to Decimal 3  First, moving from right to left, create a chart that starts at the decimal number 1 and then double it 7 times. 1286432168421

4 Converting Binary to Decimal 4  Given a binary number, place the number under the chart (right justified). 1286432168421 10110011 Add the numbers together to arrive at a final decimal amount. 128 + 32 + 16 + 2 + 1 = 179

5 Converting Decimal to Binary 5  Find the largest number that is equal to or less than the number you are converting to binary. If our example number is 220, the largest number that is equal to or less than 220 is 128. Place a 1 under that space on the chart. 1286432168421

6 Converting Decimal to Binary 6  Next, subtract that number from the original decimal number. Subtracting 128 from 220 gives us 92.  Repeat this process until we have a subtracted result of 0. 1286432168421 11011100

7 Counting in Binary 7  0 + 1 = 1  1 + 1 = 10 (carry the 1)  10 + 1 = 11  11 + 1 = 100  100 + 1 = 101  101 + 1 = 110  110 + 1 = 111

8 Binary Counting Chart 8 11111011 210121100 311131101 4100141110 5101151111 61101610000 71111710001 810001810010 910011910011 1010102010100

9 Addressing Principles 9  Logical addresses in TCP/IP are 32 bits in length.  To make addressing more humanly manageable, the 32 bits are broken into four 8 bit octets.  We separate the octets by using a period symbol – 135.87.252.57. This is referred to as dotted decimal notation.

10 Dotted-decimal notation 10

11 TCP/IP Host 11  A host is a device that has a network interface card connected to a network.  If a device has two network interfaces, it should be considered two separate hosts.  Each host that is attached to a TCP/IP network must have a unique TCP/IP address.

12 TCP/IP Addresses 12. 133.120.75.8 86 131.107.0.0 131.107.3.27 133.120.0.0 129.102.12.7 129.102.0.0 129.102.16.2 90 94 MARIA AVE

13 TCP/IP Addresses 13  IP Addresses divided into two parts (network address and host address) :  Network ID or Net ID Analogous to a street address.  Host ID Analogous to a house or building number.  TCP/IP Addresses are hierarchical addresses (combination of location ID and host ID) as opposed to flat addresses (e.g. MAC address).

14 Example 1 Change the following IP addresses from binary notation to dotted-decimal notation. a.10000001 00001011 00001011 11101111 b.11111001 10011011 11111011 00001111 Solution We replace each group of 8 bits with its equivalent decimal number and add dots for separation: a.129.11.11.239 b.249.155.251.15 14

15 Example 2 Change the following IP addresses from dotted-decimal notation to binary notation. a.111.56.45.78 b.75.45.34.78 Solution We replace each decimal number with its binary equivalent a.01101111 00111000 00101101 01001110 b.01001011 00101101 00100010 01001110 15

16 In classful addressing, the address space is divided into five classes: A, B, C, D, and E. Note: 16

17 Finding the class in binary notation 17

18 Finding the address class 18

19 Example 3 Find the class of each address: 0 a.00000001 00001011 00001011 11101111 1111 b.11110011 10011011 11111011 00001111 Solution a.The first bit is 0; this is a class A address. b.The first 4 bits are 1s; this is a class E address. 19

20 Finding the Class in decimal Notation 20

21 Example 4 Find the class of each address: a.227.12.14.87 b.252.5.15.111 c.134.11.78.56 Solution a.The first byte is 227 (b/w 224 and 239); the class is D. b.The first byte is 252 (b/w 240 and 255)the class is E. c.The first byte is 134 (b/w 128 and 191); the class is B. 21

22 Example 22  A00001010 00000010 00000000 00100101  B10101100 00010000 00001010 00000001  C10000001 00110100 00000110 00000001 Solution  A10.2.0.37  B172.16.10.1  C129.52.6.1

23 Netid and Hostid 23

24 Class A Address 24  First bit will always be a 0.  Remaining bits can be either 0s or 1s.  Range of first octet is 00000001 to 01111111  Network addresses cannot be all 0s.  127 is reserved for loopback testing.  126 valid Class A network addresses  1.x.y.z to 126.x.y.z

25 Host ID Portion 25  Cannot be all 0s  If host portion is all 0s, represents a network address.  Cannot be all 1s  If host portion is all 1s, represents a broadcast.

26 Blocks in class A 26

27 Class B Address 27  First two bits will always be a 10.  Remaining bits can be either 0s or 1s.  Range of first octet is 10000000 to 10111111  Range of networks 128.0.y.z to 191.255.y.z  16,384 valid Class B network IDs.

28 Blocks in class B 28

29 Class C Address 29  First three bits will always be a 110.  Remaining bits can be either 0s or 1s.  Range of class C addresses is 11000000.x.y.z to 11011111.x.y.z 192.0.0.z to 223.255.255.z.  2,097,152 valid Class C network addresses.

30 Blocks in class C 30

31 Class D Address 31  First octet in binary is defined as 1110xxxx, replacing x’s with whatever we wish.  Range of Class D addresses is from 224.x.y.z to 239.x.y.z.  Used for multicasting – method of sending a single packet to multiple hosts.

32 Class E Address 32  First octet is 1111xxxx, replacing x’s with whatever we wish.  Address ranges from 240.x.y.z to 255.x.y.z.  Experimental address range that is not used in actual networks.

33 A network address is different from a netid. A network address has both netid and hostid, with 0s for the hostid. Note: 33

34 Network address 34

35 Example 5 Given the address 23.56.7.91, find the network address. Solution The class is A. Only the first byte defines the netid. We can find the network address by replacing the hostid bytes (56.7.91) with 0s. Therefore, the network address is 23.0.0.0. 35

36 Example 6 Given the address 132.6.17.85, find the network address. Solution The class is B. The first 2 bytes defines the netid. We can find the network address by replacing the hostid bytes (17.85) with 0s. Therefore, the network address is 132.6.0.0. 36

37 Example 7 Given the network address 17.0.0.0, find the class. Solution The class is A because the netid is only 1 byte. 37

38 Addressing Guidelines 38  Network ID Cannot Be 127  127 is reserved for lookback functions  Network ID and Host ID Cannot Be 255 (All Bits Set to 1)  255 is a broadcast address  Network ID and Host ID Cannot Be 0 (All Bits Set to 0)  0 means “this network only”  Example: 145.20.0.0 refers to Class B network 145.20.0.0  Host ID Must Be Unique to the Network

39 Assigning Network IDs 39 1 1 2 2 3 3 124.x.y.z 192.121.73.z 131.107.y.z Router

40 Assigning Host IDs 40 Router 124.0.0. 27 124.0.0. 28 124.0.0. 29 131.107.0. 27 131.107.0. 28 131.107.0. 29 192.121.73. 1 124.0.0. 1 192.121.73. 2 131.107.0. 1 124.x.y.z 192.121.73.z 131.107.0.z 1 1 2 2 3 3

41 Address Class Summary 41 [[Number of Networks Number 126 16,384 2,097,152 Number of Hosts per Network Number of Hosts per Network 16,777,214 65,534 254 Class A Class B Class C Range of Network IDs (First Octet) Range of Network IDs (First Octet) 1 – 126 128 – 191 192 – 223

42 Reserved IP Addresses 42  Defined in RFC 1918.  Class A 10.0.0.0 to 10.255.255.255  Class B 172.16.0.0 to 172.31.255.255  Class C 192.168.0.0 to 192.168.255.255  Good choice for LAN numbering.

43 Reserved IP Addresses 43  169.254.0.0 to 169.254.255.255  used for operating systems that automatically assign addresses when a DHCP server is unavailable.

44 44  Europe : 194.0.0.0 – 195.255.255.255  North America: 198.0.0.0 – 199.255.255.255  Central & South America: 200.0.0.0 – 201.255.255.255  Asia & Pacific: 202.0.0.0 – 203.255.255.255 Some addresses allocated


Download ppt "LECTURE # 20 IP ADDRESSING 1. Binary 2  All digital electronics use a binary method for communication.  Binary can be expressed using only two values:"

Similar presentations


Ads by Google