1 / 32

4.3 Network Layer Logical Addressing

4.3 Network Layer Logical Addressing. communication at the network layer, is a host-to-host (computer-to-computer) communication – a host communicate with another host somewhere in the world for that, a global addressing scheme is necessary

fcrook
Download Presentation

4.3 Network Layer Logical Addressing

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. 4.3 Network Layer Logical Addressing • communication at the network layer, is a host-to-host (computer-to-computer) communication – a host communicate with another host somewhere in the world • for that, a global addressing scheme is necessary • logical addressing at network layer (TCP/IP suite) = IP address • there are current two version of IP addressing • IPv4 : IP version 4 • IPv6 : IP version 6 • IPv4 is a 32 bits long address that uniquely and universally defines the address of the host in the internet • no two device on the internet can have the same IP address at the same time • a device operating at the network layer has m connections to the internet, needs to have m address BENG 4522 Data Communications & Computer Networks

  2. 4.3 Network Layer Logical Addressing - Intro • Address space • an address space is the total number of addresses used by the protocol • Ex : IPv4 is a 32 bits long address, so the total address space is 232 or 4,294,967,296 (more than 4 billions) • Address notation • Binary notation – 01110101 10010101 00011101 00000010 • Dotted-Decimal Notation – 117.149.29.2 BENG 4522 Data Communications & Computer Networks

  3. 4.3.1 Classful Addressing • IPv4 addressing use the concept of classes • currently becoming obselete • in classful addressing, the address space is divided into 5 classes : A, B, C, D, E • each class occupies some part of the address space BENG 4522 Data Communications & Computer Networks

  4. 4.3.1 Classful Addressing • Classes and Blocks • each class is divided into a fixed number of blocks with each block having a fixed • Class A address – assigned for large organizations with large number of host/route • Class B address – midsize organization with tens of thousands host • Class C address – small organizations with small number of hosts • Class D address – multicasting • Class E address – future use BENG 4522 Data Communications & Computer Networks

  5. 4.3.1 Classful Addressing • What wrong with classes and blocks ? • large part of the available addresses were wasted • class A address is two large for any organization – most were wasted and not used • class B – still too large for most organizations • class C – too small for many organization • class D – Internet authorities wrongly predicted (never happened) • class E – only a few were used. BENG 4522 Data Communications & Computer Networks

  6. 4.3.1 Classful Addressing • Netid and HostId • in classful addressing, IP address in Class A, B and C is devided into netid and hostid. • varying length, depending on the class of the address. • netid shows which network the host belongs to BENG 4522 Data Communications & Computer Networks

  7. 4.3.1 Classful Addressing • Mask • is a 32 bits number made of contiguous 1s (together in sequence), followed by contiguous 0s. • does not apply for class D and E. • a mask can be used to find the netid and hostid • Ex : the mask for a class A address has eight 1s, means the first byte of any address in class A define the netid, the next 24 bits define the hostid. BENG 4522 Data Communications & Computer Networks

  8. 4.3.1 Classful Addressing • Slash Notation • Also known as CIDR (Classless Inter Domain Routing) notation • A.B.C.D/n : n is the number of contiguous 1s in the mask • Ex : 10.2.1.34/24 :mask for this address is 11111111 11111111 11111111 00000000 • For classful addressing the normal value is 8, 16 and 24 • Address Depletion • the flaws in the classful addressing scheme + fast growth of internet led to the near depletion of the available address • class A and B addresses are almost run out, and class C addresses are too small for most midsize organizations. • as a solution – classless addressing BENG 4522 Data Communications & Computer Networks

  9. 4.3.2 Classless Addressing • created to overcome the address depletion in classful addressing • more address means more computers/network/organizations can join the internet • addresses are granted in blocks • Address blocks • an organization (small or large) is granted a block (range) of address • size of the block (number of address) is based on the size of the entity • Restriction in block addressing • address in a block must be contiguous, one after another • the number of address in a block must be a power of 2 (1, 2, 4, 8, ....) • the first address must be evenly divisible by the number of address BENG 4522 Data Communications & Computer Networks

  10. 4.3.2 Classless Addressing • Restriction in block addressing (Ex :) • Mask • a mask is a 32 bits number in which the n leftmost bits are 1s and the 32-n rightmost bits are 0s. • in classless the mask for a block of address can take any value from 0 to 32 • normally written in slash (CIDR) notation BENG 4522 Data Communications & Computer Networks

  11. 4.3.2 Classless Addressing • Mask • Searching for the first address in a block of addresses BENG 4522 Data Communications & Computer Networks

  12. 4.3.2 Classless Addressing • Searching for the first address in a block of addresses • Ex : A block of addresses is granted to a small organization. We know that one of the addresses is 205.16.37.39/28. What is the first address in the block? 11001101 00010000 00100101 00100111 BENG 4522 Data Communications & Computer Networks

  13. 4.3.2 Classless Addressing • Searching for last address in a block of addresses • Ex : A block of addresses is granted to a small organization. We know that one of the addresses is 205.16.37.39/28. What is the last address in the block? BENG 4522 Data Communications & Computer Networks

  14. 4.3.2 Classless Addressing • Number of addresses in a block • the number of addresses in the block is the difference between the last and the first address • Ex : (from the previous example) BENG 4522 Data Communications & Computer Networks

  15. 4.3.2 Classless Addressing • Another method of finding the first, last & number of address in a block • Ex : given one of the address in the block is 205.16.37.39/28 (same as previous example) 1. represent the mask as a 32 bits binary number 2. first address can be found by ANDing the mask with the address 3. the last address can be found by ORing the mask complement with the address 4. the number of address can be found by complementing the mask, change it as a decimal number and add 1 to it. BENG 4522 Data Communications & Computer Networks

  16. 4.3.3 Network Addresses • when an organization is given a block of addresses, the organization is free to allocate the addresses to the devices that need to be connected to the internet • the first address in the block is normally (not always) not assigned to any device in the network • the first address is called as the network address and defines the organization network BENG 4522 Data Communications & Computer Networks

  17. 4.3.3 Network Addresses BENG 4522 Data Communications & Computer Networks

  18. 4.3.4 IP Sub-networking (Subnetting) • what actually first address means in the network ? • first address = network address • last address = broadcast address • number of valid address in a block = number of available – network address – broadcast address • network can be divided into smaller sub-net • first address in the subnet = subnet address • last address in the subnet = subnet broadcast address BENG 4522 Data Communications & Computer Networks

  19. 4.3.4 IP Sub-networking (Subnetting) • a single IP class A, B or C network is further divided into a group of hosts to form a sub-network • Advantages : • manageability • performance • security of hosts • reduce network congestion • subnet IP address • IP address that becomes the sub-network address (subnet address) of that sub-network • subnet broadcast IP address • IP address that is use to broadcast to all hosts in the sub-network BENG 4522 Data Communications & Computer Networks

  20. 4.3.4 IP Sub-networking • Ex : For a given IP address 82.34.10.22 and a subnet mask 255.255.255.240, answer the following. Pre-question : change the address to slash notation i) Determine the subnet IP address. ii) Determine the broadcast IP address. iii) Determine the valid address range of hosts IP addresses. iv) Determine the number of valid hosts for the subnet BENG 4522 Data Communications & Computer Networks

  21. 4.3.4 IP Sub-networking • Ex : Suppose an organization is given the block 17.12.40.0/26, which contains 64 addresses. The organizations has 3 offices and needs to divide the addresses into 3 sub-blocks (sub-network) of 32, 16 and 16 addresses. Find the new mask of every sub-network Answer : 1. the first subnet has 32 addresses, then 232-n must be 32, means n = 27 2. the second subnet has 16 addresses..... 3. the third subnet.... BENG 4522 Data Communications & Computer Networks

  22. 4.3.4 IP Sub-networking • Ex : example of subnetting 17.12.40.0/26 • Find each host subnet address ! BENG 4522 Data Communications & Computer Networks

  23. 4.3.4 IP Sub-networking • Ex : An ISP is granted a block of addresses starting with 190.100.0.0/16 (65,536 addresses). The ISP needs to distribute these addresses to 3 groups as follows : • 1st group has 64 customers, each needs 256 addresses • 2nd group has 128 customers, each needs 128 addresses • 3rd group has 128 customers, each needs 64 address Design the subblocks and find how many addresses are still available after all these allocation. BENG 4522 Data Communications & Computer Networks

  24. 4.3.5 Network Address Translation • increasing number of home users/small businesses using the internet • an ISP with a block of address could dynamically assign an address to these users for a specific period of time • but currently most of the home users/small businesses need more than one address as many have created a small network with several hosts where every hosts need an IP address • lead to a shortage of address problem • as a solution – Network Address Translation (NAT) • NAT enables users to have a large set of address internally and one address (or a small set of addresses) externally • traffic inside use the internal large set, while traffic outside use external small set BENG 4522 Data Communications & Computer Networks

  25. 4.3.5 Network Address Translation • to separate the addresses used inside the home or business and the one used for the Internet, the internet Authorities have reserved 3 sets of address as private addresses : • any organization can use an address out of this set without permission from the Internet authorities • unique inside the organization, but not unique globally BENG 4522 Data Communications & Computer Networks

  26. 4.3.5 Network Address Translation • the site must have only one single connection to the global Internet through a router to run the NAT software BENG 4522 Data Communications & Computer Networks

  27. 4.3.5 Network Address Translation • Address translation • all the outgoing packets go through the NAT router, which replaces the source address in the packet with the global NAT address. • all the incoming packets also pass through the NAT router, which replaces the destination address in the packet with the appropriate private address BENG 4522 Data Communications & Computer Networks

  28. 4.3.5 Network Address Translation • Translation Table • NAT router has a translation table to forward the packets to the private addresses in the network 1. Using one IP address 2. Using a Pool of IP address 3. Using both IP addresses and port numbers BENG 4522 Data Communications & Computer Networks

  29. 4.3.5 Network Address Translation • Using one IP address BENG 4522 Data Communications & Computer Networks

  30. 4.3.5 Network Address Translation • Using a Pool of IP Addresses • since the NAT router has only one global address, only one private network host can access the same external host • to remove this restriction, the NAT router uses a poll of global address • ex : instead of using only one global address (200.24.5.8), the NAT router can use 4 addresses (200.24.5.8, 200.24.5.9, 200.24.5.10 and 200.24.5.11) • 4 private hosts can connect with the same eternal hosts at the same time • no private network host can access two external server programs (HTTP and FTP) at the same time BENG 4522 Data Communications & Computer Networks

  31. 4.3.5 Network Address Translation • Using both IP Addresses and port numbers • allow a many-to-many relationship between private-network hosts and external server programs, port number is included at the translation table • ex : suppose two hosts with addresses 172.18.3.1 and 172.18.3.2 inside the private network need to access the HTTP server on external host 25.8.3.2 BENG 4522 Data Communications & Computer Networks

  32. 4.3.5 Network Address Translation • NAT and ISP • ISP that serves dial-up customers can use NAT technology to conserve addresses • ex : suppose an ISP is granted 1000 addresses, but has 100,000 customers. • the ISP translates each of the 100,000 private addresses to one of the 1000 global addresses in the outgoing packets BENG 4522 Data Communications & Computer Networks

More Related