Debian에 IPv6 할당 문제가 있습니다. 인터페이스에는 수백 개의 IPv6 공용 주소가 할당됩니다.
$ ip addr | grep -c '2409:'
219
다음을 사용하여 IPv6 주소를 확인하십시오 ip addr
.
3: enp11s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:e0:4c:36:93:15 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.10/24 brd 192.168.1.255 scope global noprefixroute enp11s0
valid_lft forever preferred_lft forever
inet6 2409:8a50:a4e:92f0:6174:3f62:57cf:ba6a/64 scope global temporary dynamic
valid_lft 258842sec preferred_lft 85861sec
inet6 2409:8a50:a4e:92f0:f49d:44ca:8557:3ca5/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 258842sec preferred_lft 172442sec
inet6 2409:8a50:a46:c400:6174:3f62:57cf:ba6a/64 scope global temporary dynamic
valid_lft 258843sec preferred_lft 85861sec
inet6 2409:8a50:a46:c400:7541:7da1:5434:1741/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 258843sec preferred_lft 172443sec
inet6 2409:8a50:a46:c400:d05e:8af5:f6cf:f42f/64 scope global temporary dynamic
valid_lft 258554sec preferred_lft 85860sec
inet6 2409:8a50:a4e:92f0:d05e:8af5:f6cf:f42f/64 scope global temporary dynamic
valid_lft 258842sec preferred_lft 85860sec
inet6 2409:8a50:a4e:92f0:5999:8fc7:475b:ccef/64 scope global temporary dynamic
valid_lft 258303sec preferred_lft 85572sec
inet6 2409:8a50:a46:c400:5999:8fc7:475b:ccef/64 scope global temporary dynamic
valid_lft 258554sec preferred_lft 85572sec
inet6 2409:8a50:a46:c400:d9d3:ef05:bb58:ca07/64 scope global temporary dynamic
valid_lft 258137sec preferred_lft 85321sec
inet6 2409:8a50:a4e:92f0:d9d3:ef05:bb58:ca07/64 scope global temporary dynamic
valid_lft 258303sec preferred_lft 85321sec
inet6 2409:8a50:a4e:92f0:71c8:2bc:9942:9d25/64 scope global temporary dynamic
valid_lft 258051sec preferred_lft 85155sec
inet6 2409:8a50:a46:c400:71c8:2bc:9942:9d25/64 scope global temporary dynamic
valid_lft 258137sec preferred_lft 85155sec
.......
커널 메시지는 다음을 보여줍니다:
[496922.494943] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[497266.149336] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[497287.754771] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[497581.736350] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[498100.833291] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[498118.774008] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[498690.290277] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[499141.642258] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[499586.227054] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[499742.201967] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[499901.453946] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[499961.327580] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[500430.519108] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[500727.481891] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[500913.499238] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[500978.223144] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[501374.991352] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[501561.471323] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[501958.160961] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[502102.048465] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[502546.680738] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[502767.658846] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[503042.022824] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[505438.052608] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[505816.211563] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[506099.932168] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[506448.276145] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[506632.626997] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[507026.426232] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[507331.850194] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[507364.491312] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[507578.809108] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
[507628.593994] IPv6: ipv6_create_tempaddr: retry temporary address regeneration
........
그리고 /etc/init.d/networking restart
작동하지 않습니다.
그 원인은 무엇입니까? 어떻게 해결하나요?
감사해요!
답변1
가능한 이유:IPv6 개인정보 보호활성화되었습니다. 이렇게 하면 각 연결에 대해 별도의 IPv6 주소가 생성되므로 IPv6 주소의 하드웨어 기반 부분은 사용 중인 컴퓨터를 식별하는 데 사용되지 않을 수 있습니다.
데비안에서는 설정을 다음에서 볼 수 있습니다.
$cat /proc/sys/net/ipv6/conf/default/use_tempaddr
어디
0
- 장애가 있는1
- 공개 주소 활성화, 선호2
- 활성화됨, 임시 주소 선호-1
- 설정되지 않음/알 수 없음, 기본값 사용
NetworkManager에서 비활성화됨
체크인/etc/NetworkManager/conf.d/ip6-privacy.conf
[connection]
ipv6.ip6-privacy=2
/etc/NetworkManager/system-connections/connection.example
또는 for의 각 연결에서
[ipv6]
ip6-privacy=2
이 값을 설정하고 0
바람직하게는 또한
echo 0 > /proc/sys/net/ipv6/conf/default/use_tempaddr
확인하려면 NetworkManager를 다시 시작하세요.
이제 임시 주소 생성이 비활성화되었으니, 주소가 삭제되었는지 확인해주세요. 그렇지 않은 경우 다음과 같이 모든 주소를 삭제하십시오.
#/bin/bash
ip a | grep global | grep -o '2409.[^ ]*' | while read address ; do
ip del $address dev enp11s0
done
ip addr add $address dev enp11s0
즉, 글로벌 IPv6 주소만 일치시키고 모두 삭제한 후 마지막 주소에 대해 다시 활성화합니다.
추신: 올바른 서브넷 마스크를 사용하면 실제로 루프를 건너뛸 수 있다고 확신합니다...