[Internet-e-architetture-di-rete] Aiuto!!! non pingo più il mio server :)
sugo
sugo at olografix.org
Sat Oct 8 22:28:56 CEST 2016
Lo so, non potevo lasciarlo rotto per troppo tempo :D
Comunque spero che possa essere d'interesse per qualcuno; il server in
questione ha due schede di rete sulla stessa subnet:
# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP qlen 1000
link/ether 00:50:56:82:47:9c brd ff:ff:ff:ff:ff:ff
inet 46.252.144.172/24 brd 46.252.144.255 scope global eth0
inet6 fe80::250:56ff:fe82:479c/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP qlen 1000
link/ether 00:50:56:82:2e:f3 brd ff:ff:ff:ff:ff:ff
inet 46.252.144.173/24 brd 46.252.144.255 scope global eth1
inet6 fe80::250:56ff:fe82:2ef3/64 scope link
valid_lft forever preferred_lft forever
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
46.252.144.0 0.0.0.0 255.255.255.0 U 0 0 0
eth0
46.252.144.0 0.0.0.0 255.255.255.0 U 0 0 0
eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0
eth0
0.0.0.0 46.252.144.1 0.0.0.0 UG 0 0 0
eth0
Prima di risolvere, e provando a pingare l'ip 46.252.144.173 da fuori,
vedevo con tcpdump che i pacchetti arrivavano ma non c'era risposta,
così come non riuscivo a pingare dall'esterno (da eth1):
# ping -I eth1 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 46.252.144.173 eth1: 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2880ms
Alla fine, documentandomi un po', ho trovato che questo si verifica per
via del Reverse Path Filter, impostato in maniera restrittiva su CentOS
6:
https://access.redhat.com/solutions/53031
PRIMA:
# ping -I eth1 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 46.252.144.173 eth1: 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2880ms
SOLUZIONE:
root at vm_sugo:~# sysctl -w net.ipv4.conf.eth1.rp_filter=0
net.ipv4.conf.eth1.rp_filter = 0
DOPO:
root at vm_sugo:~# ping -I eth1 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 46.252.144.173 eth1: 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=50 time=15.9 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=50 time=15.9 ms
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1429ms
rtt min/avg/max/mdev = 15.918/15.927/15.937/0.126 ms
anche il ping da fuori verso 46.252.144.173 ora viene onorato.
Buon weekend e grazie per aver risposto! :-)
Il 2016-10-08 21:50 Emanuela Pompei ha scritto:
> Konnichiwa!
>
> C:\Users\emakupfromjapan>ping 46.252.144.173
>
> Esecuzione di Ping 46.252.144.173 con 32 byte di dati:
> Risposta da 46.252.144.173 [1]: byte=32 durata=284ms TTL=46
> Risposta da 46.252.144.173 [1]: byte=32 durata=283ms TTL=46
> Risposta da 46.252.144.173 [1]: byte=32 durata=282ms TTL=46
> Risposta da 46.252.144.173 [1]: byte=32 durata=283ms TTL=46
>
> Statistiche Ping per 46.252.144.173 [1]:
> Pacchetti: Trasmessi = 4, Ricevuti = 4,
> Persi = 0 (0% persi),
> Tempo approssimativo percorsi andata/ritorno in millisecondi:
> Minimo = 282ms, Massimo = 284ms, Medio = 283ms
>
> :D
>
> 2016-10-08 10:44 GMT+02:00 sugo via Internet-e-architetture-di-rete
> <internet-e-architetture-di-rete at list.informagiovani.comunesbt.it>:
>
>> c:\Users\sugo\Downloads>ping 46.252.144.173 -t
>>
>> Esecuzione di Ping 46.252.144.173 con 32 byte di dati:
>> Richiesta scaduta.
>> Richiesta scaduta.
>> Richiesta scaduta.
>> Richiesta scaduta.
>> Richiesta scaduta.
>>
>> Statistiche Ping per 46.252.144.173 [1]:
>> Pacchetti: Trasmessi = 5, Ricevuti = 0,
>> Persi = 5 (100% persi),
>> Control-C
>> ^C
>>
>> E' una macchina virtuale con CentOS.
>> Dalla console locale riesco ad accedere, e a pingare cose
>> all'esterno.
>>
>> Chi mi aiuta? :D
>> _______________________________________________
>> Internet-e-architetture-di-rete mailing list
>> Internet-e-architetture-di-rete at list.informagiovani.comunesbt.it
>>
> http://list.informagiovani.comunesbt.it/mailman/listinfo/internet-e-architetture-di-rete
>> [2]
>
>
>
> Links:
> ------
> [1] http://46.252.144.173
> [2]
> http://list.informagiovani.comunesbt.it/mailman/listinfo/internet-e-architetture-di-rete
More information about the Internet-e-architetture-di-rete
mailing list