cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6792
Views
4
Helpful
5
Replies

Multiple subnets on same vlan switchport

danspulecki
Level 1
Level 1

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!

Dan

5 Replies 5

smehrnia
Level 7
Level 7

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

HTH,

plz Rate if it helped,

Soroush.

Hope it Helps!

Soroush.

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?

Thanks!

Dan

fb_webuser
Level 6
Level 6

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

Int Vlan101

ip address x.x.x.x 255.255.255.0

ip address y.y.y.y 255.255.255.0 secondary

---

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

Robin Zhu
Level 1
Level 1

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

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