ipv6 unicast-routing !---Ipv6进行路由时,必须打上
!
interface FastEthernet0/0
no ip address
duplex full
ipv6 address 2001::1:1/64 !---全球可聚合单播地址
ipv6 enable !---可以在端口上开启ipv6
no clns route-cache
#sh int f0/0
FastEthernet0/0 is up, line protocol is up
Hardware is DEC21140, address is ca01.0544.0000 (bia ca01.0544.0000)
!---“bia ca01.0544.0000”,bia即“烧录地址”(burned in address),MAC地址即0003.e39b.9220,此处MAC地址可以通过命令改变,不过主要是为了防止MAC攻击,所以意义不大。
#sh ipv6 interface f0/0 !---通过此命令来查看端口下ipv6的参数
FastEthernet0/0 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::C801:5FF:FE44:0 !---本地链路地址,EUI-64标示
Global unicast address(es):
2001::1:1, subnet is 2001::/64 !---全球可聚合单播(可以有多个),2001::/64是子网
Joined group address(es):
FF02::1 !---所有节点
FF02::2 !---所有路由器,当打开ipv6 unicast-routing时,才会加入此组
FF02::1:FF01:1 !---被请求节点的组播地址,相当于ARP的广播地址,对应2001::1:1的后32bit,01:0001
FF02::1:FF44:0 !---被请求节点的组播地址,同理对应FE80::C801:5FF:FE44:0的后32bit,44:0000
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds
ND advertised reachable time is 0 milliseconds
ND advertised retransmit interval is 0 milliseconds
ND router advertisements are sent every 200 seconds
ND router advertisements live for 1800 seconds
Hosts use stateless autoconfig for addresses.
2022-11-22更新:IPv6 ND 解析过程
此更新主要记录了整个IPv6解析mac地址的报文分析,方便日后复习。对于IPv6来说,已经用Neighbor Discovery替代了我们熟悉的ARP,在ND协议中,有多种类型的报文,我们在这里只关注NS和NA跟解析MAC地址相关的,对于RS和RA主要用于自动分配地址使用,在BNG v6的场景中使用过。关于这些详细的内容,可以参考RFC4861: Neighbor Discovery for IP version 6 (IPv6)
Message name ICMPv6 Type
Router Solicitation 133
Router Advertisement 134
Neighbor Solicitation 135Neighbor Advertisement 136
Redirect 137