Top Banner

of 22

IP Address and Subnetting

Nov 04, 2015

Download

Documents

markpter85

Learn the essentials of IP Addressing and Subnetting
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • IP Address and Subnetting*

    RD-CSY2001-2009/10

  • IP Addressing*

    RD-CSY2001-2009/10

  • Overview IPv4 address Classful addressingPrivate and Public IP addresses SubnetNeed to subnet Subnet Class C address Task*

  • Review: IPv4 Address Classes*Network IDHost ID816Class A32Class B10Class C110Multicast AddressesClass D1110Reserved for experimentsClass E1111248

    IP v4 addresses are 32 bits long, given as a.b.c.dIP addresses are divided into five classes, identified by the first group of numbers in the dotted decimal notation asClassRangeA0-127B128-191C192-223D224-239E240-255Addresses from classes A, B, C are assignable0

  • Review - Subnet mask Generally, IP addresses have two partsNetwork (Net id) Host IDNetid and Hostid in a given IP address are identified by Subnet maskDefault subnet masks areClass A : 255.0.0.0Class B : 255.255.0.0Class C : 255.255.255.0*NetworkHostHostHostNetworkNetworkHostHostNetworkNetworkNetworkHost1st octet2nd octet3rd octet4th octetClass AClass BClass C

  • Special IP AddressesLoopback address127.0.0.0Network addressIP address with all host bits set to 0Example: 172.16.0.0Broadcast address IP address with all host bits set to 1 Example: 172.16.255.255*

  • Public and private IP addresses

    Public IP addressesUniqueUsed to connect to Internet. Use of an address class depends on number of hosts / networks, required to be connected Private IP addressesUse to conserve public IP addresses Three special ranges, one each in class A, B and C.

    *

  • Private IP addressesAssigned to hosts that do not connect directly to the Internet

    Three blocks are available, one each fromClass AClass BClass C addresses

    Addresses need to be translated for connecting hosts to the Internet .*

    ClassRangeA10.0.0.0 10.255.255.255B172.16.0.0 172.31.255.255C192.168.0.0 192.168.255.255

    RD-CSY2001-2009/10

  • Problems with traditional (Classful) IP AddressingInefficient Address UsageIn danger of running out of classes A and BWhy?Class C too small for most domainsVery few class A very careful about giving them outClass B poses greatest problemClass B sparsely populated But users refuse to give it back Need simple way to reduce the number of network numbers assigned*

  • Some solutions to overcome IP address problem Use Private Addresses Dynamic allocation of addressesDHCP Subnet the given address Use Classless IP addressing schemes (CIDR) Use larger address spaceIPv6 uses 128 bit address (32 bits for IPv4 addresses)*

  • Assign IP addresses to above network using appropriate subnet mask:Class AClass BClass CTask: Assign IP addresses*Device ?Router

  • Why Subnet?Organizations have multiple networks which are independently managed Subnetting allows us to break LANs into small sub-networks Sub-networks created by borrowing bits from host-id. from the given IP address What are the maximum number of bits that can be borrowed in a Class C address?Class B address?

    *

  • Designing addressing scheme for an Inter-network.When designing an address scheme, assign addresses to hosts, network devices and the router interface

    *

  • Document: Addressing Maps*

  • How to: SubnettingStepsKnow how many Different Networks are required Borrow bits from the host portion of the IP addressFind New Subnet Mask.Calculate the number of sub-networks and the hosts available corresponding to borrowed bitsFind the sub-network boundaryNetwork AddressFind the broadcast address.Lets look at each of these steps in detail*

  • 1. How many bits to borrow?How many host bits CAN/DO I have to borrow to create required subnetsDepends on the class of your network address. How do you find the IP address class?First octet of IP addressWhat are the host bits for the default subnet mask? Class C: 8 host bitsClass B: 16 host bitsClass A: 24 host bits

    *

  • Example: How many bits to borrow?Class C Address: 210.93.45.0Requirement: At least 5 subnets how many bits do we borrow (Bits Borrow (BB))?How many bits in the host portion (HB) do we have for default mask? Since its a Class C, we have 8 bits to work with.2 to what power will give us at least 5 subnets? 23 - 2 = 6 subnetsHow many bits are left for hosts?Bits left = Bits available bits borrowed5 = 8-3Assignable host addresses 25 - 2 = 30 hosts*One network address, one broadcast address

  • 2. Whats the new subnet mask?We determine the new subnet mask by adding up the decimal value of the bits we borrowed.In the previous Class C example, we borrowed 3 bits. Below is the host octet showing the bits we borrowed and their decimal values.

    *We add up the decimal value of these bits and get 224 (128+64+32). NEW subnet mask is 255.255.255.224 (as against default subnet mask of 255.255.255.0)

  • 3. Whats the magic number?In our Class C example, our subnet mask was 255.255.255.224.224 is our last non-zero octet.Our magic number is 256 - 224 = 32Note: The last bit borrowed was the 32 bit.*

  • Assigning sub-network addresses We now take our magic number and use it as a multiplier Our Class C address was 210.93.45.0.We borrowed bits in the fourth octet, so thats where our multiplier occurs.1st subnet: 210.93.45.322nd subnet: 210.93.45.643rd subnet: 210.93.45.964th subnet:210.93.45.1285th subnet:210.93.45.1606th subnet:210.93.45.192

    *

  • Host & Broadcast AddressesNow you can see why we subtract 2 when determining the number of host addresses.Lets look at our 1st subnet: 210.93.45.32What is the total range of addresses up to our next subnet, 210.93.45.64? 210.93.45.32 to 210.93.45.63 or 32 addresses.32 cannot be assigned to a host. Why? Because it is the subnets address..63 cannot be assigned to a host. Why? Because it is the subnets broadcast address.So our host addresses are .33 - .62 or 30 host addresses--just like we figured out earlier.*

  • Last Non-Zero OctetMemorize this table. You should be able to:Quickly calculate the last non-zero octet when given the number of bits borrowed or...Determine the number of bits borrowed when given the last non-zero octet.*

    Sheet1

    Bits BorrowedNon-Zero Octet

    1128

    2192

    3224

    4240

    5248

    6252

    7254

    8255

    Sheet2

    Sheet3

    **