[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [HS][trés long]connection et configuration entre deux machines et internet



Le Lundi 3 Février 2003 22:22, Stephane Bortzmeyer a écrit :
> On Sunday 2 February 2003, at 2 h 12, the keyboard of "patrice.G"
>
[...]
> Donc, pour résumer. Appelons le routeur "adamsberg" et l'autre ordinateur
> "danglard".
>
> Sur adamsberg, vous configurez les interfaces Ethernet :
>
> /etc/network/interfaces :
>
> # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
> # /usr/share/doc/netbase/examples for more information.
>
> ...
>
> # Maison
> auto eth0
> iface eth0 inet static
>   # Vous avez le droit de choisir un autre réseau... RFC 1918
>   address 172.19.1.1
>   netmask 255.255.255.0
>   network 172.19.1.0
>   broadcast 172.19.1.255
>
> # Vers l'ADSL
> auto eth1
> iface eth1 inet static
>   address 10.0.0.1
>   netmask 255.0.0.0
>

voilà mon fichier interfaces modifié...

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian 
installation# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet static
        address 172.19.1.1
        netmask 255.255.255.0
        network 172.19.1.0
        broadcast 172.19.1.255

#vers internet (je me suis inspiré de la config du premier ordi qui
#fonctionnait bien avec ces paramétres)
auto eth1
iface eth1 inet static
        address 192.168.1.2
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1

> Vous installez la connexion avec l'ADSL. (en fait, je ne suis pas sûr que
> vous utilisiez de l'ADSL, ni avec quel fournisseur, donc j'arrête là la
> configuration de eth1).
>

je suis sous tiscali avec une connection ADSL

> ifup eth0
> ifup eth1
>
> Et ifconfig vous dira si les deux interfaces sont bien configurées.

# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:05:5D:4D:00:79
          inet addr:172.19.1.1  Bcast:172.19.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
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:11 Base address:0xa000

eth1      Link encap:Ethernet  HWaddr 00:05:5D:4D:00:20
          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:0 errors:2740 dropped:239 overruns:2740 frame:0 <-error
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:9 Base address:0xc000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:60 errors:0 dropped:0 overruns:0 frame:0
          TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4194 (4.0 KiB)  TX bytes:4194 (4.0 KiB)

il y a des packets erreur sur eth1, c'est dû à quoi?
mauvaise configuration de l'interface?
pourtant dans le premier ordinateur, cela fonctionnait...
je n'ai pas accés non plus à internet...

# host www.google.fr
Nameserver not responding
www.google.fr A record not found, try again

>
> Maintenant, pour le reste de la maison, vous mettez un serveur DHCP
> (apt-get install dhcp). Vous pouvez aussi utiliser des adresses statiques
> mais c'est plus joli avec DHCP.
>
> /etc/dhcpd.conf :
>
> # dhcpd.conf
> #
>
> # option definitions common to all supported networks...
> # Remplacez les valeurs par quelque chose qui existe sur votre réseau
> option domain-name "YOURDOMAIN.org";
> option domain-name-servers ns.YOURDOMAIN.org;
>
> option subnet-mask 255.255.255.0;
> default-lease-time 600;
> max-lease-time 3600;
>
> subnet 172.19.1.0 netmask 255.255.255.0 {
>   range 172.19.1.8 172.19.1.10;
>   option routers gw.YOURDOMAIN.org;
> }

dois je éffacer les informations qui suivent } dans ce fichier de config?

>
> /etc/init.d/dhcp reload
>
> Et sur danglard, vous dites dans /etc/network/interfaces :
>
> auto eth0
> iface eth0 inet dhcp
>   hostname danglard
>

lorsque je lance sur l'ordinateur client("danglard") une adresse eg: 
www.google.fr, mon ordinateur/serveur("adamsberg") fait un reboot... 
quelqu'un saurait quel est le probléme?

> ifup eth0 et vous regardez avec ifconfig si danglard a bien obtenu une
> adresse. 

# ifconfig
eth0      Lien encap:Ethernet  HWaddr 00:01:02:07:04:24
          inet adr:192.168.1.2  Bcast:192.168.1.255  Masque:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:85126 errors:0 dropped:0 overruns:0 frame:0
          TX packets:64699 errors:0 dropped:0 overruns:0 carrier:0
          collisions:147 lg file transmission:100
          RX bytes:41204340 (39.2 MiB)  TX bytes:23041566 (21.9 MiB)
          Interruption:11 Adresse de base:0xd800

> Sinon, il faut déboguer :
>
> - journal de DHCP (/var/log/daemon.log)

d'aprés le journal de "adamsberg" j'ai certaines parties qui indiquent des 
manques dans les fichiers de config de dhcpd:

>>Feb 10 19:34:37 debianpat dhcpd-2.2.x: No subnet declaration for eth1 
(192.168.1.2).
>>Feb 10 19:34:37 debianpat dhcpd-2.2.x: Please write a subnet declaration in 
your dhcpd.conf file for the
>>Feb 10 19:34:37 debianpat dhcpd-2.2.x: network segment to which interface 
eth1 is attached.
>>Feb 10 19:34:37 debianpat dhcpd-2.2.x: exiting.

pourtant j'ai mis une adresse ip à subnet dans la conf de dhcpd...

> - diodes des cartes Ethernet
> - 'mii-tool' sur les deux

résultat sur adamsberg:

eth0: 10 Mbit, half duplex, no link
eth1: 10 Mbit, half duplex, no link

> - 'tcpdump -n -i eth1' sur adamsberg

j'ai essayé tcpdump, mais ça tourne sans rien qui en ressort, sauf quand je 
met une adresse sur "danglard" vers internet et là ça met une adresse IP dans 
la console de "adamsberg" briévement et la machine reboote...

me suis je trompé quelque part?
j'ai cherché dans man dhcpd, je trouve pas, je suis largué...
que dois je modifier ou ajouter ou supprimer?
merci pour votre aide...

patrice

PJ de daemon.log [partie choisie]:

Feb 10 18:02:57 debianpat named[272]: running
Feb 10 19:34:34 debianpat named[269]: starting BIND 9.2.1
Feb 10 19:34:34 debianpat named[269]: using 1 CPU
Feb 10 19:34:35 debianpat lwresd[276]: starting BIND 9.2.1
Feb 10 19:34:35 debianpat lwresd[276]: using 1 CPU
Feb 10 19:34:35 debianpat rpc.statd[283]: Version 1.0 Starting
Feb 10 19:34:35 debianpat named[272]: loading configuration from 
'/etc/bind/named.conf'
Feb 10 19:34:35 debianpat lwresd[279]: loading configuration from 
'/etc/bind/lwresd.conf'
Feb 10 19:34:35 debianpat lwresd[279]: none:0: open: /etc/bind/lwresd.conf: 
file not found
Feb 10 19:34:35 debianpat lwresd[279]: loading configuration from 
'/etc/resolv.conf'
Feb 10 19:34:36 debianpat named[272]: no IPv6 interfaces found
Feb 10 19:34:36 debianpat named[272]: listening on IPv4 interface lo, 
127.0.0.1#53
Feb 10 19:34:36 debianpat named[272]: listening on IPv4 interface eth0, 
172.19.1.1#53
Feb 10 19:34:36 debianpat named[272]: listening on IPv4 interface eth1, 
192.168.1.2#53
Feb 10 19:34:37 debianpat dhcpd-2.2.x: No subnet declaration for eth1 
(192.168.1.2).
Feb 10 19:34:37 debianpat dhcpd-2.2.x: Please write a subnet declaration in 
your dhcpd.conf file for the
Feb 10 19:34:37 debianpat dhcpd-2.2.x: network segment to which interface 
eth1 is attached.
Feb 10 19:34:37 debianpat dhcpd-2.2.x: exiting.
Feb 10 19:34:37 debianpat named[272]: command channel listening on 
127.0.0.1#953
Feb 10 19:34:37 debianpat lwresd[279]: no IPv6 interfaces found
Feb 10 19:34:37 debianpat lwresd[279]: couldn't add command channel 
127.0.0.1#953: address in use
Feb 10 19:34:37 debianpat lwresd[279]: lwres listening on 127.0.0.1#921
Feb 10 19:34:37 debianpat lwresd[279]: running
Feb 10 19:34:37 debianpat named[272]: zone 0.in-addr.arpa/IN: loaded serial 1
Feb 10 19:34:37 debianpat named[272]: zone 127.in-addr.arpa/IN: loaded serial 
1
Feb 10 19:34:37 debianpat named[272]: zone 255.in-addr.arpa/IN: loaded serial 
1
Feb 10 19:34:37 debianpat named[272]: zone localhost/IN: loaded serial 1
Feb 10 19:34:37 debianpat named[272]: running

et là il y a reboot de "adamsberg" (debianpat)...

-- 
"Opinion publique : paresse personnelle." 
    ,.   (   .      )        .      "   
   ("     )  )'     ,'        )  . (`     '`    
 .; )  ' (( (" )    ;(,     ((  (  ;)  "  )"    Nietzsche
 _"., ,._'_.,)_(..,( . )_  _' )_') (. _..( '..



Reply to: