Switches, Hubs, and Modems
1752631 Members
5535 Online
108788 Solutions
New Discussion

L3 routing

 
SOLVED
Go to solution
ststst_1
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 = 172.30.1.0/24
external network #2 = 192.168.1.0/24.

Let's also assume that the router interfaces connected to the switches are 172.30.1.1/24 and 192.168.1.1/24.

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 172.30.1.0 0.0.0.255 172.30.1.1
ip route 192.168.1.0 0.0.0.255 192.168.1.1

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

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:

SW1: 172.30.1.2
SW2: 192.168.1.2

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:

SW1:
ip route 192.168.1.0 0.0.0.255 *.*.*.2

SW2:
ip route 172.30.1.0 0.0.0.255 *.*.*.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 0.0.0.255 172.30.1.2

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

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