Module 12 - Elk Tech

Transcription

Module 12IPv4 Addressing and Subnetting

Objectives1. 2.3 Explain the properties and characteristics ofTCP/IP and IPv4 subnetting2

NETWORKINGAND IP ADDRESSING3

Addressing SchemesFlat1. Used by Intranetworks2. Used by Layer 23. Used in MAC address4. Is assigned staticallybased on next availablenumber or randomA. Social Security NumberB. Your NameC. MAC- C0:AD:00:23:4F:89Hierarchical1. Used by Internetworks2. Used by Layer 33. Used by IP address4. Is assigned dynamicallybased on you locationA. Phone SystemB. ZIP CodeC. IP- 182.157.63.2194

Internet Protocol address (IP address)1. A numerical label assigned to each device participating in anetwork2. Every device on the Internet must have a unique IP addressto identify itself3. Internet Assigned Numbers Authority (IANA)4. Manages the IP address space allocations globally5. Delegates five regional Internet registries (RIRs) to allocateIP address blocks to local Internet registries (Internet serviceproviders)6. For an IP to be routable over the Internet, it must have:A. IP addressB. Subnet MaskC. Default GatewayD. DNS address (only for address lookup, i.e. web sites)5

Types of Addressing1. Static IP addressA. Manually assigned to a device by an administratorB. Constant and does not change.2. Dynamic IP addressA. Assigned to device each time it startsB. Requires less human interventionC. Less administrationD. Uses Dynamic Host Configuration Protocol (DHCP)E. Enabled by defaultF. No user intervention6

Classful vs ClasslessClassful1. Divided into 5 classes A, B,C, D (multicast) andE (reserved)2. Does not send subnetinformation3. All networks are the samesize4. Have the same subnetmask5. Can NOT use first or lastsubnetsClassless1. Also known as CIDR (ClasslessInter-Domain Routing)2. Sends subnet information3. Network can be different sizes4. Networks can have differentsubnet masks using VLSM(Variable Length Subnet Mask)5. Can use first and last subnets7

Network & Host Numbers1 Byte8 Bits1 Byte8 Bits1 Byte8 Bits1 Byte8 BitsClass ANHHHClass BNNHHClass CNNNHThe formulas are the default configuration for each class:1. N Network NumberA. Assigned by the American Registry for Internet Numbers(ARIN)B. Administrator has no control over this part of the address2. H Host NumberA. Assigned and controlled by the network administrator8

Class A AddressesClass A8 BitsNetwork24 BitsHostHostHost1. First octet only identifies the network2. When written in a binary format, the first (leftmost) bit of a Class Aaddress is always 0 (zero)3. Class A IP address example: 124.95.44.154. Range from 1-126 in their first octet5. 127 is part of a class A range but has been reserved for loopbacktesting6. Zero (0) can’t be used7. Remaining three octets can be used for the host portion of theaddress8. 224 or 16,777,216, possible IP addresses per class A network9

Class B AddressesClass B16 BitsNetworkNetwork16 BitsHostHost1. When written in a binary format, the first (leftmost) bit of aClass B address is always 10 (one and zero)2. Class B IP address example: 151.10.13.283. The first two octets identify the network number assigned byARIN4. Range from 128 to 191 in their first octet5. Remaining two octets can be used for the host portion of theaddress6. 216 or 65,536, possible IP addresses per class B network1010

Class C AddressesClass C24 BitsNetworkNetwork8 BitsNetworkHost1. When written in a binary format, the first (leftmost) bit of aClass C address is always 110 (one, one and zero)2. Class C IP address example: 201.110.213.283. The first three octets identify the network number assigned byARIN4. Range from 192 to 223 in their first octet5. Last octet can be used for the host portion of the address6. 28 or 256, possible IP addresses per class C network11

Address RangesIMPORTANT!!!MEMORIZEClass AClass BClass C1 – 126128 – 191192 – 223N.H.H.HN.N.H.HN.N.N.H1212

Converting to Binary1. An IP Address is made up of 32 bits brokendown into 4 Octets (8 bits each)2. . Known as the Dotted Decimal1313

Converting to Binary271282664253224162382242122011414

Network AddressNetworkHost32 Bits1521.2.3.4.5.21.0.0Ends with binary 0s in all host bitsAlso know as the wire addressNever used as a device IP addressUsed by routers to forward dataExample IP address: 152.21.2.3A. Class BB. First two octets are assignedC. Last two octets are host numbers used for devices in thenetworkD. Network address: 152.21.0.01515

Examples of Network NumbersWhat is the network number for this IP address?1. 194.78.112.6194.78.112.02. 117.23.8.3117.0.0.03. 156.132.64.12156.132.0.04. 208.150.112.16208.150.112.05. 91.118.125.291.0.0.01616

Broadcast AddressNetworkHost32 Bits1521.2.3.4.21.255.255End with binary 1s in host bitsUsed to send data to all devices on a networkNever used as a device IP addressExample IP address: 152.21.2.3A. Class B addressB. First two octets are assignedC. Last two octets are host numbers used for devices in thenetworkD. Broadcast address: 152.21.255.2551717

Examples of Broadcast AddressWhat is the Broadcast address for this IP address?1. 194.78.112.6194.78.112.2552. 117.23.8.3117.255.255.2553. 156.132.64.12156.132.255.2554. 208.150.112.16208.150.112.2555. 91.118.125.291.255.255.2551818

Network Number and Broadcast Address1. All 0’s in the host address is the NetworkNumber2. All 1’s in the host address in the BroadcastAddress3. These two addresses can never be used whenassigning IP’s4. When finding the number of useable hostaddresses, you will always subtract 2 (network &Broadcast)1919

Why Subnet?Before SubnettingNetworkHostAfter SubnettingNetworkSubnetHost1. A way of breaking networks into smaller moremanageable pieces2. More efficiently use IP addresses3. Reduces the amount of wasted space4. Reduce the size of a broadcast domains5. Better bandwidth utilization2020

SubnetingNetworkNetworkNetworkHost8 Bits8 Bits8 Bits8 Bits27 26 25 24 23 22 21 2011 0 0 0 0 0 027 26 25 24 23 22 21 20.0000010127 26 25 24 23 22 21 20.00100010.27 26 2524 23 22 21 200000 1 0 11SubnetHost1. Subnet addresses include:A. The Class A, Class B, or Class C network portionB. A subnet fieldC. A host field2. Subnet field and the host field are created from the original host portion3. Provides addressing flexibility4. To create a subnet address:A. Network administrator borrows bits from the original host portionB. Designates them as the subnet field (gives up control)2121

IMPORTANT!!!1. You must always borrow at least 2 bits and youmust always leave at least 2 bits2. One for the network number and one for thebroadcast2222

What is a Subnet Mask?Class B Default Subnet Mask255.255.0.01.2.3.4.5.6.Class B Subnet Mask with4 bits borrowed255.255.240.0Formal name: extended network prefixTells the network devices which part of an address is the networkfield and which part is the host field32 bits long and 4 octets, just like an IP addressBits are always borrowed from the left most available bitAllow numbers: 255, 254, 248, 240, 224, 192, 128, 0Step to determine the subnet mask:A. Express the subnetwork IP address in binary formB. Replace the network and subnet portion of the address with all1sC. Replace the host portion of the address with all 0sD. Convert the binary expression back to dotted-decimal notation2323

Subnet MaskIf you have a class C address:1. How many bits are used without subneting?242. What is the subnet mask?11111111.11111111.11111111.00000000 or 255.255.255.03. If you borrowed 4 bits, how many are used?284. What is the subnet mask?11111111.11111111.11111111.11110000 or 255.255.255.2402424

Examples of Subnet MaskWhat is the Subnet Mask for this IP address?1. 194.78.112.6/28255.255.255.2402. 117.23.8.3/10255.192.0.03. 156.132.64.12/19255.255.224.04. 208.150.112.16/30255.255.255.2525. 91.118.125.2/16255.255.0.02525

Subneting1. Always remember that there are two reserved/unusablesubnets2. Each time you borrow another bit from the host field, thenumber of subnets created increases by a power of 2(doubles)3. Examples:A. Borrowing 2 bits creates four possible subnets 22(2x2)B. Eight possible subnets are created by borrowing 3bits: 23 (2 x 2 x 2)C. Sixteen possible subnets are created by borrowing 4bits: 24 (2 x 2 x 2 x 2)D. What if you borrow one bit?2626

Useable Subnets and HostMEMORIZE1. Formula for calculating USEABLE Subnets (borrowedbits):2b - 2 useable subnets2. Formula for calculation USEABLE Hosts (unused bits):2u - 2 useable hosts2727

Calculating Subnets and HostsExample: Class C network, borrowing 3 bits:1. What is the subnet mask?255.255.255.2242. How many usable subnets?2b-2 ?23 (8) - 2 6 usable subnets3. How many useable hosts per subnet?2u-2 ?25 (32) - 2 30 usable hosts2828

Calculating Subnets and HostsThe more subnets you create, the less hostseach subnet will have2929

Boolean Operations1. The term "operations" in mathematics refers to rulesthat define how one number combines with othernumbers2. Boolean operators binary numbers:A.AND is like multiplicationB.OR is like additionC.NOT changes 1 to 0, and 0 to 13. In order to route a data packet, the router must firstdetermine the destination network/subnet addressby performing a logical AND using the destinationhost's IP address and the subnet mask4. Result will be the network/subnet address3030

ANDingFind the network address for this class B IP:1. 180.160.120.8/18255.255.192.02. What the subnet mask?3. Change IP to binary 10110100.10100000.01111000.000010004. Change SM to binary 11111111.11111111.11000000.000000005. AND function10110100.10100000.01000000.000000006. Convert back to decimal180.160.64.07. Network address3131

Classful SubnettingThings you know by default:Things you must always find outfirst before finding your IP’s:1. Class2. Formulas3. Default Mask1. Bits Borrowed2. Subnet Mask3. Number of subnets4. Numbers of hosts5. Increment3232

An IP address of 196.112.48.12 with the mosthosts:1. Bits Borrowed22. Subnet Mask255.255.255.1923. Number of subnets 22 (4) - 2 2 usable4. Numbers of hosts26 (64) - 2 62 usable5. Increment643333

An IP address of 196.112.48.12/27:1. Bits Borrowed32. Subnet Mask255.255.255.2243. Number of subnets 23 (8) - 2 6 usable4. Numbers of hosts25 (32) - 2 30 usable5. Increment323434

A class C address with 4 bits borrowed wouldhave:1. Bits Borrowed42. Subnet Mask255.255.255.2403. Number of subnets 24 (16) - 2 14 usable4. Numbers of hosts24 (16) - 2 14 usable5. Increment163535

An IP address of 196.112.48.12/29:1. Bits Borrowed52. Subnet Mask255.255.255.2483. Number of subnets 25 (32) - 2 30 usable4. Numbers of hosts23 (8) - 2 6 usable5. Increment83636

An IP address of 196.112.48.12 with the mostsubnets:1. Bits Borrowed62. Subnet Mask255.255.255.2523. Number of subnets 26 (64) - 2 62 usable4. Numbers of hosts22 (4) - 2 2 usable5. Increment43737

Class C Subnetting tAddressSN0196.112.48.0196.112.48.1 12.48.65 6.112.48.129 6.112.48.193 –196.112.48.254196.112.48.2553838

3939

Private AddressesThe following rages are available for privateaddressing:Class A10.0.0.0 – 10.255.255.255Class B172.16.0.0 – 172.31.255.255Class C192.168.0.0 – 192.168.255.2551. Found in each class2. Preserve IP addresses used on the Internet3. Not routable or usable on the Internet4. Added security5. Used by:A. Hosts that use Network Address Translation (NAT)B. Proxy server to connect to a public networkC. Hosts that do not connect to the Internet at all4040

Automatic Private IP Addressing (APIPA)1. Feature of modern operating systems2. Automatically self-configures an IP address andsubnet mask when a DHCP server isn't available3. IP address range: 169.254.0.1 through169.254.255.2544. Configures a default class B subnet mask of255.255.0.05. Used until a DHCP becomes available6. APIPA cannot be routed over the Internet4141

SummaryIn this module we discussed:1. Flat and Hierarchical address schemes2. What is Internet Protocol (IP)3. Types of addressing4. Classful and Classless addressing5. Network/Host formulas6. The different classes and how they are used7. Ranges for each class8. Network and Broadcast addresses9. Subnetting and the Subnet Mask10.Calculating subnets and hosts11.Private IP addressing4242

3. Provides addressing flexibility 4. To create a subnet address: A. Network administrator borrows bits from the original host portion B. Designates them as the subnet field (gives up control) Network Network Network Host 8 Bits 8 Bits 8 Bits 8 Bits 2 72 625 24 23 22 21 20 2 2 25 24 23 22 21 20 27 26 25 24 23 22 21 20 27 26 25 24 23 22 21 20 .