
Precisa de ajuda com roteamento. Eu não entendo como fazer isso funcionar
Eu tenho 2 dispositivos configurados. Um dos dispositivos(alguma caixa1) está configurado com 2 interfaces e a tabela de roteamento é semelhante à abaixo
[2018-08-24 00:29:14 root@somebox1: /home/admin ]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.4.1 0.0.0.0 UG 0 0 0 eth0
192.168.4.0 0.0.0.0 255.255.254.0 U 0 0 0 eth0
192.168.6.0 0.0.0.0 255.255.254.0 U 0 0 0 eth1
Portanto, nesta caixa, para duas das interfaces, foram adicionadas regras de roteamento para 192.168.4.x e 192.168.6.x. Todos fazem parte do CIDR /23
O padrão é 192.168.4.1.
Eu tenho outro dispositivo (alguma caixa2) configurado com interface única na sub-rede 192.168.6.x. Sua tabela de roteamento é semelhante a abaixo
[2018-08-24 04:54:31 admin@somebox2: ~ ]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.6.1 0.0.0.0 UG 0 0 0 eth0
192.168.6.0 0.0.0.0 255.255.254.0 U 0 0 0 eth0
Agora. Estou com uma dificuldade onde, do somebox2, não consigo fazer ping no IP eth0 do somebox1.
[2018-08-25 04:55:47 root@somebox1: /home/admin ]# ping -I eth0 192.168.4.120
PING 172.29.4.120 (172.29.4.120) from 192.168.6.21 eth0: 56(84) bytes of data.
^C
--- 172.29.4.120 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms
Mas posso fazer ping no gateway padrão de somebox1
[2018-08-25 04:55:32 root@somebox1: /home/admin ]# ping -I eth0 192.168.4.1
PING 172.29.4.1 (172.29.4.1) from 192.168.6.21 eth0: 56(84) bytes of data.
64 bytes from 192.168.4.1: icmp_seq=1 ttl=255 time=0.498 ms
64 bytes from 192.168.4.1: icmp_seq=2 ttl=255 time=0.701 ms
^C
--- 172.29.4.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1
E de somebox1, sou capaz de executar ping no IP eth0 de somebox2 usando a interface eth1
bash-4.2$ ping -I eth0 192.168.6.21
PING 192.168.6.21 (192.168.6.21) from 192.168.4.120 eth0: 56(84) bytes of data.
^C
--- 192.168.6.21 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 2999ms
bash-4.2$ ping -I eth1 192.168.6.21
PING 192.168.6.21 (192.168.6.21) from 192.168.6.44 eth1: 56(84) bytes of data.
64 bytes from 192.168.6.21: icmp_seq=1 ttl=64 time=1.64 ms
64 bytes from 192.168.6.21: icmp_seq=2 ttl=64 time=0.789 ms
64 bytes from 192.168.6.21: icmp_seq=3 ttl=64 time=0.635 ms
^C
--- 192.168.6.21 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 0.635/1.022/1.643/0.444 ms
se eu tiver a entrada da tabela de roteamento para 192.168.6.0 removida em somebox1 ou se a interface de eth1 (192.168.6.x) for completamente removida, então poderei fazer ping de somebox2 para somebox1 sem problemas.
Além disso, consigo ver se somebox2 está configurado com interfaces 192.168.4.x ou 192.168.2.x ou 192.168.12.x, consigo executar ping no IP eth0 de somebox1 sem problemas. Somente quando 192.168.6.x está configurado em somebox2, não consigo executar ping no IP eth0 de somebox1. Mas consigo executar ping no IP eth1 de somebox1 que está na rede 192.168.6.x sem problemas
Pergunta:
1. Is removing the Interface or Routing table for eth1 from somebox1 the only way i can ping from somebox2 to somebox1
2. Why is that with the same interface i am facing this hurdle of not able to ping. Is it to do with the Routing table configuration on somebox1