11-26-2021 09:25 AM
How to configure Gi0/1 and Gi0/2 switch port interfaces so that any VM is reachable/pingable from router R1 ?
Note: VLAN 50 has been reserved for special purposes. It should not be assigned to any of interfaces and/or links.
11-26-2021 09:31 AM - edited 11-26-2021 09:32 AM
Create a VLAN in Switch VLAN 10 20 30 40
Interface gi 0/2
switchport
switchport mode trunk
switchport trunk allowed vlan 10,20,30,40
Interface gi 0/1
switchport
switchport mode trunk
switchport trunk allowed vlan 10,20,30,40
what you mean untagged vlan 40 in VM side ? you like to make a native ?
Same way you need to configure vswitch.
11-27-2021 12:55 AM - edited 11-27-2021 01:00 AM
Hello,
as far as I recall, the native Vlan does not have to be explicitly allowed on the trunk. So your configs would be:
interface GigabitEthernet0/1
switchport trunk encapsulation dot1q <-- this might or might not be required
switchport mode trunk
switchport trunk native vlan 40
switchport trunk allowed vlan 10,20,30
!
interface GigabitEthernet0/2
switchport trunk encapsulation dot1q <-- this might or might not be required
switchport mode trunk
switchport trunk native vlan 40
switchport trunk allowed vlan 10,20,30
In the output you posted, Vlan 40 is tagged. If you really want this Vlan to be untagged, you need to configure the subinterface on the router with the 'native' keyword:
interface GigabitEthernet0/0/0/40
encapsulation dot1q 40 native
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