VLAN config problem!

I want to config vlan1 like this:
   network 192.168.2.0 255.255.0.0

But after apply, it auto change to this:

ip dhcp pool vlan1
   network 192.168.0.0 255.255.0.0
   default-router 192.168.1.1
   dns-server 8.8.8.8
!

Why that?
Thank you!
redstar01Asked:
Who is Participating?
 
Ernie BeekExpertCommented:
So try:

Interface vlan1
ip address 192.168.2.0
Or whatever ip you want to give it.

The network scommand is used (as you can see) for assigning a scope in DHCP. For a vlan you define a 'virtual' interface within that vlan so that your machine can communicate over that vlan.
0
 
enachemcCommented:
use 192.168.2.1

the last number cannot be 0 or
0
 
Ernie BeekExpertCommented:
Typo, should indeed be:


Interface vlan1
ip address 192.168.2.
1 Or whatever ip you want to give it.
0
Turn Raw Data into a Real Career

There’s a growing demand for qualified analysts who can make sense of Big Data. With an MS in Data Analytics, you can become the data mining, management, mapping, and munging expert that today’s leading corporations desperately need.

 
Marius GunnerudSenior Systems EngineerCommented:
What exactly are you trying to do? configure DHCP or configure an IP on the VLAN interface or have the VLAN interface receive an IP from DHCP?

If you are trying to configure a static IP on the VLAN interface then what erniebeek mentioned above is the way to do it. Though you will need to include the subnet mask

interface vlan 1
ip address 192.168.2.1 255.255.0.0

however if you are trying to configure DHCP then the reason it is changing from 192.168.2.0 to 192.168.0.0 is because of the subnet mask you are giving it. you would need to give it a subnet mask of 255.255.254.0 or some other range in the 3rd octet for that number to stay.
0
 
Marius GunnerudSenior Systems EngineerCommented:
oops. mistake in that subnet.  it would need to be 255.255.253.0 at the very least.
0
 
rochey2009Commented:
Hi,

configure the network with a subnet mask of 255.255.255.0 instead of 255.255.0.0

network 192.168.2.0 255.255.255.0
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.