Hello guys,
Sorry to bothering you.
I had a small network with one ISP and firewall.
eth1 -> Is connected to my ISP eth0 + eth0.1 , eth0.2 and etc are my local networks.
All my network accesses internet via eth1.
My routing table looks like the following :
213.194.242.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 10.123.20.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 10.123.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 10.123.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.8 10.123.42.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.5 10.123.123.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.7 10.123.40.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.4 10.123.30.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 10.123.44.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.6 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0.8 0.0.0.0 213.194.242.1 0.0.0.0 UG 0 0 0 eth1
Recently I have added secon provider via ADSL.
ADSL modem is connected via eth0.8 . Using adsl-setup I have created ppp interface ppp0.
Now I want to achieve the following :
Computers from local network range 10.123.123.0/24 (eth0.7) should access internet using my second internet provider via ppp0.
I believe that for that I need to use advanced networking and iproute package.
I will add the second routing table named "adsl" and configure routing via ppp0 there. Together with that i need to set in iptables , nat table to masquerade all ips going out via ppp0. I believe I need to use ip command for this.
And the finally my questions are :
1) Is there a good tutorial / howto for using iproute on the internet, except of the LARTC.org 2) Can i utilize by tools of CentOS, to have my configuration (with second routing table, using ip ) somehow stored - to be permanent when I will do machine restart? I mean there are networking-scripts /etc/sysconfing/network-scripts which can handle, IP assigment, virtual LANS, aliases even static routes. Can they handle advanced routing as well?
Thank you milion times.
David Hlacik
On Sun, 2009-12-20 at 19:54 +0100, David Hláčik wrote:
Computers from local network range 10.123.123.0/24 (eth0.7) should access internet using my second internet provider via ppp0.
This may be too simple for your needs, but it took a while for the light to come on for me about this when I set up something similar.
I have two Internet connections, one cable and one DSL. I want to have some of my computers on the cable connection and some on the DSL connection, but I want all of my computers to be on the same internal network.
Solution: Put a router on each modem with a different address. Assign the default gateway on each computer depending on what outside connection it is supposed to use. 192.168.0.1 == cable, 192.168.0.254 == DSL.
Nothing to it.
Frank,
but as noticeable from my routing table, I have several VLANs iniside my local network - for servers, computers, wifi's, and voip.
Each VLAN has it's own DHCP which assigns ip address with netmask 255.255.255.0 and uses particular VLAN interface on router as a gateway. If I will do so. I will lost a route between my VLAN's that way and I do not want to use netmask 255.255.0.0 so computers in local lan can communicate without router.
Thank you in advance,
David Hlacik
On Sun, Dec 20, 2009 at 11:04 PM, Frank Cox theatre@sasktel.net wrote:
On Sun, 2009-12-20 at 19:54 +0100, David Hláčik wrote:
Computers from local network range 10.123.123.0/24 (eth0.7) should access internet using my second internet provider via ppp0.
This may be too simple for your needs, but it took a while for the light to come on for me about this when I set up something similar.
I have two Internet connections, one cable and one DSL. I want to have some of my computers on the cable connection and some on the DSL connection, but I want all of my computers to be on the same internal network.
Solution: Put a router on each modem with a different address. Assign the default gateway on each computer depending on what outside connection it is supposed to use. 192.168.0.1 == cable, 192.168.0.254 == DSL.
Nothing to it.
-- MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Each VLAN has it's own DHCP which assigns ip address with netmask 255.255.255.0 and uses particular VLAN interface on router as a gateway. If I will do so. I will lost a route between my VLAN's that way and I do not want to use netmask 255.255.0.0 so computers in local lan can communicate without router.
Well, actually they will also be not reacheable, since I am using switch with configured VLAN, so subnets can not physically reach each others.
I have done little research and I have noticed : /etc/sysconfig/network-scripts/ifup-routes which seems to use route-$IFNAME and rule-$IFNAME files, passing lines to ip command. Maybe I can try a little game in this area.
Thank you and Best Regards, David Hlacik
David Hláčik <david@...> writes:
Each VLAN has it's own DHCP which assigns ip address with netmask 255.255.255.0 and uses particular VLAN interface on router as a gateway. If I will do so. I will lost a route between my VLAN's that way and I do not want to use netmask 255.255.0.0 so computers in local lan can communicate without router.
Well, actually they will also be not reacheable, since I am using switch with configured VLAN, so subnets can not physically reach each others.
I have done little research and I have noticed : /etc/sysconfig/network-scripts/ifup-routes which seems to use route-$IFNAME and rule-$IFNAME files, passing lines to ip command. Maybe I can try a little game in this area.
Thank you and Best Regards, David Hlacik
Hi David -
You might want to look into a router specific distro like Vyatta. The community edition is free or you can go the paid support route.
Vyatta will give you a much more robust router capability with a more maintainable configuration than trying to set this up by hand using IP tables. It also supports routing protocols like OSPF that make a lot more sense in the type of application you're looking at.
Cheers, Dave