Networking Forums

Networking Forums > Computer Networking > Linux Networking > Problems setting up a home LAN

Reply
Thread Tools Display Modes

Problems setting up a home LAN

 
 
Alon
Guest
Posts: n/a

 
      04-22-2004, 10:44 AM
Hi,

I'm looking for some help in setting up a two-PC LAN at home.
The final intent is to masquerade one of them so as to share
the Internet connection (my ISP charges extra for additional IPs),
but for the time being I'd be content with setting up just the
internal connectivity. Both machines are running Debian, so I thought
that network setup would be a piece of cake -I've done this before-,
but I'm running into some quite unexpected trouble.

The idea for the layout is simple: I'll be using the 192.168.0.0/16
network, with the computer with a direct connection to the net
(HOME_PC_1) using 192.168.0.1 in its secondary Ethernet card
(primary one has its IP assigned by DHCP) and HOME_PC_2 using
192.168.0.1

So, I configured the interfaces:

HOME_PC1:~# ifconfig eth1 192.168.0.1 netmask 255.255.0.0
HOME_PC2:~# ifconfig eth0 192.168.0.2 netmask 255.255.0.0

And set up routing:

HOME_PC1:~# route add -net 192.168.0.0 netmask 255.255.0.0 dev eth1
HOME_PC2:~# route add -net 192.168.0.0 netmask 255.255.0.0 dev eth0

So, the magic moment comes. I tried to ping, and received absolutely no
response. Bottom line is, I can't get any sort of connection up. In
HOME_PC_1 I get Destination Host Unreachable messages, and total silence
in the HOME_PC_2 side.

I know there can be many issues here, so I tried to be methodical:

a) Possible hardware faults: unlikely. I tested each of the Ethernet
cards by plugging them to my cablemodem, and every single one worked.
I don't think there can be any compatibility issues in this regard.

b) Firewall blocking connections: again, unlikely. I have a rather
restrictive netfilter between the internet and HOME_PC_1, using
Bastille, but I'd already added eth1 to my trusted interfaces.
To double check, I also tried pinging with the firewall down (after
disconnecting from the net, obviously). Nothing doing.

c) Stale routes: impossible. I manually cleared and set up routing
tables to verify everything was correct, and nothing there either.

d) IP conflict from my ISP using the 192.168.xxx.xxx range: nope.
They use the 10.xxx.xxx.xxx network internally (I know it from
the address I get my DHCP packets from), and I verified that the
Class B range I wanted was free. In any case, trying this with the
Internet connection down should have worked, and it doesn't.

So, I'm turning to the community for help. Anything would be greatly
appreciated. Any takers?

TIA,

Alon
 
Reply With Quote
 
 
 
 
Toni Erdmann
Guest
Posts: n/a

 
      04-22-2004, 10:48 AM
Alon wrote:

> Hi,
>
> a) Possible hardware faults: unlikely. I tested each of the Ethernet
> cards by plugging them to my cablemodem, and every single one worked.
> I don't think there can be any compatibility issues in this regard.
>


Do you use a cross-connext (patch-) cable? Or a Hub?

What does 'mii-tool' tell you ?

Toni
 
Reply With Quote
 
Georg Armbruster
Guest
Posts: n/a

 
      04-22-2004, 12:33 PM
On Thu, 22 Apr 2004 03:44:52 -0700, Alon wrote:

> So, I configured the interfaces:
>
> HOME_PC1:~# ifconfig eth1 192.168.0.1 netmask 255.255.0.0
> HOME_PC2:~# ifconfig eth0 192.168.0.2 netmask 255.255.0.0
>
> And set up routing:
>
> HOME_PC1:~# route add -net 192.168.0.0 netmask 255.255.0.0 dev eth1
> HOME_PC2:~# route add -net 192.168.0.0 netmask 255.255.0.0 dev eth0


Hi Alon!
Two points:
If I remember the private networking RFC right,
then 192.168 should be accompanied by a 255.255.255.0
netmask.

For the routes, I would consider something like:
HOME_PC1 eth0: connected to dsl modem
HOME_PC1 eth1: connected to HOME_PC2 via cross-over cable
HOME_PC1 has IP 192.168.1.1
HOME_PC2 has IP 192.168.1.2

then:
HOME_PC1: route add -host 192.168.1.2 netmask 255.255.255.0 dev eth1
HOME_PC2: route add -host 192.168.1.1 netmask 255.255.255.0 dev eth0
HOME_PC2: route add default gw 192.168.1.1

If this is of no help, give tcpdump -i eth1 on HOME_PC1 a try
to figure out what goes wrong...


Hope this helps!
Peace,
Georg
 
Reply With Quote
 
Alon
Guest
Posts: n/a

 
      04-22-2004, 02:28 PM
Toni wrote;

> Do you use a cross-connext (patch-) cable? Or a Hub?


Crossover cable. I know, it's not scalable, but I'm out of cash for the
switched hub I want and I didn't want to waste money in a cheap one.


> What does 'mii-tool' tell you ?


Not much, since one of the cards is a *very* old Intel
without a MII. But linking the other two together gets me
a very terse: eth[01]: Link down

So it's probably a hardware fault after all. I'll recheck the cable (I
ordered a crossover one, but didn't check the wiring myself) and
see what happends.

Thanks for the quick answer.

Alon
 
Reply With Quote
 
Dave Carrigan
Guest
Posts: n/a

 
      04-22-2004, 04:12 PM
Alon wrote:

> So, I configured the interfaces:
>
> HOME_PC1:~# ifconfig eth1 192.168.0.1 netmask 255.255.0.0
> HOME_PC2:~# ifconfig eth0 192.168.0.2 netmask 255.255.0.0


Did you bring the interface up? (ifconfig eth1 up)

Since this is a debian system, you would be better off adding the interfaces
into /etc/network/interfaces, and do

ifup ethn

This will handle bring the interface up, adding any needed routes, etc., and
is the proper Debian way to do interfaces.

--
Dave Carrigan
Seattle, WA, USA
(E-Mail Removed) | http://www.rudedog.org/ | ICQ:161669680
UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-C++-DNS-PalmOS-PostgreSQL-MySQL

Dave is currently listening to Toad the Wet Sprocket - Nanci (Dulcinea)
 
Reply With Quote
 
Dave Carrigan
Guest
Posts: n/a

 
      04-22-2004, 04:13 PM
Georg Armbruster wrote:

> Two points:
> If I remember the private networking RFC right,
> then 192.168 should be accompanied by a 255.255.255.0
> netmask.


No, the 255.255.0.0 is fine. He's just laying claim to all of the private
address space in 192.168. I personally would have done it /24, but doing
it /16 will work.

--
Dave Carrigan
Seattle, WA, USA
(E-Mail Removed) | http://www.rudedog.org/ | ICQ:161669680
UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-C++-DNS-PalmOS-PostgreSQL-MySQL

Dave is currently listening to Toad the Wet Sprocket - Falldown (Dulcinea)
 
Reply With Quote
 
Bill Marcum
Guest
Posts: n/a

 
      04-23-2004, 04:23 PM
On 22 Apr 2004 03:44:52 -0700, Alon
<(E-Mail Removed)> wrote:
> Hi,
>
> I'm looking for some help in setting up a two-PC LAN at home.
> The final intent is to masquerade one of them so as to share
> the Internet connection (my ISP charges extra for additional IPs),
> but for the time being I'd be content with setting up just the
> internal connectivity. Both machines are running Debian, so I thought
> that network setup would be a piece of cake -I've done this before-,
> but I'm running into some quite unexpected trouble.
>
> The idea for the layout is simple: I'll be using the 192.168.0.0/16
> network, with the computer with a direct connection to the net
> (HOME_PC_1) using 192.168.0.1 in its secondary Ethernet card
> (primary one has its IP assigned by DHCP) and HOME_PC_2 using
> 192.168.0.1
>
> So, I configured the interfaces:
>
> HOME_PC1:~# ifconfig eth1 192.168.0.1 netmask 255.255.0.0
> HOME_PC2:~# ifconfig eth0 192.168.0.2 netmask 255.255.0.0
>


You probably should put the two network cards in different subnets,
for example 192.168.0.1/255.255.255.0 and 192.168.1.1/255.255.255.0


--
Giraffe: a ruminant with a view.
 
Reply With Quote
 
Dave Carrigan
Guest
Posts: n/a

 
      04-23-2004, 05:26 PM
Bill Marcum wrote:

> On 22 Apr 2004 03:44:52 -0700, Alon
> <(E-Mail Removed)> wrote:
>> So, I configured the interfaces:
>>
>> HOME_PC1:~# ifconfig eth1 192.168.0.1 netmask 255.255.0.0
>> HOME_PC2:~# ifconfig eth0 192.168.0.2 netmask 255.255.0.0
>>

>
> You probably should put the two network cards in different subnets,
> for example 192.168.0.1/255.255.255.0 and 192.168.1.1/255.255.255.0


That's going to make it pretty hard for the two different PCs to
communicate...

--
Dave Carrigan
Seattle, WA, USA
(E-Mail Removed) | http://www.rudedog.org/ | ICQ:161669680
UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-C++-DNS-PalmOS-PostgreSQL-MySQL

Dave is currently listening to Bob Dylan - Just Like Tom Thumb's Blues
(Genuine Live 1966)
 
Reply With Quote
 
Antoine EMERIT
Guest
Posts: n/a

 
      04-24-2004, 11:35 PM
(E-Mail Removed) (Alon) wrote news:cf27b9ce.0404220244.4bb315f8
@posting.google.com:
> So, the magic moment comes. I tried to ping, and received absolutely no
> response. Bottom line is, I can't get any sort of connection up. In
> HOME_PC_1 I get Destination Host Unreachable messages, and total silence
> in the HOME_PC_2 side.


What about your default route ? did you set it with your ISP ip on HOME_PC_
1, and did you set it to 192.168.0.1 on your HOME_PC_1 ?

Did you set masquerading to NAT your network (iptables rules) ?

Did you set forwarding on (echo 1 > /proc/sys/net/ipv4/ip_forward) ?


Regards


 
Reply With Quote
 
chris-usenet@roaima.co.uk
Guest
Posts: n/a

 
      04-29-2004, 02:38 PM
Antoine EMERIT <(E-Mail Removed)> wrote:
> (E-Mail Removed) (Alon) wrote news:cf27b9ce.0404220244.4bb315f8
> @posting.google.com:
>> So, the magic moment comes. I tried to ping, and received absolutely no
>> response. Bottom line is, I can't get any sort of connection up. In
>> HOME_PC_1 I get Destination Host Unreachable messages, and total silence
>> in the HOME_PC_2 side.


> What about your default route ? did you set it with your ISP ip on HOME_PC_
> 1, and did you set it to 192.168.0.1 on your HOME_PC_1 ?


> Did you set masquerading to NAT your network (iptables rules) ?


> Did you set forwarding on (echo 1 > /proc/sys/net/ipv4/ip_forward) ?


None of those suggestions have any relevance to the OP's problem with
ping between his two PCs failing. (They are good points, but not just
yet.)

Chris
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems setting up Home Network Theslaz Wireless Networks 11 01-25-2009 04:36 PM
Setting up VSFTP at Home - Please Help mohamad2181 Linux Networking 6 06-21-2005 02:36 AM
Errors/problems after setting up my home network Tim Windows Networking 0 08-07-2004 01:29 AM
Setting up home network Maxwell Windows Networking 1 04-28-2004 12:20 AM
help setting a home network Ittay Freiman Linux Networking 7 09-03-2003 03:04 AM



1 2 3 4 5 6 7 8 9 10 11