실행 중인 GRETAP 인터페이스를 만들었습니다.
$ ip link show t104016114
15: t104016114@NONE: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1242 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 1000
link/ether 06:ef:75:cf:2c:b6 brd ff:ff:ff:ff:ff:ff
$ ip address list t104016114
15: t104016114@NONE: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1242 qdisc fq_codel state UNKNOWN group default qlen 1000
link/ether 06:ef:75:cf:2c:b6 brd ff:ff:ff:ff:ff:ff
inet 10.40.16.226/14 brd 10.43.255.255 scope global dynamic t104016114
valid_lft 2836sec preferred_lft 2836sec
IP6 링크 로컬 주소를 갖고 싶지만 여기서 막히게 됩니다.
$ ipv6calc --in prefix+mac fe80:: 06:ef:75:cf:2c:b6
No action type specified, try autodetection...found type: prefixmac2ipv6
fe80::4ef:75ff:fecf:2cb6
$ sudo ip addr add dev t104016114 scope link noprefixroute fe80::4ef:75ff:fecf:2cb6/64
RTNETLINK answers: Invalid argument
누군가 여기서 정확히 무엇이 유효하지 않은지 지적할 수 있습니까? 더 많은 정보를 얻을 수 있는 방법이 있나요?
답변1
모든RFC 2460:
패킷 크기 문제
IPv6에서는 인터넷의 모든 링크에MTU는 1280입니다.
옥텟 이상.
한 번에 1280옥텟 패킷을 전달할 수 없는 링크 에서는
링크별 조각화 및 재조립이 IPv6 아래 계층에서 제공되어야 합니다.
수행하려는 터널링(또는 다중 계층 터널링)과 관련된 어떤 이유로 인해 인터페이스 MTU가 1280보다 낮습니다. 이 경우 Linux 구현에서는 인터페이스가 IPv6에 적합한 것으로 간주하지 않습니다. IPv6가 비활성화되었습니다. 다음은 내 테스트를 보여줍니다.
# ip netns add testbed
첫 학기:
# ip -n testbed monitor
두 번째 학기:
# ip -n testbed link add t104016114 address 06:ef:75:cf:2c:b6 type gretap remote 10.100.0.2 local 10.100.0.1
첫 학기:
inet t104016114 forwarding on rp_filter strict mc_forwarding off proxy_neigh off ignore_routes_with_linkdown off
inet6 t104016114 forwarding off mc_forwarding off proxy_neigh off ignore_routes_with_linkdown off
5: t104016114@NONE: <BROADCAST,MULTICAST> mtu 1462 qdisc noop state DOWN group default
link/ether 06:ef:75:cf:2c:b6 brd ff:ff:ff:ff:ff:ff
5: t104016114@NONE: <BROADCAST,MULTICAST> mtu 1462 qdisc noop state DOWN group default
link/ether 06:ef:75:cf:2c:b6 brd ff:ff:ff:ff:ff:ff
기본적으로 선택되는 MTU는 1462입니다.
두 번째 학기:
# ip -n testbed link set t104016114 up
첫 학기:
ff00::/8 dev t104016114 table local metric 256 pref medium
fe80::/64 dev t104016114 proto kernel metric 256 pref medium
5: t104016114 inet6 fe80::4ef:75ff:fecf:2cb6/64 scope link
valid_lft forever preferred_lft forever
local fe80::4ef:75ff:fecf:2cb6 dev t104016114 table local proto kernel metric 0 pref medium
두 번째 학기:
# ip -n testbed link set t104016114 mtu 1242
첫 학기:
5: t104016114@NONE: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1242 qdisc pfifo_fast state UNKNOWN group default
link/ether 06:ef:75:cf:2c:b6 brd ff:ff:ff:ff:ff:ff
Deleted fe80::/64 dev t104016114 proto kernel metric 256 pref medium
Deleted local fe80::4ef:75ff:fecf:2cb6 dev t104016114 table local proto kernel metric 0 pref medium
Deleted ff00::/8 dev t104016114 table local metric 256 pref medium
Deleted ff02::2 dev t104016114 lladdr 33:33:00:00:00:02 NOARP
Deleted ff02::1:ffcf:2cb6 dev t104016114 lladdr 33:33:ff:cf:2c:b6 NOARP
Deleted ff02::16 dev t104016114 lladdr 33:33:00:00:00:16 NOARP
Deleted 5: t104016114 inet6 fe80::4ef:75ff:fecf:2cb6/64 scope link
valid_lft forever preferred_lft forever
Deleted inet6 t104016114
두 번째 학기:
# ip -n testbed addr add dev t104016114 scope link noprefixroute fe80::4ef:75ff:fecf:2cb6/64
RTNETLINK answers: Invalid argument
두 번째 학기:
# ip -n testbed link set t104016114 mtu 1462
첫 학기:
5: t104016114@NONE: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1462 qdisc pfifo_fast state UNKNOWN group default
link/ether 06:ef:75:cf:2c:b6 brd ff:ff:ff:ff:ff:ff
inet6 t104016114 forwarding off mc_forwarding off proxy_neigh off ignore_routes_with_linkdown off
ff00::/8 dev t104016114 table local metric 256 pref medium
fe80::/64 dev t104016114 proto kernel metric 256 pref medium
5: t104016114 inet6 fe80::4ef:75ff:fecf:2cb6/64 scope link
valid_lft forever preferred_lft forever
local fe80::4ef:75ff:fecf:2cb6 dev t104016114 table local proto kernel metric 0 pref mediump-sysctl.txt?h=v5.3#n1739
최소값의 경우 예상대로 1279를 선택하면 IPv6이 다시 비활성화되고 mtu 1280을 사용하면 IPv6을 복원할 수 있습니다.