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

Re: Idea complicata per rete domestica



2009/7/27 Davide Giovine <davidegio@fastwebnet.it>:
> Smanettando un po' sono riuscito a far funzionare la rete, però il "client"
> non riesce ad accedere a internet... i due computer si pingano e vedono
> allegramente nella loro LAN ma a uno manca la linea... ho provato i
> comandi che mi hai scritto ma non sono arrivato a nulla...
>
> Maccina client:
> ---
> /etc/network/inferfaces (ricopiato a mano)
>
> auto lo
> iface lo inet loopback
>
> allow-hotplug eth0
> iface eth0 inet static
> name Eth0
> address 192.168.0.2
> netmask 255.255.255.0
> network 192.168.0.0
> broadcast 192.168.0.255
> gateway 192.168.0.1
> ---
>
> route invece mi dà:
>
> 192.168.0.0     *       255.255.255.0 U 0       0       0       eth0
> default DEB-P4HT.local  0.0.0.0 UG      0       0       eth0
>
>
> questo invece sul "server" (come sarebbe un nome corretto? gateway?)
> ---
> # This file describes the network interfaces available on your system
> # and how to activate them. For more information, see interfaces(5).
>
> # The loopback network interface
> auto lo
> iface lo inet loopback
>
> # The primary network interface
> allow-hotplug eth0
> iface eth0 inet dhcp
> name Eth0
>
> allow-hotplug eth1
> iface eth1 inet static
> name Eth1
> address 192.168.0.1
> netmask 255.255.255.0
> network 192.168.0.0
> broadcast 192.168.0.255
> gateway 192.168.0.1
> ---
>
> e route dà:
>
> ---
> 192.168.0.0     *               255.255.255.0   U     0      0        0 eth1
> 2.abc.def.0     *               255.abc.def.0   U     0      0        0 eth0
> default         2.abc.def.1     0.0.0.0         UG    0      0        0 eth0
> default         DEB-P4HT.local  0.0.0.0         UG    0      0        0 eth1
> ---
>
> dove ogni "abc" è sempre uguale, e lo stesso "def".
>
> Che castroneria ho mai combinato?

Consiglio: usa route -n, anziché route e basta. Con gli indirizzi IP
si ragiona meglio :-)

Allora, nel route del gateway c'è un errore, ovvero ci sono due
default gateway, mentre in realtà ce ne dovrebbe essere uno solo.
Basta togliere la riga:
gateway 192.168.0.1

dal file interfaces del gateway.

Seconda cosa... i DNS sul client sono stati impostati correttamente?
Solo se usi DHCP i DNS vengono impostati correttamente.
Se no, è sufficiente copiare il file /etc/resolv.conf dal gateway sul
client e renderlo immutabile con un bel chattr +i

-- 
Dario Pilori
-Linux registered user #406515


Reply to: