I have a config that I am trying to bring up, and in my mind it should work, but perhaps I am missing something.

The idea is that one end of the link is a layer 3 interface on a router. The other end is a switchport trunk, on a vlan with an IP interface. They should be able to communicate, no?


Interface 0/1
ip address

SW1 - Layer 3 switch

Interface 1/0/10
 # switchport
 # switchport mode trunk
 # switchport trunk allowed vlan 50

vlan 50
 # name test vlan

Interface vlan 50
* ip address*

There are no gateways configured on either devices, but that should not matter? All I am trying to do is reach them directly.

# ping source int0/1


# ping source vlan 50

neither works. The physical connection is good because both devices see each other as CDP neighbors. The Interfaces are both up/up, vlan 50 interface is up. The subnet is in each device's routing table, as directly connected.

Any help would be appreciated. Am i missing something?

thank you

3 Answers 3


With your switch configuration, you are adding VLAN tags to the frames, but the router is not, so the switch assumes the traffic belongs to VLAN 1.

Since this is layer-3 switch, you should simply configure the switch interface as a layer-3 interface:

interface 1/0/10
 no switchport
 ip address

Alternatively, you could configure a trunk on the router interface.

interface 0/1
 no ip address
interface 0/1.50
 encapsulation dot1Q 50
 ip address
  • okay, but the Layer 2 port on the Switch is configured as trunk with no default vlan, which means it's vlan 1 native (and vlan 200 allowed). So that still doesn't work? thank you Sep 10, 2018 at 16:19
  • No. You are configuring the switch interface to only allow tagged VLAN 50, but the router is not sending tagged frames. With a layer-3 switch to router, it normally should be a routed link, but you can configure a trunk on the router if you need to. What you cannot do is mix a trunk and access interface the way you are doing.
    – Ron Maupin
    Sep 10, 2018 at 16:46

Depending on your needs, the best configuration may vary significantly. Alternatively, on SW1:

you could add -

interface 1/0/10
    switchport trunk native vlan 50

The actual issue in this case is that the switch needs to take the tag off the frame before forwarding it the the router, due to being layer 2 adjacent. Ron explains why above, and this is considered best practice.

However, you can still use your router interface config if you add the command I noted above to the trunk.


There are two option feasible to ensure connectivity through router and layer3 switch.

Option 1

In Router

Router(config) # int 0/1

Router(config)# ip address 192.168.50 .10

Router(config) # no shut

Layer3 switch

Switch (config) # int 1/0/10


Switch(config)#switch port mode access

Switch(config)#switch access vlan 50

Switch (config)no shutdown

In layer3 switch L2 VLAN need to create

Option 2

In router

Router(config) #int 0/1

Router(config) #ip address

Router(config) # no shut

Layer3 switch

Switch(config)# int 1/0/10

Switch(config)#no Switchport

Switch(config)#ip address. 255.255 .255.0

Switch(config)#no shutdown

Static route configuration need to configure in router and layer3 switch to route required tràffic from router to switch vise versa .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.