Re: Routing Question; Plan B
From: prg (rdgentry1_at_cablelynx.com)
Date: 01/18/05
- Next message: koolltrash_at_free.fr: "Re: ssh to unix machine behind firwwall"
- Previous message: Dan Stromberg: "fallback-reboot"
- In reply to: Coenraad Loubser: "Re: Routing Question; Plan B"
- Next in thread: Coenraad Loubser: "Re: Routing Question; Plan B"
- Reply: Coenraad Loubser: "Re: Routing Question; Plan B"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 18 Jan 2005 14:59:30 -0800
Coenraad Loubser wrote:
> Okay, so 11.x.x.x is a bad range. Haha.
> I want to know the route settings/commands!
>
> So how's this then:
>
> DSL Router 10.0.0.2
> |
> | DSL Router 10.0.0.200
> | |
> | |
> | |
> eth0 eth1
> 10.0.0.1
> Linux box (routing)
> 192.168.0.1 (dhcp,dns,nat..)
> eth2
> |
> |
> |
> LAN HUB-----PC2 (dhcp -> 192.168.0.2)
> |
> |
> PC1 (dhcp -> 192.168.0.3)
>
>
> Now, I want PC1 and PC2 to have full internet access.
> All Addresses with IP's 196.x.x.x must go through the router
10.0.0.200
> All traffic that takes longer than 2 sec to get a reply over
10.0.0.200
> should go through 10.0.0.2.(Q1: Is this possible?)And all other
traffic
> should go through 10.0.0.2 anyway!
>
> Q2: What's the best way to set up the server?
> Should I:
> Put each DSL router on a different subnet?
> Bridge all the adapters on the linux box into a single subnet?
> I would prefer the different subnets, since it will isolate the
DSL
> routers from the LAN.
>
> *yawn*
>
> Q3: So for the above setup, to set up the routing, would this do it:
> route add default gw 10.0.0.2
> route add 196.0.0.0 netmask 255.0.0.0 gw 10.0.0.200
>
> ..can I do that timeout thing with route?
[snip]
Plan B is _much_ better :-)
First, IPs are attached/belong to an interface/nic -- _not_ the
computer/OS. So, Linux will need one nic and one IP for each dsl
modem.
Why must all 196/8 traffic traverse 10.0.0.200? Where/who is providing
the upstream NAT from a private 10 net space to a public IP (10.0.0.200
to 196/8)?
Still need to know if both dsl modems connect to same ISP/subnet. If
they are connected to the _same_ subnet then solutions will vary. The
output from:
$ /sbin/route -n
will show the netmask of their upstream routers (default gw). The
output of:
$ /sbin/ifconfig -a
will show all your interface configs including IP and netmask.
Copy-n-paste commandline and output from an X terminal (eg., Konsole)
is the easiest way to grab the info.
Is your Linux getting its IP via dhcp or static? Only one IP for each
dsl connection? ISP is providing DNS I assume.
Immediate problem is that IP packets will willy nilly go out one nic
and return via the other. This must be addressed according to your
needs. See previously posted link for background.
Second setup issue: is there any reason _not_ to assign static IPs to
the lan nics? Much simpler and more reliable. You could NAT their
connections out and let the ISP's dns server provide name resolution.
Re: Q-1
Again, why do you think you will gain _anything_ by trying to do this?
When do you start the 2 sec clock? When the SYN packet leaves the
Linux box? What if it's a dns issue? An inet path issue? Far end not
responding/offline? Modem signal problem? IMO, this is a road not
worth traveling -- at all.
Re: Q-2
You will not have any choice about how to setup the dsl modems and your
nics connected to them. The Linux nic _must_ be in the same subnet as
the upstream router provided by your ISP. My guess is you will have
each modem in the same subnet unless they are provisioned by different
ISPs (and maybe even then). Whether you can try for bonding/failover
at a later date depends. Don't try it till you understand your
"simple" setup.
Re: Q-3
Depends on which nic you are talking about. Presume you mean PC1 and
PC2. In this case, your default gw is the router _immediately_
upstream that processes all unknown routes -- in this case, 192.168.0.1
(your Linux box). It will NAT and forward the request to _its_ gw.
This is not a "give a command and let 'er rip" situation. Several
possible solutions are available, but you need to study up so you can
pick the approach that suits your needs/abilities. You can start
simple and get more refined/complicated after you have experience with
the simple setup and know in which direction to improve it. Don't try
for the bull's eye right off.
Since you have obscured the 196.x.x.x IP I can only guess what you're
up to at this point. The 196/8 address space is _not_ something you
should have complete access to -- most likely a subnet provided by your
ISP. Is 196.x.x.x your ISP's router (or the address he would try to
give to the Linux nic attached to that dsl modem)? You have/will
provision only one modem connection? Or do you have some other reason
for wanting 196/8 traffic treated separately? Again, this is beginning
to make no sense.
Networking -- especially with multiple connections/routes -- requires
exactness and completeness of all info to arrive at a solution. I
suspect you do not understand networking very well -- nothing wrong
with that as everyone starts the same way.
You should get and read most all the networking howtos from tldp.
http://www.tldp.org/HOWTO/HOWTO-INDEX/networking.html
Think _really_ hard if two dsl connections for only two PCs is worth
it. Get one connection working, understand your needs, try to make one
connection work, then -- and only then -- consider two connections.
The link from my previous post is standard fare for dual connection
setups. If you don't understand it, how will you maintain it? Why not
a separate dsl modem for each PC?
hth,
prg
eamil above disabled
- Next message: koolltrash_at_free.fr: "Re: ssh to unix machine behind firwwall"
- Previous message: Dan Stromberg: "fallback-reboot"
- In reply to: Coenraad Loubser: "Re: Routing Question; Plan B"
- Next in thread: Coenraad Loubser: "Re: Routing Question; Plan B"
- Reply: Coenraad Loubser: "Re: Routing Question; Plan B"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|