Comware Based
cancel
Showing results for 
Search instead for 
Did you mean: 

A5210 - Routing between VLANs

WessexOne
Occasional Contributor

A5210 - Routing between VLANs

Hi,

 

I'm having trouble getting machines talking to each other across VLANs on a HP A5120-24G EL switch. I've been over the manual several times but I think I must be miss-reading it (or just not understanding it).

 

Most of our servers (main gateway, dns, dhcp, etc) and internet connection are connected to a CISCO switch on a 172.16.0.0/16 network. I have linked the HP switch to the CISCO switch so that any machine plugged into a VLAN1 port on the HP switch can access all the servers and the internet.

 

The problem comes when adding a second VLAN. There is one server that has to be on its own network. My plan is to create a VLAN20 network on the HP switch running a 192.168.2.0/24 network, assign a port to VLAN20, plug the server into that port and then configure IP routing on the switch so that the server on VLAN20 can access the 172.16.0.0/16 network (and thus the internet as well). It would also need to be configured so that machines on the 172.16.0.0/16 network can communicate with the server on the 192.16.2.0/24 network.

 

Both VLAN1 and VLAN20 have a Vlan-interface on the switch

 

interface Vlan-interface1
 ip address 172.16.0.5 255.255.0.0
 undo dhcp select server global-pool
#
interface Vlan-interface20
 ip address 192.168.2.5 255.255.255.0

 

I plugged a machine into the port for VLAN20, set the IP to 192.168.2.123/24 and the default gateway to 192.168.2.5. This allows it to see the switch (192.168.2.5). However, it can't see the 172.16.0.0/16 network (pings just time out). I had been led to believe that, as the two networks have a virtual interface on the switch, it would automatically route between them. Is that belief wrong?

 

 

2 REPLIES
Fredrik Lönnman
Honored Contributor

Re: A5210 - Routing between VLANs

Devices in 172.16.0.0/16 doesnt now how to find its way to 192.168.2.0/24. On whichever device is the default gw for devices in 172.16.0.0/16 you'll need to put a route showing that 192.168.2.0/24 is routed behind 172.16.0.5.

 

ip route 192.168.2.0 255.255.255.0 172.16.0.5, or similar depending on the device.

---
CCIE Service Provider
MASE Network Infrastructure [2011]
H3CSE
CCNP R&S

WessexOne
Occasional Contributor

Re: A5210 - Routing between VLANs

Thanks for the reply Fredrik.

 

The gateway we are currently using won't take static routes so I couldn't get VLAN1 talking to VLAN20.

 

As I was still unable to get the VLANs talking, I've cheated but plugging a VLAN20 port into an external CISCO gateway device and using that to get to the 172.16.0.0/16 network. Visibility is only one way (VLAN20 can see VLAN1 but not vice-versa). However, as there is only going to be one machine in VLAN20, that can be fixed with IP forwarding.