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

Traditional VLAN routing question

m.x
Level 1
Level 1

Hi all,

 

I have (a) question(s) about VLANs and Tagging. A customer wants an interface on a Cisco 1921 to be configured for traffic with VLAN 10 tagging. Because the customer is an difficult one, I'm starting to question myself. So i just looking for some answers;

1) To tagg from a switch, one simply puts the interface in the VLAN right?

 1.a) If this is correct, then the router just needs an interface configured with an IP in the same subnet, nothing more?

This is not necessary right? Or if there is a DHCP for VLAN10, you will need the sw acc command?

interface GigabitEthernet0/0/0
switchport access vlan 10
no ip address
duplex full

In this construction there is no need for trunking, only one VLAN passes through and tagging is only important for the switch right?

 

When creating an Router-on-a-stick the router needs subinterfaces and be in trunking mode. 

 

I'm a starting engineer and this still confuses me. :(

 

Thanks in advance for helping.

4 Replies 4

Jaderson Pessoa
VIP Alumni
VIP Alumni
Hello,

If you use just one network, yes... you just can tag switch's port and it will work... But if you need more than one network you will need create a sub-interface on the router, for exemple:

SW1: interface gi0/1
description TO_ROUTER
switchport mode trunk

VLAN 10
VLAN 20

RT1:
interface gi0/1.10
switchport trunk encapsulation dot1q 10
192.168.10.1 255.255.255.0
description VLAN10

interface gi0/1.20
ip address 192.168.20.1 255.255.255.0
switchport trunk encapsulation dot1q 20

Regards,
Jaderson Pessoa
*** Rate All Helpful Responses ***

Hello


@Jaderson Pessoa wrote:
Hello,

If you use just one network, yes... you just can tag switch's port and it will work... But if you need more than one network you will need create a sub-interface on the router, for exemple:

SW1: interface gi0/1
description TO_ROUTER
switchport mode trunk

VLAN 10
VLAN 20

RT1:
interface gi0/1.10
switchport trunk encapsulation dot1q 10
192.168.10.1 255.255.255.0
description VLAN10

interface gi0/1.20
switchport trunk encapsulation dot1q 20
ip address 192.168.20.1 255.255.255.0


Also the physical interface in the above example if used by any subnet with be the untagged 
example
int gig0/1
ip address 192.168.5.1 255.255.255.0 <untagged

 

or you can specify another subnet as untagged and use a subinterface

int gig0/1
no ip address

 

int gig0/1.5
encapsulation dot1q 5  native
ip address 192.168.5.1 255.255.255.0 <un tagged

int gig0/1.10
encapsulation dot1q 10 
ip address 192.168.10.1 255.255.255.0 < tagged

int gig0/1.10
encapsulation dot1q 20 
ip address 192.168.20.1 255.255.255.0 < tagged

 

Lastly the sub interface numbering doesn’t have relate to the vlans on the switch it is just the encapsulation number that does however it is recommended to keep them the same for clarification purposes



example:
int gig0/1.12
encapsulation dot1q 10  <vlan 10

int gig0/1.13
encapsulation dot1q 20  < vlan 20


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

There are things about this environment that we do not know and that might impact our advice. But based on what we know so far I believe that we can give this advice:

- this is to be configured on a 1921 router. So we have a layer 3 router connected to some kind of switch.

- the customer has requested tagging for vlan 10.

- if the switch port connecting to the router is set up as an access port in vlan 10 then there will be no tagging.

- if the switch port connecting to the router is to do tagging for vlan 10 then the switch port must be configured as a trunk port, and the native vlan can not be vlan 10.

- on the router if an IP address is configured on the main interface it will process untagged traffic. So to process traffic tagged for vlan 10 the router must be configured with a subinterface for vlan 10.

 

HTH

 

Rick

HTH

Rick

Joseph W. Doherty
Hall of Fame
Hall of Fame
Hopefully not to confuse you further, but what the other posters are describing is how to configure a router's routed ports to set/accept VLAN tags. Some routers (not sure about a 1921) may have "switch ports" too (might be built-in or as a module). These ports are generally configured like those on a switch, i.e. you would define a port as a "trunk" to obtain VLAN tags.
Review Cisco Networking products for a $25 gift card