19.1 Chapter 19 Network Layer: Logical Addressing Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
19.2 Internet Architecture The internet consists of many heterogeneous networks. A network of networks The Internet is a special internet which connects all networks based on the TCP/IP protocol. In Internet, internetworking devices called routers(or gateways) provide interconnections among all networks.
19.3 Net 1 Net 2Net 3 R1R2 Internet real structure router physical net host Internet as a universal network host user’s view Virtual, uniform one network
19.4 IP address IP addresses denote the connection(interface) to the Internet. cf> telephone address, ethernet address IP addresses are unique. Each address defines only on connection to the Internet. IP addresses are global(universal). Any host connected to the Internet must use the same IP addressing scheme.
19.5 IP address An IP address is a 32 bits long. It consists of two parts: net-id and host-id. Net idHost id 32 bits Denote a specific physical network In the Internet Denote a connection in a specific physical network
19.6 Net-id and host-id
19.7 Figure 19.1 Dotted-decimal notation and binary notation for an IPv4 address
19.8 Figure 19.2 Finding the classes in binary and dotted-decimal notation
19.9 Table 19.1 Number of blocks and block size in classful IPv4 addressing
19.10 Table 19.2 Default masks for classful addressing
19.11 Network Address
19.12 Sample Network
19.13 Special IP addresses 0 ’ s mean “ this ”, 1 ’ s mean “ all ” Limited broadcast( local net) 2 all 0s all 1s net host 127anything (often 1) This host 1 Host on this net 1 Directed broadcast for net 2 Loopback 3 Notes: 1 Allowed only at system startup(bootstrap) and is never a valid destination address. 2 Never a valid source address. 3 Should never appear on a network. Used in testing.
19.14 Subnetting IP address is designed with two levels of hierarchy: netid and hostid. Sometimes the block of a network address assigned to an organization need to be divided for efficient routing, so that an organization has several subnetworks(subnets). Subnetting provides a mean to have three levels of hierarchy.
19.15 H H Network H H Network REST OF THE INTERNET all traffic to X.X R All packets with x.x are coming to this organization from outside.
19.16 Address with subnet-id
19.17 Subnet Mask The subnet mask specifies how many bits in the host-id are assigned for subnet-id.
19.18 Subnet Example Network ID Subnet ID Host ID Network ID Subnet ID Host ID xffffff00 = xffffffc0 =
19.19 IP addressing: CIDR CIDR: Classless InterDomain Routing subnet portion of address of arbitrary length address format: a.b.c.d/x, where x is # bits in subnet portion of address subnet part host part /23
19.20 CIDR notation In CIDR, an IP address is expressed as: Network address/length Ex) /21 –( , ) block Dotted decimal32-bit binary equivalent lowest highest CIDR mask
19.21 Ex) /16 ( , ) block lowest Highest
19.22 An ISP has the address block of /18 (64/24s). If a customer requests 800 IP addresses, then the ISP can assign the address block of /22 (4 contiguous/24s) to the customer. What is the advantage of using CIDR comparing with the case of assigning one class B address or 4 class C addresses? ISP’s block /18 client’s block /22 Class C(0) /24 Class C(1) /24 Class C(2) /24 Class C(3) /24 Example
19.23 An ISP is granted a block of addresses starting with /16 (65,536 addresses). The ISP needs to distribute these addresses to three groups of customers as follows: a. The first group has 64 customers; each needs 256 addresses. b. The second group has 128 customers; each needs 128 addresses. c. The third group has 128 customers; each needs 64 addresses. Design the subblocks and find out how many addresses are still available after these allocations. Example 19.10
19.24 Solution Figure 19.9 shows the situation. Example (continued) Group 1 For this group, each customer needs 256 addresses. This means that 8 (log2 256) bits are needed to define each host. The prefix length is then 32 − 8 = 24. The addresses are
19.25 Example (continued) Group 2 For this group, each customer needs 128 addresses. This means that 7 (log2 128) bits are needed to define each host. The prefix length is then 32 − 7 = 25. The addresses are
19.26 Example (continued) Group 3 For this group, each customer needs 64 addresses. This means that 6 (log 2 64) bits are needed to each host. The prefix length is then 32 − 6 = 26. The addresses are Number of granted addresses to the ISP: 65,536 Number of allocated addresses by the ISP: 40,960 Number of available addresses: 24,576
19.27 Figure 19.9 An example of address allocation and distribution by an ISP
19.28 Private Address The private addresses are not recognized in the global Internet. IP private addresses can only be used in local networks. The blocks of IP private addresses ~ ~ ~ The local sites with private addresses can be connected to the global Internet through NAT.
19.29 Figure A NAT implementation
19.30 Figure Addresses in a NAT
19.31 Figure NAT address translation
19.32 Table 19.4 Five-column translation table
19.33 An IPv6 address is 128 bits long. Note
19.34 Figure IPv6 address in binary and hexadecimal colon notation
19.35 Figure Abbreviated IPv6 addresses
19.36 Figure Prefixes for provider-based unicast address