아래 오류가 있습니다.
[root@~]# traceroute -s 'publicIP' 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
**bind: Cannot assign requested address**
그러나 소스를 입력하지 않으면 정상적으로 작동합니다.
[root@pf-apispens ~]# traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
1 192.168.111.1 (192.168.111.1) 1.759 ms 1.728 ms 1.649 ms
2 * * *
3 172.24.7.x (172.24.7.x) 1.752 ms 1.744 ms 1.816 ms
4 61.8.x.x (61.8.x.x) 1.635 ms 1.653 ms 1.632 ms
[root@~]# ip addr
{1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1454 qdisc pfifo_fast state UP qlen 1000
link/ether fa:16:3e:a7:5c:d0 brd ff:ff:ff:ff:ff:ff
inet 192.168.111.xyz/24 brd 192.168.111.255 scope global eth0
inet 192.168.111.xyzz/32 scope global eth0
inet6 fe80::f816:3eff:fea7:5cd0/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether fa:16:3e:1d:e7:7a brd ff:ff:ff:ff:ff:ff
[root@~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.111.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
172.27.0.0 192.168.111.2 255.255.254.0 UG 0 0 0 eth0
0.0.0.0 192.168.111.1 0.0.0.0 UG 0 0 0 eth0
해결 방법에 대해 조언 해주십시오. 더 많은 정보가 필요하면 알려주세요. 미리 감사드립니다 :)
traceroute -s
서버의 인터페이스에 직접 할당하는 주소 로 입력 해야합니다.
다음의 출력에서이 주소를 입력 할 수 있습니다 ip a
.
192.168.111.xyz
192.168.111.xyzz
그러나 다른 장치 (예 : 라우터)에 할당 되었기 때문에 실제 공용 IP는 아닙니다.
참조 man traceroute
:
-s source_addr, --source = source_addr
대체 소스 주소를 선택합니다. 인터페이스 중 하나의 주소를 선택해야합니다. 기본적으로 발신 인터페이스의 주소가 사용됩니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다