dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
2067
share rss forum feed

olive403

join:2012-10-10
Canada
Reviews:
·WestNet Wireless

Two Gateways (two isps two nic)- LINUX - Please :)

Hi!
(i googled this and tired numerous answers still cant get the routes working, using redhat 5)

I have a linux computer, before I get another internet connection on my server- I have a question, since i have two ISPs - trying to get them both to be routing on the internet

(firewall turned off since they are behind routers)

( i did this on a windows 2000 about 12 years ago with just a few clicks)

eth0 = 172.10.10.190 255.255.255.0 gateway 172.10.10.1 (not set)
eth1 = 10.10.10.190 255.255.255.0 gateway 10.10.10.1 (set as default gateway)

I did the whole IP tables thing....
ip rule.

did the service network restart

but still can only reach server from default eth1 gateway.

Any suggestions?
--
My ISP Speedtest
»www.speedtest.net/result/2234183999.png


plebel
Premium
join:2011-01-27
Ottawa, ON

Try setting both as default gateways, you should be able to add more than one.

route add -net 0.0.0.0 netmask 0.0.0.0 gw 172.10.10.1
route add -net 0.0.0.0 netmask 0.0.0.0 gw 10.10.10.1


olive403

join:2012-10-10
Canada

i did that but it just chooses a random route - .........


plebel
Premium
join:2011-01-27
Ottawa, ON

I'm not sure what you're trying to do here... Do you want to do fail-over or load balance outgoing connections between your two ISP's or are you trying something else?

Expand your moderator at work

UnixMan

join:2012-10-14
reply to olive403

Re: Two Gateways (two isps two nic)- LINUX - Please :)

You can't just add two default routes. Read this this first or google for "Linux Advanced Routing".


olive403

join:2012-10-10
Canada

thats exactly what i did. still not working...


olive403

join:2012-10-10
Canada

ill paypal someone $10 to fix this from me with SSH access


plebel
Premium
join:2011-01-27
Ottawa, ON
reply to olive403

This may help...

»www.tldp.org/HOWTO/Adv-Routing-H···nks.html


olive403

join:2012-10-10
Canada
Reviews:
·WestNet Wireless

thats exactly what i did from the start - same thing - only one ip will have an outside path to the internet....

here are the commands are used.

ip route add 172.10.10.0 dev eth0 src 172.10.10.190 table T1

ip route add default via 172.10.10.1 table T1
ip route add 10.0.0.0 dev eth1 src 10.10.10.190 table T2
ip route add default via 10.10.10.1 table T2


ip route add 172.10.10.0 dev eth0 src 172.10.10.190
ip route add 10.0.0.0 dev eth1 src 10.10.10.190

Then, your preference for default route:
ip route add default via 172.10.10.1


ip rule add from 172.10.10.190 table T1
ip rule add from 10.10.10.190 table T2

ip route add default scope global nexthop via 172.10.10.1 dev eth0 weight 1 \
nexthop via 10.10.10.1 dev eth1 weight 1
--
My ISP Speedtest
»www.speedtest.net/result/2234183999.png


olive403

join:2012-10-10
Canada
reply to plebel

i gave up i think TELUS is blocking my business port 80


olive403

join:2012-10-10
Canada
Reviews:
·WestNet Wireless
reply to olive403

where would i save this info so when i restart network service it already has this saved?
--
My ISP Speedtest
»www.speedtest.net/result/2234183999.png


plebel
Premium
join:2011-01-27
Ottawa, ON

I don't remember where exactly extra routing information is kept in Red Hat, somwhere under /etc/sysconfig/network or network_scripts. You could create a startup script as well that runs those commands, just make sure it runs immediately after the network startup script runs.


UnixMan

join:2012-10-14
reply to olive403

Create the following files:

/etc/sysconfig/network-scripts/route-eth0
/etc/sysconfig/network-scripts/route-eth1
/etc/sysconfig/network-scripts/rule-eth0
/etc/sysconfig/network-scripts/rule-eth1

and add your configuration for each Ethernet interface your system has. Files route-* and rule-* contain only parameters of ip command (simply exclude "ip route/rule add"). For example, route-eth0 will look like:

172.10.10.0 dev eth0 src 172.10.10.190 table T1
default via 172.10.10.1 table T1
...

I think it should work in RedHat. My server is running Fedora 17 which is a RedHat distro as well and it has a similar configuration for two interfaces.

olive403

join:2012-10-10
Canada
Reviews:
·WestNet Wireless
reply to olive403

ok strange - i added the routes to rc.local.. onlything i did different now i cant get the network to turn on

Bringing up loopback interface: [ OK ]
has different MAC address than expected, ignoring.
[FAILED]
--
My ISP Speedtest
»www.speedtest.net/result/2234183999.png


olive403

join:2012-10-10
Canada
Reviews:
·WestNet Wireless
reply to olive403

does anyone know hwo to do this with windows server? i formated switching to windows server 2008
--
My ISP Speedtest
»www.speedtest.net/result/2234183999.png



Raja

@41.136.121.x

Hi i am also having this same problem..
after setting up the IP route & rule the network could not turn on..
Found the assigned IP address was removed.

I have reconfigured it .

does anyone help to configure this IP rule


JeanInNepean

join:2012-09-19
Nepean, ON
Reviews:
·TekSavvy TekTalk
·voip.ms
·Primus Talkbroad..
reply to olive403

You need to bind the two eth interfaces into a single one to be able to use them as a single one. I recommend you read the following page:

»access.redhat.com/knowledge/docs···ing.html


Cyborg994

join:2005-04-18
Montreal, QC
reply to olive403

I did this kind of setup with a microtik router a few years back. Was fairly easy.

If I remember correctly you cna use iptables to randomly or specifically define which nat will be used to go out, otherwise it will cause issues.