LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Weird net behaviour with Debian Lenny (https://www.linuxquestions.org/questions/linux-networking-3/weird-net-behaviour-with-debian-lenny-559162/)

analian 06-04-2007 05:29 PM

Weird net behaviour with Debian Lenny
 
Hello,

I've got a comp with Debian Lenny installed.
Also I've got a Linksys BEFSR41v3.1 router.
I connect through pppoe to my ISP. I've got a strange problem though.
The inet connection is just fine, but I'm having problems pinging the router from my comp. I realized I had the interface set in a different subnet of the router's subnet, so I did

# ifconfig eth0 192.168.1.2 netmask 255.255.255.0 up

(the router's ip address is 192.168.1.1 with netmask 255.255.255.0, as default to all linksys routers)

then I
# ifconfig

eth0 Link encap:Ethernet HWaddr 00:00:E8:05:0C:01
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:687803 errors:0 dropped:0 overruns:0 frame:0
TX packets:262931 errors:65 dropped:0 overruns:0 carrier:65
collisions:0 txqueuelen:1000
RX bytes:646613799 (616.6 MiB) TX bytes:24949329 (23.7 MiB)
Interrupt:20 Base address:0x9000


then I ping the router and can browse its admin page but only for about 20-30 seconds

then suddenly i'm not able to ping the router anymore and when I
# ifconfig

eth0 Link encap:Ethernet HWaddr 00:00:E8:05:0C:01
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:688655 errors:0 dropped:0 overruns:0 frame:0
TX packets:264147 errors:65 dropped:0 overruns:0 carrier:65
collisions:0 txqueuelen:1000
RX bytes:646708758 (616.7 MiB) TX bytes:25054069 (23.8 MiB)
Interrupt:20 Base address:0x9000

As you see, I've "lost" my ip address and netmask configuration and that's the reason I cannot ping the router anymore. So I'm asking, why the heck is this happening?

Tried the same thing on my other computer, which has Debian Etch installed, and no such problems occurred. Is it a Lenny issue or something else is wrong?

Thank you.

P.S.
I disabled the dchp in the router's options to be sure my comp doesn't get a new ip via dhcp, but as expected this wasn't the case. Something else is wrong.

P.S.2
Another stupid thing that happens is that I can't connect to the inet form the comp with etch, though no filtering is set in the router's options. Any idea why this happens? I use analoguos setup for both machines.

Nathanael 06-04-2007 05:45 PM

depending on your /etc/network/interfaces file (perhaps post it here) you might be starting a dhcp client on your debian computer. if the client is not stopped then you will of course lose your statically set address.

if dhclient or dhcpcd is actually running you should find it in the output of ps -AH

analian 06-04-2007 06:07 PM

Here's my /etc/network/interfaces:

Actually I've got two LAN cards, and I'm actually working with eth1_rename_ren (I can't explain why is this absurd name, but I still can't figure how to fix it). I wrote eth0 in the above example for clarity, so the eth0 in the file presented below is my other LAN card.

------------------------------------------------------------------------
# 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

iface dsl-provider inet ppp
pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
provider dsl-provider
------------------------------------------------------------------------

I tried killing all dh* processess -- found only an instance of dhcdbd running and killed it. Now I can't even configure my eth1_rename_ren statically at all, no idea why.

Btw I'm using kernel version 2.6.20-1-686, if this can be useful.

Nathanael 06-05-2007 01:39 AM

if you have 2 nics, i dont see an entry in that config file for your absurdly named interface!
unless of course that funny named interface is just an alias!

try configuring your interface with that interfaces config gile (man interfaces) will get you further on how to use the directives, etc.
hotplug is enabled, so if the link goes down (for whatever reason) and comes back up, hotplug will probably either down and up the interface, or simply request another dhcp address.

analian 06-05-2007 08:12 AM

It appears you are right.

First I managed to change the stupid eth1_rename_ren name to eth1 using udev, which is one problem less.

Then I edited /etc/network/interfaces accordingly and I've got static address now and life's better (:

I just don't understand where did the dhcp reply come form, since I've disabled dchp on my router. I guess it was routed through my router from my isp's dchp server.

Thank you for the advice.

Nathanael 06-07-2007 02:11 PM

dhcp responses are not routed!
if a dhcp request times out the client asignes an address in a certain subnet (169.254.xxx.xxx) i believe... not 100% sure though.

analian 06-08-2007 05:16 PM

That's an answer where did these 169.254.xxx.xxx addresses get from (:

Thank you.

utanja 06-08-2007 05:28 PM

Quote:

Originally Posted by analian
That's an answer where did these 169.254.xxx.xxx addresses get from (:

Thank you.

i think those are the default addresses when no ip is assigned either static or dynamic.....just a thought....


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