Eu recebi uma caixa vermelha recentemente instalada em um servidor.
Eu posso executar ping em outra máquina na rede usando o ip e o nome do servidor, mas não consigo pingar localhost ou 127.0.0.1 ou 192.168.4.42 (ip local)
[root@comp2 ~]# ping comp1
PING vcas1 (192.168.4.41) 56(84) bytes of data.
64 bytes from vcas1 (192.168.4.41): icmp_seq=1 ttl=64 time=0.104 ms
64 bytes from vcas1 (192.168.4.41): icmp_seq=2 ttl=64 time=0.100 ms
--- comp1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.100/0.102/0.104/0.002 ms
[root@comp2 ~]#
[root@comp2 ~]# ping 192.168.4.41
PING 192.168.4.41 (192.168.4.41) 56(84) bytes of data.
64 bytes from 192.168.4.41: icmp_seq=1 ttl=64 time=0.119 ms
64 bytes from 192.168.4.41: icmp_seq=2 ttl=64 time=0.105 ms
--- 192.168.4.41 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.105/0.112/0.119/0.007 ms
Mas não consigo pingar localhost ou endereço IP local.
[root@comp2 ~]# ping 192.168.4.42
PING 192.168.4.42 (192.168.4.42) 56(84) bytes of data.
--- 192.168.4.42 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms
PING comp2 (192.168.4.42) 56(84) bytes of data.
--- comp2 ping statistics ---
17 packets transmitted, 0 received, 100% packet loss, time 15999ms
[root@comp2 ~]# ping 192.168.4.42
PING 192.168.4.42 (192.168.4.42) 56(84) bytes of data.
--- 192.168.4.42 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms
[root@comp2 ~]# ping localhost
PING localhost.localdomain (127.0.0.1) 56(84) bytes of data.
--- localhost.localdomain ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms
Este é o meu / etc / hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.4.41 comp1
192.168.4.42 comp2
e finalmente este é o meu ifconfig:
[root@comp2 ~]# /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:26:55:D4:4E:81
inet addr:10.0.0.14 Bcast:10.127.255.255 Mask:255.128.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:271591 errors:0 dropped:0 overruns:0 frame:0
TX packets:3079 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:16571921 (15.8 MiB) TX bytes:228424 (223.0 KiB)
Memory:fbfa0000-fbfc0000
eth1 Link encap:Ethernet HWaddr 00:26:55:D4:4E:80
inet addr:192.168.4.42 Bcast:192.168.4.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:174349 errors:0 dropped:0 overruns:0 frame:0
TX packets:34537 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:12202232 (11.6 MiB) TX bytes:3230241 (3.0 MiB)
Memory:fbfe0000-fc000000
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:16398 errors:0 dropped:0 overruns:0 frame:0
TX packets:16398 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:829344 (809.9 KiB) TX bytes:829344 (809.9 KiB)
O que está acontecendo?
EDITAR:
[root@comp2 ~]# /sbin/iptables -F
[root@comp2 ~]# /etc/init.d/iptables stop
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]
[root@comp2 ~]# ping localhost
PING localhost.localdomain (127.0.0.1) 56(84) bytes of data.
--- localhost.localdomain ping statistics ---
6 packets transmitted, 0 received, 100% packet loss, time 4999ms
Ainda nada.
[root@comp2 ~]#/sbin/ip route show
192.168.4.0/24 dev eth1 proto kernel scope link src 192.168.4.42
169.254.0.0/16 dev eth1 scope link
10.0.0.0/9 dev eth0 proto kernel scope link src 10.0.0.14
default via 10.0.0.1 dev eth0
[root@comp2 ~]# /sbin/route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.4.0 * 255.255.255.0 U 0 0 0 eth1
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
10.0.0.0 * 255.128.0.0 U 0 0 0 eth0
default VideoGateway.Om 0.0.0.0 UG 0 0 0 eth0
Novo:
Isto é algo que eu deveria ter feito já, mas igualmente do servidor comp1 (192.168.4.41), eu não consigo pingar comp2 (192.168.4.42)