06-30-2012 03:09 PM - edited 03-07-2019 07:32 AM
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
06-30-2012 04:00 PM
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.
06-30-2012 05:11 PM
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
06-30-2012 06:55 PM
06-30-2012 07:05 PM
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
06-30-2012 09:35 PM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide