@jindai0729

Are you sure you want to delete the question?

Leaving a resolved question undeleted may help others!

追加したポートに他ホストからのpingができない

Q&A

Closed

解決したいこと

ホストAに追加したポート(eth2)へ、ホストBからpingできるようにしたいです。
*ホストAとBは同一セグメントに存在しています。
*ホストA自身は追加したポートにpingが通ります。
*ホストBはホストAが持つ他のポートにはpingが通ります。(後付したポートへのpingできない)

発生している問題・エラー

[cloud-user@ha2 ~]$ ping 192.168.100.108
PING 192.168.100.108 (192.168.100.108) 56(84) bytes of data.
^C
--- 192.168.100.108 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1060ms

自分で試したこと

FWやセキュリティグループの問題でないことは確認しました。

補足

ifconfigの出力結果を共有します。

ホストA(ha1)

[cloud-user@ha1 ~]$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450
inet 192.168.100.113 netmask 255.255.255.0 broadcast 192.168.100.255
inet6 fe80::f816:3eff:fed0:1c13 prefixlen 64 scopeid 0x20<link>
ether fa:16:3e:d0:1c:13 txqueuelen 1000 (Ethernet)
RX packets 54494 bytes 3450605 (3.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 54449 bytes 3317227 (3.1 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450
inet 192.168.100.55 netmask 255.255.255.0 broadcast 192.168.100.255
inet6 fe80::f816:3eff:fe5d:1008 prefixlen 64 scopeid 0x20<link>
ether fa:16:3e:5d:10:08 txqueuelen 1000 (Ethernet)
RX packets 40925 bytes 1730002 (1.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 53 bytes 5377 (5.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450
inet 192.168.100.108 netmask 255.255.255.0 broadcast 192.168.100.255
inet6 fe80::3946:9b4d:2d6c:4b63 prefixlen 64 scopeid 0x20<link>
ether fa:16:3e:5f:f0:90 txqueuelen 1000 (Ethernet)
RX packets 40859 bytes 1722436 (1.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 41 bytes 4351 (4.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

ホストB(ha2)

[cloud-user@ha2 ~]$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450
inet 192.168.100.40 netmask 255.255.255.0 broadcast 192.168.100.255
inet6 fe80::f816:3eff:fe6d:da8a prefixlen 64 scopeid 0x20<link>
ether fa:16:3e:6d:da:8a txqueuelen 1000 (Ethernet)
RX packets 16699 bytes 136578554 (130.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 54713 bytes 3393577 (3.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 113798 bytes 42311961 (40.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 113798 bytes 42311961 (40.3 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
0 likes

2Answer

Comments

  1. @jindai0729

    Questioner

    ご連絡くださりありがとうございます。
    はい。下記の通り"192.168.100.1"で統一されております。

    ha1側
    [cloud-user@ha1 ~]$ ip route
    ★default via 192.168.100.1 dev eth0 proto dhcp src 192.168.100.113 metric 100
    ★default via 192.168.100.1 dev eth2 proto dhcp src 192.168.100.108 metric 102
    ★default via 192.168.100.1 dev eth1 proto dhcp src 192.168.100.55 metric 103
    169.254.169.254 via 192.168.100.1 dev eth0 proto dhcp src 192.168.100.113 metric 100
    以下略

    ha2側
    [cloud-user@ha2 ~]$ ip route
    ★default via 192.168.100.1 dev eth0 proto dhcp src 192.168.100.40 metric 100
    169.254.169.254 via 192.168.100.1 dev eth0 proto dhcp src 192.168.100.40 metric 100
    192.168.100.0/24 dev eth0 proto kernel scope link src 192.168.100.40 metric 100

  2. ホストAのeth0,1,2からとホストBのeth0からデフォルトゲートウェイへはそれぞれ疎通してますか?

  3. @jindai0729

    Questioner

    度々ありがとうございます。
    はい。下記の通り疎通は確認できております。

    ha1の確認結果
    [cloud-user@ha1 ~]$ ping 192.168.100.1
    PING 192.168.100.1 (192.168.100.1) 56(84) bytes of data.
    64 bytes from 192.168.100.1: icmp_seq=1 ttl=64 time=0.188 ms
    64 bytes from 192.168.100.1: icmp_seq=2 ttl=64 time=0.119 ms
    ^C
    --- 192.168.100.1 ping statistics ---
    2 packets transmitted, 2 received, 0% packet loss, time 1021ms
    rtt min/avg/max/mdev = 0.119/0.153/0.188/0.036 ms

    ha2の確認結果
    [cloud-user@ha2 ~]$ ping 192.168.100.1
    PING 192.168.100.1 (192.168.100.1) 56(84) bytes of data.
    64 bytes from 192.168.100.1: icmp_seq=1 ttl=64 time=2.74 ms
    64 bytes from 192.168.100.1: icmp_seq=2 ttl=64 time=0.114 ms
    64 bytes from 192.168.100.1: icmp_seq=3 ttl=64 time=0.111 ms
    ^C
    --- 192.168.100.1 ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2023ms
    rtt min/avg/max/mdev = 0.111/0.987/2.736/1.236 ms
    [cloud-user@ha2 ~]$
    [cloud-user@ha2 ~]$
    [cloud-user@ha2 ~]$ ping 192.168.100.113 *参考:ha1のeth0
    PING 192.168.100.113 (192.168.100.113) 56(84) bytes of data.
    64 bytes from 192.168.100.113: icmp_seq=1 ttl=64 time=2.98 ms
    64 bytes from 192.168.100.113: icmp_seq=2 ttl=64 time=0.270 ms
    64 bytes from 192.168.100.113: icmp_seq=3 ttl=64 time=0.194 ms

  4. ↓のIPアドレスが重複している可能性があるので、

    192.168.100.108

    他の空いている192.168.100.0/24のIPアドレスをホストAのeth2に設定し、疎通を試すとどうなりますか?

  5. @jindai0729

    Questioner

    ご連絡ありがとうございます。
    結果としましては、変わらず疎通できませんでした。

    作業の流れは下記の通りで、「nmcliでIPを"192.168.100.252"に変更→nmcli con down/upで再起動」して進めました。

    =============================
    ha1の作業
    [root@ha1 ~]# nmcli con show
    NAME UUID TYPE DEVICE
    System eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 ethernet eth0
    System eth1 9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04 ethernet eth1
    ★Wired connection 1 58a6ec65-4f8c-3514-a0a4-9858fa4f5bad ethernet eth2
    [root@ha1 ~]#
    [root@ha1 ~]# nmcli con mod "Wired connection 1" ipv4.addresses 192.168.100.252/24
    [root@ha1 ~]#
    [root@ha1 ~]# nmcli con down "Wired connection 1" && nmcli con up "Wired connection 1"
    Connection 'Wired connection 1' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/3)
    Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/6)
    [root@ha1 ~]#
    [root@ha1 ~]# ifconfig
    省略
    eth1: flags=4163 mtu 1450 
    inet 192.168.100.253 netmask 255.255.255.0 broadcast 192.168.100.255
    *テストとしてeth1のIPも変えてみましたが、ha2からは疎通不可でした。
    省略
    ★eth2: flags=4163 mtu 1450
    inet 192.168.100.252 netmask 255.255.255.0 broadcast 192.168.100.255
    省略

    ha2の作業
    [cloud-user@ha2 ~]$ ping 192.168.100.252
    PING 192.168.100.252 (192.168.100.252) 56(84) bytes of data.
    ^C
    --- 192.168.100.252 ping statistics ---
    3 packets transmitted, 0 received, 100% packet loss, time 2069ms

  6. 同じネットワークセグメントなので、考えにくいのですが、ホストAに「IPフォワード(IP Forward)」の設定を追加することでホストBから疎通できるようになりませんか?

  7. @jindai0729

    Questioner

    案内ありがとうございます。
    結果は変わらず疎通できませんでした。

    補足としてNICを追加した流れを下記共有します。
    よろしければ内容確認の上、お気づきの点があればご指摘いただきたいです。

    具体的に、ha1とha2は仮想サーバであり、今回ha1に新たにNICを追加いたしました。また、NIC払い出しと同時にDHCPのサービスからIPは払い出させれたものであり手動でのIP設定は行っておりません。

    他、ご不明な点ががあればお申し付けください。
    また、ここまでのご対応ありがとうございます。(言える内に言っておくべきと思いまして)

  8. この記事と同じ現象が発生しているのではないでしょうか?

  9. @jindai0729

    Questioner

    @YearCentury
    ご連絡くさりありがとうございます。
    確認しましたが、下記の点から少し状況異なるものと思われます。

    参考のページによると「後付したNICに疎通ができないのはもともとのNICを切断した場合のみ」とあるかと思います。

    しかし、当方の環境ではha1自身は後付NICに疎通できて、ha2からは疎通できない。という状況の為少し違う事象が発生しているものと思われます。

    今回、お力添えくださり誠にありがとうございます。
    また何かお気づきの点があればご指摘願います。

image.png
このゲートウェイ、本当に同じノードでしょうか?
それぞれのネットワークインタフェースが3つの別々のネットワークに接続されていて、3つともが 192.168.100.0/24 になっている可能性もあるかなと思っています。

ha1 にて以下のコマンドで近隣ホストを見せていただけますか?

$ ip -4 neigh
0Like

Your answer might help someone💌