Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter-5 TCP/IP Suite.

Similar presentations


Presentation on theme: "Chapter-5 TCP/IP Suite."— Presentation transcript:

1 Chapter-5 TCP/IP Suite

2 IP Addresses

3 INTRODUCTION

4 IP Address An IP address is an address used in order to uniquely identify a device on an IP network. IP Addresses are used to route packets from a sending node to a receiving node. The address is made up of 32 binary bits. Divided into a network portion and host portion with the help of a subnet mask. The Internet Assigned Numbers Authority (IANA) assigns network identifiers to avoid duplications.

5 IP Address The 32 binary bits are broken into four octets
(1 octet = 8 bits). Each octet is converted to decimal and separated by a period (dot). For this reason, an IP address is said to be expressed in dotted decimal format (for example, ). The value in each octet ranges from 0 to 255 decimal, or − binary.

6 Dotted Decimal Notation
IP addresses are written in a so-called dotted decimal notation Each byte is identified by a decimal number in the range [0..255]: Example: 1st Byte = 128 2nd Byte = 143 3rd Byte = 137 4th Byte = 144

7 Network prefix and Host number
The network prefix identifies a network and the host number identifies a specific host (actually, interface on the network). How do we know how long the network prefix is? The network prefix used to be implicitly defined (class-based addressing, A,B,C,D…) The network prefix now is flexible and is indicated by a prefix/netmask (classless). network prefix host number

8 An IP address is a 32-bit address. The IP addresses are unique.
What is an IP Address? An IP address is a bit address. The IP addresses are unique.

9 Address space rule ………….. ………….. addr1 The address space in a protocol that uses N-bits to define an Address is: 2N addr15 addr2 ………….. ………….. ………….. addr41 addr226 addr31 ………….. …………..

10 The address space of IPv4 is
IPv4 address space The address space of IPv4 is or 4,294,967,296.

11 Binary Notation

12 Dotted-decimal notation

13 0x75951DEA Hexadecimal Notation
D EA 0x75951DEA

14 Example 1 Change the following IP address from binary notation to dotted-decimal notation. Solution

15 Example 2 Change the following IP address from dotted-decimal notation to binary notation: Solution

16 111.56.045.78 Example 3 Solution There are no leading zeroes in
Find the error in the following IP Address Solution There are no leading zeroes in Dotted-decimal notation (045)

17 75.45.301.14 Example 3 (continued) Solution
Find the error in the following IP Address Solution In decimal notation each number <= 255 301 is out of the range

18 CLASSFUL ADDRESSING

19 Occupation of the address space

20 In classful addressing the address space is
divided into 5 classes: A, B, C, D, and E.

21 IP Address Classes Rules for class design
The IP is divided into different classes. Rules for class design ALL BITS ZERO NOT ALLOWED ALL BITS ONE NOT ALLOWED

22 Finding the class in binary notation

23 Finding the address class

24 IP Address Classes The IP is divided into different class with respect to their 1st octet. Class A: 0XXX XXXX – Min = = 1 Max = = 126 127 is not allowed as it is loop back address used by LAN card for its own working process. Class A addresses are assigned to networks with a very large number of hosts.

25 Class A Addresses The high-order bit in a class A address is always set to zero. The next seven bits complete the network ID. The remaining 24 bits represent the host ID. This allows for 126 networks and 16,777,214 hosts per network.

26 Class A Addresses Network Host 1.0.0.0 to 127.255.255.255
1 7 24 In this 7bits are used for network field and 24 bits for host field. Class A IP address range includes to

27 Millions of class A addresses are wasted.

28 Class B Address Class B addresses are assigned to medium-sized to large-sized networks. The two high-order bits in a class B address are always set to binary 1 0. The next 14 bits complete the network ID. The remaining 16 bits represent the host ID. This allows for 16,384 networks and 65,534 hosts per network.

29 Class B Address Host Network 10
In this 14 bits are used for network field and 16 bits for host field. Class B IP address range includes to Host Network 10 2 14 16

30 Many class B addresses are wasted.

31 Class C Address Class C addresses are used for small networks.
The three high-order bits in a class C address are always set to binary The next 21 bits complete the network ID. The remaining 8 bits (last octet) represent the host ID. This allows for 20,97,152 networks and 254 hosts per network.

32 Class C Address 192.0.0.0 to 223.255.255.255 Host Network 110
21 8 In this 21 bits are used for network field and 8 bits for host field. Class C IP address range includes to

33 The number of addresses in a class C block is smaller than the needs of most organizations.

34 Class D Address Multicast Address 1110
Class D addresses are reserved for IP multicast addresses. The four high-order bits in a class D address are always set to binary The remaining bits recognize hosts. Class D IP address range includes to Multicast Address 1110 4 32

35 Class D addresses are used for multicasting; there is only one block in this class.

36 Reserved for Future Use
Class E Address Class E is an experimental address that is reserved for future use. The high-order bits in a class E address are set to 1111. Class E IP address range includes to Reserved for Future Use 1111 4 32

37 Class E addresses are reserved for special purposes; most of the block is wasted.

38 1st and 2nd bits are 1, and 3rd bit is 0 hence, Class C
Example 6 Find the class of the following IP addresses Solution 1st is 0, hence it is Class A 1st and 2nd bits are 1, and 3rd bit is 0 hence, Class C

39 Finding the class in decimal notation
Figure 4-5 Finding the class in decimal notation

40 Example 7 Find the class of the following addresses Solution 1st byte = 158 (128<158<191) class B 1st byte = 227 (224<227<239) class D

41 The 1st byte is between 128 and 191. The addresses range from
Example 8 Given the network address , find the class, the block, and the range of the addresses Solution The 1st byte is between 128 and 191. Hence, Class B The block has a netid of The addresses range from to

42 Network Masks A network mask helps to know which portion of the address identifies – the network and which portion of the address identifies the node. A mask is a 32-bit binary number. Class A, B, and C networks have default masks, also known as natural masks. Class A default mask is Class B default mask is Class C default mask is

43 Example How the mask identify the network and node address. Consider IP: Default mask: 1. Convert the address and mask to binary numbers. = = _________________________________________________________________ And = netid = = 8 hostid = =

44 SUBNETTING

45 Subnetting To create multiple logical networks that exist within a single Class A, B, or C network. If you do not subnet, you are only able to use one network from your Class A, B, or C network, which is unrealistic. The subnet mask is 32 bit value that usually expressed in dotted decimal notation.

46 Subnet mask The subnet mask follows two rules:
• If a binary bit is set to a 1 (or on) in a subnet mask, the corresponding bit in the address identifies the network. • If a binary bit is set to a 0 (or off) in a subnet mask, the corresponding bit in the address identifies the host.

47 Example Looking at the address and subnet mask in binary:
IP Address: Subnet Mask: The first 16 bits of the subnet mask are set to 1. Thus, the first 16 bits of the address (158.80) identify the network. The last 16 bits of the subnet mask are set to 0. Thus, identify the unique host on that network.

48 Note The network portion of the subnet mask must be contiguous.
For example, a subnet mask of is not valid. Subnetting is done by borrowing bits from the host part and add them the network part

49 Finding the Subnet Address
Given an IP address, we can find the subnet address the same way we found the network address. We apply the mask to the address. We can do this in two ways: straight or short-cut.

50 Straight Method In the straight method, we use binary notation for both the address and the mask and then apply the AND operation to find the subnet address.

51 Example 9 What is the subnetwork address if the destination address is and the subnet mask is ?

52 The subnetwork address is 200.45.32.0.
Solution The subnetwork address is

53 Short-Cut Method If the byte in the mask is 255, copy the byte in the address. If the byte in the mask is 0, replace the byte in the address with 0. If the byte in the mask is neither 255 nor 0, we write the mask and the address in binary and apply the AND operation.

54 Example 10 What is the subnetwork address if the destination address is and the mask is ? Solution

55 Figure 5-6 Solution

56 The number of subnets must be a power of 2.

57 The number of 1s in the default mask is 24 (class C).
Example 11 A company is granted the site address (class C). The company needs six subnets. Design the subnets. Solution The number of 1s in the default mask is 24 (class C).

58 Solution (Continued) The company needs six subnets. This number 6 is not a power of 2. The next number that is a power of 2 is 8 (23). We need 3 more 1s in the subnet mask. The total number of 1s in the subnet mask is 27 (24 + 3). The total number of 0s is 5 ( ).

59 Solution (Continued) The mask is or The number of subnets is 8. The number of addresses in each subnet is 25 (5 is the number of 0s) or 32

60 Subnet 1: The bit combination is 001
Subnet 1: The bit combination is Taking last octet in binary : = 32 (10) Hence the subnet address is, Subnet 2: The bit combination is Taking last octet in binary : = 64(10) Hence the subnet address is, Subnet 3: The bit combination is Taking last octet in binary : = 96(10) Hence the subnet address is,

61 Subnet 4: The bit combination is 100
Subnet 4: The bit combination is Taking last octet in binary : = 128(10) Hence the subnet address is, Subnet 5: The bit combination is Taking last octet in binary : = 160(10) Hence the subnet address is, Subnet 6: The bit combination is Taking last octet in binary : = 192 (10) Hence the subnet address is,

62 Figure 5-8 Example 3

63 The number of 1s in the default mask is 16 (class B).
Example 12 A company is granted the site address (class B). The company needs 1000 subnets. Design the subnets. Solution The number of 1s in the default mask is 16 (class B).

64 The company needs 1000 subnets. This number is not a power of 2.
Solution (Continued) The company needs 1000 subnets. This number is not a power of 2. The next number that is a power of 2 is (210). We need 10 more 1s in the subnet mask. The total number of 1s in the subnet mask is 26 ( ). The total number of 0s is 6 ( ).

65 The number of subnets is 1024.
Solution (Continued) The mask is or The number of subnets is 1024. The number of addresses in each subnet is 26 (6 is the number of 0s) or 64.

66 Figure 5-9 Example 4

67 Variable-length subnetting

68 SUPERNETTING

69 What is suppernetting? Supernetting is the opposite of subnetting.
In subnetting you borrow bits from the host part. Supernetting is done by borrowing bits from the network side. And combine a group of networks into one large supernetwork.

70 Supernetting This enables organizations to modify their network size and minimize the requirement of network routing devices. Helps routers to store routing information effectively.

71 A supernetwork

72 Rules:  The number of blocks must be a power of 2 (1, 2, 4, 8, 16, . . .).  The blocks must be contiguous in the address space (no gaps between the blocks).  The third byte of the first address in the superblock must be evenly divisible by the number of blocks. In other words, if the number of blocks is N, the third byte must be divisible by N.

73 Example 5 A company needs 600 addresses. Which of the following set of class C blocks can be used to form a supernet for this company?

74 Solution 1: No, there are only three blocks. 2: No, the blocks are not contiguous. 3: No, 31 in the first block is not divisible by 4. 4: Yes, all three requirements are fulfilled.

75 Comparison of subnet, default,
and supernet masks

76 Example 13 We need to make a supernetwork out of 16 class C blocks. What is the supernet mask? Solution We need 16 blocks. For 16 blocks we need to change four 1s to 0s in the default mask. So the mask is or

77 Example 14 A supernet has a first address of and a supernet mask of A router receives three packets with the following destination addresses: Which packet belongs to the supernet?

78 Solution We apply the supernet mask to see if we can find the beginning address. AND  AND  AND  Only the first address belongs to this supernet.


Download ppt "Chapter-5 TCP/IP Suite."

Similar presentations


Ads by Google