
라우팅에 도움이 필요합니다. 이 작업을 수행하는 방법을 이해하지 못합니다
2개의 장치를 구성했습니다. 장치 중 하나(썸박스1)은 2개의 인터페이스로 구성되어 있으며 라우팅 테이블은 아래와 유사합니다.
[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
따라서 이 상자에는 두 개의 인터페이스에 대해 192.168.4.x 및 192.168.6.x에 대한 라우팅 규칙이 추가되었습니다. 그들은 모두 CIDR /23의 일부입니다
기본값은 192.168.4.1을 통한 것입니다.
다른 장치가 있습니다(썸박스2)는 서브넷 192.168.6.x에서 단일 인터페이스로 구성되었습니다. 라우팅 테이블은 아래와 같습니다.
[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
지금. somebox2에서 somebox1의 eth0 IP를 ping할 수 없는 문제가 있습니다.
[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
하지만 somebox1의 기본 게이트웨이에 ping을 보낼 수는 있습니다.
[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
그리고 somebox1에서 eth1 인터페이스를 사용하여 somebox2의 eth0 IP에 ping을 보낼 수 있습니다.
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
somebox1에서 192.168.6.0에 대한 라우팅 테이블 항목을 제거했거나 eth1(192.168.6.x)의 인터페이스를 완전히 제거한 경우 somebox2에서 somebox1로 아무런 문제 없이 핑을 보낼 수 있습니다.
또한 somebox2가 인터페이스 192.168.4.x, 192.168.2.x 또는 192.168.12.x로 구성되어 있는지 확인할 수 있으며 문제 없이 somebox1의 eth0 IP를 ping할 수 있습니다. somebox2에 192.168.6.x가 구성된 경우에만 somebox1의 eth0 IP를 ping할 수 없습니다. 그러나 192.168.6.x 네트워크에 있는 somebox1의 eth1 IP를 문제 없이 ping할 수 있습니다.
질문:
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