Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   CentOS (http://www.linux-archive.org/centos/)
-   -   routing with 2 ISPs (http://www.linux-archive.org/centos/298287-routing-2-isps.html)

David Hláčik 12-20-2009 05:54 PM

routing with 2 ISPs
 
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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Frank Cox 12-20-2009 09:04 PM

routing with 2 ISPs
 
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

David Hláčik 12-21-2009 09:52 AM

routing with 2 ISPs
 
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
>
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

David Hláčik 12-21-2009 10:06 AM

routing with 2 ISPs
 
> 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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

David G. Miller 12-22-2009 01:40 AM

routing with 2 ISPs
 
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



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


All times are GMT. The time now is 04:38 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.