Click to See Complete Forum and Search --> : Need little help with our network....


gmoreno
12-27-2000, 12:35 AM
I have two computers:

Computer A:
I have installed Clarkconnect gateway (http://www.clarckconnect.org) it is working perfectly. Both nics are configured correctly. Havent dont much to this box since I installed the software/distro.
ip 192.168.1.1
This computer connects me to my dsl service from pacbell. PacBell dns=206.13.31.12

Using Cat5 Crossover Cable

Computer B:
Slackware 7.1
Here are the configuration files:
/etc/hosts:
# For loopbacking.
127.0.0.1 localhost
192.168.1.2 moreno.dyndns.org.moreno moreno.dyndns.org

# End of hosts.

/etc/rc.d/rc.inet1:
#! /bin/sh
#
# rc.inet1 This shell script boots up the base INET system.
#
# Version: @(#)/etc/rc.d/rc.inet1 2.00 10/06/1999
#

HOSTNAME=`cat /etc/HOSTNAME`

# Attach the loopback device.
/sbin/ifconfig lo 127.0.0.1
/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo

# IF YOU HAVE AN ETHERNET CONNECTION, use these lines below to configure the
# eth0 interface.

# Edit these values to set up a static IP address:
IPADDR="192.168.1.2" # REPLACE with YOUR IP address!
NETMASK="255.255.255.0" # REPLACE with YOUR netmask!
NETWORK="192.168.1.0" # REPLACE with YOUR network address!
BROADCAST="192.168.1.255" # REPLACE with YOUR broadcast address, if you
# have one. If not, leave blank and edit below.
GATEWAY="192.168.1.1" # REPLACE with YOUR gateway address!

# To use DHCP instead of a static IP, set this value to "yes":
DHCP="no" # Use DHCP ("yes" or "no")

# OK, time to set up the interface:
if [ "$DHCP" = "yes" ]; then # use DHCP to set everything up:
echo "Attempting to configure eth0 by contacting a DHCP server..."
/sbin/dhcpcd
elif [ ! "$IPADDR" = "127.0.0.1" ]; then # set up IP statically:
# Set up the ethernet card:
echo "Configuring eth0 as ${IPADDR}..."
/sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}

# If that didn't succeed, give the system administrator some hints:
if [ ! $? = 0 ]; then
cat << EOF
Your ethernet card was not initialized properly. Here are some reasons why this
may have happened, and the solutions:
1. Your kernel does not contain support for your card. Including all the
network drivers in a Linux kernel can make it too large to even boot, and
sometimes including extra drivers can cause system hangs. To support your
ethernet, either edit /etc/rc.d/rc.modules to load the support at boottime,
or compile and install a kernel that contains support.
2. You don't have an ethernet card, in which case you should comment out this
section of /etc/rc.d/rc.inet1. (Unless you don't mind seeing this error...)
EOF
fi

# Older kernel versions need this to set up the eth0 routing table:
KVERSION=`uname -r | cut -f 1,2 -d .`
if [ "$KVERSION" = "1.0" -o "$KVERSION" = "1.1" \
-o "$KVERSION" = "1.2" -o "$KVERSION" = "2.0" -o "$KVERSION" = "" ]; then
/sbin/route add -net ${NETWORK} netmask ${NETMASK} eth0
fi

# If there is a gateway defined, then set it up:
if [ ! "$GATEWAY" = "" ]; then
/sbin/route add default gw ${GATEWAY} netmask 0.0.0.0 metric 1
fi
fi

# End of rc.inet1

Problem:

Can't ping each other. Computer b can't access internet via Computer A.


PLEASE HELP!

Gaccm
12-27-2000, 01:48 AM
are the netmasks the same? that would stop you. Also check out the HW buy pluging both nics into the... nm, u using crossover.

/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo -> this unnessecary

try searching the networking forum, you will almost definately solve your problem.

gmoreno
12-27-2000, 02:00 AM
Please explain the the hw part in laymens terms.

compunuts
12-27-2000, 03:14 AM
Is your network card initiatialize correctly? What happen if you ping comp A IP from comp A and compB IP from comp B? You didn't say it comes back okay or not.
And then make sure your cable is working. Crossover is sometimes little strange. Try changing the sides.

Oh and what message do you see if you issue "ifconfig" command?

[This message has been edited by compunuts (edited 27 December 2000).]

gmoreno
12-27-2000, 03:16 AM
They can't ping each other...host unknown

compunuts
12-27-2000, 03:22 AM
Okay for now, let's not go into network stuff.

My question is "Is each computer see its own Network card? What is the message if you issue "ifconfig" command? The IP setting comes back okay?

You didn't say that in your posts.

mdwatts
12-27-2000, 04:01 AM
You can ping localhost on each PC to verify the ethernet cards are working ok?

Both hosts files need entries to point to each other.

Comp A & B probably need the /etc/resolv.conf setup correctly

domain yourispdomainname
nameserver xx.xx.xx.xx # isp dns 1
nameserver xx.xx.xx.xx # isp dns 2

Phuzon
12-27-2000, 05:37 AM
Originally posted by mdwatts:
[B]You can ping localhost on each PC to verify the ethernet cards are working ok?

Both hosts files need entries to point to each other.
...


Only if you want to give the computers names. You can refer to them by there IP addresses without anything in /etc/hosts


------------------
I am Phuzon! Crazy nerd, ruler of the tropical layer of Hell...

Silicon Palace (http://www.silicon-palace.com)

five40i
12-27-2000, 09:29 AM
What is the IP of the internal nic in computer A ??? What do your ip_chains look like?? As far as I can see you have box B pointing towards the nic that is connected to your DSL but there is nothing in between.
How does box A know to forward box B to the internet and vice versa????

gmoreno
12-28-2000, 01:15 PM
http://www.clarkconnect.org/forums/Forum2/HTML/000089.html

I have posted some more info there.

PLEASE HELP!!!!!!!!!!!