ping
使用 ping 指令來診斷 IP 配置問題。這個指令會檢查是否可從使用指定 IP 位址執行指令的節點存取指定的 IP 位址。
語法
參數
- -srcip4 source_ipv4_address destination_ipv4_address
- (如果未指定 -srcip6,則為必要)指定傳送連線測試封包的 IPv4 位址。IPv4 位址必須已連結至發出指令的節點上的一個埠。如果未指定此參數,則必須指定 srcip6。
- -srcip6 source_ipv6_address destination_ipv6_address
- (如果未指定 -srcip4,則為必要)指定傳送連線測試封包的 IPv6 位址。IPv6 位址必須已連結至發出指令的節點上的一個埠。如果未指定此參數,則必須指定 srcip4。
說明
此指令會檢查能否從使用指定 IP 位址執行指令的節點存取指定 IP 位址。
請使用此指令從任何節點的任何埠執行連線測試(在您登入該節點上的服務助理時)。
呼叫範例
ping -srcip4 192.168.1.51 192.168.1.30
結果輸出
PING 192.168.1.51 (192.168.1.51)PING 9.20.136.11 (9.20.136.11) 56(84) bytes of data.
64 bytes from 192.168.1.51: icmp_seq=1 ttl=249 time=0.690 ms
64 bytes from 192.168.1.51: icmp_seq=2 ttl=249 time=0.382 ms
64 bytes from 192.168.1.51: icmp_seq=3 ttl=249 time=0.311 ms
PING 192.168.1.30 (192.168.1.30)PING 9.20.136.11 (9.20.136.11) 56(84) bytes of data.
64 bytes from 192.168.1.30: icmp_seq=1 ttl=249 time=0.690 ms
64 bytes from 192.168.1.30: icmp_seq=2 ttl=249 time=0.382 ms
64 bytes from 192.168.1.30: icmp_seq=3 ttl=249 time=0.311 ms
