View previous topic :: View next topic |
Author |
Message |
Elianto n00b
Joined: 07 Apr 2003 Posts: 70 Location: San Benedetto del Tronto
|
Posted: Mon Dec 15, 2003 11:48 pm Post subject: Rete domestica [Risolto] |
|
|
Ho due macchine con sopra installato linux (da una parte la mandrake, per mio fratello di 10 anni, e dall'altra la Gentoo, per me ) ...
La situazione è questa: la macchina principale con sopra gentoo ha due schede di rete, eth0 con IP 10.0.0.1 collegato con il modem ADSL, e eth1 con IP 192.168.0.1 collegato attraverso un cavo incrociato con la macchina mandrake che ha indirizzo IP 192.168.0.2.
Ora il problema sta nel fatto che se attivo tutte e due le schede sulla macchina principale, con connessione ADSL attiva, non riesco a pingare la macchina Mandrake. Viceversa, se elimino la connessione ADSL e l'interfaccia eth0 non ci sono problemi. Ho capito quindi che è un problema di gatway e di instradamento dei pacchetti, ma non sono riuscito a capire dove intervenire.
Posto il mio ifconfig
Quote: |
eth0 Link encap:Ethernet HWaddr 00:50:8D:FB:7C:16
inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1491 errors:0 dropped:0 overruns:0 frame:0
TX packets:1210 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1022434 (998.4 Kb) TX bytes:166256 (162.3 Kb)
Interrupt:10 Base address:0x5000
eth1 Link encap:Ethernet HWaddr 00:40:05:8A:41:E5
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST 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:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:11 Base address:0x5000
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:299 errors:0 dropped:0 overruns:0 frame:0
TX packets:299 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:180079 (175.8 Kb) TX bytes:180079 (175.8 Kb)
ppp0 Link encap:Point-to-Point Protocol
inet addr:80.181.133.124 P-t-P:192.168.100.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:1404 errors:0 dropped:0 overruns:0 frame:0
TX packets:1123 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:986077 (962.9 Kb) TX bytes:138748 (135.4 Kb)
|
e il mio route
Quote: |
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.100.1 * 255.255.255.255 UH 0 0 0 ppp0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
10.0.0.0 * 255.0.0.0 U 0 0 0 eth0
loopback localhost 255.0.0.0 UG 0 0 0 lo
default 192.168.100.1 0.0.0.0 UG 0 0 0 ppp0
|
Un grazie a tutta la comunità!
Alessandro
Last edited by Elianto on Tue Dec 16, 2003 12:38 pm; edited 1 time in total |
|
Back to top |
|
|
cataenry Guru
Joined: 04 Nov 2003 Posts: 343
|
Posted: Tue Dec 16, 2003 12:00 am Post subject: |
|
|
Scusami, ma da qui risulta che la eth1 della macchina principale ha indirizzo ip 192.168.0.2... errore di cut&paste oppure le 2 macchine hanno entrambe ip# 192.168.0.2? |
|
Back to top |
|
|
Elianto n00b
Joined: 07 Apr 2003 Posts: 70 Location: San Benedetto del Tronto
|
Posted: Tue Dec 16, 2003 12:10 am Post subject: |
|
|
E' un errore di cut e past, purtroppo ...
La situazione è quella descritta all'inizio del post.
Grazie!!! |
|
Back to top |
|
|
Diggs Apprentice
Joined: 07 Oct 2003 Posts: 239 Location: LoSt In NeT SpAcE
|
Posted: Tue Dec 16, 2003 1:18 am Post subject: |
|
|
Prova questo:
1) settare la eth0 a 192.168.0.1
2) settare la eth1 a 192.168.1.1
3) settare la mdk a 192.168.1.2
Ho una situazione identica alla tua, a me ha funzionato così.
Cmq hai settato gli hosts in /etc/hosts?
Ti pasto il mio conf [N.B. la mia box ha hostname settato a gateway e dnsdomainname a daemon] :
Quote: |
127.0.0.1 localhost.daemon localhost
192.168.1.1 gateway.daemon gateway #la eth1 rivolta verso la rete interna
192.168.1.2 pc-01.daemon pc-01 # primo pc della rete interna
192.168.1.3 pc-02.daemon pc-02 # secondo pc della rete interna
|
_________________ IRCNET NICK: diggs on IRCNET
http://leonardo.netsons.org/
Gioca a Tremulous! Player [!!!] Diggs [ITA] |
|
Back to top |
|
|
Elianto n00b
Joined: 07 Apr 2003 Posts: 70 Location: San Benedetto del Tronto
|
Posted: Tue Dec 16, 2003 10:09 am Post subject: |
|
|
Grazie mille ora funziona perfettamente.
Il mio errore è stato quello di mettere in /etc/hosts lo stesso IP per la prima macchina e per il gateway.
Grazie ancora.
Alessandro |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31455 Location: here
|
Posted: Tue Dec 16, 2003 12:08 pm Post subject: |
|
|
Elianto wrote: | Grazie mille ora funziona perfettamente.
Il mio errore è stato quello di mettere in /etc/hosts lo stesso IP per la prima macchina e per il gateway.
Grazie ancora.
Alessandro |
Potresti anche usare una sola scheda di rete sulla tua macchina cosi' risparmi
sul hardware. Basta che in /etc/conf.d/net setti eth0 con ip per il modem e poi
crei un alias con l'IP che va al pc di tuo fartello. Cosi' ti ritroverai con un eth0
e un eth0:0. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31455 Location: here
|
Posted: Tue Dec 16, 2003 12:09 pm Post subject: |
|
|
Dimenticavo metti il tag [risolto] al titolo. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
MyZelF Bodhisattva
Joined: 25 Feb 2003 Posts: 2010 Location: Venice, Italy
|
Posted: Tue Dec 16, 2003 12:32 pm Post subject: |
|
|
fedeliallalinea wrote: |
Potresti anche usare una sola scheda di rete sulla tua macchina cosi' risparmi
sul hardware. Basta che in /etc/conf.d/net setti eth0 con ip per il modem e poi
crei un alias con l'IP che va al pc di tuo fartello. Cosi' ti ritroverai con un eth0
e un eth0:0. |
Però per fare così ha bisogno anche di uno switch, altrimenti il modem ethernet dove lo attacca? |
|
Back to top |
|
|
|