ip addressing

168
April 26, 2022 April 26, 2022 BMK, AKGEC, Ghaziabad BMK, AKGEC, Ghaziabad 1 Computer Networks Computer Networks (ECS - 601) (ECS - 601) BM Kalra BM Kalra Professor and HoD Professor and HoD Computer Science and Engineering Computer Science and Engineering Ajay Kumar Garg Engineering College, Ghaziabad Ajay Kumar Garg Engineering College, Ghaziabad

Upload: anandita

Post on 17-Aug-2015

17 views

Category:

Documents


0 download

TRANSCRIPT

  1. 1. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 11 Computer NetworksComputer Networks (ECS - 601)(ECS - 601) BM KalraBM Kalra Professor and HoDProfessor and HoD Computer Science and EngineeringComputer Science and Engineering Ajay Kumar Garg Engineering College, GhaziabadAjay Kumar Garg Engineering College, Ghaziabad
  2. 2. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 22 Lecture 33Lecture 33 (20 Mar 2015)(20 Mar 2015) Network LayerNetwork Layer AddressingAddressing
  3. 3. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 33 OSI Model - Summary of layersOSI Model - Summary of layers
  4. 4. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 44 Network LayerNetwork Layer Responsible for source to destination delivery data link layerResponsible for source to destination delivery data link layer oversees the delivery of packet between two systems on the sameoversees the delivery of packet between two systems on the same network (link)network (link) To provide internetworking to move the packet through differentTo provide internetworking to move the packet through different networksnetworks Provides logical addressing IP Address network layer adds aProvides logical addressing IP Address network layer adds a header that includes the logical addresses of the sender and theheader that includes the logical addresses of the sender and the receiverreceiver Uses IP in TCP/IP protocol suiteUses IP in TCP/IP protocol suite Delivery of individual packets from the source to the destination hostDelivery of individual packets from the source to the destination host A delivery mechanism used by TCP/UDPA delivery mechanism used by TCP/UDP unreliable and connectionless datagram protocolunreliable and connectionless datagram protocol provides a best effort delivery serviceprovides a best effort delivery service Provides no error control or flow controlProvides no error control or flow control Only provides error detectionOnly provides error detection IP supporting protocolsIP supporting protocols ARP Address Resolution ProtocolARP Address Resolution Protocol RARP Reverse Address Resolution ProtocolRARP Reverse Address Resolution Protocol ICMP Internet Control Message ProtocolICMP Internet Control Message Protocol IGMP Internet Group Message ProtocolIGMP Internet Group Message Protocol
  5. 5. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 55 Links Between Two HostsLinks Between Two Hosts
  6. 6. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 66 Network layer in anNetwork layer in an internetworkinternetwork
  7. 7. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 77 Network Layer at Source &Network Layer at Source & DestinationDestination
  8. 8. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 88 Network Layer at the RouterNetwork Layer at the Router
  9. 9. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 99 AddressingAddressing
  10. 10. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 1010 AddressesAddresses AnalogyAnalogy If you want to know any info about me fromIf you want to know any info about me from somebody or want to send some info to mesomebody or want to send some info to me How do you identify me?How do you identify me? What is my identity?What is my identity? My NameMy Name My AddressMy Address To send information on the net-To send information on the net- whom to send?whom to send? How do you identify a machine onHow do you identify a machine on the network?the network?
  11. 11. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 1111 AddressesAddresses FlatFlat voter-idvoter-id i-card numbersi-card numbers HierarchicalHierarchical Postal PIN numbersPostal PIN numbers International telephone numberingInternational telephone numbering schemescheme What is a MAC address?What is a MAC address?
  12. 12. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 1212 Flat AddressingFlat Addressing In a flat routing infrastructure, each network ID isIn a flat routing infrastructure, each network ID is represented individually in the routing table.represented individually in the routing table. The network IDs have no network/subnet structureThe network IDs have no network/subnet structure and cannot be summarized.and cannot be summarized. RIP-based IPX internetworks use flat networkRIP-based IPX internetworks use flat network addressing and have a flat routing infrastructure.addressing and have a flat routing infrastructure. .
  13. 13. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 1313 IP Address HierarchyIP Address Hierarchy Does a telephone switch in California know howDoes a telephone switch in California know how to reach a specific phone in Virginia?to reach a specific phone in Virginia? (1-703-555-1212)(1-703-555-1212)
  14. 14. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 1414 IP Address HierarchyIP Address Hierarchy Does a telephone switch in California know howDoes a telephone switch in California know how to reach a specific phone in Virginia?to reach a specific phone in Virginia? (1-703-555-1212)(1-703-555-1212) Long (remote) distance Local office California Path to 1 (A number indicates destination is remote)
  15. 15. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 1515 Does a telephone switch in California know howDoes a telephone switch in California know how to reach a specific phone in Virginia?to reach a specific phone in Virginia? (1-703-555-1212)(1-703-555-1212) Long (remote) distance Long distance Virginia Path to 703 (An area code summarizes an area in VA) Local office California Path to 1 (A number indicates destination is remote) IP Address HierarchyIP Address Hierarchy
  16. 16. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 1616 Does a telephone switch in California know how toDoes a telephone switch in California know how to reach a specific phone in Virginia?reach a specific phone in Virginia? (1-703-555-1212)(1-703-555-1212) Long (remote) distance Long distance Virginia Path to 703 (An area code summarizes an area in VA) Path to 555 (A prefix summarizes a smaller area in VA) Local office Alexandria Local office California Path to 1 (A number indicates destination is remote) IP Address HierarchyIP Address Hierarchy
  17. 17. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 1717 Does a telephone switch in California know how to reach aDoes a telephone switch in California know how to reach a specific phone in Virginia?specific phone in Virginia? (1-703-555-1212)(1-703-555-1212) Long (Remote)- Distance Long-Distance Virginia Path to 703 (An Area Code Summarizes an Area in VA) Path to 555 (A Prefix Summarizes a Smaller Area in VA) Path to 1212 (Number) Local Office Alexandria Local Office Aunt JudyCalifornia Path to 1 (A Number Indicates Destination Is Remote) IP Address HierarchyIP Address Hierarchy
  18. 18. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 1818 Benefits of HierarchicalBenefits of Hierarchical AddressingAddressing Reduced number of route table entriesReduced number of route table entries Summarize multiple addresses into routeSummarize multiple addresses into route summariessummaries Efficient allocation of addressesEfficient allocation of addresses Contiguous address assignment allows you toContiguous address assignment allows you to use all possible addressesuse all possible addresses
  19. 19. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 1919 Hierarchical AddressingHierarchical Addressing groups of network IDs can be represented as a single routing table entry through route summarization The network IDs in a hierarchical internetwork have a network/subnet/sub-subnet structure A routing table entry for the highest level (the network) is also the route used for the subnets and sub-subnets of the network simplifes routing tables and lower the amount of routing information that is exchanged, but they require more planning IP implements hierarchical network addressing, and IP internetworks can have a hierarchical routing structure
  20. 20. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 2020 AddressesAddresses Each communication endpoint mustEach communication endpoint must have an address.have an address. Consider 2 processesConsider 2 processes communicating over an internet:communicating over an internet: the network must be specifiedthe network must be specified the host must be specifiedthe host must be specified the process must be specified.the process must be specified.
  21. 21. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 2121 AddressesAddresses Physical LayerPhysical Layer: no address necessary: no address necessary Data Link LayerData Link Layer - address must be able to- address must be able to select any host on the network.select any host on the network. Network LayerNetwork Layer - address must be able to- address must be able to provide information to enable routing.provide information to enable routing. Transport LayerTransport Layer - address must identify the- address must identify the destination process.destination process.
  22. 22. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 2222 Addresses in TCP/IPAddresses in TCP/IP
  23. 23. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 2323 AddressesAddresses Three typesThree types Port AddressPort Address Layer 4 addressLayer 4 address For running different applicationsFor running different applications Logical AddressLogical Address Layer3 addressLayer3 address IP address and it is set by the operating systemIP address and it is set by the operating system Changes with location changeChanges with location change Physical AddressPhysical Address Layer2 addressLayer2 address MAC addressMAC address generated by the manufacturergenerated by the manufacturer The MAC address is unique In a Local Area Network (LAN)The MAC address is unique In a Local Area Network (LAN) Fixed does not changeFixed does not change
  24. 24. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 2424 Logical & Physical AddressesLogical & Physical Addresses AnalogyAnalogy My Name: Physical AddressMy Name: Physical Address My Home Address: Logical AddressMy Home Address: Logical Address
  25. 25. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 2525
  26. 26. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 2626 IPv4 AddressingIPv4 Addressing An IPv4 address is a 32-bit addressAn IPv4 address is a 32-bit address thatthat uniquelyuniquely andand universallyuniversally definesdefines the connection of a device (forthe connection of a device (for example, a computer or a router) toexample, a computer or a router) to the Internetthe Internet UniqueUnique two devices on the internet two devices on the internet can never have the same address at thecan never have the same address at the same timesame time UniversalUniversal addressing system must be addressing system must be accepted by any host that wants to beaccepted by any host that wants to be connected to the Internetconnected to the Internet
  27. 27. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 2727 IPv4 AddressingIPv4 Addressing Logical AddressLogical Address Layer3 AddressingLayer3 Addressing Example - IPv4/IPv6Example - IPv4/IPv6 IPv4 addresses are unique & universalIPv4 addresses are unique & universal Two Level Hierarchical AddressingTwo Level Hierarchical Addressing Network id + Host idNetwork id + Host id IPv4 32 bit addressing systemIPv4 32 bit addressing system 223232 = 4,294,967,296(more than 4 Billion IP Addresses)= 4,294,967,296(more than 4 Billion IP Addresses) Network IDNetwork ID (8 to 24 bits)(8 to 24 bits) Host IDHost ID (24 to 8 bits)(24 to 8 bits)
  28. 28. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 2828 IPv4 /Internet/Global /LogicalIPv4 /Internet/Global /Logical AddressAddress
  29. 29. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 2929 The IPv4 addresses are unique and universal. NoteNote
  30. 30. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 3030 The address space of IPv4 is 232 or 4,294,967,296 (more than 4 billion) NoteNote
  31. 31. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 3131 Layer 3 AddressesLayer 3 Addresses Network IDNetwork ID Assigned byAssigned by ARINARIN (www.arin.net)(www.arin.net) Identifies theIdentifies the network tonetwork to which a devicewhich a device is attached.is attached. May beMay be identified byidentified by one, two, orone, two, or three of thethree of the first threefirst three octets.octets. Host IDHost ID Assigned by aAssigned by a networknetwork administrator.administrator. Identifies the specificIdentifies the specific device on thatdevice on that network.network. May be identified byMay be identified by one, two, or three ofone, two, or three of the last three octets.the last three octets.
  32. 32. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 3232 IP Address: NotationIP Address: Notation Binary NotationBinary Notation In binary notation, the IPv4 address is displayed as 32 bits.In binary notation, the IPv4 address is displayed as 32 bits. Each octet is often referred to as a byte. So it is common to hear anEach octet is often referred to as a byte. So it is common to hear an IPv4 address referred to as a 32-bit address or a 4-byte address. (MACIPv4 address referred to as a 32-bit address or a 4-byte address. (MAC Address 6 bytes)Address 6 bytes) The following is an example of an IPv4 address in binary notation:The following is an example of an IPv4 address in binary notation: 01110101 10010101 00011101 0000001001110101 10010101 00011101 00000010 Dotted-Decimal NotationDotted-Decimal Notation To make the IPv4 address more compact and easier to read, InternetTo make the IPv4 address more compact and easier to read, Internet addresses are usually written in decimal form with a decimal pointaddresses are usually written in decimal form with a decimal point (dot) separating the bytes.(dot) separating the bytes. The following is the dotted-decimal notation of the above address:The following is the dotted-decimal notation of the above address: 117.149.29.2117.149.29.2 One octet 8 bitsOne octet 8 bits total numbers 2total numbers 288 =256 (0-255)=256 (0-255) So, highest number 255So, highest number 255
  33. 33. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 3333 Dotted-decimal notation andDotted-decimal notation and binary notation for an IPv4binary notation for an IPv4 addressaddress
  34. 34. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 3434 Dotted - Decimal NotationDotted - Decimal Notation Network layer addresses are 32 bits longNetwork layer addresses are 32 bits long 1000010010100011100000000001000110000100101000111000000000010001 This binary number can be divided into fourThis binary number can be divided into four octetsoctets 10000100 10100011 10000000 0001000110000100 10100011 10000000 00010001 Each octet (or byte) can be converted toEach octet (or byte) can be converted to decimal numberdecimal number 132 163 128 17132 163 128 17 Finally the address can be written in dottedFinally the address can be written in dotted decimal notationdecimal notation 132.163.128.17132.163.128.17
  35. 35. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 3535 Example 19.1Example 19.1 Change the following IPv4 addresses fromChange the following IPv4 addresses from binary notation to dotted-decimal notation.binary notation to dotted-decimal notation. SolutionSolution We replace each group of 8 bits with itsWe replace each group of 8 bits with its equivalent decimal number and add dots forequivalent decimal number and add dots for separation.separation.
  36. 36. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 3636 Example 19.2Example 19.2 Change the following IPv4 addresses fromChange the following IPv4 addresses from dotted-decimal notation to binary notation.dotted-decimal notation to binary notation. SolutionSolution We replace each decimal number with itsWe replace each decimal number with its binary equivalentbinary equivalent
  37. 37. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 3737 Example 19.3Example 19.3 Find the error, if any, in the following IPv4 addresses.Find the error, if any, in the following IPv4 addresses. a.a. 111.56.045.78111.56.045.78 b.b. 221.34.7.8.20221.34.7.8.20 c.c. 75.45.301.1475.45.301.14 d.d. 11100010.23.14.6711100010.23.14.67 SolutionSolution a.a. There must be no leading zero (There must be no leading zero (0045).45). b.b. There can be no more than four numbers.There can be no more than four numbers. c.c. Each number needs to be less than or equal to 255.Each number needs to be less than or equal to 255. d.d. A mixture of binary notation and dotted-decimalA mixture of binary notation and dotted-decimal notation is not allowed.notation is not allowed.
  38. 38. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 3939 Classful IP AddressesClassful IP Addresses Three major organizationsThree major organizations Large OrganizationLarge Organization with a largewith a large number of attached hosts or routersnumber of attached hosts or routers Midsize organizationMidsize organization with tens andwith tens and thousands of attached hosts orthousands of attached hosts or routersrouters Small organizationSmall organization with a smallwith a small number of attached hosts or routersnumber of attached hosts or routers
  39. 39. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 4040 In classful addressing, the address space is divided into five classes: A, B, C, D, and E. NoteNote
  40. 40. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 4141 Classful IP AddressesClassful IP Addresses Three major classesThree major classes Class AClass A: Small number of Networks: Small number of Networks Large number of hosts Large number of hosts Class BClass B: Medium number of: Medium number of Networks Medium number of hostsNetworks Medium number of hosts Class CClass C: Large number of Networks: Large number of Networks Small number of hosts Small number of hosts
  41. 41. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 4242 Classful IP AddressesClassful IP Addresses N NetworkN Network H HostH Host FirstFirst OctetOctet SecondSecond OctetOctet ThirdThird OctetOctet FourthFourth OctetOctet Class AClass A NN HH HH HH Class BClass B NN NN HH HH Class CClass C NN NN NN HH Class DClass D Class EClass E
  42. 42. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 4343 Classes Binary & DottedClasses Binary & Dotted DecimalDecimal Class D: for multicastingClass D: for multicasting Class E: for future/research useClass E: for future/research use
  43. 43. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 4444 First OctetFirst Octet Class AClass A 00 00000000000000 00 00 11111111111111 127127 Class BClass B 1010 000000000000 128128 1010 111111111111 191191 Class CClass C 110110 0000000000 192192 110110 1111111111 223223 Class D:Class D: MulticastMulticast 11101110 00000000 224224 11101110 11111111 239239 Class E:Class E: ExperimentalExperimental 11111111 00000000 240240 11111111 11111111 255255
  44. 44. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 4545 Address Class UsageAddress Class Usage AddressAddress classes A, B, and Cclasses A, B, and C are available forare available for Internet useInternet use Class DClass D addresses are used foraddresses are used for multicastingmulticasting Some Class D multicast addresses areSome Class D multicast addresses are used byused by routing protocolsrouting protocols OSPF224.0.0.5, 224.0.0.6OSPF224.0.0.5, 224.0.0.6 RIPv2224.0.0.9RIPv2224.0.0.9 EIGRP224.0.0.10EIGRP224.0.0.10 Other Class D multicast addresses are used byOther Class D multicast addresses are used by videoconferencing or other applicationsvideoconferencing or other applications Class EClass E addresses are reserved for future useaddresses are reserved for future use and for research purposesand for research purposes
  45. 45. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 4646 What Class?What Class? How do you know what class an IP address is in?How do you know what class an IP address is in? For Dotted Decimal AddressFor Dotted Decimal Address If the first octet is between:If the first octet is between: 0 1270 127 Class A addressesClass A addresses 128 191128 191 Class B AddressesClass B Addresses 192 223192 223 Class C AddressesClass C Addresses 224 239224 239 Class D AddressesClass D Addresses 240 255240 255 Class E AddressesClass E Addresses For Binary IP AddressFor Binary IP Address The first bit is 0The first bit is 0 Class A AddressClass A Address The first 2 bits are 10The first 2 bits are 10 Class B AddressClass B Address First three bits are 110First three bits are 110 Class C AddressClass C Address First four bits are 1110First four bits are 1110 Class D AddressClass D Address First four bits are 1111First four bits are 1111 Class E AddressClass E Address
  46. 46. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 4747 Example 19.4Example 19.4 Find the class of each addressFind the class of each address a.a. 000000001 00001011 00001011 111011110000001 00001011 00001011 11101111 b.b. 11011000001 10000011 00011011 1111111100001 10000011 00011011 11111111 c.c. 1414.23.120.8.23.120.8 d.d. 252252.5.15.111.5.15.111 SolutionSolution a.a. The first bit is 0. This is a class A address.The first bit is 0. This is a class A address. b.b. The first 2 bits are 1; the third bit is 0. This is a class CThe first 2 bits are 1; the third bit is 0. This is a class C address.address. c.c. The first byte is 14; the class is A.The first byte is 14; the class is A. d.d. The first byte is 252; the class is E.The first byte is 252; the class is E.
  47. 47. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 4848 Number of NetworksNumber of Networks Number of networks in each classNumber of networks in each class Class A has 128 networks (0 to 127)Class A has 128 networks (0 to 127) Class B has 16,384 networksClass B has 16,384 networks Class C has 2,097,152 networksClass C has 2,097,152 networks
  48. 48. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 4949 Number of HostsNumber of Hosts Maximum number of hosts vary for eachMaximum number of hosts vary for each classclass Class A has 16,777,214 available hosts (2Class A has 16,777,214 available hosts (22424 2)2) Class B has 65,534 available hosts (2Class B has 65,534 available hosts (21616 2)2) Class C has 254 available hosts (2Class C has 254 available hosts (288 2)2) The first address in each network isThe first address in each network is reserved for thereserved for the Network AddressNetwork Address (all zeros)(all zeros) and the last address is reserved for theand the last address is reserved for the Broadcast AddressBroadcast Address (all ones)(all ones)
  49. 49. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 5050 No. of blocks and block sizeNo. of blocks and block size
  50. 50. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 5151 In classful addressing, a large part of the available addresses were wasted. NoteNote
  51. 51. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 5252 Lecture 34Lecture 34 (20 Mar 2015)(20 Mar 2015) IP AddressingIP Addressing
  52. 52. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 5353 Reserved AddressesReserved Addresses Network Address (wire address)Network Address (wire address) This is an This is an IP address that ends with binaryIP address that ends with binary 0s in all0s in all host bits.host bits. Class A Network Address example:Class A Network Address example: 113.0.0.0113.0.0.0 Hosts on a network can only communicateHosts on a network can only communicate directlydirectly with other hosts if they have thewith other hosts if they have the same network ID.same network ID. If they dont, they will not be able toIf they dont, they will not be able to communicate unless there iscommunicate unless there is another deviceanother device connecting the networks.connecting the networks.
  53. 53. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 5454 Reserved AddressesReserved Addresses Broadcast AddressBroadcast Address is used to send data is used to send data to all of the devices on a network.to all of the devices on a network. Broadcast IP addresses end with binaryBroadcast IP addresses end with binary 1s1s in the host partin the host part of the address.of the address. Class B Broadcast Address example:Class B Broadcast Address example: 176.10.255.255176.10.255.255 (Remember decimal 255 = binary 11111111)(Remember decimal 255 = binary 11111111)
  54. 54. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 5555 Special AddressSpecial Address Host ID all 0s is reserved to refer toHost ID all 0s is reserved to refer to networknetwork numbernumber 192.168.100.0192.168.100.0 158.108.0.0158.108.0.0 18.0.0.018.0.0.0 Host ID all 1s is reserved toHost ID all 1s is reserved to broadcastbroadcast to allto all hosts on a specific networkhosts on a specific network 192.168.100.255192.168.100.255 158.108.255.255158.108.255.255 18.255.255.25518.255.255.255 Address 0.0.0.0 means Address 0.0.0.0 means default routedefault route Address 127.0.0.0 means Address 127.0.0.0 means this nodethis node Address 127.0.0.1Address 127.0.0.1 ((local loopbacklocal loopback). Message sent). Message sent to this address will never leave the local hostto this address will never leave the local host Address 255.255.255.255 is reserveAddress 255.255.255.255 is reservedd to broadcastto broadcast to every host on the local network (limitedto every host on the local network (limited broadcast)broadcast)
  55. 55. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 5656 Netid and HostidNetid and Hostid Netid and host id are of varying length Netid and host id are of varying length depending on class of the addressdepending on class of the address FirstFirst OctetOctet SecondSecond OctetOctet ThirdThird OctetOctet FourthFourth OctetOctet Class AClass A NN HH HH HH Class BClass B NN NN HH HH Class CClass C NN NN NN HH Class DClass D Class EClass E
  56. 56. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 5757 Netid and HostidNetid and Hostid
  57. 57. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 5858 MaskMask Although the length of the netid and hostid (inAlthough the length of the netid and hostid (in bits) is predetermined in classful addressing,bits) is predetermined in classful addressing, we can also use a mask (also called the defaultwe can also use a mask (also called the default mask), a 32-bit number made of contiguous 1smask), a 32-bit number made of contiguous 1s followed by contiguous 0s.followed by contiguous 0s. The mask can help us to find the netid and theThe mask can help us to find the netid and the hostid.hostid. For example, the mask for a class A address hasFor example, the mask for a class A address has eight 1s, which means the first 8 bits of anyeight 1s, which means the first 8 bits of any address in class A define the netid; the next 24address in class A define the netid; the next 24 bits define the hostid.bits define the hostid. The concept does not apply to classes D and E.The concept does not apply to classes D and E.
  58. 58. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 5959 MaskingMasking
  59. 59. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 6060 Default Mask for classfulDefault Mask for classful addressingaddressing The last column shows the mask in the form /nThe last column shows the mask in the form /n where n can be 8, 16, or 24 in classful addressing.where n can be 8, 16, or 24 in classful addressing. This notation is also calledThis notation is also called slash notationslash notation oror Classless Interdomain RoutingClassless Interdomain Routing (CIDR) notation.(CIDR) notation. Classful addressing is a special case of classlessClassful addressing is a special case of classless addressing.addressing.
  60. 60. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 6161 IP AddressingIP Addressing Crisis & SolutionsCrisis & Solutions
  61. 61. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 6262 Flaw in Classful AddressFlaw in Classful Address We can see the flaw in this design.We can see the flaw in this design. A block in class A address is too large forA block in class A address is too large for almost any organizationalmost any organization A block in class B is also very large,A block in class B is also very large, probably too large for any of theprobably too large for any of the organizations that received a class B block.organizations that received a class B block. A block in class C is probably too small.A block in class C is probably too small. A and B always wasted. But C is always notA and B always wasted. But C is always not enuff!!!enuff!!!
  62. 62. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 6565 Issues with IP AddressingIssues with IP Addressing IP address exhaustionIP address exhaustion Routing table growthRouting table growth U N I V E R S I T YU N I V E R S I T Y Internet
  63. 63. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 6666 IP Addressing SolutionsIP Addressing Solutions SubnettingSubnetting (RFCs 950, 1812)(RFCs 950, 1812) Private AddressesPrivate Addresses (RFC 1918)(RFC 1918) Network Address Translation (NAT)Network Address Translation (NAT) (RFC 1631)(RFC 1631) Classless Interdomain Routing (CIDR)Classless Interdomain Routing (CIDR) (RFCs 1518, 1519, 2050)(RFCs 1518, 1519, 2050) Route summarizationRoute summarization (RFC 1518)(RFC 1518) Variable Length Subnet MaskingVariable Length Subnet Masking (VLSM)(VLSM) (RFC 1812)(RFC 1812)
  64. 64. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 6767 SubnettingSubnetting
  65. 65. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 6868 Basics of SubnettingBasics of Subnetting Subnetwork is a smaller divisions of a networksSubnetwork is a smaller divisions of a networks A larger network is split into several smaller partsA larger network is split into several smaller parts for internal use say different departments of afor internal use say different departments of a college but still act like a single network to thecollege but still act like a single network to the outside worldoutside world
  66. 66. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 6969 SubnettingSubnetting Basically without subnetting, most ofBasically without subnetting, most of organization is limited to two levelsorganization is limited to two levels of hierarchyof hierarchy In this case, the hosts cannot beIn this case, the hosts cannot be organized into groups, and all of theorganized into groups, and all of the hosts are at the same level.hosts are at the same level. As a result the organization has oneAs a result the organization has one network with many many hostsnetwork with many many hosts
  67. 67. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 7070 A Network with Two Levels ofA Network with Two Levels of HierarchyHierarchy
  68. 68. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 7171 To make a network more organize,To make a network more organize, three levels of hierarchy isthree levels of hierarchy is implemented.implemented. Subnetting creates an intermediateSubnetting creates an intermediate level of hierarchy in the IP addressinglevel of hierarchy in the IP addressing system.system. Now we have 3 levels:Now we have 3 levels: NetidNetid subnetid, andsubnetid, and hostid.hostid. SubnettingSubnetting
  69. 69. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 7272 Subnet AddressesSubnet Addresses Changing from 2 Level hierarchy to 3 LevelChanging from 2 Level hierarchy to 3 Level hierarchyhierarchy Include Class A, B, or C network portion plus aInclude Class A, B, or C network portion plus a subnet field and a host field.subnet field and a host field. Bits are borrowed from the host field and areBits are borrowed from the host field and are designated as the subnet field.designated as the subnet field. NetworkNetwork SubnetSubnet HostHost NetworkNetwork HostHost
  70. 70. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 7373 A Network with Three Levels ofA Network with Three Levels of HierarchyHierarchy
  71. 71. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 7474 Basics of SubnettingBasics of Subnetting They provide addressing flexibilityThey provide addressing flexibility Less wastage of IP addressesLess wastage of IP addresses Better logical organizationBetter logical organization Provides a logical network structure thatProvides a logical network structure that is hidden from the outside worldis hidden from the outside world A.K.A. subnetsA.K.A. subnets Subnet addresses are assigned locally,Subnet addresses are assigned locally, usually by a network administrator.usually by a network administrator. Subnets reduce a broadcast domain.Subnets reduce a broadcast domain. RFC 950 (1985)RFC 950 (1985)
  72. 72. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 7575 SupernettingSupernetting The time came when most of the class A and class BThe time came when most of the class A and class B addresses were depleted; however, here was still aaddresses were depleted; however, here was still a huge demand for midsize blocks.huge demand for midsize blocks. The size of a class C block with a maximum number ofThe size of a class C block with a maximum number of 256 addresses did not satisfy the needs of most256 addresses did not satisfy the needs of most organizations.organizations. Even a midsize organization needed more addresses.Even a midsize organization needed more addresses. One solution was supernetting.One solution was supernetting. In supernetting, an organization can combine severalIn supernetting, an organization can combine several class C blocks to create a larger range of addresses.class C blocks to create a larger range of addresses. In other words, several networks are combined toIn other words, several networks are combined to create a supernetwork or a supernet.create a supernetwork or a supernet.
  73. 73. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 7676 SupernettingSupernetting An organization can apply for a set of class C blocksAn organization can apply for a set of class C blocks instead of just one.instead of just one. For example, an organization that needs 1000For example, an organization that needs 1000 addresses can be granted four contiguous class Caddresses can be granted four contiguous class C blocks.blocks. The organization can then use these addresses toThe organization can then use these addresses to create one supernetwork.create one supernetwork. Supernetting decreases the number of 1s in the mask.Supernetting decreases the number of 1s in the mask. For example, if an organization is given four class CFor example, if an organization is given four class C addresses, the mask changes from /24 to /22.addresses, the mask changes from /24 to /22. We will see that classless addressing eliminated theWe will see that classless addressing eliminated the need for supernetting.need for supernetting.
  74. 74. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 7777 Addresses with and withoutAddresses with and without SubnettingSubnetting
  75. 75. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 7878 Subnet MaskSubnet Mask To implement subnetting, mainTo implement subnetting, main router needs a subnet mask thatrouter needs a subnet mask that indicates the network + subnetindicates the network + subnet portion and the host portionportion and the host portion Subnet mask is also 32 bit longSubnet mask is also 32 bit long Written in dotted decimal notationWritten in dotted decimal notation with a slash followed by the numberwith a slash followed by the number of bits in the network + subnet partof bits in the network + subnet part
  76. 76. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 7979 Subnet MaskSubnet Mask Subnet mask can be written asSubnet mask can be written as 255.255.252.0255.255.252.0 Alternative notationAlternative notation /22/22 indicates indicates that the subnet mask is 22 bit longthat the subnet mask is 22 bit long
  77. 77. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 8080 Classful addressing, which is almost obsolete, is replaced with classless addressing. Note
  78. 78. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 8181 ClasslessClassless Interdomain Routing (CIDR)Interdomain Routing (CIDR) cidercider
  79. 79. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 8282 Classless AddressingClassless Addressing To overcome address depletion and give more organizationsTo overcome address depletion and give more organizations access to the Internet, classless addressing was designed andaccess to the Internet, classless addressing was designed and implemented.implemented. In this scheme,In this scheme, there are no classesthere are no classes, but the addresses are still, but the addresses are still granted in blocks.granted in blocks. Address BlocksAddress Blocks In classless addressing, when an entity, small or large, needsIn classless addressing, when an entity, small or large, needs to be connected to the Internet, it is granted a block (range) ofto be connected to the Internet, it is granted a block (range) of addresses.addresses. The size of the block (the number of addresses) varies basedThe size of the block (the number of addresses) varies based on the nature and size of the entity.on the nature and size of the entity. For example,For example, a household may be given only two addresses;a household may be given only two addresses; a large organization may be given thousands of addressesa large organization may be given thousands of addresses an ISP, as the Internet service provider, may be given thousandsan ISP, as the Internet service provider, may be given thousands or hundreds of thousands based on the number of customers itor hundreds of thousands based on the number of customers it may serve.may serve.
  80. 80. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 8383 Classless AddressingClassless Addressing To simplify the handling of addresses,To simplify the handling of addresses, the Internet authorities impose threethe Internet authorities impose three restrictions on classless addressrestrictions on classless address blocks:blocks: 1. The addresses in a block must be1. The addresses in a block must be contiguous, one after another.contiguous, one after another. 2. The number of addresses in a block2. The number of addresses in a block must be a power of 2 (I, 2, 4, 8, ... ).must be a power of 2 (I, 2, 4, 8, ... ). 3. The first address must be evenly3. The first address must be evenly divisible by the number of addresses.divisible by the number of addresses.
  81. 81. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 8484 Example 19.5Example 19.5 Figure 19.3 shows a block ofFigure 19.3 shows a block of addresses, in both binary and dotted-addresses, in both binary and dotted- decimal notation, granted to a smalldecimal notation, granted to a small business that needs 16 addresses.business that needs 16 addresses.
  82. 82. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 8585 Example 19.5Example 19.5 Figure 19.3, A block of 16 addresses granted to a small organizationFigure 19.3, A block of 16 addresses granted to a small organization We can see that the restrictions are applied to this block.We can see that the restrictions are applied to this block. The addresses are contiguous.The addresses are contiguous. The number of addresses is a power of 2 (16 = 24), andThe number of addresses is a power of 2 (16 = 24), and The first address is divisible by 16.The first address is divisible by 16. The first address, when converted to a decimal number, isThe first address, when converted to a decimal number, is 3,440,387,360, which when divided by 16 results in 215,024,2103,440,387,360, which when divided by 16 results in 215,024,210
  83. 83. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 8686 MaskMask A better way to define a block of addresses isA better way to define a block of addresses is to select any address in the block and theto select any address in the block and the mask.mask. As we discussed before, a mask is a 32-bitAs we discussed before, a mask is a 32-bit number in which thenumber in which the n leftmost bits are 1sn leftmost bits are 1s and the 32 - n rightmost bits are 0s.and the 32 - n rightmost bits are 0s. However, in classless addressing the maskHowever, in classless addressing the mask for a block can take any value from 0 to 32.for a block can take any value from 0 to 32. It is very convenient to give just the value ofIt is very convenient to give just the value of n preceded by a slash (CIDR notation).n preceded by a slash (CIDR notation).
  84. 84. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 8787 MaskMask In IPv4 addressing, a block ofIn IPv4 addressing, a block of addresses can be defined asaddresses can be defined as x.y.z.t /x.y.z.t /nn in which x.y.z.t defines one of thein which x.y.z.t defines one of the addresses and the /addresses and the /nn defines the maskdefines the mask Where n is the number of 1s in the maskWhere n is the number of 1s in the mask NoteNote
  85. 85. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 8888 MaskMask The address and the /n notationThe address and the /n notation completely define the whole block (thecompletely define the whole block (the first address, the last address, and thefirst address, the last address, and the number of addresses).number of addresses). First Address:First Address: Network AddressNetwork Address (host part 0s)(host part 0s) The first address in the block can beThe first address in the block can be found by setting thefound by setting the (32 n) rightmost(32 n) rightmost bitsbits in the binary notation of thein the binary notation of the address toaddress to 0s0s..
  86. 86. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 8989 MaskMask The first address in the block can be found by setting the rightmost 32 n bits to 0s. NoteNote
  87. 87. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 9090 Example 19.6Example 19.6 A block of addresses is granted to a smallA block of addresses is granted to a small organization. We know that one of the addresses isorganization. We know that one of the addresses is 205.16.37.39/28205.16.37.39/28. What is the first address in the. What is the first address in the block?block? SolutionSolution The binary representation of the given address isThe binary representation of the given address is 11001101 00010000 00100101 0010011111001101 00010000 00100101 00100111 If we set 3228 rightmost bits to 0, we getIf we set 3228 rightmost bits to 0, we get 11001101 00010000 00100101 001000011001101 00010000 00100101 0010000 oror 205.16.37.32205.16.37.32 This is actually the block shown in Figure 19.3.This is actually the block shown in Figure 19.3.
  88. 88. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 9191 Last Address:Last Address: Broadcast Address (host part 1s)Broadcast Address (host part 1s) The last address in the block can beThe last address in the block can be found by setting thefound by setting the (32 n) rightmost(32 n) rightmost bitsbits in the binary notation of thein the binary notation of the address toaddress to 1s1s..
  89. 89. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 9292 The last address in the block can be found by setting the rightmost 32 n bits to 1s. NoteNote
  90. 90. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 9393 Example 19.7Example 19.7 Find the last addressFind the last address for the block in Example 19.6. A block of addresses is granted to a small organization.A block of addresses is granted to a small organization. We know that one of the addresses isWe know that one of the addresses is 205.16.37.39/28205.16.37.39/28.. What is the first address in the block?What is the first address in the block? Solution The binary representation of the given address is 11001101 00010000 00100101 00100111 If we set 32 28 rightmost bits to 1, we get 11001101 00010000 00100101 00101111 or 205.16.37.47 This is actually the block shown in Figure 19.3.
  91. 91. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 9494 Number of AddressesNumber of Addresses The number of addresses in theThe number of addresses in the block is the difference between theblock is the difference between the last and first address.last and first address. It can easily be found using theIt can easily be found using the formulaformula 2232- n32- n ..
  92. 92. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 9595 The number of addresses in the block can be found by using the formula 232n . NoteNote
  93. 93. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 9696 Example 19.8Example 19.8 Find the number of addresses in ExampleFind the number of addresses in Example 19.6.19.6. A block of addresses is granted to a smallA block of addresses is granted to a small organization. We know that one of theorganization. We know that one of the addresses isaddresses is 205.16.37.39/28205.16.37.39/28. What is the first. What is the first address in the block?address in the block? SolutionSolution formulaformula 2232- n32- n The value of n is 28, which means thatThe value of n is 28, which means that number of addresses is 2number of addresses is 2 32283228 or 16.or 16.
  94. 94. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 9797 Example 19.9Example 19.9 Another way to find the first address, the lastAnother way to find the first address, the last address, and the number of addresses is toaddress, and the number of addresses is to represent the mask as arepresent the mask as a 32-bit binary32-bit binary (or 8-digit(or 8-digit hexadecimal) number.hexadecimal) number. This is particularly useful when we are writing aThis is particularly useful when we are writing a program to find these pieces of information.program to find these pieces of information. In Example 19.5 the /28 can be represented asIn Example 19.5 the /28 can be represented as 11111111 11111111 11111111 1111000011111111 11111111 11111111 11110000 (twenty-eight 1s and four 0s).(twenty-eight 1s and four 0s). FindFind a.a. The first addressThe first address b.b. The last addressThe last address c.c. The number of addresses.The number of addresses.
  95. 95. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 9898 Solution a. The first address can be found by ANDing the given addresses with the mask. ANDing here is done bit by bit. The result of ANDing 2 bits is 1 if both bits are 1s; the result is 0 otherwise.
  96. 96. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 9999 b.The last address can be found by ORing the given addresses with the complement of the mask. ORing here is done bit by bit. The result of ORing 2 bits is 0 if both bits are 0s; the result is 1 otherwise. The complement of a number is found by changing each 1to 0 and each 0 to 1.
  97. 97. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 100100 c. The number of addresses can be found by complementing the mask, interpreting it as a decimal number, and adding 1 to it.
  98. 98. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 101101 Lecture 35Lecture 35 (1 4Mar 2014)(1 4Mar 2014) IP AddressingIP Addressing
  99. 99. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 102102 Network AddressesNetwork Addresses When an organization is given a block ofWhen an organization is given a block of addresses, the organization is free to allocate theaddresses, the organization is free to allocate the addresses to the devices that need to beaddresses to the devices that need to be connected to the Internet.connected to the Internet. The first address in the class, however, isThe first address in the class, however, is normally (not always) treated as a specialnormally (not always) treated as a special address.address. TheThe first address is called the network addressfirst address is called the network address andand defines the organization networkdefines the organization network.. It defines the organization itself to the rest of theIt defines the organization itself to the rest of the world.world. The first address is the one that isThe first address is the one that is used byused by routers to direct the message sent to therouters to direct the message sent to the organizationorganization from the outside.from the outside.
  100. 100. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 103103 The first address in a block is normally not assigned to any device; it is used as the network address that represents the organization to the rest of the world. Note
  101. 101. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 104104 Figure 19.5 Two levels of hierarchy in an IPv4 address
  102. 102. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 105105 Two-Level Hierarchy: NoTwo-Level Hierarchy: No SubnettingSubnetting An IP address can define only two levels of hierarchyAn IP address can define only two levels of hierarchy when not subnetted.when not subnetted. PrefixPrefix: The part of the address that defines the: The part of the address that defines the network is called the prefix - Thenetwork is called the prefix - The n leftmost bitsn leftmost bits ofof the address x.y.z.t/n define the network (organizationthe address x.y.z.t/n define the network (organization network)network) SuffixSuffix: the part that defines the host is called the: the part that defines the host is called the suffix - thesuffix - the (32-n)(32-n) rightmost bits define the particularrightmost bits define the particular host (computer or router) to the network.host (computer or router) to the network.
  103. 103. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 106106 Each address in the block can be considered as a two-level hierarchical structure: the leftmost n bits (prefix) define the network; the rightmost 32 n (suffix) bits define the host. NoteNote
  104. 104. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 107107 Three-Levels of Hierarchy:Three-Levels of Hierarchy: SubnettingSubnetting An organization that is granted a large block ofAn organization that is granted a large block of addresses may want to create clusters of networksaddresses may want to create clusters of networks (called subnets) and divide the addresses between(called subnets) and divide the addresses between the different subnets.the different subnets. The rest of the world still sees the organization asThe rest of the world still sees the organization as one entity; however, internally there are severalone entity; however, internally there are several subnets.subnets. All messages are sent to the router address thatAll messages are sent to the router address that connects the organization to the rest of the Internet;connects the organization to the rest of the Internet; the router routes the message to the appropriatethe router routes the message to the appropriate subnets.subnets. The organization, however, needs to create small subThe organization, however, needs to create small sub blocks of addresses, each assigned to specificblocks of addresses, each assigned to specific subnets.subnets. The organization has its own mask;The organization has its own mask; each subneteach subnet must also have its own mask.must also have its own mask.
  105. 105. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 108108 Three-Level Hierarchy in an IPv4Three-Level Hierarchy in an IPv4 AddressAddress subnet prefix length can differ for thesubnet prefix length can differ for the subnetssubnets
  106. 106. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 109109 ExampleExample suppose an organization is given the block 17.12.40.0/26,suppose an organization is given the block 17.12.40.0/26, which contains 64 addresses.which contains 64 addresses. The organization has three offices and needs to divide theThe organization has three offices and needs to divide the addresses into three sub blocks of 32, 16, and 16 addresses.addresses into three sub blocks of 32, 16, and 16 addresses. SolutionSolution We canWe can find the new masksfind the new masks by using the following arguments:by using the following arguments: 1. Suppose the mask for the first subnet is n1, then 21. Suppose the mask for the first subnet is n1, then 232- n132- n1 must bemust be 32, which means that n1 =27.32, which means that n1 =27. 2. Suppose the mask for the second subnet is n2, then 22. Suppose the mask for the second subnet is n2, then 232- n232- n2 mustmust be 16, which means that n2 = 28.be 16, which means that n2 = 28. 3. Suppose the mask for the third subnet is n3, then 23. Suppose the mask for the third subnet is n3, then 232- n332- n3 must bemust be 16, which means that n3 =28.16, which means that n3 =28. This means that we have the masksThis means that we have the masks 27, 28, 2827, 28, 28 with thewith the organization mask beingorganization mask being 2626.. Figure shows one configuration for the above scenario.Figure shows one configuration for the above scenario. Three-Levels of Hierarchy:Three-Levels of Hierarchy: SubnettingSubnetting
  107. 107. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 110110 Configuration & Addresses: SubnettedConfiguration & Addresses: Subnetted NetworkNetwork
  108. 108. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 111111 Finding subnet addresses from oneFinding subnet addresses from one of the addresses in the subnet.of the addresses in the subnet. In subnet 1In subnet 1, the address 17.12.14.29/27 can, the address 17.12.14.29/27 can give us the subnet address if we use thegive us the subnet address if we use the subnet mask /27subnet mask /27 HostHost:: 00010001 00001100 00001110 0001110100010001 00001100 00001110 00011101 ANDing with MaskANDing with Mask: /27 (27 1s): /27 (27 1s) 11111111 11111111 11111111 1110000011111111 11111111 11111111 11100000 We get theWe get the subnetsubnet:: 00010001 00001100 00001110 0000000000010001 00001100 00001110 00000000 17.12.14.017.12.14.0
  109. 109. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 112112 Finding subnet addresses from oneFinding subnet addresses from one of the addresses in the subnet.of the addresses in the subnet. In subnet 2In subnet 2, the address 17.12.14.45/28 can, the address 17.12.14.45/28 can give us the subnet address if we use thegive us the subnet address if we use the subnet mask /28subnet mask /28 HostHost:: 00010001 00001100 00001110 0010110100010001 00001100 00001110 00101101 ANDing with MaskANDing with Mask: /28 (28 1s): /28 (28 1s) 11111111 11111111 11111111 1111000011111111 11111111 11111111 11110000 We get the subnetWe get the subnet:: 00010001 00001100 00001110 0010000000010001 00001100 00001110 00100000 17.12.14.3217.12.14.32
  110. 110. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 113113 Finding subnet addresses from oneFinding subnet addresses from one of the addresses in the subnet.of the addresses in the subnet. In subnet 3In subnet 3, the address 17.12.14.50/28 can, the address 17.12.14.50/28 can give us the subnet address if we use thegive us the subnet address if we use the subnet mask /28 becausesubnet mask /28 because HostHost:: 00010001 00001100 00001110 0011001000010001 00001100 00001110 00110010 ANDing with MaskANDing with Mask: /28 (28 1s): /28 (28 1s) 11111111 11111111 11111111 1111000011111111 11111111 11111111 11110000 We get the subnetWe get the subnet:: 00010001 00001100 00001110 0011000000010001 00001100 00001110 00110000 17.12.14.4817.12.14.48
  111. 111. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 114114 More Levels of HierarchyMore Levels of Hierarchy The structure of classless addressing does notThe structure of classless addressing does not restrict the number of hierarchical levels.restrict the number of hierarchical levels. An organization can divide the granted block ofAn organization can divide the granted block of addresses into subblocks.addresses into subblocks. Each subblock can in turn be divided into smallerEach subblock can in turn be divided into smaller subblocks. And so on.subblocks. And so on. One example of this is seen in the ISPs.One example of this is seen in the ISPs. A national ISP can divide a granted large block into smallerA national ISP can divide a granted large block into smaller blocks and assign each of them to a regional ISP.blocks and assign each of them to a regional ISP. A regional ISP can divide the block received from theA regional ISP can divide the block received from the national ISP into smaller blocks and assign each one to anational ISP into smaller blocks and assign each one to a local ISP.local ISP. A local ISP can divide the block received from the regionalA local ISP can divide the block received from the regional ISP into smaller blocks and assign each one to a differentISP into smaller blocks and assign each one to a different organization.organization. Finally, an organization can divide the received block andFinally, an organization can divide the received block and make several subnets out of it.make several subnets out of it.
  112. 112. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 115115 Address AllocationAddress Allocation The ultimate responsibility of address allocationThe ultimate responsibility of address allocation is given to a global authority called the Internetis given to a global authority called the Internet Corporation for Assigned Names and AddressesCorporation for Assigned Names and Addresses (ICANN).(ICANN). However, ICANN does not normally allocateHowever, ICANN does not normally allocate addresses to individual organizations.addresses to individual organizations. It assigns a large block of addresses to an ISP.It assigns a large block of addresses to an ISP. Each ISP, in turn, divides its assigned block intoEach ISP, in turn, divides its assigned block into smaller subblocks and grants the subblocks tosmaller subblocks and grants the subblocks to its customers.its customers. In other words, an ISP receives one large block toIn other words, an ISP receives one large block to be distributed to its Internet users.be distributed to its Internet users. This is calledThis is called address aggregationaddress aggregation: many blocks: many blocks of addresses are aggregated in one block andof addresses are aggregated in one block and granted to one ISP.granted to one ISP.
  113. 113. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 116116 An ISP is granted a block of addresses startingAn ISP is granted a block of addresses starting with 190.100.0.0/16 (65,536 addresses). The ISPwith 190.100.0.0/16 (65,536 addresses). The ISP needs to distribute these addresses to threeneeds to distribute these addresses to three groups of customers as follows:groups of customers as follows: a.a. The first group hasThe first group has 64 customers64 customers; each needs; each needs 256 addresses256 addresses.. b.b. The second group hasThe second group has 128 customers128 customers; each; each needsneeds 128 addresses128 addresses.. c.c. The third group hasThe third group has 128 customers128 customers; each needs; each needs 64 addresses64 addresses.. Design the sub blocks and find out how manyDesign the sub blocks and find out how many addresses are still available after theseaddresses are still available after these allocations.allocations. Example 19.10Example 19.10
  114. 114. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 117117 Solution Figure 19.9 shows the situation. 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 Example 19.10 (contd.)Example 19.10 (contd.)
  115. 115. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 118118 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 Example 19.10 (contd.)Example 19.10 (contd.)
  116. 116. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 119119 Group 3 For this group, each customer needs 64 addresses. This means that 6 (log264) 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 Example 19.10 (contd.)Example 19.10 (contd.)
  117. 117. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 120120 Address allocation and distribution byAddress allocation and distribution by an ISPan ISP
  118. 118. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 121121 Lecture 36Lecture 36 (26 Mar 2014)(26 Mar 2014) IP v6IP v6
  119. 119. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 122122 IPv6IPv6 IPngIPng Next-Generation IPNext-Generation IP
  120. 120. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 123123 Why A New IP?Why A New IP? Inefficient usage of available IP addresses classfulInefficient usage of available IP addresses classful schemescheme IP address depletion/exhaustionIP address depletion/exhaustion Aug 90 - Class B exhausted by Mar 94Aug 90 - Class B exhausted by Mar 94 Backbone routing table growthBackbone routing table growth Too much data to exchangeToo much data to exchange Routing calculation complexityRouting calculation complexity Other issuesOther issues Security - No security mechanism (no encryption andSecurity - No security mechanism (no encryption and authentication is provided by IPv4).authentication is provided by IPv4). Quality of Service - Inadequate QoS for nowadaysQuality of Service - Inadequate QoS for nowadays application such as real-time audio and video transmissionapplication such as real-time audio and video transmission (due to delay & resource reservation) strategy(due to delay & resource reservation) strategy
  121. 121. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 124124 ADVANTAGE OF IPv6ADVANTAGE OF IPv6 Larger address spaceLarger address space: IPv4 only 2: IPv4 only 23232 . IPv6 2. IPv6 2128128 340,282,366,920,938,463,463,374,607,431,768,211,340,282,366,920,938,463,463,374,607,431,768,211, 456 addresses. Can stand more than 150 years456 addresses. Can stand more than 150 years BetterBetter header formatheader format New optionsNew options: allow for additional functionalities: allow for additional functionalities for future usefor future use Allowance for extensionAllowance for extension: allow the extension of: allow the extension of the protocol if required by new technologies orthe protocol if required by new technologies or applications.applications. Support for resource allocationSupport for resource allocation.- to support.- to support traffic such as real-time audio and video verytraffic such as real-time audio and video very very efficiently compared to IPv4.very efficiently compared to IPv4. Support for more securitySupport for more security. The encryption and. The encryption and authentication options in IPv6 provideauthentication options in IPv6 provide confidentiality and integrity of the packet.confidentiality and integrity of the packet.
  122. 122. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 126126 Features of IPv6Features of IPv6 Larger Address SpaceLarger Address Space Efficient and hierarchical addressing and routingEfficient and hierarchical addressing and routing infrastructureinfrastructure efficient, hierarchical, and summarizable routingefficient, hierarchical, and summarizable routing infrastructureinfrastructure Aggregation-based address hierarchy EfficientAggregation-based address hierarchy Efficient backbone routing smaller routing tablesbackbone routing smaller routing tables Efficient and Extensible IP datagramEfficient and Extensible IP datagram Efficient Header FormatEfficient Header Format The IPv6 header has a new format that is designed toThe IPv6 header has a new format that is designed to minimize header overhead.minimize header overhead. This is achieved by moving both nonessential fields andThis is achieved by moving both nonessential fields and option fields to extension headers that are placed afteroption fields to extension headers that are placed after the IPv6 header.the IPv6 header. The streamlined IPv6 header provides more efficientThe streamlined IPv6 header provides more efficient processing at intermediate routers.processing at intermediate routers.
  123. 123. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 127127 Features of IPv6Features of IPv6 Auto-configuration - To simplify host configuration,Auto-configuration - To simplify host configuration, Stateless and stateful address configurationStateless and stateful address configuration stateful address configuration, such as address configuration in thestateful address configuration, such as address configuration in the presence of a DHCP server - hosts on a link automatically configurepresence of a DHCP server - hosts on a link automatically configure themselves with IPv6 addresses for the link (link-local addresses)themselves with IPv6 addresses for the link (link-local addresses) stateless address configuration (address configuration in the absence ofstateless address configuration (address configuration in the absence of a DHCP server) - are derived from prefixes advertised by local routers.a DHCP server) - are derived from prefixes advertised by local routers. Even in the absence of a router, hosts on the same link can automaticallyEven in the absence of a router, hosts on the same link can automatically configure themselves with link-local addresses and communicateconfigure themselves with link-local addresses and communicate without manual configuration.without manual configuration. Built-in security - IPsec mandatoryBuilt-in security - IPsec mandatory Better support for quality of service (QoS) - New fields in the IPv6Better support for quality of service (QoS) - New fields in the IPv6 header define how traffic is handled and identified - traffic isheader define how traffic is handled and identified - traffic is identified in the IPv6 header, support for QoS can be easily achievedidentified in the IPv6 header, support for QoS can be easily achieved even when the packet payload is encrypted with IPSeceven when the packet payload is encrypted with IPSec New protocol for neighboring node interaction - The NeighborNew protocol for neighboring node interaction - The Neighbor Discovery protocol for IPv6 - Neighbor Discovery replaces AddressDiscovery protocol for IPv6 - Neighbor Discovery replaces Address Resolution Protocol (ARP)Resolution Protocol (ARP) Extensibility - IPv6 can be extended for new features by addingExtensibility - IPv6 can be extended for new features by adding extension headers after the IPv6 header.extension headers after the IPv6 header. MobilityMobility
  124. 124. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 128128 IPv6 Improvements over IPv4IPv6 Improvements over IPv4 Longer addresses than IPv4Longer addresses than IPv4 16 Bytes 128 bits long16 Bytes 128 bits long Provides unlimited supply of Internet AddressesProvides unlimited supply of Internet Addresses Simplification of the headerSimplification of the header Contains 7 fields (13 in IPv4)Contains 7 fields (13 in IPv4) Allows routers to process packets fasterAllows routers to process packets faster Improves throughput and delayImproves throughput and delay Better support for optionsBetter support for options Required because fields previously required for IPv4 are nowRequired because fields previously required for IPv4 are now optionaloptional Options are represented in a different way makes simple forOptions are represented in a different way makes simple for routers to skip over options not intended for them this featurerouters to skip over options not intended for them this feature speeds up packet processing timespeeds up packet processing time Big advance in securityBig advance in security Authentication and privacy are key featuresAuthentication and privacy are key features More attention to Quality of service (QoS)More attention to Quality of service (QoS) AutoconfigurationAutoconfiguration
  125. 125. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 133133 IPv6 AddressesIPv6 Addresses 128-bit long. Fixed size128-bit long. Fixed size Larger Address space - 2Larger Address space - 2128128 = 3.410= 3.4103838 addressesaddresses 66510665102121 addresses per sq. m of earth surfaceaddresses per sq. m of earth surface If assigned at the rate of 10If assigned at the rate of 1066 //s, it would take 20s, it would take 20 yearsyears Expected to support 810Expected to support 8101717 to 210to 2103333 addressesaddresses 8108101717 1,564 address per sq. m1,564 address per sq. m Allows multiple interfaces per host.Allows multiple interfaces per host. Allows multiple addresses per interfaceAllows multiple addresses per interface Allows unicast, multicast, anycastAllows unicast, multicast, anycast Allows provider based, site-local, link-localAllows provider based, site-local, link-local 85% of the space is unassigned85% of the space is unassigned
  126. 126. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 137137 IPv6 AddressingIPv6 Addressing 128 bit addresses!128 bit addresses! 340,282,366,920,938,463,463,374,607,431340,282,366,920,938,463,463,374,607,431 ,768,211,456 addresses!,768,211,456 addresses! Uses hierarchical addressing structureUses hierarchical addressing structure Allows embedding of IEEE 802 addressAllows embedding of IEEE 802 address as EUI-64 identifiersas EUI-64 identifiers Specified as 8 16-bit hexadecimalSpecified as 8 16-bit hexadecimal numbers separated by colonsnumbers separated by colons
  127. 127. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 138138 Hexadecimal Colon NotationHexadecimal Colon Notation Written asWritten as eight sectionseight sections each of 2 byte length separated by colonseach of 2 byte length separated by colons 2 bytes (16 bits) in hexadecimal requires2 bytes (16 bits) in hexadecimal requires four hexadecimal digitsfour hexadecimal digits Therefore address contain 32 hexadecimal digits with every four digits separated byTherefore address contain 32 hexadecimal digits with every four digits separated by a colona colon So, There are:So, There are: 8 groups of 4 hexadecimal digits.8 groups of 4 hexadecimal digits. Each group represents 16 bits (4 hexa digits X 4 bit)Each group represents 16 bits (4 hexa digits X 4 bit) Separator is : (colon)Separator is : (colon) Hex digits are not case sensitive, so DBCA is same as dbca or DBcaHex digits are not case sensitive, so DBCA is same as dbca or DBca
  128. 128. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 139139 Abbreviated IPv6 AddressesAbbreviated IPv6 Addresses TheThe leading zeros within a group can be omittedleading zeros within a group can be omitted only the leading zeros can be only the leading zeros can be dropped, not the trailing zerosdropped, not the trailing zeros Further abbreviations are possible if there areFurther abbreviations are possible if there are consecutive sectionsconsecutive sections consistingconsisting of zeros only.of zeros only. One or more consecutive groups of zeros can be replaced by a pair of colons One or more consecutive groups of zeros can be replaced by a pair of colons allowed only once per addressallowed only once per address Re-expansion of the abbreviated address is very simple: Align the unabbreviatedRe-expansion of the abbreviated address is very simple: Align the unabbreviated portions and insert zeros to get the original expanded address.portions and insert zeros to get the original expanded address.
  129. 129. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 140140 Expand the address 0:15::1:12:1213 to its original. Solution We first need to align the left side of the double colon to the left of the original pattern and the right side of the double colon to the right of the original pattern to find how many 0s we need to replace the double colon. This means that the original address is. Example 19.11Example 19.11
  130. 130. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 141141 Prefix and Interface IDPrefix and Interface ID IPv6 (128-bit) address contains two parts:IPv6 (128-bit) address contains two parts: The first 64-bits is known as theThe first 64-bits is known as the prefixprefix. The prefix. The prefix includes the network and subnet address. Becauseincludes the network and subnet address. Because addresses are allocated based on physical location, theaddresses are allocated based on physical location, the prefix also includes global routing information. The 64-prefix also includes global routing information. The 64- bit prefix is often referred to as the global routingbit prefix is often referred to as the global routing prefix.prefix. The last 64-bits is theThe last 64-bits is the interface IDinterface ID. This is the unique. This is the unique address assigned to an interface.address assigned to an interface. NoteNote: Addresses are assigned to interfaces (network: Addresses are assigned to interfaces (network connections), not to the host. Each interface can haveconnections), not to the host. Each interface can have more than one IPv6 address.more than one IPv6 address.
  131. 131. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 142142 IPv6 Addressing In UseIPv6 Addressing In Use IPv6 uses theIPv6 uses the / notation/ notation to denote howto denote how many bits in the IPv6 address representmany bits in the IPv6 address represent the subnet.the subnet. The full syntax of IPv6 isThe full syntax of IPv6 is ipv6-address/prefix-lengthipv6-address/prefix-length wherewhere ipv6-address is the 128-bit IPv6 addressipv6-address is the 128-bit IPv6 address /prefix-length is a decimal value/prefix-length is a decimal value representing how many of the left mostrepresenting how many of the left most contiguous bits of the address comprisecontiguous bits of the address comprise the prefix.the prefix.
  132. 132. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 143143 IPv6 Addressing In UseIPv6 Addressing In Use Lets analyze an example:Lets analyze an example: 2001:C:7:ABCD::1/642001:C:7:ABCD::1/64 is reallyis really 2001:000C:0007:ABCD2001:000C:0007:ABCD::0000:0000:0000:00010000:0000:0000:0001//6464 The first 64-bitsThe first 64-bits 2001:000C:0007:ABCD2001:000C:0007:ABCD is theis the address prefixaddress prefix The last 64-bitsThe last 64-bits 0000:0000:0000:00010000:0000:0000:0001 is theis the interface IDinterface ID /64/64 is theis the prefix lengthprefix length (/64 is well-known and(/64 is well-known and also the prefix length in most cases)also the prefix length in most cases)
  133. 133. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 144144 Address SpaceAddress Space IPv6 is divided intoIPv6 is divided into several categoriesseveral categories.. A few leftmost bits, called theA few leftmost bits, called the typetype prefixprefix, in each address define its, in each address define its category.category. The type prefix isThe type prefix is variable in lengthvariable in length
  134. 134. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 145145 Type Prefixes for IPv6Type Prefixes for IPv6 AddressesAddresses
  135. 135. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 146146 Type Prefixes for IPv6Type Prefixes for IPv6 AddressesAddresses
  136. 136. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 147147 IPv6IPv6 IPv6 supports 3 types of addressesIPv6 supports 3 types of addresses UnicastUnicast MulticastMulticast AnycastAnycast
  137. 137. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 148148 IPv6 Address TypesIPv6 Address Types A single interface may be assigned multiple IPv6 addresses of any type (unicast, anycast, multicast) Address TypeAddress Type DescriptionDescription UnicastUnicast One to One (Global, Link local, Site local) + An address destined for a single interface. MulticastMulticast One to Many + An address for a set of interfaces + Delivered to a group of interfaces identified by that address. + Replaces IPv4 broadcast AnycastAnycast One to Nearest (Allocated from Unicast) + Delivered to the closest interface as determined by the IGP
  138. 138. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 149149 Lecture 37Lecture 37 (27 Mar 2014)(27 Mar 2014) IP v6 contdIP v6 contd ..
  139. 139. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 150150 Unicast AddressesUnicast Addresses Unicast addresses identify a singleUnicast addresses identify a single interface, so defines a single computer.interface, so defines a single computer. The packet sent to a unicast address mustThe packet sent to a unicast address must be delivered to that specific computer.be delivered to that specific computer. IPv6 defines two types of unicastIPv6 defines two types of unicast addresses:addresses: Geographically based, andGeographically based, and provider-based - the provider-based address isprovider-based - the provider-based address is generally used by a normal host as a unicastgenerally used by a normal host as a unicast address.address.
  140. 140. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 151151 Multicast AddressesMulticast Addresses Multicast addresses identify a group ofMulticast addresses identify a group of interfaces - which define a group of hostsinterfaces - which define a group of hosts instead of just one.instead of just one. A packet sent to a multicast address isA packet sent to a multicast address is delivered to all of the interfaces in thedelivered to all of the interfaces in the group in turn delivered to each membergroup in turn delivered to each member of the group.of the group. NOTE: There are no broadcast addresses inNOTE: There are no broadcast addresses in IPv6, their function being superseded byIPv6, their function being superseded by multicast addresses.multicast addresses.
  141. 141. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 152152 Anycast AddressesAnycast Addresses IPv6 also defines anycast addresses.IPv6 also defines anycast addresses. Anycast addresses identify a set of interfaces such that aAnycast addresses identify a set of interfaces such that a packet sent to a anycast address will be delivered to onepacket sent to a anycast address will be delivered to one member of the set.member of the set. An anycast address, like a multicast address, alsoAn anycast address, like a multicast address, also defines adefines a group of nodesgroup of nodes.. However, a packet destined for an anycast address isHowever, a packet destined for an anycast address is delivered to only one of the members of the anycast group,delivered to only one of the members of the anycast group, thethe nearest onenearest one (the one with the shortest route).(the one with the shortest route). Although the definition of an anycast address is stillAlthough the definition of an anycast address is still debatable, one possible use is to assign an anycastdebatable, one possible use is to assign an anycast address to all routers of an ISP that covers a large logicaladdress to all routers of an ISP that covers a large logical area in the Internet.area in the Internet. The routers outside the ISP deliver a packet destined forThe routers outside the ISP deliver a packet destined for the ISP to the nearest ISP router.the ISP to the nearest ISP router. No block is assigned for anycast addresses.No block is assigned for anycast addresses.
  142. 142. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 153153 Reserved AddressesReserved Addresses Another category in the addressAnother category in the address space is the reserved address.space is the reserved address. These addresses start with eight OsThese addresses start with eight Os (type prefix is 00000000).(type prefix is 00000000). A few subcategories are furtherA few subcategories are further defined in this categorydefined in this category
  143. 143. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 154154 Reserved Addresses in IPv6Reserved Addresses in IPv6
  144. 144. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 155155 Local AddressesLocal Addresses These addresses are used when anThese addresses are used when an organization wants to use IPv6 protocolorganization wants to use IPv6 protocol without being connected to the globalwithout being connected to the global Internet.Internet. In other words, they provide addressingIn other words, they provide addressing for private networks.for private networks. Nobody outside the organization can sendNobody outside the organization can send a message to the nodes using thesea message to the nodes using these addresses.addresses. Two types of addresses are defined forTwo types of addresses are defined for this purposethis purpose Link LocalLink Local Site LocalSite Local
  145. 145. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 156156 SecuritySecurity IPv6 adds three security servicesIPv6 adds three security services Packet authenticationPacket authentication Packet integrityPacket integrity Packet confidentialityPacket confidentiality Implemented using theImplemented using the Authentication Header and theAuthentication Header and the Encapsulating Security PayloadEncapsulating Security Payload HeaderHeader
  146. 146. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 157157 IPv6 HeadersIPv6 Headers Simpler header - faster processingSimpler header - faster processing by routers.by routers. No optional fields - fixed size (40 bytes)No optional fields - fixed size (40 bytes) No fragmentation fields.No fragmentation fields. No checksumNo checksum Support for multiple headersSupport for multiple headers more flexible than simple protocolmore flexible than simple protocol field.field.
  147. 147. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 158158 IPv4 HeaderIPv4 Header VERS HL Fragment Offset Fragment LengthService Datagram ID FLAG TTL Protocol Header Checksum Source Address Destination Address Options (if any) Data 1 byte1 byte 1 byte 1 byte
  148. 148. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 159159 IPv6 HeaderIPv6 Header VERS PRIO Hop Limit Flow Label Payload Length Next Header 1 byte1 byte 1 byte 1 byte Source Address (128 bits - 16 bytes) Dest. Address (128 bits - 16 bytes)
  149. 149. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 160160 IPv6 Header FieldsIPv6 Header Fields VERS:VERS: IP version number 6 (4 for IPv4)IP version number 6 (4 for IPv4) Priority/Traffic Class:Priority/Traffic Class: will be used in congestionwill be used in congestion control to distinguish between packet withcontrol to distinguish between packet with different real-time delivery requirementsdifferent real-time delivery requirements Flow Label:Flow Label: experimental - sender can label aexperimental - sender can label a sequence of packets as being in the same flow.sequence of packets as being in the same flow. Payload LengthPayload Length: number of bytes following the 40: number of bytes following the 40 byte headerbyte header Next Header:Next Header: tells which of the six extensiontells which of the six extension headers follow this oneheaders follow this one Hop Limit:Hop Limit: same as TTL field in IPv4same as TTL field in IPv4 Source/Destination Address:Source/Destination Address: 16 Bytes each16 Bytes each
  150. 150. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 161161 Extension HeadersExtension Headers
  151. 151. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 162162 Extension HeadersExtension Headers Hop-by-Hop Option Special options thatHop-by-Hop Option Special options that require hop-by-hop processingrequire hop-by-hop processing Destination Options Optional information toDestination Options Optional information to be examined by the destination nodebe examined by the destination node Routing Extended routing, like IPv4 loose listRouting Extended routing, like IPv4 loose list of routers to visitof routers to visit Fragmentation Fragmentation andFragmentation Fragmentation and reassemblyreassembly Authentication Integrity and authentication,Authentication Integrity and authentication, securitysecurity Encrypted Security payload ConfidentialityEncrypted Security payload Confidentiality
  152. 152. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 163163 IPv6 Vs IPv4 HeaderIPv6 Vs IPv4 Header IPv6 twice the size of IPv4 headerIPv6 twice the size of IPv4 header Version: only field with same position andVersion: only field with same position and meaningmeaning RemovedRemoved:: Header length, fragmentation fieldsHeader length, fragmentation fields (identification, flags, fragment offset),(identification, flags, fragment offset), header checksumheader checksum ReplacedReplaced:: Datagram length by payload lengthDatagram length by payload length Protocol type by next headerProtocol type by next header Time to live by hop limitTime to live by hop limit Type of service by class octetType of service by class octet
  153. 153. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 164164 Major Improvements of IPv6Major Improvements of IPv6 HeaderHeader No option fieldNo option field: Replaced by: Replaced by extension header. Result in a fixedextension header. Result in a fixed length, 40-byte IP header.length, 40-byte IP header. No header checksumNo header checksum: Result in fast: Result in fast processing.processing. No fragmentation at intermediateNo fragmentation at intermediate nodesnodes: Result in fast IP forwarding.: Result in fast IP forwarding.
  154. 154. May 20, 2015May 20, 2015 BMK, AKGEC, GhaziabadBMK, AKGEC, Ghaziabad 165165 4040 bytesbytes 6060 bytesbytes IPv4IPv4 IPv6IPv6 00 1515 1616 3131 vers IHL TOS total lengthvers IHL TOS total length identification flags frag-offsetidentification flags frag-offset TTL protocol header checksumTTL protocol header checksum source addresssource address destination addressdestination address options and paddingoption