[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Linux LAN probs - a shaggy dog story?



Patrick Kirk wrote:
> 

[snip]

> 
> Help please.  Why am I unable to give internet access to my machines on the
> LAN?

Hi Patrick,

I too am playing with getting my home network up and running. I seem to
be done for the most part. Question, do you have your gateway box set up
as a gateway box? My setup is like this: I have two PCs, one of with is
connected via a cable modem, so I have two NICs in the gateway and one
in the ordinary host. On my gateway machine, my /etc/init.d/network file
has two sets of values (one for each NIC). I'm assuming that you're able
to connect to the world on your gateway machine. My file looks like so:

#! /bin/sh
ifconfig lo 127.0.0.1
route add -net 127.0.0.0
#
IPADDR0=#.#.#.#
NETMASK0=255.255.255.0
NETWORK0=#.#.#.#
BROADCAST0=#.#.#.255
GATEWAY0=#.#.#.1
#
IPADDR1=192.168.1.100
NETMASK1=255.255.255.0
NETWORK1=192.168.1.0
BROADCAST1=192.168.1.255
#
ifconfig eth0 ${IPADDR0} netmask ${NETMASK0} broadcast ${BROADCAST0}
route add -net ${NETWORK0}
[ "${GATEWAY0}" ] && route add default gw ${GATEWAY0} metric 1
#
ifconfig eth1 ${IPADDR1} netmask ${NETMASK1} broadcast ${BROADCAST1}
route add -net ${NETWORK1} netmask ${NETMASK1} dev eth1

On the ordinary host (I'm taking a shot in the dark here cuz, it's
running windows at this time), your /etc/init.d/network should be
similar, only with one nic. You also need to make sure you have the
ifconfig and route commands executed like in the first incantation (the
one with the default gateway).

I hope I'm not leaving anything out, but if you contine to have
problems, feel free to contact me publicly or privately (public is
preferred, so this gets into the archive, and that others can spot my
screw-ups)

hth
-- 
                                         __   _
Mark Wagnon             Debian GNU/ -o) / /  (_)__  __ ____  __    
Chula Vista, CA                     /\\/ /__/ / _ \/ // /\ \/ /   
mwagnon1@home.com                  _\_v____/_/_//_/\_,_/ /_/\_\
                                           http://www.debian.org


Reply to: