cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1359
Views
0
Helpful
4
Replies

Vlan switch and subinterface vlan

I have an 8 port L2 switch which has 3 ports in VLAN 10 and 4 ports in VLAN 20

Port 1 of the switch is a trunk port connect to FastEthernet 0 of my Cisco router which is doing inter VLAN routing between both VLANs by using the following commands

interface FastEthernet0.10

encapsulation dot1Q 10

ip address 192.168.0.1 255.255.255.0

!

interface FastEthernet0.20

encapsulation dot1Q 20

ip address 10.10.0.1 255.255.0.0

The router also has 8 switch ports and I would like to assign 2 ports to VLAN 10 and another 2 to VLAN 20.

If I do the following, does it do what I want?

interface Vlan10

no ip address

!

interface Vlan20

no ip address

!

interface FastEthernet1

switchport access vlan 10

no ip address

!

interface FastEthernet2

switchport access vlan 10

no ip address

!

interface FastEthernet3

switchport access vlan 20

no ip address

!

interface FastEthernet4

switchport access vlan 20

no ip address

Thanks.

1 Accepted Solution

Accepted Solutions

Jeff Van Houten
Level 5
Level 5

If fe0 can be a trunk port, then remove the sub interfaces, put in switchport mode trunk and put the ip addresses for the 2 Vlans on the svis.

Sent from Cisco Technical Support iPad App

View solution in original post

4 Replies 4

Jeff Van Houten
Level 5
Level 5

You need to list the model numbers of the equipment and the software versions. There are different answers depending on those factors, but if you're running an older router like I think you are, you're most likely going to have to cross-cable the 2 switches and get rid of the svis on the router.

Sent from Cisco Technical Support iPad App

The router is an 1801 running IOS 15.1. It has 9 switch ports with FE0 capable of being used as a trunk port.

The switch is a TP Link SG3210 layer 2 managed switch.

Jeff Van Houten
Level 5
Level 5

If fe0 can be a trunk port, then remove the sub interfaces, put in switchport mode trunk and put the ip addresses for the 2 Vlans on the svis.

Sent from Cisco Technical Support iPad App

Thanks!

I cannot use FE0 as a trunk port only divide it into subinterfaces, but you've helped me get the SVI vlans working by using one of the switchports (fa1 - 8 ) as a trunk.

This is how I originally tried to get intervlan routing working but couldn't and found the subinterface method.

Here's a test solution in case anyone else has this problem

On the layer 2 switch, Ive plugged a NAS storage device (192.168.200.2) into port 7 and set that port as a GENERAL port with a PVID of 50 (Port VLAN ID also known as VLAN ID).

Port 8 is set up as a TRUNK port, trunking PVID 50 and this connects to FE8 on the Cisco which is the corresponding trunk port.

On the Cisco, I have the following config...

vlan 50

name TEST

!

interface FastEthernet8

switchport trunk native vlan 50

switchport mode trunk

no ip address

!

interface Vlan50

description TEST

ip address 192.168.200.1 255.255.255.0

This works great.

One last question, why would someone use subinterfaces or the above method of inter vlan routing?

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco