1 |
Erik wrote: |
2 |
> Frank Jahn wrote: |
3 |
>> Erik schrieb: |
4 |
>>> I am trying to connect my Gentoo computer to my D-Link DVG-1120 (VoIP |
5 |
>>> Gateway with NAT) again after 3 months. It used to work great, but now |
6 |
>>> the network status is changing randomly. Sometimes I can load a |
7 |
>>> webpage, |
8 |
>>> but then when I click on a link I get an error message. Then it may |
9 |
>>> suddenly work again. The Internet connection to the gateway works fine |
10 |
>>> and I can make phonecalls with the phones that are connected to it. It |
11 |
>>> is the link to the computer that is broken. The computer works when |
12 |
>>> connected directly to the internet and the cable works perfectly too |
13 |
>>> (tested elsewhere). I see that it is changing randomly by executing the |
14 |
>>> command |
15 |
>>> ifconfig eth0|grep "inet addr:" |
16 |
>>> repeateldy. Sometimes I get nothing, sometimes I get: |
17 |
>>> inet addr:192.168.0.46 Bcast:192.168.0.255 |
18 |
>>> Mask:255.255.255.0 |
19 |
>>> It looks random. What can I do about it? Is there some software for |
20 |
>>> analyzing it? |
21 |
>> could you post your config please? |
22 |
> Thanks for your answer. Here is some configuration: |
23 |
> ================================================= |
24 |
> # cat /etc/modules.autoload.d/kernel-2.6|grep -E "(b44|ipw2100)" |
25 |
> b44 |
26 |
> ipw2100 |
27 |
> # lsmod|grep -E "(b44|ipw2100)" |
28 |
> b44 18636 0 |
29 |
> ipw2100 71028 0 |
30 |
> ieee80211 26184 1 ipw2100 |
31 |
> firmware_class 6976 1 ipw2100 |
32 |
> # cat /etc/modules.d/b44 |
33 |
> alias eth0 b44 |
34 |
> # cat /etc/modules.d/ipw2100 |
35 |
> alias eth1 ipw2100 |
36 |
> # ls -l /etc/conf.d/net* /etc/init.d/net* |
37 |
> -rw-r--r-- 1 root root 32176 28 aug 20.43 /etc/conf.d/net.example |
38 |
> lrwxrwxrwx 1 root root 6 28 aug 20.43 /etc/init.d/net.eth0 -> net.lo |
39 |
> lrwxrwxrwx 1 root root 6 18 feb 2006 /etc/init.d/net.eth1 -> net.lo |
40 |
> -rwxr-xr-x 1 root root 30045 28 aug 20.43 /etc/init.d/net.lo |
41 |
> -rwxr-xr-x 1 root root 3046 28 aug 20.43 /etc/init.d/netmount |
42 |
> # ps aux|grep -E "(ifplug|dhcp|eth)" |
43 |
> root 1010 0.0 0.0 1472 428 ? Ss 16:27 0:00 |
44 |
> /usr/sbin/ifplugd --iface=eth0 |
45 |
> root 1530 0.0 0.0 1600 228 ? Ss 16:28 0:00 |
46 |
> /sbin/dhcpcd -h c213-100-41-30.swipnet.se eth0 |
47 |
> root 1980 0.0 0.0 1780 652 pts/1 R+ 17:03 0:00 grep |
48 |
> -E (ifplug|dhcp|eth) |
49 |
> # rc-update show |
50 |
> acpid | default |
51 |
> alsasound | default |
52 |
> bootmisc | boot |
53 |
> checkfs | boot |
54 |
> checkroot | boot |
55 |
> clock | boot |
56 |
> consolefont | boot |
57 |
> cpufreq | boot |
58 |
> gpm | boot |
59 |
> hdparm | boot |
60 |
> hostname | boot |
61 |
> hotplug | boot |
62 |
> kbdrate | boot |
63 |
> keymaps | boot |
64 |
> local | default nonetwork |
65 |
> localmount | boot |
66 |
> modules | boot |
67 |
> net.lo | boot |
68 |
> netmount | default |
69 |
> postfix | default |
70 |
> power | default |
71 |
> rmnologin | boot |
72 |
> syslog-ng | default |
73 |
> urandom | boot |
74 |
> xdm | default |
75 |
> # emerge -pv baselayout net-tools iproute2 |
76 |
> |
77 |
> These are the packages that would be merged, in order: |
78 |
> |
79 |
> Calculating dependencies... done! |
80 |
> [ebuild R ] sys-apps/baselayout-1.12.4-r7 USE="unicode -bootstrap |
81 |
> -build -static" 0 kB |
82 |
> [ebuild R ] sys-apps/net-tools-1.60-r11 USE="nls -static" 0 kB |
83 |
> [ebuild R ] sys-apps/iproute2-2.6.15.20060110 USE="berkdb -atm |
84 |
> -minimal" 0 kB |
85 |
> |
86 |
> Total size of downloads: 0 kB |
87 |
> ================================================= |
88 |
> |
89 |
> |
90 |
> What does this mean?: |
91 |
> # /etc/init.d/net.eth0 start |
92 |
> * Service net.eth0 starting |
93 |
> * WARNING: net.eth0 has started but is inactive |
94 |
> |
95 |
> I made this script to test how often it fails. It checks ifconfig 10 |
96 |
> 000 times and reports how many times it did NOT have an address: |
97 |
> #! /bin/bash |
98 |
> export I=0 |
99 |
> export FAILURES=0 |
100 |
> while test $I -lt 10000; do |
101 |
> export I=$(dc -e "$I 1 + p"); |
102 |
> export FAILURES=$(dc -e "$FAILURES $(ifconfig eth0|grep "inet |
103 |
> addr:">/dev/null; echo $?) + p"); |
104 |
> done |
105 |
> echo FAILURES=$FAILURES |
106 |
> |
107 |
> |
108 |
> When I run it I get: |
109 |
> FAILURES=9786 |
110 |
> FAILURES=9787 |
111 |
> FAILURES=9779 |
112 |
> (numbers vary somewhat between runs) |
113 |
> |
114 |
> Running the script with the computer connected directly to the |
115 |
> Internet gives: |
116 |
> FAILURES=0 |
117 |
> |
118 |
> What else should I do? |
119 |
I have narrowed down the problem further. I am now connected with a |
120 |
static IP address and it works just fine. |
121 |
|
122 |
# grep "^[^#]" /etc/conf.d/net.eth0 |
123 |
config_eth0=( "192.168.0.16 netmask 255.255.255.0 broadcast 192.168.0.255" ) |
124 |
routes_eth0=( |
125 |
"default via 192.168.0.1" # IPv4 default route |
126 |
) |
127 |
|
128 |
|
129 |
So I guess it must be the DHCP client on the computer that fails somehow. |
130 |
-- |
131 |
gentoo-user@g.o mailing list |