LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 07-12-2007, 02:16 PM   #16
Tomermory
Member
 
Registered: Mar 2007
Location: Amiens, France
Distribution: Debian Etch,
Posts: 181

Original Poster
Rep: Reputation: 30

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!
 
Old 07-12-2007, 03:47 PM   #17
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,228
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
Thumbs up

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
 
Old 07-13-2007, 06:13 AM   #18
Tomermory
Member
 
Registered: Mar 2007
Location: Amiens, France
Distribution: Debian Etch,
Posts: 181

Original Poster
Rep: Reputation: 30
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!
 
Old 07-13-2007, 02:37 PM   #19
Tomermory
Member
 
Registered: Mar 2007
Location: Amiens, France
Distribution: Debian Etch,
Posts: 181

Original Poster
Rep: Reputation: 30
OK, this is getting very seriously on my nerves! 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
 
Old 07-13-2007, 04:12 PM   #20
Tomermory
Member
 
Registered: Mar 2007
Location: Amiens, France
Distribution: Debian Etch,
Posts: 181

Original Poster
Rep: Reputation: 30
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!
 
Old 07-13-2007, 05:34 PM   #21
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,228
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
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.
 
Old 07-14-2007, 03:51 AM   #22
Tomermory
Member
 
Registered: Mar 2007
Location: Amiens, France
Distribution: Debian Etch,
Posts: 181

Original Poster
Rep: Reputation: 30
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!
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
 
Old 07-14-2007, 07:24 AM   #23
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 52
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?
 
Old 07-14-2007, 01:54 PM   #24
Tomermory
Member
 
Registered: Mar 2007
Location: Amiens, France
Distribution: Debian Etch,
Posts: 181

Original Poster
Rep: Reputation: 30
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!

Last edited by Tomermory; 07-14-2007 at 01:57 PM.
 
Old 07-15-2007, 02:11 AM   #25
Tomermory
Member
 
Registered: Mar 2007
Location: Amiens, France
Distribution: Debian Etch,
Posts: 181

Original Poster
Rep: Reputation: 30
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!
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! 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
 
Old 07-15-2007, 09:05 PM   #26
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,228
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
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
 
Old 07-16-2007, 01:36 AM   #27
Tomermory
Member
 
Registered: Mar 2007
Location: Amiens, France
Distribution: Debian Etch,
Posts: 181

Original Poster
Rep: Reputation: 30
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.

Last edited by Tomermory; 07-16-2007 at 06:50 AM.
 
Old 07-16-2007, 08:39 AM   #28
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,228
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
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.
 
Old 07-16-2007, 09:22 AM   #29
Tomermory
Member
 
Registered: Mar 2007
Location: Amiens, France
Distribution: Debian Etch,
Posts: 181

Original Poster
Rep: Reputation: 30
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 ) 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
 
Old 07-16-2007, 09:49 AM   #30
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,228
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
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
 
  


Reply

Tags
debian, local, network, ubuntu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help setting local network leonidg Linux - Networking 3 01-20-2005 06:35 AM
Setting up Mail server for Local Network Deep13 Linux - Software 2 10-30-2003 08:05 AM
Setting up a local network guyd Linux - Networking 12 08-10-2003 02:00 PM
setting up ftp to run on a local network dewyw74 Linux - Newbie 2 01-02-2003 02:33 AM
Problems gettting to local network after setting firewall vendemmian Linux - Networking 0 05-21-2001 11:34 AM


All times are GMT -5. The time now is 03:10 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration