1

I have a Dell switch s4128f-on which I'm using as L3 core switch. What I want to achieve is creating multiple vlans and being able to reach other networks through an uplink.

What I've done so far is:

  • created vlan10 (for local servers), 10.10.51.1/24 on the switch
  • created uplink vlan172 for external, 172.16.0.2/24

The uplink will be connected to another server which has access to other external networks and NAT rules configured to forward traffic from 172.16.0.0/24 to external interfaces.

On the switch I configured a static route: ip route 0.0.0.0/0 172.16.0.1, so that all my unresolved traffic will go through the uplink and reach external networks.

When I configure a machine in the vlan172 (switch port in access mode) with ip 172.16.0.3 and gateway 172.16.0.1, I'm able to ping servers in vlan10, ping 172.16.0.1, ping 172.16.0.2 as well reach external networks through the uplink.

When connected to the switch's serial console, I can also reach external networks and ping 8.8.8.8.

The problem is when I configure a machine in vlan10 with gateway 10.10.51.1, I can ping servers on vlan172 but can't reach external network through uplink. I tried adding a static route to link the two vlans but I get the error Network unreachable. Please help.

1 Answer 1

1

The router to which your layer-3 switch (which is also a router) is connected needs to be told how to reach the networks on the layer-3 switch.

Routers learn routes in three ways:

  • Directly connected networks
  • Statically configured routes
  • Dynamically learned routes through a routing protocol

Your upstream router does not know how to reach the network on VLAN 10.

Normally, you set up the layer-3 switch as the LAN router, and it is the gateway for each VLAN. You then connect the layer-3 switch to the WAN router via a layer-3 routed link. You will need to either statically configure routes to the VLANs on the layer-3 switch on the WAN router pointing to the layer-3 switch, or you run a routing protocol between the LAN router (layer-3 switch) and the WAN router.

1
  • Thank you so much, I added a static route in my uplink server, from uplink to l3 switch and now it works. You deserver a warm coffee ;)
    – 2202
    Commented May 27, 2022 at 14:06

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