我有一个 /48,我从中为该局域网分配了一个 /64
我有一台 Windows 8.1,我想使用分配的 IP 作为传出地址。
但我一直收到自动分配的地址。
netsh interface ipv6>show addresses
Interface 2: Ethernet
Addr Type DAD State Valid Life Pref. Life Address
--------- ----------- ---------- ---------- ------------------------
Manual Preferred infinite infinite 2001:DB8:1234:8000::1111:2222
Public Preferred 29d23h53m20s 6d23h53m20s 2001:DB8:1234:8000:21d:9ff:fe24:656c
Other Preferred infinite infinite fe80::21d:9ff:fe24:656c%2
(2001:DB8:1234:: 是文档示例网络)
我只希望将 1111:2222 地址用作传出地址,而不是从 mac 生成的地址。(我想将其用作第一级访问控制)
我已禁用隐私扩展:
netsh interface ipv6>show global
Querying active state...
General Global Parameters
---------------------------------------------
Default Hop Limit : 128 hops
Neighbor Cache Limit : 256 entries per interface
Route Cache Limit : 128 entries per compartment
Reassembly Limit : 33537408 bytes
ICMP Redirects : enabled
Source Routing Behavior : dontforward
Task Offload : enabled
Dhcp Media Sense : enabled
Media Sense Logging : disabled
MLD Level : all
MLD Version : version3
Multicast Forwarding : disabled
Group Forwarded Fragments : disabled
Randomize Identifiers : disabled
Address Mask Reply : disabled
Minimum MTU : 1280
Current Global Statistics
---------------------------------------------
Number of Compartments : 1
Number of NL clients : 5
Number of FL providers : 5
netsh interface ipv6>show interface ethernet
Interface Ethernet Parameters
----------------------------------------------
IfLuid : ethernet_7
IfIndex : 2
State : connected
Metric : 10
Link MTU : 1500 bytes
Reachable Time : 22500 ms
Base Reachable Time : 30000 ms
Retransmission Interval : 1000 ms
DAD Transmits : 1
Site Prefix Length : 64
Site Id : 1
Forwarding : disabled
Advertising : disabled
Neighbor Discovery : enabled
Neighbor Unreachability Detection : enabled
Router Discovery : enabled
Managed Address Configuration : disabled
Other Stateful Configuration : disabled
Weak Host Sends : disabled
Weak Host Receives : disabled
Use Automatic Metric : enabled
Ignore Default Routes : disabled
Advertised Router Lifetime : 1800 seconds
Advertise Default Route : disabled
Current Hop Limit : 64
Force ARPND Wake up patterns : disabled
Directed MAC Wake up patterns : disabled
ECN capability : application
答案1
这些说明http://blog.yogi-way.lv/2013/01/ipv6-and-slaac.html可能是你所需要的:
要在 Windows 中禁用 SLAAC,首先检查要禁用自动配置的 NIC:
netsh interface ipv6 show interface
然后执行
netsh interface ipv6 set interface X routerdiscovery=disabled
其中 X 是 show 命令输出中所需的接口索引。
要禁用隐私执行(命令对所有接口全局有效):
netsh interface ipv6 set privacy state=disable store=persistent netsh interface ipv6 set global randomizeidentifiers=disabled store=persistent
但需注意一点:如果您禁用监听路由器通告,则必须手动配置 IPv6 默认网关(可能还需要配置其他一些设置,如 MTU 大小)。