Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 
New Member

Multiple subnets on same vlan switchport

I have a Cisco 2901 with the 4port gigabit ethernet switch module that I'm trying to get configured to have a seperate subnet for each port.  So far I have it set up so each subnet is a vlan, then on each port I use the switchport access vlan command to tell it which subnet I want that port to be on.  However, there is one port that I need to have 2 subnets on.  The way I found to do that was to use switchport trunking on that port, but it doesn't seem to be working properly.

Can someone show me how they would configure this?  Right now I have vlan 101 as x.x.x.17/28 and vlan 103 as x.x.x.53/30.  I think where I'm getting hung up is the proper association between the physical port and the vlan subnets.

Thanks for any help!


Everyone's tags (5)

Multiple subnets on same vlan switchport

Hey Dan,

what you got behind that port another router or switch? have this in mind, VLANs are a layer 2 implementation, and have nothing to do with ip subnets, when ur physical interface is a member of VLAN X, it only comunicates with switch ports in VLAN X accross the network, regardless of the Layer 3 ip address, which of course that is something to be considered too. but all im trying to say is that, Layer 2 is a whole different level that Layer 3.

a switchport can only belong to one vlan at a time. trunk ports can carry traffic from different vlans, but there must be another trunk capable port at the other end.

at last; we might use a certain ip subnet across a vlan, but essentially thats not mandatory. Layer 2 and Layer 3! different


plz Rate if it helped,


Hope it Helps!

New Member

Multiple subnets on same vlan switchport

Thanks for the reply.

The other device is a Cisco ASA.

I was afraid I could only have a switchport belong to only 1 vlan, and I didn't think the trunking would help me, but I gave it a shot anyway.

Any suggestions on how to configure that one switchport to send both subnets to the ASA?



Hall of Fame Super Gold

Multiple subnets on same vlan switchport

Try to configure the SVI with the second subnet as an IP Address Secondary.

Int Vlan101

ip address x.x.x.x

ip address y.y.y.y secondary


Posted by WebUser Pedro Seabra Ávila from Cisco Support Community App

New Member

Re: Multiple subnets on same vlan switchport

Set trunk on router interface:

Interface g0/0

No shut

Interface g0/0.10

Encapsu dot1q 10

Interface g0/0.20

Encapsu dot1q 20

G0/0 is dot1q trunk with two allowed vlan, 10 and 20

Sent from Cisco Technical Support iPhone App

CreatePlease to create content