1 / 53

IP- adresses and subnet masks

IP- adresses and subnet masks. Figure 19.9 Dotted-decimal notation. IP addresses. 32-bit address i today’s IP version 4 (IPv4). 128-bit in IPv6. Exampel of IP addres: 1100 0001 0000 1100 0101 1011 0001 1111 2 binary form. At punctured decimal form this is 193.12.91.31.

avilaj
Download Presentation

IP- adresses and subnet masks

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-adresses and subnet masks

  2. Figure 19.9Dotted-decimal notation

  3. IP addresses • 32-bit address i today’s IP version 4 (IPv4). • 128-bit in IPv6. • Exampel of IP addres: 1100 0001 0000 1100 0101 1011 0001 11112 binary form. • At punctured decimal form this is 193.12.91.31. • Using hexadecimal form this is C10C5B1F.

  4. Example 1 Change the following IP addresses from binary notation to dotted-decimal notation. a. 10000001 00001011 00001011 11101111 b. 11111001 10011011 11111011 00001111

  5. Example 1 Change the following IP addresses from binary notation to dotted-decimal notation. a. 10000001 00001011 00001011 11101111 b. 11111001 10011011 11111011 00001111 Solution We replace each group of 8 bits with its equivalent decimal number and add dots for separation: a. 129.11.11.239 b. 249.155.251.15

  6. Example 2 Change the following IP addresses from dotted-decimal notation to binary notation. a. 111.56.45.78 b. 75.45.34.78

  7. Example 2 Change the following IP addresses from dotted-decimal notation to binary notation. a. 111.56.45.78 b. 75.45.34.78 Solution We replace each decimal number with its binary equivalent: a. 01101111 00111000 00101101 01001110 b. 01001011 00101101 00100010 01001110

  8. A Hierarchical Addressing • Physical network address – A part used by the router • Host address – Specific device, node or network interface on the physical network network node 3.1 1 1 2 3 1.1 1.2 1.3 2.1 An example of hierarchical addressing 2 1 3 1

  9. Note: In classful addressing, the address space is divided into five classes: A, B, C, D, and E.

  10. Figure 9.5 IP address formats and classes

  11. Figure 19.10Finding the class in binary notation

  12. Figure 19.11Finding the address class

  13. Example 3 Find the class of each address: a. 00000001 00001011 00001011 11101111 b. 11110011 10011011 11111011 00001111

  14. Example 3 Find the class of each address: a. 00000001 00001011 00001011 11101111 b. 11110011 10011011 11111011 00001111 Solution a. The first bit is 0; this is a class A address. b. The first 4 bits are 1s; this is a class E address.

  15. Figure 19.12Finding the class in decimal notation

  16. Example 4 Find the class of each address: a.227.12.14.87 b.252.5.15.111 c.134.11.78.56

  17. Example 4 Find the class of each address: a.227.12.14.87 b.252.5.15.111 c.134.11.78.56 Solution a. The first byte is 227 (between 224 and 239); the class is D. b. The first byte is 252 (between 240 and 255); the class is E. c. The first byte is 134 (between 128 and 191); the class is B.

  18. Figure 19.13Netid and hostid

  19. Figure 19.14Blocks in class A

  20. Figure 19.15Blocks in class B

  21. Figure 19.16Blocks in class C

  22. Figure 19.17Network address

  23. Figure 19.13Number of hosts and networks N bit host ID allows 2N addresses, or 2N-2 hosts in the network. The first address (the network address) and the last address (the broadcast address) are future addresses can not be used as host addresses. M free bit net ID allows 2M networks.

  24. Example 5 Given the address 23.56.7.91, find the network address.

  25. Example 5 Given the address 23.56.7.91, find the network address. Solution The class is A. Only the first byte defines the netid. We can find the network address by replacing the hostid bytes (56.7.91) with 0s. Therefore, the network address is 23.0.0.0.

  26. Example 6 Given the address 132.6.17.85, find the network address.

  27. Example 6 Given the address 132.6.17.85, find the broadcast address. Solution The class is B. The first 2 bytes defines the netid. We can find the network address by replacing the hostid bytes (17.85) with 1s. Therefore, the broadcast address is 132.6.255.255.

  28. Example 7 Given the network address 17.0.0.0, find the class.

  29. Example 7 Given the network address 17.0.0.0, find the class. Solution The class is A because the netid is only 1 byte.

  30. Class-less addresses • Today subnetting and classless addresses are used instead of class-ful addressing. • Then a network can be devided into several subnets, each corresponding to a physical network. Arbitrary number of host-bits can be used. • A 0 in the subnet mask means that the corresponding bit in the address belongs to the host-ID, and a 1 that it belongs to the Net ID or subnet ID. • Example: Subnet mask 255.255.0.0 = FFFF0000 (sixteen ones and sixteen zeros) means that the first 16 bits in the i IP-adressen are Net-ID or subnet ID, the rest are Host-ID.

  31. Example: Network addresses 192.16.4.0 192.16.4.3 172.16.4.255 192.16.4.1 192.16.4.2 192.16.4.255 192.16.5.0 192.16.5.3 192.16.5.1 192.16.5.2 172.16.5.255 192.16.5.255 192.16.3.0 192.16.3.5 172.16.3.255 192.16.3.3 192.16.3.1 192.16.3.2 192.16.3.4 192.16.3.255 Host addresses Broadcast addresses The mask is 255.255.255.0 for all hosts

  32. Figure 19.23Subnet mask

  33. Figure 19.21Addresses in a network with and without subnetting

  34. Table 19.1 Default masks

  35. Note: The network address can be foundby applying the default mask to anyaddress in the block (including itself).It retains the netid of the block and sets the hostid to 0s.

  36. Example 8 A router outside the organization receives a packet with destination address 190.240.7.91. Show how it finds the network address to route the packet.

  37. Example 8 A router outside the organization receives a packet with destination address 190.240.7.91. Show how it finds the network address to route the packet. Solution • The router follows three steps: • The router looks at the first byte of the address to find the class. It is class B. • The default mask for class B is 255.255.0.0. The router ANDs this mask with the address to get 190.240.0.0. • The router looks in its routing table to find out how to route the packet to this destination. Later, we will see what happens if this destination does not exist.

  38. Example 9 A router inside the organization receives the same packet with destination address 190.240.33.91. Show how it finds the subnetwork address to route the packet. Solution • The router follows three steps: • The router must know the mask. We assume it is /19, as shown in Figure 19.23. • The router applies the mask to the address, 190.240.33.91. The subnet address is 190.240.32.0. • The router looks in its routing table to find how to route the packet to this destination. Later, we will see what happens if this destination does not exist.

  39. Broadcast IP address • Broadcast IP address is used when information needs to be sent to all the hosts on the same network • Convenient in broadcast networks (such as Ethernet) • Broadcast IP address is obtained when host bits are replaced by 1s.

  40. Unicast, Multicast and Reserved Addresses • Unicast address is used for one-to-one communication • Multicast address is used for one-to-many communication (group communication) – D class • Reserved addresses – Besides the addresses in class E reserved addresses are: • Network addresses – all host bits are 0 • Broadcast addresses – all host bits are 1 • All network part 0 – host on this network • 127.0.0.0 mask 255.0.0.0 and all host addresses on this network are reserved for testing purposes. 127.0.0.1 = localhost. • 0.0.0.0 – default route

  41. Figure 19.25NAT

  42. Figure 19.26Address translation

  43. Figure 19.27Translation

  44. Table 19.3 Five-column translation table

  45. Table 19.2 Address ranges reserved for private NAT addresses

  46. Useful Programs • These programs use ICMP to probe the Internet • ping • Sends packets that is echoed by remote computer • Remote computer replies with echo packet • Local computer reports receipt of reply • traceroute • Reports path to remote computer • Sends packets to the destination starting with TTL=1 • Each successive packet identifies next router along path • Reports list of packets • ipconfig – shows network configuration info • Displays all configuration information

  47. Ping - Example Four packets are sent. Each has different round-trip time (RTT). Why? Minimum, Maximum and average are also given.

  48. Round-trip Time (RTT) • Time for the packet to be sent and acknowledgement to come back to the sender • Why the packets have different RTT? • They might travel different paths • The load in some of the routers might be high. Therefore packet’s waiting time at the routers can be different. • Ping also shows the percentage of lost packets.

  49. Traceroute - Example The source is sending three packets with TTL=1, then another three with TTL=2 and so on until TTL is by one bigger then the number of hops. A response is thus obtained from each hop where the packets are dropped. RTT for each packet is presented.

  50. VisualRoute • A program that displays visually (on a map) traceroute • Trial version can be obtained free from www.visualroute.com

More Related