Re: 2ème carte réseau

Pàgina inicial

Reply to this message
Autor: Xavier Bestel
Data:  
A: Frédéric Mantegazza
CC: guilde
Assumpte: Re: 2ème carte réseau
Salut,

On Fri, 2009-07-10 at 11:07 +0200, Frédéric Mantegazza wrote:
> Re,
>
> Je viens de mettre une seconde carte réseau dans mon PC, mais je n'arrive
> pas à la configurer. Je voudrais quelle permettre d'accéder au réseau
> 192.168.1.0... Où et comment configurer tout ça ?
>
> Pour l'instant, j'ai, dans /etc/network/interfaces :
>
> auto lo
> iface lo inet loopback
>
> # The primary network interface
> allow-hotplug eth0
> iface eth0 inet dhcp
>
> # The secondary interface
> allow-hotplug eth1
> iface eth1 inet static
>     address 192.168.1.1
>     netmask 255.255.255.0
>     network 192.168.1.0
>     broadcast 192.168.1.255

>
> # Static routes
> up route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1
> down route del -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1


Tu te répètes. J'aurais plutôt fait ça:

# The secondary interface
allow-hotplug eth1
iface eth1 inet static
    address 192.168.1.1
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1



.. et c'est tout.

    Xav


> $ route
> Table de routage IP du noyau
> Destination     Passerelle      Genmask         Indic Metric Ref    Use Iface
> 172.17.44.0     *               255.255.255.0   U     0      0        0 eth0
> 192.168.1.0     192.168.1.1     255.255.255.0   UG    0      0        0 eth1
> 192.168.1.0     *               255.255.255.0   U     0      0        0 eth1
> default         172.17.44.254   0.0.0.0         UG    0      0        0 eth0

>
> Mais le réseau 192.168.1.0 n'est pas accessible :
>
> $ ping 192.168.1.71
> PING 192.168.1.71 (192.168.1.71) 56(84) bytes of data.
> >From 192.168.1.1 icmp_seq=2 Destination Host Unreachable
> >From 192.168.1.1 icmp_seq=3 Destination Host Unreachable
> >From 192.168.1.1 icmp_seq=4 Destination Host Unreachable
>
> Une idée ?
>
> Merci d'avance.
>
> PS : au fait, est-ce bien là qu'on met les routes statiques ?
>