1

I am setting up a /21 VLAN on a Cisco Layer 3 switch.

I would like the network to be DHCP and range from 192.168.38.0 - 192.168.46.254.

When I assign as such:

interface Vlan38
 ip address 192.168.38.1 255.255.248.0

I get an error on an overlap with a 192.168.32.0/24 VLAN.

What is the correct IP to set as the Gateway if not the bottom one?

dthree
  • 201
  • 4
  • 12
  • You are going to need to edit your question to include the full switch configuration. You have something configured that is causing the problem, and we need to see your configuration to tell you what it is. – Ron Maupin Apr 21 '17 at 19:01
  • It's a dumber question than that. I don't know technically how to assign a VLAN a subnet bigger than /24, i.e. does it assign upwards or downwards? – dthree Apr 21 '17 at 19:04
  • You really need to learn how to subnet first. See this question and the excellent answer on how to do that. You need to do it in binary, then it becomes obvious. – Ron Maupin Apr 21 '17 at 19:06
  • I do know how to subnet. I don't know where the gateway fits into a subnet. – dthree Apr 21 '17 at 19:57
  • A gateway is simply a host on a network, and you can use any usable host address on the network for a gateway. Some people always use the first usable address, and some people always use that last usable address. It simply doesn't matter, but you should be consistent. You need to learn how to subnet first. Study the answer in that link I gave you. You will not get very far, and it will be very frustrating unless you know how to subnet. That is step 1. – Ron Maupin Apr 21 '17 at 20:06

1 Answers1

4

the range 192.168.38.0 - 192.168.46.254 is not a /21 network.

The closest /21 networks are

192.168.32.0/21 (192.168.32.0 - 192.168.39.255)

192.168.40.0/21 (192.168.40.0 - 192.168.47.255)

Obviously you have the 192.168.32.0/24 network configured on a vlan interface.

When you set ip address 192.168.38.1 255.255.248.0on another interface you get an error because you are actually adding the 192.168.32.0/21network and this conflict with 192.168.32.0/24 which is a subnet of 192.168.32.0/21

You cannot chose an arbitrary range of IP address and declare that this range is a network. When you work with the IP address in binary form you can see why. See this answer: How do you calculate the prefix, network, subnet, and host numbers? for more details

JFL
  • 19,649
  • 1
  • 32
  • 64
  • Here is a nice calculator when trying to determine what fits in which range. http://jodies.de/ipcalc?host=192.168.38.1&mask1=21&mask2= – Craken Jun 07 '19 at 21:07