[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 808
  • Last Modified:

Change VLAN number and cannot ping default gateway

I have a question about configuring the VLANS on a Cisco switch.
I have a 2960 switch and have a 2811 router connected to it.  
I have configured the switchport that is connected to the router as a trunk.
The interface on the router is configured with IP
I have workstations on the switch and have their default gateway set as
I can ping the default gateway fine from my workstations when they are in the default VLAN 1.
Now I create a VLAN 100 and move all access ports to it.
I can no longer ping the default gateway of and I'm not sure why?
Can the router not accept tagged packets unless setup with subinterfaces?
  • 2
  • 2
1 Solution
Don JohnstonInstructorCommented:
Yes, but it has to be configured to communicate with VLAN 100.

Unlike a switch, the router must be specifically configured for each VLAN on the trunk.

int f0/0.100
 encap dot1q 100
 ip address

Open in new window

then change the default-gateway on the hosts to
ingersoeAuthor Commented:
So you're saying I could also set the Native VLAN to 100, then the switch would not tag any traffic from VLAN 100 and the router could see it?

If I changed the default-gateway on the hosts to, then I would also have to change all of their IP addresses also...assuming a /24 mask.

Is there no way to set encap dot1q 100 on the interface instead of a subinterface?
Don JohnstonInstructorCommented:
Each VLAN will have a different IP addressing scheme. If you VLAN 1 is using, then VLAN 100 will have to be something other than
ingersoeAuthor Commented:
Thanks.  That's what I needed to know.

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now