cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
273
Views
2
Helpful
3
Replies

Subinterfaces and VLANs

michal-miac
Level 1
Level 1

I have a few general questions when it comes to my network. Maybe someone could even suggest how to name the topic of my question. But firstly, I'd like to introduce you to my network.

Screenshot from 2024-03-27 09-44-56.png


The special thing about the network is that subinterfaces are configured on the two connected interfaces of the routers, so the configuration looks like this on the first router:

interface GigabitEthernet2.1
encapsulation dot1Q 2
ip address 192.168.10.2 255.255.255.0

interface GigabitEthernet2.2
encapsulation
dot1Q 3 native
ip address 192.168.9.2 255.255.255.0

and on the second router:

interfacedc GigabitEthernet1.1
encapsulation dot1Q 2
ip address 192.168.10.1 255.255.255.0

interface GigabitEthernet1.2
encapsulation dot1Q 3 native
ip address 192.168.9.1 255.255.255.0

Communication between the network 192.168.10.2 255.255.255.0 can only take place if this configuration is carried out on the switch:

interface Ethernet1/1
switchport
switchport mode trunk
switchport trunk allowed vlan add 2
no shutdown

interface Ethernet1/2
switchport
switchport mode trunk
switchport trunk allowed vlan add 2
no shutdown

The background idea is that I want to be able to create different networks on the same interfaces. My concerns are:

1. is it common to use such configuration?

2. is it best practice to use such configurations?

3. does it make sense to configure the switch interfaces as trunk?

3. what would be another solution that would mimic the same as my network?

1 Accepted Solution

Accepted Solutions

1. is it common to use such configuration?Yes

2. is it best practice to use such configurations?this is optimal config

3. does it make sense to configure the switch interfaces as trunk?sure since you use subinterface in router then router and SW must use tag frame and tag frame only work with trunk port

3. what would be another solution that would mimic the same as my network?there is no other solution except if the router supports vlan, then you can config vlan SVI instead of subinterface and still you need trunk port in SW for both vlan and subinterface.

MHM

View solution in original post

3 Replies 3

1. is it common to use such configuration?Yes

2. is it best practice to use such configurations?this is optimal config

3. does it make sense to configure the switch interfaces as trunk?sure since you use subinterface in router then router and SW must use tag frame and tag frame only work with trunk port

3. what would be another solution that would mimic the same as my network?there is no other solution except if the router supports vlan, then you can config vlan SVI instead of subinterface and still you need trunk port in SW for both vlan and subinterface.

MHM

Wow that was fast, thank you very much!

Joseph W. Doherty
Hall of Fame
Hall of Fame

You ask are such configurations common.  In the large Enterprise networks I supported, they were not.  The reason they were not is because routers, in conjunction with L3 switches, very seldom need to host multiple networks on the same interface.  Usually a router interface had a /30 or /31 p2p connection to another router or L3 switch.

Such a configuration might be used between routers and L2 switches, but again, something I seldom saw with usage of L3 switches.

Regarding your questions about best practice and/or other solutions, it would depend on your goals and budget.

Basically, most low end routers offer much, much less routing performance compared to a comparatively priced L3 switch.  So consider why/when you would use two routers with a L2 switch and not a L3 switch?  Yes, a L2 switch costs less than a L3 switch, yet you have a need/budget for multiple routers?

Review Cisco Networking for a $25 gift card