I seem to be having trouble with communications between a Ubuntu 16.04 VM and Cisco SG-300 10 port switch. I feel like there is something obvious I MUST be missing but for the life of me I cannot figure it out.

On the Linux side, the relevant commands entered are:

modprobe 8021q   
sudo vconfig ens34 3700   
sudo ip addr add dev ens34.3700  
sudo ip link set up ens34.3700

On the Cisco side, relevant commands entered are (starting from default config):

config terminal  
interface ge 1  
switchport mode trunk  
switchport trunk allowed vlan add 3700  
interface vlan3700  
ip add  
no shutdown

Yet for some reason I cannot ping between the VM and the switch.

I used Wireshark to capture some traffic between the two, and what I notice is that the frames VM --> Cisco switch are all tagged VLAN 3700, and the Cisco switch is able to read these frames and respond, however the responses seem to be untagged.

Linux-->Cisco Linux-->Cisco

Cisco-->Linux Cisco-->Linux

Why does this happen? What can I do to fix it?

  • 1
    Did you create the VLAN in the vlan database?
    – Ron Trunk
    May 16, 2016 at 19:28
  • One way to check whether the VLAN exists (as per Ron's comment) is show vlan. You should see the VLAN listed on the left, but not necessarily the port in question listed on the right. May 16, 2016 at 20:31
  • What happens if you set the native vlan to 1 on the cisco side? If the switch believes the native vlan of the port is 3700 is might not think it needs to tag the packet on the way back. May 17, 2016 at 10:02
  • Hey, thanks for the responses. I did create the VLAN in the VLAN database, the switch can ping its own IP and Linux can ping its own IP but they cant talk to each other. The native VLAN for Cisco is 1 by default, but I tried setting it anyway, no change in results observed.
    – user25427
    May 19, 2016 at 19:02
  • If you look at the top of the last pane in Wireshark for both packets, you'll see that the Linux --> Cisco packet is 64 bytes while the reply is 60 bytes. (the 4 byte difference I assume being the 802.1Q type tag & VLAN ID)
    – user25427
    May 19, 2016 at 19:10

2 Answers 2


I never really figured this out but I've moved on from it and chalked it up to the vlan linux package lacking some intelligence that Cisco has. (seeing as how Cisco understood when packets were meant for it and Linux didn't)

Thanks to all who took time for this.


Trunk links carry multiple VLANs. Are you running multiple VM's on your server? If not, why are you trunking to it? Why trunk to the server?

switchport trunk allowed vlan add 3700 should be deleted - just allow all until you get it working.

  • Yes, the intention was to have multiple vlans on it. I focused on a specific one just for troubleshooting purposes. What I eventually ended up finding is that the responses from that Cisco switch were basically the same as what came from a Fortigate 200D unit. Basically: Linux --> Fortigate200D or Cisco SG300 = working, Fortigate200D or Cisco SG300 --> Linux = not working, Fortigate200D <--> Cisco SG300 = working, Which is why I chalked it up to the Linux vlan package lacking some intelligence.
    – user25427
    Jul 12, 2016 at 19:04

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.