VLAN and gateway outside of subnet

Issues related to configuring your network
Post Reply
ppetasis
Posts: 7
Joined: 2009/11/25 15:36:16
Location: Greece

VLAN and gateway outside of subnet

Post by ppetasis » 2011/01/12 10:41:02

My company hosts five Servers with CentOS 5 installed in a Data Center. The Data Center assigns a VLAN to each customer so that they can organize customers and also count traffic. The VLAN assigned to my company is in the form 62.103.X.X with a subnet mask 255.255.255.240 so the IPs that we can use in our Servers are 13. The first IP in the VLAN (for example 62.103.1.1) is the Gateway and the rest, that are calculated from the subnet mask, are assigned to servers(62.103.1.2 up to 62.103.1.14).
The problem I have is that we have run out of IPs in our VLAN. We have used all IPs and we want some more. The Data Center can assign new IPs but not grow our VLAN IPs by expanding the subnet mask. So they gave us a new VLAN with some IPs (for example 62.104.X.X with a subnet mask 255.255.255.192) They told me that I had to use as gateway the gateway of the first VLAN 62.103.1.1 and assign the new IPs as usual. So I assigned to one of the CentOS 5 servers the IP 62.104.1.2 and set the gateway to 62.103.1.1. Unfortunately this did not work and we could not establish connectivity to the Internet.

Is it possible to assign a gateway outside of the IPs that are in the subnet? Could it be a problem with the VLAN setup by the Data Center?
I would really appreciate any help from the CentOS community.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

VLAN and gateway outside of subnet

Post by pschaff » 2011/01/13 16:54:13

AFAIK the gateway needs to be on your subnet. If there's any other way to make it work, I have never encountered it.

ppetasis
Posts: 7
Joined: 2009/11/25 15:36:16
Location: Greece

Re: VLAN and gateway outside of subnet

Post by ppetasis » 2011/01/14 16:12:13

I totally agree with you but the Data Center staff said this is the correct gateway to work with the VLAN.

I think the staff at the servers have no idea about networking and VLAN. I will probably have to talk to the networking department of the Data Center or just set the gateway to the first IP of the second VLAN.

Thanks

glistwan
Posts: 21
Joined: 2011/01/19 12:08:37
Location: Poland

Re: VLAN and gateway outside of subnet

Post by glistwan » 2011/01/21 11:44:29

I'm pretty sure the gateway needs to be on the same subnet. The guys at the Data Center need to add a secondary ip address on the gateways interface if the access is untagged of create a subinterface in the proper vlan with an ip address in the same subnet if the access is tagged. Most commonly tagged interfaces are called :
eth0.11 for a subinterfece on ethernet 0 in vlan 11
eth3.60 for a subinterface on ethernet 3 in vlan 60
and so on.

Best regards,
Greg

drakonblayde
Posts: 10
Joined: 2011/02/10 09:20:08

Re: VLAN and gateway outside of subnet

Post by drakonblayde » 2011/02/10 10:00:45

If they actually did assign you a new VLAN, then they're incompetent. It's childs play to add a second subnet allocation as a secondary ip address on the SVI already configured.

You could probably make it work by creating a static route to the other gateway and then specifying the interface as the next hop instead of an IP. It's ghetto, but it'll work.

I'd get their network engineer on the phone and get him/her to explain to me exactly how this is configured on their end, and how I'm supposed to configure it on my end.

Post Reply