1

I am trying to allocate 256 IP addresses to Subnet1, 128 IP addresses to Subnet2 and 128 addresses to Subnet3 using the IP address 120.130.10.0/23

What I have setup in GNS3 is a router connected to 3 ethernet switches, and each of these ethernet switches have a VPC connected for testing purposes. enter image description here

What I think should be done is assign 120.130.10.1-120.130.11.2 to Subnet1, 120.130.11.3-120.130.11.130 to Subnet2 and then since there isn't 128 IP's left, I should create a new network space 120.130.12.0/24 to allocate 120.130.12.1-120.130.12.128 to Subnet3.

Now I'm assuming that what I've said above works ? (beginner network knowledge) But I run into an issue when I'm trying to apply this to GNS3 because I can't assign two subnets to 120.130.10.0/3 because I get the error "120.130.10.0 overlaps with FastEthernet0/1"

So I would like to know how to fix this problem when it comes to configuring the routers, or any other problems you can see with my logic as I'm new and any help will be appreciated

2
  • 2
    Your address space isn't big enough to do what you want. You actually need a /22.
    – Ron Trunk
    Sep 6, 2016 at 3:18
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
    – Ron Maupin
    Aug 15, 2017 at 2:16

2 Answers 2

1

You cannot assign IP addresses to the subnets the way you describe. The number of addresses in a subnet must be a power of two, and that includes the unusable-for-hosts network and broadcast addresses. If you must have 256 hosts in one subnet, you will need to use a /23 network.

Also, you cannot have overlapping subnets configured in a router, as you have discovered.

This answer will give you the basics on how to subnet correctly. You need to convert the addresses and masks to binary to do it correctly, and you will see how it works. In binary, it becomes obvious.

5
  • This isn't entirely correct. You can indeed assign all 256 addresses of a /24 through the use of the ip subnet zero command. However, this is an advanced and tricky setup and not one that anyone is likely to recommend. cisco.com/c/en/us/support/docs/ip/… Sep 6, 2016 at 15:41
  • 2
    That's not what the ip subnet zero command does. That command allows you to use the all zeroes and all ones subnets. See the Cisco document, Subnet Zero and the All-Ones Subnet. That command was necessary for IOS versions prior to 12.0 in order to use the all zeroes subnet. It has nothing to do with being able to assign the subnet or broadcast addresses to hosts.
    – Ron Maupin
    Sep 6, 2016 at 15:47
  • IP subnet zero allows you to use the all zeroes and all ones IP addresses of a subnet, which are the two network engineers subtract from the total as they are the network ID and broadcast. Sep 6, 2016 at 15:50
  • 2
    You are incorrect. Read the documentation of the command. With IPv4, there are only two network sizes which use the all zeros and all ones addresses of the subnet for host addresses: /31 and /32. Sending traffic to the all zeros or all ones addresses in any other network size will send the traffic to all the hosts on the network. Since IOS version 12.0, the ip subnet zero command is unnecessary.
    – Ron Maupin
    Sep 6, 2016 at 15:56
  • 2
    I stand corrected. My apologizes. Thanks for clarifying my misunderstanding @RonMaupin. Sep 6, 2016 at 16:00
0

You need to change the IP addressing scheme you have to suite the needs of the network more efficiently, and you cannot use over-lapping subnets this way.

As others describe, you can’t use the whole amount of addresses as one (beginning) is reserved for the subnet/network number and the last is reserved for the layer three broadcast address. (192.168.0.255/24 for example).

E.g

Network Number: 192.168.0.0/24 Broadcast Address: 192.168.0.255/24

== 254 host addressses.

Also remember that if you require a gateway then the L3 device will also require a host address as well.

I suggest you re-subnet this network taking into account how many subnets you need and how many hosts you need in each as well as taking into account future growth.

Also try using a subnet calculator like http://www.subnet-calculator.com/ if you’re struggling calculating the binaries.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.