LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 11-22-2005, 06:39 AM   #1
jireson
LQ Newbie
 
Registered: Nov 2005
Posts: 1

Rep: Reputation: 0
Unhappy multiple default gateways


Hi,

I'm trying to setup my network with multiple default gateways from a debian linux box running 2.6.11.10.

I've read lartc.org/howto/lartc.rpdb.multiple-links.html and understand about setting up the routes for each interface in separate routing tables.

I have added the table names into my rp_tables file and ip route show table demon/ rednet shows that there's nothing in those tables.

However when I try an add a route into the tables it accepts my command,
Code:
ip route add 213.246.137.16/30 dev eth3 src 213.246.137.18 table rednet
, but it gets added into the main routing table.

I'm quite obviously missing something, but can't work out what it is. Do I need to comple something extra into the kernel?

Can anyone please shed any light on the situation?

Thanks

 
Old 11-22-2005, 08:41 AM   #2
fr_laz
Member
 
Registered: Jan 2005
Location: Cork Ireland
Distribution: Debian
Posts: 384

Rep: Reputation: 32
hi,
i'm quite in a hurry... so i wont be long.
I think you've got to compile the advanced routing module in your kernel.
but it's strange you don't have any error message...
good luck
 
Old 11-22-2005, 06:31 PM   #3
xrtc
LQ Newbie
 
Registered: Sep 2005
Posts: 28

Rep: Reputation: 15
#marking the packets in the input interface in this case eth0

iptables -t mangle -A PREROUTING -i eth0 -s 62.1.196.116/32 -j MARK --set-mark 6


#Masquerade the outgoing interface with the input one

iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE


#sending the marked packets with number 4 into the talbe 80.out

ip ru add fwmark 4 table 80.out


#making default gw 10.0.1.138 for table 80.out

ip ro add default table 80.out via 10.0.1.138
 
Old 02-04-2006, 02:24 AM   #4
xxx_anuj_xxx
Member
 
Registered: Jun 2004
Location: Bharat
Distribution: RedHat, Debian, FreeBSD, Fedora, Centos
Posts: 114

Rep: Reputation: 16
simply use shorewall firewall.


Shorewall and Multiple Internet Connections
eth3 connects to ISP1. The IP address of eth3 is 172.16.6.50 and the ISP's gateway router has IP address 172.16.6.49
eth0 connects to ISP 2. The IP address of eth0 is 192.192.192.15 and the ISP's gateway router has IP address 192.192.192.10.
eth1 connects to the local LAN(192.168.0.1).

1: Edit /etc/shorewall/providers file



Entries in /etc/shorewall/providers can specify that outgoing connections are to be load-balanced between the two ISPs.

##############################################################################
#NAME NUMBER MARK DUPLICATE INTERFACE GATEWAY OPTIONS
ISP1 1 1 main eth3 172.16.6.49 track,balance
ISP2 2 2 main eth0 192.192.192.10 track, balance
#LAST LINE -- ADD YOUR ENTRIES ABOVE THIS LINE -- DO NOT REMOVE

2: Edit the interfaces file
/etc/shorewall/interfaces
##############################################################################
#ZONE INTERFACE BROADCAST OPTIONS GATEWAY
#
loc eth1
net eth0 detect
net eth3 detect
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE


4:Edit your policy file(Add the following line):
/etc/shorewall/policy

#SOURCE DESTINATION POLICY LIMIT:BURST
net net DROP
5:Edit the masq file
/etc/shorewall/masq:
#INTERFACE SUBNET ADDRESS
eth0 172.16.6.50 192.192.192.15
eth3 192.192.192.10 172.16.6.50
6:I want to masquerade my eth1 (local zone) for this I will add the following in my masq file:-
#INTERFACE SUBNET ADDRESS
eth0 eth1 192.192.192.10
eth3 eth1 172.16.6.50


best regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how are multiple default gateways handled? eantoranz Linux - Networking 9 06-01-2005 03:09 PM
Multiple Gateways Jon Doe Linux - Networking 9 03-07-2005 04:26 PM
Multiple Gateways inforlinx Linux - Networking 1 02-22-2005 09:28 PM
Red Hat 7.3 and multiple gateways on multiple interfaces bluefmc Linux - Networking 2 11-19-2004 06:01 PM
multiple ips, multiple gateways, one interface drpixel Linux - Networking 6 12-04-2002 01:56 AM


All times are GMT -5. The time now is 01:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration