Switches, Hubs, and Modems
Showing results for 
Search instead for 
Did you mean: 

L3 routing

Go to solution
Occasional Contributor

L3 routing

I have two HP L3 switches, that need to act as gateway of the internal network to two different external networks.

The internal network belongs to a single vlan (VLAN 1), so the traffic will be routed based on the packets' destination networks.
For example
external network #1 =
external network #2 =

Let's also assume that the router interfaces connected to the switches are and

the two switches will have VLAN1 ip addresses
SW1: *.*.*.1/24 and
SW2: *.*.*.2/24,
where *.*.*.0/24 is the internal network's address.

The other Router will connect to Switch1 and the other to Switch2

What are the needed configurations on the L3 switches to handle routing to the external networks?

I know it's something like this but I need some help:

ip routing
ip route
ip route

Do I need to add an additional ip address to both switches, so that they can connect to the Routers?
Ben Dehner
Trusted Contributor

Re: L3 routing

First, on each switch you will have to add a new VLAN; the only port that needs to be a member of this vlan is the link to the external router. The value of the VLAN ID is not relevant, becaue it won't be seen outside of the switch.

Second, you need to give the switches an IP address on these new VLANs for their respective external networks:


Now, as soon as you add the IP address in the VLAN, the switch will know that it has a local direct route to that network. But you will need to add that network into the other switches config:

ip route *.*.*.2

ip route *.*.*.1

Your L3 switches can now route out to the external networks, but this is only half the battle. You will also need to add routes on the external networks' routers so they can get packets back to you. So,

RTR 1:
ip route *.*.*.0

RTR 2:
ip route *.*.*.0

This should get you going.
Trust me, I know what I'm doing