public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
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	[thread overview]
Message-ID: <200706111655.24559.bss03@volumehost.net> (raw)
In-Reply-To: <466D6111.7040501@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2436 bytes --]

On Monday 11 June 2007, dexter <dexters84@gmail.com> wrote about 'Re: 
[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 
the "internet at large" correctly.  This will generally involve some sort 
of source-based routing and/or some custom dhclient scripts and/or 
assigning proper metrics to your routes and telling the kernel how to use 
those metrics when there are multiple routes to a single IP.

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

/etc/conf.d/net:
config_eth0=( "dhcp" )
modules_eth0=( "pump" )
pump_eth0=""
config_eth1=( "69.154.123.205/29 brd 69.154.123.207" )
modules_eth1=( "!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

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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2007-06-11 22:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-11 14:19 [gentoo-user] Double network cards Marco Calviani
2007-06-11 14:53 ` Dan Farrell
2007-06-11 15:05 ` Hans-Werner Hilse
2007-06-11 16:42   ` Marco Calviani
2007-06-11 16:54     ` Hans-Werner Hilse
2007-06-11 17:52     ` Dan Farrell
2007-06-11 16:30 ` [gentoo-user] " Grant Edwards
     [not found] ` <466D6111.7040501@gmail.com>
2007-06-11 21:55   ` Boyd Stephen Smith Jr. [this message]
2007-06-11 22:18 ` [gentoo-user] " Jerry McBride

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200706111655.24559.bss03@volumehost.net \
    --to=bss03@volumehost.net \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox