cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1049
Views
0
Helpful
7
Replies

i have a question about creating a vlans on layer 2 switch

dolanduck.
Level 1
Level 1

Im Confused with svi on a layer 2 switch.

How come on my layer 2 switch when i create vlan 99 and i give it a ip address of 10.0.0.2 and and 10.0.0.1 on a router interface my router cant ping my vlan 99. Is it because vlan 99 Its not assigned to a interface or no intervlan routing.

Help

7 Replies 7

Reza Sharifi
Hall of Fame
Hall of Fame

The port that connects the switch to the router needs to be in vlan 99 as well.

HTH

ok is that the reason it works with vlan 1 because by default all ports belong to vlan 1 ?

Hi,

Yes, you are correct.

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!

Deepak Kumar
VIP Alumni
VIP Alumni

Hi,

There is a single rule that If you want to communicate with any device from the switch (Managemenable with VLANs) then there must match the VLAN assignment or Layer 3 interface configuration the same as a remote peer.

Suppose: .

 

Router (gig1/1)-----------(gig1/0/1)Switch

 

your router configuration is like:

 

interface gig 1/1

no shut

ip address 10.0.0.1 255.255.255.0

 

and your switch configuration must be like (If you want to use SVI):

 

vlan 99

!

interface vlan 99

ip address 10.0.0.2 255.255.255.0

!

interface gig 1/0/1

switchport mode access 

switchport access vlan 99

!

 

Regards,

Deepak Kumar

 

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!

is it the same with a layer 3 switch if i enable ip routing. 

is it the same with a layer 3 switch if i enable ip routing. 

Yes, the same with ip routing or without it. But if the switch is just layer-2, you don't need IP routing at all. All you need is a default-gateway statement.

HTH

thanks im now going to connect my layer 3 switch to my router then my layer 2 switch to it.

Review Cisco Networking for a $25 gift card