1 / 87

IP Addresses

IP Addresses. NETE0510 Presented by Dr.Apichan Kanjanavapastit. Introduction. The identifier used in the IP layer of the TCP/IP protocol suite to identify each device connected to the Internet is called the Internet address or IP address

Télécharger la présentation

IP Addresses

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IP Addresses NETE0510 Presented by Dr.Apichan Kanjanavapastit

  2. Introduction • The identifier used in the IP layer of the TCP/IP protocol suite to identify each device connected to the Internet is called the Internet address or IP address • An IP address is a 32-bit address that uniquely and universally defines the connection of a host or a router to the Internet • IP addresses are unique. They are unique in the sense that each address defines one, and only one, connection to the Internet • Two devices on the Internet can never have the same address.

  3. Notation • There are 3 common notations to show an IP address: binary notation, dotted decimal notation, and hexadecimal notation • Binary notation. The IP address is displayed as 32 bits. To make the address more readable, one or more spaces is usually inserted between each octet (8 bits)

  4. Notation (cont.) • Dotted-Decimal Notation. To make the IP address more compact and easier to read, Internet addresses are usually written in decimal form with a decimal point (dot) separating the bytes

  5. Example 5.3 Find the error, if any, in the following IPv4 addresses: a. 111.56.045.78 b. 221.34.7.8.20 c. 75.45.301.14 d. 11100010.23.14.67 Solution a. There should be no leading zeroes (045). b. We may not have more than 4 bytes in an IPv4 address. c. Each byte should be less than or equal to 255. d. A mixture of binary notation and dotted-decimal notation.

  6. Notation (cont.) • Hexadecimal Notation. Sometimes an IP address is displayed in the format of hexadecimal. Each hexadecimal digit is equivalent to 4 bits. This means that a 32-bit address has 8 hexadecimal digits. This notation is often used in network programming 10000001 00001011 00001011 11101111 0x810B0BEF or 810B0BEF16

  7. Classful Addressing • IP addresses, when started a few decades ago, used the concept of classes • This architecture is called classful addressing • In the mid-1990s, a new architecture, called classless addressing, was introduced and will eventually supersede the original architecture • However, part of the Internet is still using classful addressing, but the migration is very fast

  8. Classful Addressing (cont.) • In classful addressing, the IP address space is divided into 5 classes: A, B, C, D and E • Each class occupies some part of the whole address space

  9. Recognizing Class • One can find the class of an address when the address is given in binary notation or dotted-decimal notation • If the address is given in binary notation, the first few bits can immediately tell us the class of the address

  10. Recognizing Class (cont.) • One can follow the procedure to systematically check the bits and find the class • The procedure can be easily programmed in any language

  11. Recognizing Class (cont.) • When the address is given in dotted-decimal notation, we need to look at the first byte to determine the class of the address • Each class has a specific range of numbers

  12. Netid and Hostid • In classful addressing, an IP address in classes A, B, and C is divided into netid and hostid • These parts are of varying lengths, depending on the class of the address

  13. Classes and Blocks • One problem with classful addressing is that each class is divided into a fexed number of blocks with each block having a fixed size • Class A. Class A is divided into 128 blocks with each block having a different netid • Class A addresses were designed for large organization with a large number of hosts or routers attached to their network • However, the number of addresses in each block, 16,777,216, is probably larger than the needs of amost all organizations

  14. Classes and Blocks (cont.)

  15. Classes and Blocks (cont.) • Class B. Class B is divided into 16,384 blocks with each block having a different netid • Since each block in this class contains 65,536 addresses, the organization should be large enough to use all of these addresses • Class B addresses were designed for mid-size organizations that may have only tens of thousands of hosts or routers attached to their networks

  16. Classes and Blocks (cont.) • Class C. Class C is divided into 2,097,152 blocks. However, each block in this class contains only 256 addresses, which means the organization should be small enough to need less than 256 address • The number of addresses in each block is so limited most organizations do not want a block in this class

  17. Classes and Blocks (cont.) • Class D. There is just one block of class D addresses. It is designed for multicasting • Class E. There is just one block of class E addresses. It was designed for use as reserved addresses

  18. Network Addresses • Network addresses play a very important role in classful addressing • A network address has several properties: • The network address is the first address in the block • The network address defines the network to the rest of the Inter • Given the network address, we can find the class of the address, the block, and the range of the addresses in the block

  19. Mask • One way we can find the network address is to first find the class of the address and the netid • We then set the hostid to zero to find the network address • The above method is feasible if we have not subnetted the network; that is, if we have not divided the network into subnetworks • A general procedure that can be used involves a mask to find the network address from a given address • A mask is a 32-bit number that gives the first address in the block (the network address) when bitwise

  20. Masking Concept

  21. Default Masks • In the AND operation for classful addressing, there are 3 masks, one for each class

  22. CIDR Notation • Although in classful addressing each address has a default mask, it is sometimes convenient to explicitely indicate the default mask • The CIDR (pronounced cider), or classless interdomain routing, notation is used for this purpose • In this notation, the number of 1s in the mask is added after a slash at the end of the address • For example, the address 18.46.74.10, which is a class A address with the mask 255.0.0.0, is written as 18.46.74.10/8

  23. Multihomed Devices • A computer that is connected to different networks is called a multihomed computer and will have more than one address, each possibly belonging to a different class • A router must be connected to more than one network, otherwise it cannot route

  24. Special Addresses • Some parts of the address space are used for special addresses

  25. Network Address

  26. Direct Broadcast Address

  27. Limited Broadcast Address • In classes A, B, and C, an address with all 1s for the netid and hostid defines a broadcast address in the current network • However, a route will block a packet having this type of address to confine the broadcasting to the local network

  28. This Host on This Network • If an IP address is composed of all zeros, it means this host on this network • This is used by a host at bootstrap time when it does not know its IP address

  29. Specific Host on This Network • An IP address with a netid of all zeros means a specific host on this network • It is used by a host to send a message to another host on the same network

  30. Loopback Address • The IP address with the first byte equal to 127 is used for the loopback address, which is an address used to test the software on a machine • When this address is used, a packet never leaves the machine; it simply returns to the protocol software

  31. Private Address • A number of blocks in each class are assigned for private use. They are not recognized globally • These address are used either in isolation or in connection with network address translation techniques

  32. Unicast, Multicast, and Broadcast Addrsses • Unicast addresses. Unicast communication is one-to-one. When a packet is sent from an individual source to an individual destination, a unicast communication takes place • Multicast addresses. Multicast communication is one-to-many. When a packet is sent from an individual source to a group of destination, a multicast communication takes place • Broadcast Addresses. Broadcast communication is one-to-all. The Internet allows broadcasting only at the local level

  33. Sample internet

  34. Subnetting • In subnetting, a network is divided into several smaller subnetworks with each subnetwork having its own subnetwork address • IP addresses are designed with 2 levels of hierarchy. However, in many cases, these 2 levels of hierarchy are not enough since the hosts cannot be organized into groups • One solution is subnetting, the further division of a network into smaller networks called subnetworks (or subnets)

  35. Subnetting (cont.) • Adding subnetworks creates an intermediate level of hierarchy in the IP addressing system • Now we have 3 levels: site, subnet, and host. The site is the first level. The 2nd level is the subnet. This host is the 3rd level • The routing of an IP datagram now involves 3 steps: delivery to the site, delivery to the subnetwork, and delivery to the host

  36. Subnet Mask • When a network is subnetted, we must have a subnet mask • The default mask creates the network address; the subnet mask creates the subnetwork address

  37. Number of Subnetworks/Number of Addresses per Subnet • The number of subnetworks can be found by counting the extra 1s that are added to the default mask to make the subnetmask • The number of addresses per subnetwork can be found by counting the number of 0s in the subnet mask

  38. Supernetting • In supernetting, an organization can combine several class C blocks to create a larger range of addresses

  39. Supernet Mask • A supernet mask is the reverse of a subnet mask • A supernet mask for class C has less 1s than the default mask for this class

  40. Obsolescence The idea of subnetting and supernetting of classful addresses is almost obsolete.

  41. Classless IP Addressing • During the 1990s, Internet service providers (ISPs) came into prominece • An ISP is granted a large range of addresses and then subdivides the addresses, giving a range to household or a small business • To facilitate this evolution the problems of classful addressing, in 1996, the Internet authorities announced a new architecture called classless addressing

  42. Variable-Length Blocks • In classless addressing, variable-length blocks are assigned that belong to no class • We can have a block of 2 addresses, 4 addresses, 128 addresses, and so on • In this architecture, the entire address space (232 addresses) is divided into blocks of different sizes

  43. Restrictions • Number of addresses in a block. There is only one restriction on the number of addresses in a block; it must be a power of 2 (2, 4, 8, …) • First address. The 1st address must be evenly divisible by the number of addresses. For example, if a block contains 4 addresses, the 1st address must be divisible by 4

  44. Example 1 Which of the following can be the beginning address of a block that contains 16 addresses? a. 205.16.37.32 b.190.16.42.44c. 17.17.33.80 d.123.45.24.52 SolutionOnly two are eligible (a and c). The address 205.16.37.32 is eligible because 32 is divisible by 16. The address 17.17.33.80 is eligible because 80 is divisible by 16.

  45. Restrictions (cont.) • Mask. In classless addressing, the address must be accompanied by the mask. The mask is given in CIDR notation with the number of 1s in the mask The n after the slash defines the number of bits that are the same in every address in the block. If n is 20, it means the 20 leftmost bits are identical in each address with 12 bits not the same

  46. Restrictions (cont.) • Prefix and Prefix length. Prefix is similar to netid and the prefix length is the length of the prefix (n in the CIDR notation). There is a one-to-one relationship between a mask and a prefix length

  47. Restrictions (cont.) • Suffix and suffix length. The suffix is the varying part (similar to the hostid). The suffix length is the length of the suffix (32-n) in CIDR notation

More Related