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

vlan routing

jessica jestol
Level 1
Level 1

I have a 4506 connected via fiber to a 2960. The interface on the 4506 is switchport access vlan 9. The interface on the 2960 is switchport access vlan 10. They are both on the same subnet. vlan 9 on the 4506 is 10.20.2.1 and vlan 10 on the 2960 is 10.20.2.2. How are these two talking? I tried to change the interface on the 4506 to a trunk and I wasn't able to ping the 2960s vlan interface anymore.

 

4506

interface GigabitEthernet2/48
 switchport access vlan 9
 switchport mode access
interface Vlan9
 ip address 10.20.2.1 255.255.255.0

2960

interface GigabitEthernet0/1
 switchport access vlan 10
 switchport mode access
interface Vlan10
 ip address 10.20.2.2 255.255.255.0
 no ip route-cache
1 Accepted Solution

Accepted Solutions

Reza Sharifi
Hall of Fame
Hall of Fame

As long as the 2 switches are in access mode (untagged), you can use different vlan ids on each switch (9 and 10 or 100 and 200) and use the same IP segment  just like your scenario. If you trunk the interfaces than the vlans tags have to match.

HTH

View solution in original post

7 Replies 7

Reza Sharifi
Hall of Fame
Hall of Fame

As long as the 2 switches are in access mode (untagged), you can use different vlan ids on each switch (9 and 10 or 100 and 200) and use the same IP segment  just like your scenario. If you trunk the interfaces than the vlans tags have to match.

HTH

Ah. Ok. thanks. So, is there any way to add a second vlan to that 4506 interface?

Yes but first you need both switches to be using the same vlan on the port and have a vlan interface (SVI) for the same vlan.

So you need to standardise with one of the two vlans you are using.

Whichever you pick make sure the vlan exists in the vlan database of the switch you are modifying.

Once you have done this you can them make the connection a trunk link and add another vlan to it.

Jon

 

Yes, you can add a second vlan, but the interface mode have to changed to trunk first.  You also need the add same exact second vlan on the 2960.

int gi2/48

switchport

switch mode trunk

switch trun allow vlan 100,200

you need the same config on the 2960

 

HTH

One last thing then, what is this that shows in my config? Is there any way to make it go away?

vlan 2-1001

 

Thanks so much for your help! This is what I thought I was going to have to do.
 

nathan demers
Level 1
Level 1

I think a more detailed answer here is required.  

Lets go back to the basics of vlan tags and what the end devices knows.  

Imagine the g 0/1 is used by a laptop.  That laptop has no clue as to what vlan it is on.  Wjy?  The switch never notifies it of the vlan.  the laptop wouldnt even know what to do with it because its irrelevant to it.   When packets enter the switchport they are tagged.  When they leave the switchport they are untagged.  

The same rule applies to two switches with access ports.  As the frames leave an interface the tag is stripped and as it enters its added. So by all rights both switches are performing the same function considering the other an end device. This is why they are able to communicate.  

As for the trunk port a trunk cannot communicate with an access port because (lets assume dot1q tagging) trunks tag packets with dot1q tags or and the access port cant interpret those.

One thing to consider is, it might be possible i have not tested this, is if the access port and native vlan on the trunk port were the same  (both vlan 6)  I think the trunk would have to be forced into "nonegotiate" in order for this to work.  Not sure never tested it or considered it till now.

 

Trunk allowed vlans do not need to match.  From a hierarchy perspective the upstream switch can limit the vlans manually and the downstream switch can be left as a default trunk.  This will work.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card