Javascript required
Skip to content Skip to sidebar Skip to footer

a technician needs to place 500 devices on a network. using cidr, what is the best host ip address?

    This document provides bones information needed in gild to configure your router for routing IP, such as how addresses are broken downwards and how subnetting works. You learn how to assign each interface on the router an IP address with a unique subnet. At that place are examples included in order to help tie everything together.

    Requirements

    Cisco recommends that you have a basic agreement of binary and decimal numbers.

    Components Used

    This document is not restricted to specific software and hardware versions.

    The data in this document was created from the devices in a specific lab surround. All of the devices used in this document started with a cleared (default) configuration. If your network is alive, brand sure that yous understand the potential impact of whatever control.

    Additional Information

    If definitions are helpful to you, utilise these vocabulary terms in social club to become you lot started:

    • Accost - The unique number ID assigned to ane host or interface in a network.

    • Subnet - A portion of a network that shares a item subnet address.

    • Subnet mask - A 32-bit combination used to describe which portion of an address refers to the subnet and which part refers to the host.

    • Interface - A network connection.

    If yous accept already received your legitimate address(es) from the Internet Network Information Eye (InterNIC), you are gear up to begin. If you practice not plan to connect to the Internet, Cisco strongly suggests that yous use reserved addresses from RFC 1918.

    An IP accost is an accost used in order to uniquely identify a device on an IP network. The address is made up of 32 binary $.25, which can be divisible into a network portion and host portion with the assist of a subnet mask. The 32 binary bits are broken into four octets (1 octet = 8 $.25). Each octet is converted to decimal and separated by a period (dot). For this reason, an IP accost is said to be expressed in dotted decimal format (for case, 172.xvi.81.100). The value in each octet ranges from 0 to 255 decimal, or 00000000 - 11111111 binary.

    Here is how binary octets convert to decimal: The right most scrap, or least significant bit, of an octet holds a value of ii0. The bit just to the left of that holds a value of 2ane. This continues until the left-near bit, or most significant flake, which holds a value of 2seven. So if all binary bits are a 1, the decimal equivalent would be 255 every bit shown here:

              1  ane  ane  1 i ane ane ane   128 64 32 sixteen 8 4 ii 1 (128+64+32+16+8+4+2+ane=255)

    Here is a sample octet conversion when not all of the bits are fix to 1.

              0  1 0 0 0 0 0 1   0 64 0 0 0 0 0 1 (0+64+0+0+0+0+0+i=65)

    And this sample shows an IP address represented in both binary and decimal.

              10.       one.      23.      19 (decimal)   00001010.00000001.00010111.00010011 (binary)

    These octets are cleaved down to provide an addressing scheme that can accommodate large and small networks. In that location are v different classes of networks, A to Due east. This document focuses on classes A to C, since classes D and East are reserved and discussion of them is across the scope of this certificate.

    Note: Besides notation that the terms "Class A, Class B" and then on are used in this document in order to assistance facilitate the understanding of IP addressing and subnetting. These terms are rarely used in the industry anymore because of the introduction of classless interdomain routing (CIDR).

    Given an IP address, its class tin can be adamant from the iii high-order bits (the iii left-most bits in the beginning octet). Effigy 1 shows the significance in the three loftier gild $.25 and the range of addresses that fall into each class. For informational purposes, Form D and Class E addresses are likewise shown.

    Effigy ane

    In a Course A address, the starting time octet is the network portion, so the Class A example in Effigy 1 has a major network address of 1.0.0.0 - 127.255.255.255. Octets ii, 3, and iv (the next 24 bits) are for the network manager to split into subnets and hosts as he/she sees fit. Form A addresses are used for networks that have more than 65,536 hosts (actually, upwardly to 16777214 hosts!).

    In a Class B address, the starting time 2 octets are the network portion, so the Grade B example in Figure 1 has a major network address of 128.0.0.0 - 191.255.255.255. Octets 3 and 4 (16 bits) are for local subnets and hosts. Form B addresses are used for networks that have between 256 and 65534 hosts.

    In a Class C address, the first three octets are the network portion. The Class C example in Figure 1 has a major network address of 192.0.0.0 - 223.255.255.255. Octet 4 (viii bits) is for local subnets and hosts - perfect for networks with less than 254 hosts.

    A network mask helps you know which portion of the accost identifies the network and which portion of the address identifies the node. Class A, B, and C networks take default masks, also known as natural masks, as shown here:

    Class A: 255.0.0.0 Class B: 255.255.0.0 Class C: 255.255.255.0

    An IP address on a Class A network that has non been subnetted would have an address/mask pair like to: viii.twenty.fifteen.1 255.0.0.0. In order to see how the mask helps you place the network and node parts of the accost, convert the address and mask to binary numbers.

    8.20.15.1 = 00001000.00010100.00001111.00000001 255.0.0.0 = 11111111.00000000.00000000.00000000

    Once you lot have the address and the mask represented in binary, then identification of the network and host ID is easier. Any address $.25 which have corresponding mask bits set to i represent the network ID. Whatever address bits that have corresponding mask bits set to 0 represent the node ID.

    8.20.15.1 = 00001000.00010100.00001111.00000001 255.0.0.0 = 11111111.00000000.00000000.00000000             -----------------------------------              cyberspace id |      host id               netid =  00001000 = 8 hostid = 00010100.00001111.00000001 = 20.fifteen.ane

    Subnetting allows yous to create multiple logical networks that exist within a single Form A, B, or C network. If you lot practise not subnet, you lot are only able to use ane network from your Class A, B, or C network, which is unrealistic.

    Each data link on a network must have a unique network ID, with every node on that link being a member of the same network. If you suspension a major network (Class A, B, or C) into smaller subnetworks, it allows you to create a network of interconnecting subnetworks. Each data link on this network would then accept a unique network/subnetwork ID. Any device, or gateway, that connectsn networks/subnetworks has n singled-out IP addresses, one for each network / subnetwork that it interconnects.

    In order to subnet a network, extend the natural mask with some of the bits from the host ID portion of the accost in order to create a subnetwork ID. For example, given a Class C network of 204.17.5.0 which has a natural mask of 255.255.255.0, you can create subnets in this fashion:

    204.17.5.0 -      11001100.00010001.00000101.00000000 255.255.255.224 - 11111111.11111111.11111111.11100000                   --------------------------|sub|----

    By extending the mask to be 255.255.255.224, you take taken three $.25 (indicated by "sub") from the original host portion of the address and used them to make subnets. With these iii $.25, it is possible to create 8 subnets. With the remaining five host ID bits, each subnet can have upwardly to 32 host addresses, 30 of which can actually be assigned to a device since host ids of all zeros or all ones are not allowed (it is very important to retrieve this). So, with this in mind, these subnets have been created.

    204.17.5.0 255.255.255.224     host address range 1 to thirty 204.17.v.32 255.255.255.224    host accost range 33 to 62 204.17.5.64 255.255.255.224    host address range 65 to 94 204.17.v.96 255.255.255.224    host accost range 97 to 126 204.17.5.128 255.255.255.224   host address range 129 to 158 204.17.v.160 255.255.255.224   host address range 161 to 190 204.17.5.192 255.255.255.224   host address range 193 to 222 204.17.5.224 255.255.255.224   host address range 225 to 254

    Annotation: There are two ways to announce these masks. First, since you use three bits more the "natural" Class C mask, you lot tin denote these addresses equally having a three-chip subnet mask. Or, secondly, the mask of 255.255.255.224 can also be denoted every bit /27 as there are 27 bits that are ready in the mask. This second method is used with CIDR. With this method, one of these networks tin can be described with the notation prefix/length. For example, 204.17.five.32/27 denotes the network 204.17.5.32 255.255.255.224. When appropriate, the prefix/length notation is used to denote the mask throughout the residuum of this document.

    The network subnetting scheme in this department allows for eight subnets, and the network might appear as:

    Effigy two

    Notice that each of the routers in Figure two is attached to four subnetworks, one subnetwork is common to both routers. Also, each router has an IP accost for each subnetwork to which it is fastened. Each subnetwork could potentially support up to thirty host addresses.

    This brings up an interesting bespeak. The more host $.25 you utilise for a subnet mask, the more subnets y'all take available. However, the more subnets available, the less host addresses bachelor per subnet. For example, a Course C network of 204.17.five.0 and a mask of 255.255.255.224 (/27) allows you lot to have viii subnets, each with 32 host addresses (30 of which could exist assigned to devices). If y'all apply a mask of 255.255.255.240 (/28), the breakdown is:

    204.17.5.0 -      11001100.00010001.00000101.00000000 255.255.255.240 - 11111111.11111111.11111111.11110000                   --------------------------|sub |---

    Since y'all now take four bits to make subnets with, you merely accept four bits left for host addresses. So in this case you can have up to xvi subnets, each of which tin can accept upward to 16 host addresses (14 of which can exist assigned to devices).

    Take a look at how a Course B network might exist subnetted. If y'all have network 172.16.0.0, and then yous know that its natural mask is 255.255.0.0 or 172.16.0.0/16. Extending the mask to anything beyond 255.255.0.0 means y'all are subnetting. You lot tin quickly see that you have the ability to create a lot more than subnets than with the Form C network. If y'all use a mask of 255.255.248.0 (/21), how many subnets and hosts per subnet does this allow for?

    172.16.0.0  -   10101100.00010000.00000000.00000000 255.255.248.0 - 11111111.11111111.11111000.00000000                 -----------------| sub |-----------

    You utilize five bits from the original host $.25 for subnets. This allows you lot to have 32 subnets (2five). Afterwards using the five bits for subnetting, you lot are left with 11 bits for host addresses. This allows each subnet so have 2048 host addresses (ii11), 2046 of which could exist assigned to devices.

    Note: In the past, at that place were limitations to the use of a subnet 0 (all subnet $.25 are set to zero) and all ones subnet (all subnet $.25 set to 1). Some devices would non allow the use of these subnets. Cisco Systems devices allow the use of these subnets when the ip subnet zero command is configured.

    Sample Practice one

    Now that yous have an agreement of subnetting, put this knowledge to utilise. In this example, you are given two accost / mask combinations, written with the prefix/length notation, which have been assigned to two devices. Your task is to decide if these devices are on the aforementioned subnet or dissimilar subnets. You tin can use the address and mask of each device in order to make up one's mind to which subnet each accost belongs.

    DeviceA: 172.16.17.xxx/20 DeviceB: 172.16.28.15/20

    Determine the Subnet for DeviceA:

    172.sixteen.17.30  -   10101100.00010000.00010001.00011110 255.255.240.0 -   11111111.11111111.11110000.00000000                   -----------------| sub|------------ subnet =          10101100.00010000.00010000.00000000 = 172.16.16.0

    Looking at the address bits that have a corresponding mask bit set up to ane, and setting all the other address bits to zero (this is equivalent to performing a logical "AND" between the mask and address), shows you to which subnet this accost belongs. In this instance, DeviceA belongs to subnet 172.16.xvi.0.

    Determine the Subnet for DeviceB:

    172.16.28.fifteen  -   10101100.00010000.00011100.00001111 255.255.240.0 -   11111111.11111111.11110000.00000000                   -----------------| sub|------------ subnet =          10101100.00010000.00010000.00000000 = 172.16.16.0

    From these determinations, DeviceA and DeviceB take addresses that are part of the aforementioned subnet.

    Sample Exercise 2

    Given the Class C network of 204.fifteen.5.0/24, subnet the network in order to create the network in Effigy three with the host requirements shown.

    Figure 3

    Looking at the network shown in Figure 3, you tin can see that you are required to create five subnets. The largest subnet must support 28 host addresses. Is this possible with a Class C network? And if so, then how?

    Yous can start by looking at the subnet requirement. In gild to create the five needed subnets you would need to utilize three bits from the Class C host bits. Ii bits would only permit you 4 subnets (two2).

    Since you need three subnet $.25, that leaves you with 5 $.25 for the host portion of the address. How many hosts does this support? 25 = 32 (30 usable). This meets the requirement.

    Therefore you accept determined that it is possible to create this network with a Class C network. An example of how you might assign the subnetworks is:

    netA: 204.15.five.0/27      host address range i to thirty netB: 204.fifteen.5.32/27     host accost range 33 to 62 netC: 204.xv.5.64/27     host address range 65 to 94 netD: 204.15.v.96/27     host accost range 97 to 126 netE: 204.15.5.128/27    host address range 129 to 158

    In all of the previous examples of subnetting, notice that the aforementioned subnet mask was practical for all the subnets. This means that each subnet has the same number of bachelor host addresses. You can need this in some cases, but, in most cases, having the aforementioned subnet mask for all subnets ends up wasting accost space. For example, in the Sample Practice 2 section, a class C network was split into eight equal-size subnets; however, each subnet did not utilize all available host addresses, which results in wasted address infinite. Figure 4 illustrates this wasted address space.

    Figure iv

    Figure 4 illustrates that of the subnets that are being used, NetA, NetC, and NetD have a lot of unused host address space. It is possible that this was a deliberate blueprint accounting for future growth, but in many cases this is just wasted accost space due to the fact that the same subnet mask is used for all the subnets.

    Variable Length Subnet Masks (VLSM) allows y'all to utilise different masks for each subnet, thereby using address space efficiently.

    VLSM Case

    Given the same network and requirements as in Sample Exercise 2 develop a subnetting scheme with the utilize of VLSM, given:

    netA: must support fourteen hosts netB: must support 28 hosts netC: must back up 2 hosts netD: must back up vii hosts netE: must back up 28 host

    Determine what mask allows the required number of hosts.

    netA: requires a /28 (255.255.255.240) mask to support 14 hosts netB: requires a /27 (255.255.255.224) mask to support 28 hosts netC: requires a /xxx (255.255.255.252) mask to back up ii hosts netD*: requires a /28 (255.255.255.240) mask to back up 7 hosts netE: requires a /27 (255.255.255.224) mask to support 28 hosts  * a /29 (255.255.255.248) would simply allow 6 usable host addresses   therefore netD requires a /28 mask.

    The easiest manner to assign the subnets is to assign the largest offset. For example, you can assign in this fashion:

    netB: 204.fifteen.5.0/27  host address range 1 to 30 netE: 204.fifteen.5.32/27 host address range 33 to 62 netA: 204.15.5.64/28 host accost range 65 to 78 netD: 204.xv.5.80/28 host address range 81 to 94 netC: 204.15.5.96/30 host address range 97 to 98

    This tin be graphically represented equally shown in Figure five:

    Figure 5

    Figure five illustrates how using VLSM helped save more than half of the accost space.

    Classless Interdomain Routing (CIDR) was introduced in society to improve both address space utilization and routing scalability in the Net. Information technology was needed because of the rapid growth of the Cyberspace and growth of the IP routing tables held in the Internet routers.

    CIDR moves away from the traditional IP classes (Class A, Class B, Course C, and then on). In CIDR , an IP network is represented past a prefix, which is an IP address and some indication of the length of the mask. Length means the number of left-most contiguous mask bits that are set up to one. So network 172.16.0.0 255.255.0.0 tin can be represented as 172.16.0.0/16. CIDR besides depicts a more than hierarchical Cyberspace compages, where each domain takes its IP addresses from a college level. This allows for the summarization of the domains to be done at the higher level. For instance, if an ISP owns network 172.16.0.0/16, then the ISP tin offer 172.sixteen.one.0/24, 172.xvi.2.0/24, and and then on to customers. Nevertheless, when advertising to other providers, the Internet access provider only needs to advertise 172.xvi.0.0/16.

    For more than information on CIDR, come across RFC 1518 and RFC 1519.

    31-bit Subnets

    A 30-bit subnet mask allows for four IPv4 addresses: 2 host addresses, one all-zeros network, and 1 all-ones broadcast accost. A point-to-point link tin can only have 2 host addresses. There is no real need to have the broadcast and all-zeros addresses with bespeak-to-signal links. A 31-bit subnet mask will allow for exactly two host addresses, and eliminates the circulate and all-zeros addresses, thus conserving the use of IP addresses to the minimum for point-to-point links.

    Refer to RFC 3021 - Using 31-Scrap Prefixes on IPv4 Point-to-Point Links.

    The mask is 255.255.255.254 or /31.


    The /31 subnet can exist used on true betoken-to-point links, such equally series or POS interfaces. Yet, they can also be used on broadcast interface types similar ethernet interfaces. If that is the case, make sure there are only 2 IPv4 addresses needed on that ethernet segment.

    Case

    192.168.1.0 and 192.168.ane.i are on the subnet 192.168.i.0/31.

    R1(config)#int gigabitEthernet 0/1
    R1(config-if)#ip address 192.168.1.0 255.255.255.254
    % Alarm: utilise /31 mask on non point-to-point interface cautiously

    The warning is printed because gigabitEthernet is a broadcast segment.

    32-fleck Subnets

    A subnet mask of 255.255.255.255 (a /32 subnet) describes a subnet with merely one IPv4 host address. These subnets cannot be used for assigning address to network links, considering they ever demand more than than ane address per link. The use of /32 is strictly reserved for use on links that tin take only one address. The example for Cisco routers is the loopback interface. These interfaces are internal interfaces and exercise non connect to other devices. As such, they can take a /32 subnet.

    Example

    interface Loopback0
    ip accost 192.168.2.1 255.255.255.255

    Sample Configuration

    Routers A and B are connected via series interface.

    Router A

              hostname routera   !   ip routing   !   int e 0   ip accost 172.sixteen.fifty.1 255.255.255.0   !(subnet 50)   int due east ane ip address 172.16.55.1 255.255.255.0   !(subnet 55)   int s 0 ip accost 172.16.threescore.1 255.255.255.0   !(subnet 60) int due south 0   ip accost 172.sixteen.65.one 255.255.255.0 (subnet 65)   !S 0 connects to router B   router rip   network 172.16.0.0

    Router B

              hostname routerb   !   ip routing   !   int e 0   ip address 192.1.x.200 255.255.255.240   !(subnet 192)   int east 1   ip address 192.one.10.66 255.255.255.240   !(subnet 64)   int s 0   ip accost 172.16.65.2 (aforementioned subnet as router A'due south s 0)   !Int due south 0 connects to router A   router rip   network 192.1.ten.0   network 172.xvi.0.0

    Host/Subnet Quantities Table

    Course B                   Effective  Effective # bits        Mask         Subnets     Hosts -------  ---------------  ---------  ---------   1      255.255.128.0           2     32766   2      255.255.192.0           4     16382   3      255.255.224.0           8      8190   four      255.255.240.0          16      4094   5      255.255.248.0          32      2046   6      255.255.252.0          64      1022   7      255.255.254.0         128       510   8      255.255.255.0         256       254   9      255.255.255.128       512       126   10     255.255.255.192      1024        62   xi     255.255.255.224      2048        30   12     255.255.255.240      4096        14   thirteen     255.255.255.248      8192         6   14     255.255.255.252     16384         two  Class C                   Effective  Effective # bits        Mask         Subnets     Hosts -------  ---------------  ---------  ---------   1      255.255.255.128      2        126    two      255.255.255.192      4         62   3      255.255.255.224      8         30   four      255.255.255.240     16         fourteen   5      255.255.255.248     32          6   vi      255.255.255.252     64          two     *Subnet all zeroes and all ones included. These   might not exist supported on some legacy systems. *Host all zeroes and all ones excluded.
    • IP Routing Protocols Engineering science Support
    • Subnet Cypher and the All-Ones Subnet
    • Host and Subnet Quantities
    • Technical Back up & Documentation - Cisco Systems

    goslingtooll1983.blogspot.com

    Source: https://www.cisco.com/c/en/us/support/docs/ip/routing-information-protocol-rip/13788-3.html