Re: local routing between two network cards?

From: Pete (neverland_at_jwgibbs.cchem.berkeley.edu)
Date: 02/14/05


Date: 14 Feb 2005 13:24:56 -0800

In article <slrnd123ef.7b9.ibuprofin@compton.phx.az.us>,
Moe Trin <no.mail.accepted.sorry> wrote:
>In article <cupdif$uc$1@jwgibbs.CChem.Berkeley.EDU>, Pete wrote:
>
>Your description of the problem isn't quite clear. Have you had a look
>at the "Linux Network Administrator's Guide"? It should be available on
>your system, or get it from http://tldp.org/guides.html.
Hadn't seen that one -- I'll grab it now...
>
>>I have a linux (RedHat 7.1) box with two wthernet cards, each of which
>>connects to one other satellite (non-linux, non M$) machine. (Local LAN
>>only -- no internet connection.) Each machine converses happily with
>>linux, but they can't see each other, because there is no routing
>>between the cards.
>
>Make sure these are different networks (or you'll have to get into
>Bridging, and proxy-arp, and all kind of nasty sounding things), and that
  Ahh -- well this could be a problem! All the machines have 192.168.1...
addresses. I have /etc/sysconfig/static-routes set up to direct the
linux box packets the right way.
>they each know to send the packets to the local address of the Linux box as
>a gateway to the network that the "other" computer is on. Then, tell the
>Linux box to act as a router, by setting the variable FORWARD_IPV4 in
>/etc/sysconfig/network to either 'true' or 'yes'.
This I have done, but it's having no effect.

In more detail, /etc/sysconfig/network is:

NETWORKING=yes
HOSTNAME=Lys
FORWARD_IPV4=yes

and /etc/sysconfig/sysctl.conf is:

# Enables packet forwarding
net.ipv4.ip_forward = 1
net.ipv4.ip_always_defrag = 1
# Enables source route verification
net.ipv4.conf.all.rp_filter = 1
# Disables the magic-sysrq key
kernel.sysrq = 0
 
/etc/sysconfig/static-routes has:
eth0 host 192.168.1.2
eth1 host 192.168.1.1

(And both satellite machines have the linux one (192.168.1.3) set up
as gateway.)
>
>>What I'd like is some simple router scheme that passes packets arriving
>>at one card destined for the machine on the other card to be passed to
>>that card. However, I've never been able to track down how to do this.
>
>Very common question, answered many time. Had you also looked at all of
>the HOWTOs on the system? 7.1 is unsupported and ancient, but the HOWTOs
>should tell you all you need to know.
Hmm -- no, I haven't really found the answers I need, despite quite a
bit of delving! [Yes, I know 7.1 is old, but my philosophy is that
advantages of updating seldom outweigh the pain! (And some of the HOWTOs
are even older... (:-/)]

I may just break down and rewire with a small hub. [As background,
I acquired the hardware that I've installed the Linux on with two
network cards already in place, so it seemed easier just to use
crossover cables to connect. Works fine for most things, except
when I want to talk satellite to satellite.]

                                        -- Pete --

-- 
============================================================================
The address in the header is a Spam Bucket -- don't bother replying to it...
(If you do need to email, replace the account name with my true name.)
============================================================================


Relevant Pages