[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [NOVICE] Min Linux kan ikke se netværket



At 18:01 25-09-1999 +0200, you wrote:
[Om /etc/init.d/network]
Den burde jo gøre andet end blot initialisere nogle lokale variable.
(lokale for network scriptet)

Men hos mig har jeg (med mine tal) ...

Det var ikke gået op for mig, at det var en script-fil.


Min ser sådan ud:

---------- start fil ----------
#!/bin/sh

cat /proc/net/dev |grep : | cut -d : -f 1 | grep lo >/dev/null 2>&1

if [ $? -eq 0 ] ; then
   ifconfig lo 127.0.0.1
   route add -net 127.0.0.0 netmask 255.0.0.0 dev lo
fi

IPADDR=192.168.42.2
NETMASK=255.255.255.0
NETWORK=192.168.42.0
BROADCAST=192.168.42.0
GATEWAY=192.168.42.1

cat /proc/net/dev |grep : | cut -d : -f 1 | grep eth0 >/dev/null 2>&1

if [ $? -eq 0 ] ; then
   ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
   route add -net ${NETWORK} netmask ${NETMASK} dev eth0
   [ "${GATEWAY}" ] && route add default gw ${GATEWAY} metric 1
fi
---------- slut fil ----------


#!      /bin/sh
ifconfig lo 127.0.0.1
route add -net 127.0.0.0 lo

Hvad gør de to linier?


# Network route for ethernet
ifconfig eth0 192.168.1.1 up

'Starter' dit netkort?


route add -net 192.168.1.0 netmask 255.255.255.0 eth0

Sætter din maskine op til hvad der skal gå gennem gateway'en?


> Så gateway skulle være lagt rigtigt ind. Hvad kan der så være i vejen,

nej den startes ikke automatisk jvf. ovenstående.

Det opdagede jeg. Skal jeg så bare indsætte


ifconfig eth0 192.168.42.2 netmask 255.255.255.0 up

i min network fil?

> siden jeg kun kan ping'e på mit eget LAN? Og hvordan får jeg Linux til at
> starte netkortet automatisk, når den starter op? Med andre ord: Hvor skal
> nedenstående kommando indsættes?
>
> ifconfig eth0 192.168.42.2 netmask 255.255.255.0 up

jeg har det i /etc/init.d/network
(men måske ikke det korrekte sted, men det virker hos mig)

OK, hvis det virker, så er det vel en god start. :-)



---


Venlig hilsen / Kind regards

Jens Bang (sslug@sslug)

Freja Data                    Tlf./phone : +45 - 4046 - 3442
Guldbergs Plads 12 1. tv.     Fax        : +45 - 3537 - 7006
DK-2200 København N
Denmark                       Homepage   : www.frejadata.dk



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:57 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *