1 / 104

Unit –6 Network Layer: Logical Addressing

Unit –6 Network Layer: Logical Addressing. Overview. Ipv4 addresses Ipv6 addresses. ADDRESSING. Four levels of addresses are used in an internet employing the TCP/IP protocols: physical, logical, port, and specific. Physical Addressing.

kgillard
Télécharger la présentation

Unit –6 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. Unit –6 Network Layer: Logical Addressing

  2. Overview • Ipv4 addresses • Ipv6 addresses

  3. ADDRESSING Four levels of addresses are used in an internet employing the TCP/IP protocols: physical, logical, port, and specific.

  4. Physical Addressing • A network adapter has a unique and permanent physical address. • A Physical address is also called MAC address is a 48-bit flat address burned into the ROM of the NIC (Network Interface Card) card at the factory which is a Layer1 device of the OSI model. • On a local area network, low-lying hardware-conscious protocols deliver data across the physical network using the adapter's physical address. • On a basic ethernet network, for example, a computer sends messages directly onto the transmission medium. • The network adapter of each computer listens to every transmission on the local network to determine whether a message is addressed to its own physical address.

  5. Physical Addressing

  6. Logical Addressing • A Logical address also called IP address is a 32- bit address assigned to each system in a network. • This works in Layer-3 of OSI Model. • This would be generally the IP address.

  7. Logical Addressing

  8. Logical Addressing

  9. Logical Addressing

  10. Logical Addressing

  11. IP Addresses

  12. The physical addresses will change from hop to hop, but the logical addresses usually remain the same.

  13. Port Address A single wire connects the network to the distant computer, but there may be many applications on that machine-a web server, an ftp server, a telnet server, etc.-waiting for somebody to connect. So the question arises: How do you use one wire and one IP address to connect to the right application? The answer: Ports. Port address is transport layer ID (similar to IP in NetworkLayer) which identify the application on the host. A port address is a 16-bit address represented by one decimal number as shown.

  14. IPv4 ADDRESSES

  15. IPv4 ADDRESSES An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a device (for example, a computer or a router) to the Internet. • Address Space Notations • Classful Addressing • Classless Addressing • Network Address Translation (NAT)

  16. IPv4 ADDRESSES • IPv4 protocol address has an address space • An address is the total number of addresses used by the protocol. • If a protocol uses N bits to define an address the address space is 2N value. • Notations • Binary Notation and Dotted Decimal Notation • Binary Notation: 32 bits are used each octet is referred as byte, 4 byte address • Dotted Decimal Notation: Written in Decimal point and each byte is separated by dots.

  17. IPv4 ADDRESSES An IPv4 address is 32 bits long. The IPv4 addresses are unique and universal. • An IP address is a 32-bit sequence of 1s and 0s. • To make the IP address easier to use, the address is usually written as four decimal numbers separated by periods. • This way of writing the address is called the dotted decimal format. The address space of IPv4 is 232 or 4,294,967,296.

  18. Classful Addressing

  19. Internet Addresses (IP Addresses) • Defined when IP was standardized in 1981 • IP addresses are 32-bit long and consist of: • a network address part – network identifier • a host address part – host number within that network • IP addresses are grouped into classes (A,B,C) depending on the size of the network identifier and the host part of the address • A fourth class (Class D) was defined later (1988) for Multicast addresses

  20. Internet Address Classes • Class A • 126 networks (0 and 127 reserved) (1 byte starts from but MSB bit is always 0) • Assigned to very large size networks where number of hosts 65K to16M • Class B • 16384 networks • Assigned to Intermediate size networks where number of hosts 256 to 65K • Class C • 2097152 networks • Assigned to smaller networks where #hosts < 256

  21. Finding the classes in binary and dotted-decimal notation Number of blocks and block size in classful IPv4 addressing

  22. IP addresses are divided into classes A,B and C to define large, medium, and small networks. The Class D address was created to enable multicasting. IETF reserves Class E addresses for its own research. Every IP address has two parts: • Network • Host

  23. Reserved IP ADDRESSES • Certain host addresses are reserved and cannot be assigned to devices on a network. • An IP address that has binary 0s in all host bit positions is reserved for the network address. • An IP address that has binary 1s in all host bit positions is reserved for the broadcast address.

  24. Example Change the following IPv4 addresses from binary notation to dotted-decimal notation. Solution

  25. Example Change the following IPv4 addresses from dotted-decimal notation to binary notation. Solution

  26. Example Find the error, if any, in the following IPv4 addresses. Solution a. There must be no leading zero (045). b. There can be no more than four numbers. c. Each number needs to be less than or equal to 255. d. A mixture of binary notation and dotted-decimal notation is not allowed.

  27. Example Find the class of each address. a. 00000001 00001011 00001011 11101111 b. 11000001 10000011 00011011 11111111 c. 14.23.120.8 d. 252.5.15.111 Solution a. The first bit is 0. This is a class A address. b. The first 2 bits are 1; the third bit is 0. This is a class C address. c. The first byte is 14; the class is A. d. The first byte is 252; the class is E.

  28. Netid and Hostid • Netid and Hostid • In classful addressing an IP address in class A,B, C is divided into netid and hostid • In class A one byte defines the netid and 3 bytes defines the host ID • In class B 2 byte defines the netid and 2 bytes defines the host ID • In class C 3 byte defines the netid and 1 bytes defines the host ID

  29. Mask • Mask • The mask helps to find the netid and hostid • In class A first 8 bits defines the netid; the next 24 bits hostid, hence in this first 8 are 1s. • /n i.e 8 or 16 or 24 shows the mask for each class. • This /n notation is called Classless Interdomain Routing (CIDR) Default masks for classful addressing

  30. Subnets

  31. Problems with Classes • Class A usually too big • Class C often too small • Not enough Class Bs • Inefficient utilisation of address space • Solution: Extending the network part of the address: Subnetting In classful addressing, a large part of the available addresses were wasted.

  32. Subnetting Subnets . A campus network consisting of LANs for various departments

  33. Subnetting Subnet Mask • Subnet masks are applied to an IP address to identify the Network portion and the Host portion of the address. • A bitwise logical AND operation between the address and the subnet mask s performed in order to find the Network Address or number. • Default Subnet Masks • Class A - 255.0.0.0 • 11111111.00000000.00000000.00000000 • Class B - 255.255.0.0 • 11111111.11111111.00000000.00000000 • Class C - 255.255.255.0 • 11111111.11111111.11111111.00000000

  34. Subnetting Logical Bitwise AND Operation • Example • 140.179.240.200 • It’s a Class B, so the subnet mask is: • 255.255.0.0 In Binary: 10001100.10110011.11110000.11001000 11111111.11111111.00000000.00000000 10001100.10110011.00000000.00000000 By doing this, the computer has found that Network Address is 140.179.0.0

  35. Subnetting Another Example: Suppose we have the address of: 206.15.143.89? What class is it? Class C What is the subnet mask? 255.255.255.0 What is the Network Address? 206.15.143.0 What is the host portion of the address? 0.0.0.89

  36. Subnetting • You can manipulate your subnet mask in order to create more network addresses. • If you have a Class C network, how many individual host addresses can you have? • 1 to 254 • Remember, you can’t have all “0”s and all “1”s in the host portion of the address (Reserved address). • So we cannot use 206.25.143.0 (all “0”s) or 206.25.143.255 (all “1”s) as a host address.\ • Remember, an address of all “0”s or all “1”s cannot be used in the last octet (or host portion). All “0”s signify the Network Address and all “1”s signify the broadcast address

  37. Subnetting Example • We have 1 Class C Network (206.15.143.0) • And we have 254 host address (1 to 254) • But what if our LAN has 5 networks in it and each network has no more than 30 hosts on it? • Do we apply for 4 more Class C licenses, so we have one for each network? • We would be wasting 224 addresses on each network, a total of 1120 addresses

  38. Subnetting • Subnetting is a way of taking an existing class license and breaking it down to create more Network Addresses. • This will always reduce the number of host addresses for a given network. • Subnetting makes more efficient use of the address.

  39. Subnetting How Does Subnetting Work? • Additional bits can be added (changed from 0 to 1) to the subnet mask to further subnet, or breakdown, a network. • When the logical AND is done by the computer, the result will give it a new Network (or Subnet) Address.

  40. Subnetting • We ask our ISP for a Class C license. • They give us the Class C bank of 206.15.143.0 • This gives us 1 Network (206.15.143.0) with the potential for 254 host addresses (206.15.143.1 to 206.15.143.254). • But we have a LAN made up of 5 Networks with the largest one serving 25 hosts. • So we need to Subnet our 1 IP address...

  41. Subnetting So How Does This Work? • To calculate the number of subnets (networks) and/or hosts, we need to do some math: • Use the formula 2n-2 where the n can represent either how many subnets (networks) needed OR how many hosts per subnet needed (where -2 is 000000000 and 11111111 addresses are not used).

  42. Subnetting So How Does This Work? • We know we need at least 5 subnets. So 23-2 will give us 6 subnet addresses (Network Addresses). • We know we need at least 25 hosts per network. 25-2 will give us 30 hosts per subnet (network). • This will work, because we can steal the first 3 bits from the host’s portion of the address to give to the network portion and still have 5 (8-3) left for the host portion:

  43. Subnetting Break it down: • Let’s go back to what portion is what: We have a Class C address: NNNNNNNN.NNNNNNNN.NNNNNNNN.HHHHHHHH With a Subnet mask of: 11111111.11111111.11111111.00000000 We need to steal3 bits from the host portion to give it to the Network portion: NNNNNNNN.NNNNNNNN.NNNNNNNN.NNNHHHHH

  44. Subnetting Break it down: NNNNNNNN.NNNNNNNN.NNNNNNNN.NNNHHHHH This will change our subnet mask to the following: 11111111.11111111.11111111.11100000 • Above is how the computer will see our new subnet mask, but we need to express it in decimal form as well: 255.255.255.224 128+64+32=224

  45. Subnetting What address is what? • Which of our 254 addresses will be a Subnet (or Network) address and which will be our host addresses? • Because we are using the first 3 bits for our subnet mask, we can configure them into eight different ways (binary form):

  46. Subnetting What address is what? • Which of our 254 addresses will be a Subnet (or Network) address and which will be our host addresses? • Because we are using the first 3 bits for our subnet mask, we can configure them into eight different ways (binary form): 000 001 010 011 100 101 110 111

  47. Subnetting What address is what? • We cannot use all “0”s or all “1”s 000 001 010 011 100 101 110 111 • We are left with 6 useable network numbers.

  48. Subnetting Network (Subnet) Addresses Remember our values: 128 64 32 16 8 4 2 1 Equals Now our 3 bit configurations: 0 0 1H H H H H 32 0 1 0H H H H H 64 0 1 1H H H H H 96 1 0 0H H H H H 128 1 0 1H H H H H 160 1 1 0H H H H H 192

  49. Subnetting Network (Subnet) Addresses 0 0 1h h h h h 32 0 1 0h h h h h 64 0 1 1h h h h h 96 1 0 0h h h h h 128 1 0 1h h h h h 160 1 1 0h h h h h 192 Each of these numbers becomes the Network Address of their subnet...

  50. Subnetting Network (Subnet) Addresses 206.15.143.32 206.15.143.64 206.15.143.96 206.15.143.128 206.15.143.160 206.15.143.192

More Related