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
  • 211
  • 4
  • 12

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,884
  • 1
  • 36
  • 68