LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Setting up local network (https://www.linuxquestions.org/questions/debian-26/setting-up-local-network-568686/)

Tomermory 07-12-2007 04:59 AM

Setting up local network
 
Hi,

I'm trying to set up a local network between one computer running on Debian Etch and another on Ubuntu Dapper. This should be easy enough to do, but neither computer sees the other. Here is the procedure I followed, did I miss something?

In the Debian machine I did system --> networking and changed the properties on eth0 to the following:

Configuration: static
IP address: 192.168.0.1
Subnet mask: 255.255.255.0

I validated this and then set up the Ubuntu machine as follows:

Configuration: static
IP address: 192.168.0.2
Subnet mask: 255.255.255.0
Gateway address: 192.168.0.1

When I do a ping on the Debian machine towards the Ubuntu machine, this is what I get:

Code:

james@debian:~$ ping -c5 192.168.0.2

PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data.
From 192.168.0.1 icmp_seq=1 Destination Host Unreachable
From 192.168.0.1 icmp_seq=2 Destination Host Unreachable
From 192.168.0.1 icmp_seq=3 Destination Host Unreachable
From 192.168.0.1 icmp_seq=4 Destination Host Unreachable
From 192.168.0.1 icmp_seq=5 Destination Host Unreachable

--- 192.168.0.2 ping statistics ---
5 packets transmitted, 0 received, +5 errors, 100% packet loss, time 4009ms
, pipe 3

Here is the result of ifconfig:

Code:

debian:/home/james# ifconfig
eth0      Link encap:UNSPEC  HWaddr 00-00-20-ED-00-8B-B3-B6-00-00-00-00-00-00-00-00
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:290 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:12135 (11.8 KiB)

eth1      Link encap:Ethernet  HWaddr 00:30:BD:BB:43:19
          inet6 addr: fe80::230:bdff:febb:4319/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:191 errors:0 dropped:0 overruns:0 frame:0
          TX packets:73 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:20301 (19.8 KiB)  TX bytes:18588 (18.1 KiB)
          Interrupt:169 Base address:0xdc00

eth2      Link encap:Ethernet  HWaddr 00:20:ED:8F:21:36
          inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::220:edff:fe8f:2136/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7665 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8257 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6868880 (6.5 MiB)  TX bytes:1280628 (1.2 MiB)
          Interrupt:177 Base address:0xd800

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:200 errors:0 dropped:0 overruns:0 frame:0
          TX packets:200 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:9860 (9.6 KiB)  TX bytes:9860 (9.6 KiB)


I don't know if this is of importance, but when the Debian computer boots in verbose mode, I get a message that DHPDISCOVER is looking at eth1 on 255.255.255.255 on various ports, and fails to find anything. Shouldn't it look on 255.255.255.0? Incidentally, I don't know if this is of importance but before I attempted to set up the network, I got the same message, but rather than looking at eth1 it looked at eth0.
Perhaps I should add that I had managed to establish this connection when both computers were Windows, and I also managed it between Windows and Linux, but since I got rid of Windows I have never been able to connect these two computers.
This problem seems very simple to me, but I haven't found a solution to it by Googling around or by looking at the previous threads on this forum.
Thanks in advance for your help

James

farslayer 07-12-2007 08:48 AM

might I suggest running iptables -L on both machines to see if a firewall is enabled ?

The following shows output on a system with no firewall rules configured..
Code:

it-etch:/usr/src/linux# iptables -L
Chain INPUT (policy ACCEPT)
target    prot opt source              destination

Chain FORWARD (policy ACCEPT)
target    prot opt source              destination

Chain OUTPUT (policy ACCEPT)
target    prot opt source              destination

It's interesting is that most of your traffic is over eth2 (10.0.0.1) RX bytes: (6.5 MiB) TX bytes: (1.2 MiB).

While there is practically ZERO traffic over eth0 (192.168.0.1) RX bytes: (0.0 b) TX bytes: (11.8 KiB)

It's hard for me to guess how you have everything connected.. how are the PC's in the 192.168.0.0 subnet connected together ? Via a switch, crossover cable, other ?

tjyorkshire 07-12-2007 08:48 AM

hey,
Firstly the DHPDISCOVER problem shouldn't matter, as you have no DHCP server and you are using static ip addresses.
What happens when you ping the Ubuntu machine towards the Debian machine?
Do you have a firewall that is blocking the packets?

Tomermory 07-12-2007 09:18 AM

OK, here's what I get when I do iptables -L on the Debian machine:

Code:

Chain INPUT (policy ACCEPT)
target    prot opt source              destination

Chain FORWARD (policy ACCEPT)
target    prot opt source              destination

Chain OUTPUT (policy ACCEPT)
target    prot opt source              destination

When I do the command on the Ubuntu machine, I get the same result.

As for the ping command on the Ubuntu machine, this is what I get:

Code:

james@james1:~$ ping -c5 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.

--- 192.168.0.1 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4013ms

It's very strange this business about eth2. I have never (as far as I know) tried to configure eth2, unless by mistake, and in any case when I do system --> networking, eth2 is listed as being unconfigured.
The two computers are simply connected via a crossover lead.

As for DHCPDISCOVER, if it's not needed, is there a way of stopping Debian from looking for it on boot up? It at least doubles the start up time.

farslayer 07-12-2007 09:27 AM

Just spotted something else that is interesting...

Quote:

eth0 Link encap:UNSPEC
Are you sure you configured and are using the right interface ? encapsulation should be ethernet, not unspecified..

do you truly have 3 ethernet cards in that machine ?

lspci to verify the number of NIC's

cat /var/log/dmesg | grep eth - see what eth device is assigned to what hardware

Tomermory 07-12-2007 09:40 AM

I'll tell you the whole story! I had a few problems when I was installing Debian, as it asked me questions I found difficult to answer about the network. I'm not sure I got them all right as I'm very weak in this area. Also, I had a funny business with the Internet connection not coming on automatically on start up. I played around with it for a while until I got it working. Perhaps I made a mess of everything - it wouldn't be the first time!
As for the Ethernet card business, this has always struck me as odd. As far as I know, there are only two Ethernet cards in this machine. Well, there were last time I looked! But where on earth does eth2 come from? And Debian isn't alone in flagging up eth2 - I also had it on Mandriva and, I think the other distros I've tried on this machine.

farslayer 07-12-2007 09:48 AM

So did you run the commands I posted ? the results may contain the answers you seek....

Tomermory 07-12-2007 11:02 AM

My apologies, farslayer, I didn't see your commands at the bottom of your post. Guess that's what comes of my doing too many things at once. Well, here's the Ispci command. I don't know what it all means!

Quote:

debian:/home/james# lspci
00:00.0 Host bridge: Silicon Integrated Systems [SiS] SiS645DX Host & Memory & AGP Controller (rev 01)
00:01.0 PCI bridge: Silicon Integrated Systems [SiS] Virtual PCI-to-PCI bridge (AGP)
00:02.0 ISA bridge: Silicon Integrated Systems [SiS] SiS962 [MuTIOL Media IO] (rev 14)
00:02.1 SMBus: Silicon Integrated Systems [SiS] SiS961/2 SMBus Controller
00:02.3 FireWire (IEEE 1394): Silicon Integrated Systems [SiS] FireWire Controller
00:02.5 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE]
00:02.6 Modem: Silicon Integrated Systems [SiS] AC'97 Modem Controller (rev a0)
00:02.7 Multimedia audio controller: Silicon Integrated Systems [SiS] AC'97 Sound Controller (rev a0)
00:03.0 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 0f)
00:03.1 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 0f)
00:03.2 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 0f)
00:03.3 USB Controller: Silicon Integrated Systems [SiS] USB 2.0 Controller
00:0b.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
00:10.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
01:00.0 VGA compatible controller: nVidia Corporation NV17 [GeForce4 MX 440-SE] (rev a3)
And here is the result of cat /var/log/dmesg | grep eth:

Code:

debian:/home/james# cat /var/log/dmesg | grep eth
eth0: RealTek RTL8139 at 0xdc00, 00:30:bd:bb:43:19, IRQ 169
eth0:  Identified 8139 chip type 'RTL-8100B/8139D'
eth1: RealTek RTL8139 at 0xd800, 00:20:ed:8f:21:36, IRQ 177
eth1:  Identified 8139 chip type 'RTL-8100B/8139D'
eth1394: eth0: IEEE-1394 IPv4 over 1394 Ethernet (fw-host0)
eth1: link down
ADDRCONF(NETDEV_UP): eth1: link is not ready

Hm, it would appear that eth1 is down. I wasn't expecting that!

nx5000 07-12-2007 11:35 AM

Quote:

00-00-20-ED-00-8B-B3-B6-00-00-00-00-00-00-00-00
Wow that's a looong HW adress :)
Looks like mine when I put my Wireless in monitor mode.

Could it be firewire, bluetooth, usb?

Tomermory 07-12-2007 11:58 AM

Quote:

Could it be firewire, bluetooth, usb?
I don't have bluetooth so it couldn't be that.

farslayer 07-12-2007 12:59 PM

From the LSPCI command these are your two onboar Ethernet controllers..
Quote:

00:0b.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
00:10.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
This entry from teh dmesg log is a bit confusing though..
Quote:

eth1394: eth0: IEEE-1394 IPv4 over 1394 Ethernet (fw-host0)
IEEE 1394 is Firewire..
I'm not sure why it's listing eth0 next to a Realtec chip AND the firewire entry..

It looks like your REAL Network interfaces are eth1 and eth2 and the Firewire has taken over the eth0 Position.

You may want to edit your /etc/network/interfaces file and see how that goes.. maybe something like this..

Code:

it-etch:/usr/src/linux# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
# allow-hotplug eth0
# iface eth0 inet dhcp

# The Secondary network interface
# allow-hotplug eth1
# iface eth1 inet dhcp
auto eth1
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0
gateway 192.168.0.254
network 192.168.0.0
broadcast 192.168.0.255



# The Tertiary network interface
# allow-hotplug eth2
# iface eth2 inet dhcp
# auto eth2
# iface eth2 inet static
# address 192.168.0.3
# netmask 255.255.255.0
# gateway 192.168.0.254
# network 192.168.0.0
# broadcast 192.168.0.255


Tomermory 07-12-2007 01:37 PM

Right, now I've got another problem. I cannot run the text editor:

debian:/home/james# cp /etc/network/interfaces /etc/network/interfaces.backup
debian:/home/james# kedit /etc/network/interfaces
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

kedit: cannot connect to X server :0.0
debian:/home/james# kate /etc/network/interfaces
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

kate: cannot connect to X server :0.0

What's going on here?

nx5000 07-12-2007 01:44 PM

Install package: "sux" and then sux kate blah.txt
Or use "sudo" and then sudo kate blah.txt

Tomermory 07-12-2007 01:50 PM

OK, panic over. I downloaded sux and then ran xhost local:root. Now to work...

Before I change anything, I'd like you to see what's in /etc/network/interfaces. Does it look right?

Quote:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

iface eth1 inet dhcp



iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0

nx5000 07-12-2007 02:12 PM

Nein, not good. Eth0 is your firewire!
eth1 and eth2 are your ethernet wire interfaces
(you don't need the xhost for sux, otherwise sux becomes useless)

Tomermory 07-12-2007 02:16 PM

OK, so does this mean that whereas I have been trying to communicate to the second computer via eth0 I should have configured eth2? It sounds like this, but experience has taught me to check with the experts in cases like these before I do anything!

farslayer 07-12-2007 03:47 PM

Use the interfaces file I posted earlier... it should work for you.
(Since you already made a backup of your original file.. Way to go !! :) )


Or just edit the eth1 portion of yours and remove the IP info from eth0

Tomermory 07-13-2007 06:13 AM

Quote:

Since you already made a backup of your original file.. Way to go !!
Yes, I learned the hard way! Actually, I can't do anything for the moment 'cos my Inernet connection is down. Hope it's got nothing to do with my playing around with the connection parametres!

Tomermory 07-13-2007 02:37 PM

OK, this is getting very seriously on my nerves! :mad: I need help here! For some reason, I no longer have an Internet connection. I'm writing this from a Knoppix live cd, so it shouldn't be a hardware issue. I can only imagine that it has something to do with a manipulation that I did yesterday. As I told you everything I did, perhaps someone can see what's gone wrong. Usually when I have this problem, after first installing a Linux distro, I solve it by simply playing around with disabling then re-enabling the various listed Ethernet cards in various orders, then cold re-starting the computer. This usually works, after a while, but this time it doesn't. Here are some things that might be important:
1) The DNS address part in the network configuration tool is empty. When I fill it (I took the pains of noting it yesterday!) it is empty again after re-boot. Before re-boot, I can re-run the network tool and the address is still there, but restarting the computer wipes it clean.
2) DHCPDISCOVER now looks at eth1, whereas it didn't before yesterday. I did notice when I had just installed Debian that when it did this the Internet wouldn't start, but maybe that was just a coincidence.

Thanks for your help, once again.

James

Tomermory 07-13-2007 04:12 PM

That was a very close call! Good job I made that backup! I've just tried changing the interfaces file - I copied what you posted, farslayer, and pasted it into /etc/network/interfaces, replacing the text that was previously there, in the hope that that would sort out the Internet problem I wrote about above. Well, had I not made that backup, I would probably now be sitting in front of the computer screen re-installing Debian!

Here's what happened. After editing the file, I cold started the computer and I got this message:

Code:

Configuring network interfaces.../etc/network/interfaces:|: misplaced option ifup: couldn't read interfaces file "/etc/network/interfaces".
The computer continued booting up, then at the moment it tried to load KDE it hung up in "initialising system services" and the screen went totally black!

I really don't know what happened there!

Great! It's the evening of the French National holiday, fireworks are whizzing over my roof, and I'm stuck here at my computer! Still, I am English I suppose!

farslayer 07-13-2007 05:34 PM

Something must not have been right when you pasted the info.. Misplaced line feed, or something goofy.

you could try manually typing the settings for the other interface into your configuration.

Tomermory 07-14-2007 03:51 AM

Great! I've sorted out the Internet problem, and as a bonus the DHCPDISOVER issue too. I wondered whether enabling hot-plugging could be a solution, so I thought about a distribution that has good hardware detection, Knoppix was an obvious choice. I simply copied the etc/network/interfaces file from the Knoppix live cd and pasted it into etc/network in Debian. This worked a dream, and also disabled the DHCPDISCOVER process on boot up. Perfect! :D
But the local network problem remains. When I try to change eth2 to give it a static IP (192.168.0.1) the Internet comes down. Can you tell me what I need to change in the interfaces files? I say files plural because there are two in Knoppix. Here they are:

1) This one is etc/network/interfaces:

Code:

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
# automatically added when upgrading
auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet dhcp
        pre-up ifconfig eth0 up

allow-hotplug eth1
iface eth1 inet dhcp
        pre-up ifconfig eth1 up

allow-hotplug eth2
iface eth2 inet dhcp
        pre-up ifconfig eth2 up

2) This one is /etc/network/interfaces-

Quote:

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
# automatically added when upgrading
auto lo
iface lo inet loopback

nx5000 07-14-2007 07:24 AM

Quote:

But the local network problem remains. When I try to change eth2 to give it a static IP (192.168.0.1) the Internet comes down.
What is your DHCP server assigning you? When the DHCP discover gets the information, have you checked your network parameters?
ifconfig -a
route -n

If you use these informations for static config, then there's no reason to not work.
There's no firewall or no security on the dhcp server?

Tomermory 07-14-2007 01:54 PM

OK, if I understand you right, you mean that I should find out the DNS that the DHCP assigns to connect me to the modem, then compare it with the DNS that it should use, and change it if necessary. Is that it?
The DNS of my external modem is 10.0.0.138. Here is the result of the two commands you posted:
[QUOTE]
Quote:

debian:/home/james# ifconfig -a
eth0 Link encap:UNSPEC HWaddr 00-00-20-ED-00-8B-B3-B6-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:142 dropped:142 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

eth1 Link encap:Ethernet HWaddr 00:30:BD:BB:43:19
inet6 addr: fe80::230:bdff:febb:4319/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:156 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:51768 (50.5 KiB)
Interrupt:169 Base address:0xdc00

eth2 Link encap:Ethernet HWaddr 00:20:ED:8F:21:36
inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::220:edff:fe8f:2136/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7579 errors:0 dropped:0 overruns:0 frame:0
TX packets:5759 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9490041 (9.0 MiB) TX bytes:722659 (705.7 KiB)
Interrupt:177 Base address:0xd800

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:48 errors:0 dropped:0 overruns:0 frame:0
TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3328 (3.2 KiB) TX bytes:3328 (3.2 KiB)

sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Hmm, don't see 10.0.0.138 there, but I do see 10.0.0.1 on eth2. Is this normal? What are lo and sit0, by the way? Now for the other command:

Quote:

debian:/home/james# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
0.0.0.0 10.0.0.138 0.0.0.0 UG 0 0 0 eth2
Here I see the correct DNS, but it's on eth2 and not on eth1. Everything appears mixed up!

Tomermory 07-15-2007 02:11 AM

OK, last night I sent you the results of ifconfig -a and route -n and it appeared to me that eth2 is being used for the Internet and, indeed, in the networking tool which I use to configure the network eth2 is currently set as being the default gateway device. So this morning I decided to see what would happen if I set the local network on eth1. So I left eth2 as having a dynamic IP and set the static IP on eth1. Result: the same! It's very strange:if I change the settings on either eth1 or eth2, the Internet goes down. Something else that it strange is that after changing these settings eth0 is automatically switched off when I restart the computer, even though I haven't touched this. I really don't understand! :scratch:
More news. I tried editing /etc/network/interfaces again by replacing what is in there by farslayer's suggestion. Sorry, farslayer, the exact same thing happens! :cry: On boot up the computer hangs on initializing system services and I get the blank screen of death. I have to re-boot in single user mode, remove the new interfaces file and copy back the old one in order for me to be able to start the computer again. What is going on here? I thought Linux was the network tool of choice! Perhaps it's my computer? But then, I did get this working in Windows :confused:

farslayer 07-15-2007 09:05 PM

So are you trying to enable BOTH interfaces in the same subnet (10.0.0.0) at the same time ? if so the system is probably getting a bit confused..

You should only have one interface enabled at a time on any particular subnet.

If you configure eth1 as a Static IP address, you should shut down eth2

Tomermory 07-16-2007 01:36 AM

OK, I've tried giving éth1 a static address and shutting down eth2; I've tried giving eth2 a static address and shutting down eth1; I've tried giving both eth1 and eth2 a static addresss. But all these actions bring down the Internet. :confused:

farslayer 07-16-2007 08:39 AM

So when you assign the Static IP address, and shut down the other interface, did you verify the system still had a default route and Entries in the DNS ?

Static IP address alone won't get you internet access, your system still needs a default route defined as well as a DNS server.

Tomermory 07-16-2007 09:22 AM

The DNS address is set to10.0.0.138 but it's impossible to specify a default gateway as that field becomes blanked out. I don't know if it'll help you track down the problem (I'm sure it's something really obvious I'm doing - or not doing :rolleyes: ) but here are the parametres that are in the networking settings tool with eth2 switched on and eth1 off:

Connections

Location: nothing entered here.

Ethernet connection: The interface eth2 is active
Ethernet connection: The interface eth1 is not active
Ethernet connection: The interface eth0 is active
Modem connection: The interface ppp0 is not configured

Default gateway device: blanked out: impossible to add anything here.

General

Host settings

Hostname: Debian
Domain: nothing entered here

DNS
DNS servers: 10.0.0.138
Search domain: Ian

Hosts

IP Address Alisases
ff00::O ip6-mcastprefix
127.0.0.1 localhost debian
fe00::0 ip6-localnet
ff02::2 ip6-allrouters
ff02::1 ip6-allnodes
::1 ip6-localhost ip6-loopback
127.0.1.1 debian
ff02::3 ip6-allhosts

Under the "properties" tag

Interface name: eth2 (enabled)
Configuration: Static IP address
IP address: 192.168.0.1
Subnet mask: 255.255.255.0
Gateway address: nothing entered here

Interface name: eth1 (enabled) – yes this box is checked, but unchecking it makes no difference.
Configuration: DHCP
IP address: blank
Subnet mask: blank
Gateway address: blank

Interface name: eth0 (enabled)
Configuration: DHCP
IP address: blank
Subnet mask: blank
Gateway address: blank

farslayer 07-16-2007 09:49 AM

no default gateway = no internet.

so does your /etc/network/interfaces file contain the line defining the default gateway ?

Code:

# The Secondary network interface
# allow-hotplug eth2
# iface eth2 inet dhcp
auto eth2
iface eth2 inet static
address 192.168.0.1
netmask 255.255.255.0
gateway 192.168.0.138
network 192.168.0.0
broadcast 192.168.0.255

you can manually define the default gateway on your system
/sbin/route add default gw 192.168.0.138

Verify you now have the proper default route

route
Code:

it-etch:/etc/udev/rules.d# route
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
192.168.0.0    *              255.255.255.0  U    0      0        0 eth2
default        192.168.0.138  0.0.0.0        UG    0      0        0 eth2


Tomermory 07-16-2007 10:15 AM

Ah! Could we be homing in on the problem?
There is no line in the interfaces file dealing with a default gateway. Would that be 10.0.0.138 in my case (the address to my modem?). I've already posted it, but here is my current interfaces file (copied from Knoppix):

Quote:

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
# automatically added when upgrading
auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet dhcp
pre-up ifconfig eth0 up

allow-hotplug eth1
auto eth0

iface eth1 inet dhcp

iface eth2 inet dhcp

auto eth2

auto eth1

farslayer 07-16-2007 10:42 AM

Your displayed interfaces file is for DHCP addressing not Static IP addresses...

It's difficult to help you if you are going to switch back and forth between static and dynamic addressing every other post.. Your displayed configuration is for Dynamic addressing on Both Ethernet interfaces.

With Dynamic addressing your router or DHCP server would assign the Default gateway and DNS servers. your config should work fine for either interface you are using, and BOTH should not be plugged in at the same time.

With Static addressing you need to specify every piece of address info yourself, from the IP address, to the Gateway and DNS Servers, etc..


Exactly HOW do you want this setup and working, Static addressing or DHCP ?
Which interface do you plan to use ?

There is no need to have an interface you are not using try to come up automatically it just slows down the boot process and doesn't get used anyway.

Tomermory 07-16-2007 11:35 AM

Quote:

It's difficult to help you if you are going to switch back and forth between static and dynamic addressing every other post..
Sorry about that!The way I want to set this up is to have a static address on this (Debian) computer so that it can communicate with another (Ubuntu machine) I'm not sure about which interface I need to use. The way I saw it, there was one Ethernet card, which I had put in so that I can set up this network, and one external ADSL modem. I imagined that the external modem was eth0 and the card was eth1. I had no idea what eth2 was. Now I realise that this was all wrong, absolutely wrong! Now I understand (hopefully this is nearer the picture?!) that eth0 is firewire, and so redundant, and that eth2 is the Ethernet card. Eth1, then, needs to come down as it doesn't correspond to anything in the computer. Trouble is, the computer behaves as though it does correspond to something! I hope this is coherent! I'm just one hell of a newhie when it comes to networking, and I've only been using Debian for around a month.

farslayer 07-16-2007 02:58 PM

lets jump back to Page 1 of this thread then and look at the sample config i posted for you.. .


Code:

it-etch:/usr/src/linux# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback


# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
# auto eth0

# The Secondary network interface
allow-hotplug eth1
iface eth1 inet dhcp
# auto eth1


# The Tertiary network interface
# allow-hotplug eth2
# iface eth2 inet dhcp
auto eth2
iface eth2 inet static
address 192.168.0.1
netmask 255.255.255.0
gateway 192.168.0.138
network 192.168.0.0
broadcast 192.168.0.255

The only 2 sections you should need active are lo which is your loopback interface and eth2 since that is the physical network interface you have decided to use.

According to your earlier post (output of lspci) there are actually 2 physical network interfaces on your motherboard, so there should be 2 physical network jacks on the back of the PC. one of them will be eth1 and the other is eth2.

so with this information in your /etc/network/interfaces file and the cable plugged into the appropriate physical network interface jack in the PC, your machine should have a Static IP address of 192.160.0.1 and the Other interfaces should be down (because the auto ethX lines are commented out for those interfaces.)

It really shouldn't be any more complicated than that...



It is really odd that your router is 192.168.0.138 and your PC is 192.168.0.1 those settings are backwards from the default configuration of most routers.

Most routers are either 192.168.0.1 or 192.168.0.254.
Most routers start handing out DHCP addresses in the range of 192.168.0.100 - 192.168.0.200

but if the information you provided is correct the configuration in this post should work.




Another item that is odd is that every time you have DHCP enabled you are showing IP addresses in the 10.0.0.0 network, not 192.168.0.0 .

Are you sure your network is configured for 192 address range ?

You mentioned you had another PC on the network and it is working fine..
Just for sanity's sake could you post the IP setting of that workstation ?

Tomermory 07-16-2007 03:36 PM

Thanks for all your help with this, farslayer. I'm a teacher, and I know how exasperating it can be when a student fails to understand, despite all your efforts! Actually, I've read through all the posts again and I can see that I've learned a lot since the beginning - so thanks once again. Now I need to go away and find some more information to clear this up:

Quote:

Most routers are either 192.168.0.1 or 192.168.0.254.
Most routers start handing out DHCP addresses in the range of 192.168.0.100 - 192.168.0.200
And this too:

Quote:

Another item that is odd is that every time you have DHCP enabled you are showing IP addresses in the 10.0.0.0 network, not 192.168.0.0
But I want to clear this up now:

Quote:

You mentioned you had another PC on the network and it is working fine..
This isn't quite true. I had connected these two computers up before, in the bad old days when I only had Windows on both machines. Then I was able to connect them together using the Windows tools and quite a bit of help from a colleague.

Tomermory 07-16-2007 04:22 PM

Following what I said in the post above, I've just found the following information on the web page of my Internet provider. I don't know if it helps, but here it is:

Primary DNS: 194.117.200.10
Secondary DNS: 194.117.200.15
SubnetMask: 255.255.255.0
Domain name: club-internet.fr

On another page, they explain how they attribute the modem IP addresses. Here is my translation:

Quote:

The default range of local IPs is set for the Speed Touch 530 modem as 10.0.0.X (where X is a number between 1 and 255.)
By default, the Speed Touch 530 modem is assigned the address 10.0.0.138. Therefore the other possible IP addresses range from 10.0.0.1 to 10.0.0.255 (excepting 10.0.0.138, which is reserved for the Speed Touch 530 modem.)
As for the IP 192.168.0.1 - it was me personally who gave this computer that address, and the client computer 192.168.0.2. Do I take it that I should have chosen something like 10.0.0.1 and 10.0.0.2? If so, I can't understand why my old Windows network worked as these were the exact IPs I used.

farslayer 07-16-2007 08:15 PM

Do you have a broadband router hooked up between your Broadband modem and the computers ? if you do have a router it would typically assign addresses in the 192.168.0.0 Range.. from what I can see that functionality may be built into your modem...

I'm asking you a lot of questions so I can try and get a clear picture of what is going on and figure out exactly where our disconnect is so we can get you running.. Yes it can be frustrating and at time I wish I had a white board so I could draw a picture it would make explanations so much easier :)

it looks like part of the problem is we have been trying to assign an address in the wrong IP range to get you online..

Code:

it-etch:/usr/src/linux# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
# auto eth0

# The Secondary network interface
allow-hotplug eth1
iface eth1 inet dhcp
# auto eth1

# The Tertiary network interface
# allow-hotplug eth2
# iface eth2 inet dhcp
auto eth2
iface eth2 inet static
address 10.0.0.1
netmask 255.255.255.0
gateway 10.0.0.138
network 10.0.0.0
broadcast 10.0.0.255

Try these addresses for your Static IP address..

the second computer can then be 10.0.0.2 and so on..

If that works and the PC's are online... we can look at what it will take to make them talk to each other on you local network.

Tomermory 07-17-2007 01:10 AM

Sorry, farlayer, that doesn't work!!!:cry: I've tried editing your file to disable eth2 and enable eth1, and I've also edited it to enable both. But as soon as we assign a static IP, the Internet comes down. I'm going to write to my Internet provider to see if there is anything funny about the modem. It'd surprise me, though, as it's very common - and as I said, the network did work under Windows. :mad:

Quote:

Do you have a broadband router hooked up between your Broadband modem and the computers ?
No, there is no router. It is a simple (:D ) crossover connection between two computers.

Tomermory 07-17-2007 11:33 AM

Great news, farslayer :p :p I've got the Internet working with a static IP! And I've managed to switch off eth1 and eth0! Simple solution - I knew it would be something dumb! The netmask was wrong! 255.0.0.0 and not 255.255.255.0! Next step, configuring the other computer. :D

Tomermory 07-17-2007 12:12 PM

OK, I've just tried configuring the second computer but the two computers don't see each other. I guess this problem will be much more straightforward than the last, though!
Here are the parametres I put in the second computer:
Configuration: static IP address
IP address: 10.0.0.2
Subnet mask: 255.0.0.0
Gateway address: 10.0.0.1

Host: james1

DNS servers: 10.0.0.1

Search domain: debian.

I'm not at all sure about the last two. For this computer they were: DNS servers: debian; Search domain: Ian. Do I need to change these settings on the second computer to read the same as the first?

Tomermory 07-19-2007 02:30 AM

I'm going away for a month, and I won't be able to look into this problem until I get back. I'll post a new thread then, as I still can't get these two computers to see each other.
Once again, thanks a lot for your help - I'd never have got this far without it.

Cheers

James


All times are GMT -5. The time now is 05:31 PM.