linux-l: Netzwerkprobleme, die mich grau werden lassen
Kay Molkenthin
molkiheg at cetus.zrz.TU-Berlin.DE
Mo Jun 1 19:42:31 CEST 1998
Johannes Walther wrote:
>
> Das sieht schon mal gut aus...
> Schau mal in /etc/init.d/network
---
#!/bin/sh
#
# network Bring up/down networking
#
# Modified: Ngo Than
# Date: 29.10.1996
# Source function library.
. /etc/init.d/functions
[ ! -f /etc/sysconfig/network ] && exit 0
. /etc/sysconfig/network
# Source PCMCIA
if [ -f /etc/sysconfig/pcmcia ]; then
. /etc/sysconfig/pcmcia
fi
# Check that networking is up.
[ "$NETWORKING" = "yes" ] || exit 0
[ -x /sbin/ifconfig ] || exit 0
[ ! -d /etc/sysconfig/network-scripts ] && exit 0
cd /etc/sysconfig/network-scripts
interfaces=`ls ifcfg* | grep -v ifcfg-lo | grep -v :`
# See how we were called.
case "$1" in
start)
./ifup ifcfg-lo
for i in $interfaces; do
./ifup $i boot
done
touch /var/lock/subsys/network
;;
stop)
for i in $interfaces; do
./ifdown $i boot
done
./ifdown ifcfg-lo
rm -f /var/lock/subsys/network
;;
*)
echo "Usage: network {start|stop}"
exit 1
esac
exit 0
---
>
> und dann in /etc/sysconfig/network-scripts, dort werden die
> Netzwerksachen eingestell.
Dauert etwas, da mehrere Skripte drin sind. Habe aber nichts an den
Skripten geändert.
---
kay:[network-scripts] #ls -la
total 17
drwxr-xr-x 2 root root 1024 Jun 01 19:29 ./
drwxr-xr-x 3 root root 1024 Jun 01 19:27 ../
-rw-r--r-- 1 root root 117 Jun 01 00:43 ifcfg-eth0
-rwxr-xr-x 1 root root 100 Jul 22 1996 ifcfg-lo*
-rwxr-xr-x 1 root root 253 Jul 22 1996 ifdown*
-rwxr-xr-x 1 root root 377 Aug 28 1996 ifdown-ppp*
-rwxr-xr-x 1 root root 372 Aug 28 1996 ifdown-sl*
-rwxr-xr-x 1 root root 3142 Nov 14 1996 ifup*
-rwxr-xr-x 1 root root 858 Sep 10 1996 ifup-plip*
-rwxr-xr-x 1 root root 1545 Aug 28 1996 ifup-ppp*
-rwxr-xr-x 1 root root 346 Nov 08 1996 ifup-routes*
-rwxr-xr-x 1 root root 1054 Aug 28 1996 ifup-sl*
---
>
> In /etc/sysconfig/network ist alles richtig eingetragen ?
---
NETWORKING=yes
HOSTNAME="kay.chaos.de"
DOMAINNAME="chaos.de"
GATEWAY=""
GATEWAYDEV=eth0
NAMESERVER="130.149.4.20"
---
> Probiere mal per Hand:(als root)
>
> ifconfig
---
kay:[network-scripts] #ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Bcast:127.255.255.255 Mask:255.0.0.0
UP BROADCAST LOOPBACK RUNNING MTU:3584 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0 coll:0
eth0 Link encap:Ethernet HWaddr 00:40:95:A4:04:E4
inet addr:192.168.1.1 Bcast:192.168.1.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:0 errors:0 dropped:0 overruns:0 carrier:0 coll:0
Interrupt:9 Base address:0x240
ippp0 Link encap:Point-to-Point Protocol
inet addr:130.149.1.137 P-t-P:130.149.1.70 Mask:255.255.0.0
UP POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:8732 errors:0 dropped:0 overruns:0 frame:0
TX packets:5711 errors:0 dropped:0 overruns:0 carrier:0
coll:0
---
>
> wenn kein eth0 vorhanden, dann
>
> ifconfig eth0 <deine IP> broadcast 255.255.255.255 netmask <deine ersten
> 3 stellen>.0 ((bzw an deine gegebenheiten anpassen))
>
> Ist dann ein Interface vorhanden ? test mit <ifconfig>
> Wenn ja gib
>
> route add -net <netzwerknummer> netmask <netzwerkmaske> eth0
> und dann
> route add default gw <Rechnernummer der gegenseite> <device>
Was ist die Netzwerknummer? 192.168.0.0 oder die IP meines Rechners
192.168.1.1
Auf ein neues... ;-)
Mehr Informationen über die Mailingliste linux-l