From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org)
	by nuthatch.gentoo.org with esmtp (Exim 4.62)
	(envelope-from <gentoo-user+bounces-65302-garchives=archives.gentoo.org@gentoo.org>)
	id 1HxryL-0007rQ-Es
	for garchives@archives.gentoo.org; Mon, 11 Jun 2007 22:02:49 +0000
Received: from robin.gentoo.org (localhost [127.0.0.1])
	by robin.gentoo.org (8.14.0/8.14.0) with SMTP id l5BM0YBp025807;
	Mon, 11 Jun 2007 22:00:34 GMT
Received: from ender.volumehost.net (adsl-69-154-123-202.dsl.fyvlar.swbell.net [69.154.123.202])
	by robin.gentoo.org (8.14.0/8.14.0) with ESMTP id l5BLtRra018353
	for <gentoo-user@lists.gentoo.org>; Mon, 11 Jun 2007 21:55:28 GMT
Received: from localhost (localhost [127.0.0.1])
	by ender.volumehost.net (Postfix) with ESMTP id B9B8F24E6
	for <gentoo-user@lists.gentoo.org>; Mon, 11 Jun 2007 21:55:26 +0000 (UTC)
X-Virus-Scanned: amavisd-new at volumehost.net
Received: from ender.volumehost.net ([127.0.0.1])
	by localhost (ender.volumehost.net [127.0.0.1]) (amavisd-new, port 10024)
	with LMTP id RKFSUUuhaG2u for <gentoo-user@lists.gentoo.org>;
	Mon, 11 Jun 2007 21:55:25 +0000 (UTC)
Received: from adsl-69-154-123-205.dsl.fyvlar.swbell.net (adsl-69-154-123-205.dsl.fyvlar.swbell.net [69.154.123.205])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by ender.volumehost.net (Postfix) with ESMTP id 1AB7F20827
	for <gentoo-user@lists.gentoo.org>; Mon, 11 Jun 2007 21:55:25 +0000 (UTC)
From: "Boyd Stephen Smith Jr." <bss03@volumehost.net>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Double network cards
Date: Mon, 11 Jun 2007 16:55:19 -0500
User-Agent: KMail/1.9.7
References: <da5cd1900706110719v30737d1dg22b9094d149c145f@mail.gmail.com> <466D6111.7040501@gmail.com>
In-Reply-To: <466D6111.7040501@gmail.com>
X-Eric-Conspiracy: There is no conspiracy
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
Content-Type: multipart/signed;
  boundary="nextPart1515466.JFlfG32FEU";
  protocol="application/pgp-signature";
  micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <200706111655.24559.bss03@volumehost.net>
X-Archives-Salt: c05897ea-755d-44f7-a385-bbd60ff5221e
X-Archives-Hash: 312d4a5fe2b646512d6c310d9d12a0d1

--nextPart1515466.JFlfG32FEU
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Monday 11 June 2007, dexter <dexters84@gmail.com> wrote about 'Re:=20
[gentoo-user] Double network cards':
> Marco Calviani pisze:
> > Hi list,
> >   i would like some technical advice concerning the possibility of
> > mounting two network devices on the same desktop computer. One network
> > card (which is binded to a fixed IP) allows me to allow the machine to
> > be visible on the public network, while the second one (faster, the
> > one i've installed now) is used to work.
>
> Hello
> If You are going to use both devices to access the same address space
> then afaik it is not possible.
> I think it could be done with static routing, but You would require
> properly configured router.

Which (surprise!) is the same thing as a properly configured linux box. :P

Basically, you simply need to make sure you configure routing for=20
the "internet at large" correctly.  This will generally involve some sort=20
of source-based routing and/or some custom dhclient scripts and/or=20
assigning proper metrics to your routes and telling the kernel how to use=20
those metrics when there are multiple routes to a single IP.

We have two networks here at the house: the cable internet (9Mbps/1Mbps,=20
but those speeds can't be counted on, dynamic IP) and the DSL=20
(1.5Mbps/512Kbps, I think, block of static IPs).  I've got two NICs so I'm=
=20
on both of them.  Virtually all traffic uses the cable connection (http=20
requests, bittorrent, etc.), but the DSL connection is available for=20
traffic (ssh, local mail server [on the same subnet], etc.). Here's the=20
relevant parts of my setup:

/etc/conf.d/net:
config_eth0=3D( "dhcp" )
modules_eth0=3D( "pump" )
pump_eth0=3D""
config_eth1=3D( "69.154.123.205/29 brd 69.154.123.207" )
modules_eth1=3D( "!plug" )

/etc/iproute2/rt_tables:
127     dsl

/etc/conf.d/local.start:
sbr-init

/usr/local/sbin/sbr-init:
#!/bin/bash

# Clear tables
ip route flush table dsl 2>&-

# Fill tables
ip route add 69.154.123.200/29 dev eth1 table dsl
ip route add 0.0.0.0/0 via 69.154.123.206 table dsl

# Reset rules
ip rule del pref 16000 from 69.154.123.205 2>&-

# Set rules
ip rule add pref 16000 from 69.154.123.205 table dsl

=2D-=20
Boyd Stephen Smith Jr.                     ,=3D ,-_-. =3D.=20
bss03@volumehost.net                      ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-'=20
http://iguanasuicide.org/                      \_/    =20

--nextPart1515466.JFlfG32FEU
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (GNU/Linux)

iD8DBQBGbcTM55pqL7G1QFkRAsLPAJ4izWZah5BFhyLrIonlRNV7EdAyQwCfed3X
iFT5Vqqw/Qw0UOMzTOsw/98=
=QBNM
-----END PGP SIGNATURE-----

--nextPart1515466.JFlfG32FEU--
-- 
gentoo-user@gentoo.org mailing list