04-21-2026 04:32 AM
Hi, I am trying to set up intervlan routing on a Cisco WS-C3750X but it isn't working correctly. I have attached two laptops to the switch running Ubuntu as I thought that the problem might lie with Windows so I reformatted them. The laptops can ping the default gateway of their respective vlans but not the default gateway of the second vlan or each other. At the moment I am studying a course for the CCNA so I'm not sure if it is something that I am doing wrong or a fault with the switch as my thinking is that there is some issue with routing on the switch. However, I have bought multiple switches from Ebay but have had the same problem, many of the switches I have sent back thinking there was a fault with the switches. I am now beginning to think that it is something I am doing wrong or at least not properly as I have very little knowledge or experience. I've now run out of ideas and I'm at a loss as to how to troubleshoot this problem further and hope that somebody can help me, please
This is how I configured the switch:
en conf t vlan 10 vlan 20 int g2/0/1 switchport access vlan 10 switchport mode access int g2/0/2 switchport access vlan 20 switchport mode access exit int vlan 10 ip add 10.1.10.254 255.255.255.0 no shut int vlan 20 ip add 10.1.20.254 255.255.255.0 no shut exit ip dhcp excluded-address 10.1.10.254 ip dhcp excluded-address 10.1.20.254 ip dhcp pool VLAN10 network 10.1.10.0 255.255.255.0 default-router 10.1.10.254 ip dhcp pool VLAN20 network 10.1.20.0 255.255.255.0 default-router 10.1.20.254 ip routing end
And these are various screenshots from the switch:
Solved! Go to Solution.
04-23-2026 01:49 PM
Hello @glosnick ,
the linux box has two default routes one via wired port and one (likely) via wireless and the one via wireless is the preferred one for the lowest metric
This is why you cannot ping the other side the icmp echo request is sent out following the best default route using the 192.168.1.254 using wlo1 interface.
Either you make tjhe default route via other interface preferred or you add a static route for 10.0.0.0/8 via other interface.
As you see a linux box is a small router on its own.
Hope to help
Giuseppe
04-21-2026 05:08 AM
Hello @glosnick ,
the switch configuration looks like correct . The key command is ip routing that enables inter vlan routing
post on the linux laptops
ifconfig -a
Be also aware of possible interaction with software firewall on the test PCs
Hope to help
Giuseppe
04-23-2026 07:32 AM
Hi and thanks for taking the time to respond to my problem, so how would I disable the firewall on the Ubuntu pc's I'll have a look now and see if I can figure it out but your input would be appreciated.
Regards
Nick
04-21-2026 05:12 AM - edited 04-21-2026 05:16 AM
Hello @glosnick
Strange that on WS-3750-X you need to add 'ip routing" command... Try it first and see if it resolve your problem.
Please share #show version output here...
Agree with Mr Larosa: " ... Be also aware of possible interaction with software firewall on the test PCs ..."
04-23-2026 11:25 AM
Thanks for taking the time to respond to me. Not quite sure how to disable the firewall on Ubuntu but I'll look at it shortly when I've been through all these kind responses.
Screenshot of from 'show version' command:
Hope that might help.
Nick
04-21-2026 06:11 AM - edited 04-21-2026 08:38 AM
At a glance, config looks good and you do have an ip routing statement.
Windows FWs might block a ping from the other PC, but the router shouldn't block pinging its non local Interface.
Can router gateway ping same net PC?
Can router gateway ping other net PC? (The latter requires pinging with source interface or source IP.)
Have you checked PC hosts for DHCP info all correctly obtained?
BTW, this physical lab might be pretty accurately replicated in Packet Tracer using a 3560 switch.
04-21-2026 10:04 AM
I just threw your config on a PT 3560 (although had to modify interfaces, as PT mostly has FE interfaces).
Appear to be able to ping all interface IPs as expected.
Switch#sh run
Building configuration...
Current configuration : 1671 bytes
!
version 12.2(37)SE1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
no profinet
!
ip dhcp excluded-address 10.1.10.254
ip dhcp excluded-address 10.1.20.254
!
ip dhcp pool VLAN10
network 10.1.10.0 255.255.255.0
default-router 10.1.10.254
ip dhcp pool VLAN20
network 10.1.20.0 255.255.255.0
default-router 10.1.20.254
!
ip routing
!
spanning-tree mode pvst
!
interface FastEthernet0/1
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/2
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
interface Vlan10
mac-address 0001.96e9.5301
ip address 10.1.10.254 255.255.255.0
!
interface Vlan20
mac-address 0001.96e9.5302
ip address 10.1.20.254 255.255.255.0
!
ip classless
!
ip flow-export version 9
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
end
Switch#
So, at least to PT, configuration also appears valid (and again, works within PT).
04-21-2026 01:27 PM
I agree with my colleagues that the switch config in the OP looks correct. As a next step in troubleshooting can you attempt to ping from the switch to the 2 laptops? It would also be helpful to see the contents of the arp table on the switch (especially to verify that the laptops are in the arp table).
04-23-2026 11:50 AM
04-23-2026 11:46 AM
Hi, thanks for getting back to me, in answer to your questions. I'm not sure what you mean by router gateway but I'm assuming you mean the switch and the switch can ping both of the laptops on the network. As far as I'm aware both the laptops have correctly obtained the correct information. I was trying to add screenshots of the relevant information from each laptop but it appears that each time I try there is some error? I'll try again, might let me this time, so if pictures are attached it worked!
Finally and I'm sure it can be replicated in Packet Tracer and at some point I'll try it but I wanted to build a physical network, although not quite sure why, possibly need my head tested.
Nick
04-21-2026 11:35 PM
Hi @glosnick ,
You configuration is correct, and routing seems to be working on the switch.
Could you please share or verify that the netmask and default gateway is configured correct on the computers?
This seems like a missing default gateway on the Linux computers as they can ping the local network but not across the switch. PC in VLAN10 can ping 10.1.10.254 but not 10.1.20.254? and vice versa?
Please share the output from the "route" command on the linux computers.
04-22-2026 03:11 AM
Could you please share or verify that the netmask and default gateway is configured correct on the computers?
This seems like a missing default gateway on the Linux computers as they can ping the local network but not across the switch.
From the behavior, I've thought exactly the same, which is why I had earlier asked "Have you checked PC hosts for DHCP info all correctly obtained?"
In my PT lab, the PC hosts correctly obtained the DHCP information and, as reported, worked fine. Although, I did initially forget to enable DHCP on the PCs, and until I did, they didn't work.
04-23-2026 12:03 PM
04-23-2026 01:49 PM
Hello @glosnick ,
the linux box has two default routes one via wired port and one (likely) via wireless and the one via wireless is the preferred one for the lowest metric
This is why you cannot ping the other side the icmp echo request is sent out following the best default route using the 192.168.1.254 using wlo1 interface.
Either you make tjhe default route via other interface preferred or you add a static route for 10.0.0.0/8 via other interface.
As you see a linux box is a small router on its own.
Hope to help
Giuseppe
04-27-2026 03:43 AM
Hi and thanks for your response. Through trial and error I determined that when I switched the wifi card off on both laptops it would work. So, you response is likely the solution to my problem. Although not sure how to make the route via the wired port the default route or how adding a static route would help. I'm hoping Google will know the answer but your perspective would be greatly appreciated.
Nick
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