Re: What is a 'default route'??

From: David Haggett (news-spam_at_haggett.demon.co.uk)
Date: 03/10/04


Date: Wed, 10 Mar 2004 08:31:21 +0000

On Tue, 09 Mar 2004 21:18:57 -0800, Arthur wrote:

This is not a linux question, and the answer would apply whichever OS you
use.

> I have a Linux box (Mandrake 9.2). It has 2 NIC's. I have 2
> different DSL providers. Thus I have 2 routers, 1 switch and 2 DSL
> modems.

OOoooh....nice:)
>
> Below is my routing table. What is a default route? Basically, does
> this mean that ALL traffic on your network goes out to the internet

The default route is the next-hop used to send traffic with a destination
address not on your local network. It is used as a "last resort" if there
is no specific route to a destination in the hosts routing table.

 
The IP stack will allow you to set more than 1 default gateway but in your
set-up it wouldn't work. If you set both, default behavior is (probably) to
load-balance (i.e. alternate) packets between gateways. Because you use
NAT, alternate packets arrive at the destination server with a different
source address, and a TCP connection cannot be reliably maintained.

Packet 1 (SYN) SRC: 206.126.232.53 DST <Server on Internet>
Reply 1 (SYN-ACK) SRC: <Server on Internet> DST: 206.126.232.53
Packet 2 (ACK) SRC: 64.36.28.114 DST: <Server on Internet>

Because the Internet server hasn't started the TCP negotiation with
host206.126.232.53 64.36.28.114, it drops the 2nd packet and the
connection is broken.

> If the second diagram is true, then I should have automatic failover.
> I should be able to use both routes regardless.
>
> Should the same not be true for incoming connections? Why can't I
> SSH or TELNET into both like this:

Because you reply packets also get translated as they leave your routers.

> eth0 / eth1 <======> 206.126.232.53 OR 64.36.28.114
>
> Can someone please, please explain this in dingbat terms for me?
>
> Basically I have 2 DSL lines and 2 NIC's. I should be able to go out
> over either one and come in over either one. And, if one goes down, the
> other should take over and I can stil get in and out over that
> one.....that is what I really want.

To do this you will need to take the following steps
1. Purchase a valid (non-RFC1918) range of IP addresses.
2. Negotiate with BOTH your ISPs to provide BGP peering.
3. Configure BGP peering on your two routers to advertise your
public address space to the internet.
4. Purchase a third router to sit between you and your edge routers and
configure dynamic routing between all three.

Good Luck

-- 
David Haggett (CCNP)
Linux user since 01/01/2003
Email: david<at>haggett<dot>demon<dot>co<dot>uk


Relevant Pages

  • policy-based routing and NAT with iptables
    ... I try to setup policy-based routing under linux with iptables and ip ... configured iptables so that packets with some port-numbers are marked. ... Those packets marked should receive the second routing-table. ... hostname:/home/airflow# ip route list table default ...
    (comp.os.linux.networking)
  • Re: email disappearing
    ... > routing the packets into the NTL/Telewest network when it should have gone ... suggest they should be able to route them to their destination, ... they'd fail at the first NTL/TW router. ... packets being bounced between 2 routers, if the NTL/TW network was trying to ...
    (uk.telecom.broadband)
  • Re: Static route via address, not interface
    ... >> and then add network route via router ... configuration (I have 172.22.2.0/24 segment attached with router ... Routing tables ... packets transmitted, 1 packets received, 0% packet loss ...
    (freebsd-net)
  • Re: IPCOP login help
    ... ping may be disabled or blocked ... question is why are packets destined for 192.168.1.1 being sent to ... This is probably because you don't have routing set up on that other PC. ... try 'route print' to see the routing table (there ...
    (comp.security.firewalls)
  • Re: Routing problems
    ... is to forward some of the packets ... > I'm no routing guru but from the setup described the ... > or put a static route on each host on the 10.X.X.X ... The 10.X.X.X subnet will never need to use any of the ...
    (freebsd-questions)