Results 1 to 9 of 9
Hi all,
Im having a issue with routing internet traffic from my router two different subnets (vlans). Theres my setup:-
Server:
eth2 to the router
192.168.2.2 mask 255.255.255.0 gw 192.168.2.1 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-03-2010 #1Just Joined!
- Join Date
- Jul 2009
- Location
- uk
- Posts
- 22
Having issue with routing one gateway to different subnets
Hi all,
Im having a issue with routing internet traffic from my router two different subnets (vlans). Theres my setup:-
Server:
eth2 to the router
192.168.2.2 mask 255.255.255.0 gw 192.168.2.1 thats ok
eth0 to vlan2
192.168.3.1 mask 255.255.255.0 gw 192.168.2.1
eth1 to vlan3
192.168.4.1 mask 255.255.255.0 gw 192.168.2.1
Both eth0,1 are running dhcp (two scoopes) that works fine !
the output of route -n is :-
192.168.4.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 eth2
i have ip_forwarding on aswell, but i can ping the ip on the server running that dhcp scoope ie ping 192.168.4.1 works great but i just cant get the internet on the clients
i guess theres something im missing
any help will be great
thanks
- 09-03-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,143
These are not vlans, but different lans. 192.x.x.x addresses are class C networks (non-routable outside the LAN). To get a vlan (subnet), you need to have all using 192.168.1.x addresses, but set your subnet mask accordingly to how many subnets you need. In your case, each "vlan" needs its own router, then you can access the internet from each system, otherwise you need to use real subnets.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 09-03-2010 #3Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,143
FWIW, I am currently teaching this cruft in a data communication and networking class to AT&T technicians...
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 09-03-2010 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,143
One last thing you might try before restructuring your network, is to provide more complete information about your network's physical setup. My "pronouncements" originally are very general in scope, though generally true. However, as we all know, the devil is in the details!
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 09-03-2010 #5Just Joined!
- Join Date
- Jul 2009
- Location
- uk
- Posts
- 22
Hi Rub,
Sorry i didnt explain it properly.
I have a server with three nics eth2 going to the router, eth0 and 1 going to a switch with 2 vlans setup. Client are connected to the switch on a vlan which there is dhcp server running with 2 scopes for each of the nics going to vlan on the switch.
I want the server to be a router as such, which i know it can be done as there distro about that does it. I understand that 192.168.x.x is not a vlan thats where i wrote it down wrong when i typed it out.
So technically the main internet connection is eth2, but i need to route the internet though to the clients thats connected to a vlan on the switch
But i dont know where im going wrong
Thanks for your help
- 09-03-2010 #6Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,143
Ok. That's clearer now. The router is the overall network gateway to the internet. The server is the LAN router. So what is the address of the edge router (connected to eth2)? What is it's subnet mask?
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 09-03-2010 #7Just Joined!
- Join Date
- Jul 2009
- Location
- uk
- Posts
- 22
Router 192.168.2.1 mask 255.255.255.0
server
eth2 192.168.2.2 mask 255.255.255.0 internet
eth0 192.168.3.1 mask 255.255.255.0 vlan 2
eth1 192.168.4.1 mask 255.255.255.0 vlan 3
edit: i deleted the diagram that was there and just wrote it out it didnt display properly
thanks
- 09-03-2010 #8Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,143
It came out fine in the email. The main problem I see is that the "vlan"s are using 192.168.2.1 as their gateway. You need to set the gateway to 192.168.3.1 or 192.168.4.1 for the systems on each segment, depending upon the ethernet port on the server you are using. Then, set up your routing table on the server to connect each of those to 192.168.2.1 so internet requests eventually get to the edge router and onto the internet.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 09-03-2010 #9Just Joined!
- Join Date
- Jul 2009
- Location
- uk
- Posts
- 22
Right ok, i have opened the route tab on nic 192.168.2.1 in the network manager and put destination 192.168.4.1 and mask as 255.255.255.0 and gw 192.168.2.1 then i restarted the connections and its still not working

any ideas


Reply With Quote
