- 积分
- 675
- 鸿鹄币
- 个
- 好评度
- 点
- 精华
- 最后登录
- 1970-1-1
- 阅读权限
- 40
- 听众
- 收听
中级工程师
   
|
CCXX -IPv6 多种地址自动配置方法
自动配置的目的就是满足即插即用的特性。注意的是非试验环境下路由器的接口地址必须手工配置。
自动配置仅在以太网上生效,窜口上是无效的.sh ipv6 nei也查看不断任何窜口上的邻居信息
路由器如果要使通告的前缀生效必须全局启用Ipv6单播路由。(效果是加入了 FF02::2,因为邻居请求消息是发往FF02::2这个组的)
有状态配置: 需要占用设备资源来保留分配地址的状态比如DHCP中的租期和地址池等。优点是易管理
无状态配置: 利用EUI-64 自动地址分配机制,不需要为地址分配来保留分配状态。优点是简单
1 Link-local :其实不必去刻意配置link-local,因为只要接口配置了IPV6地址,会自动生成link-local地址。Link-local作为路由协议中的下一跳地址,优点是稳定,因为只要网卡不变,即使Ipv6地址怎么改,link-local地址不会变,以及一些Ipv6机制中使用,link-local范围受限于链路所在节点。
R1(config-if)#ipv6 enable
R1(config-if)#do sh ipv6 int f0/0
FastEthernet0/0 is administratively down, line protocol is down
IPv6 is enabled, link-local address is FE80::C800:CFF:FE5C:0 [TENTATIVE]
No global unicast address is configured
Joined group address(es):
FF02::1
FF02::1:FF5C:0
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
2 手工配置:发现窜口也有link-local并且借用的以太口的。
R1(config)#int s1/1
R1(config-if)#ipv6 add 2001::1/64
R1(config-if)#do sh ipv6 int s1/1
Serial1/1 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::C800:CFF:FE5C:0
Global unicast address(es):
2001::1, subnet is 2001::/64
Joined group address(es):
FF02::1
FF02::2
FF02::1:FF00:1
FF02::1:FF5C:0
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
Hosts use stateless autoconfig for addresses
3 自动配置:让设备从网关路由器自动学习到网络前缀只适用于以太网。(提供便利的重编址机制)。格式是 Ipv6前缀加上64位的EUI主机ID。
R1 上随便配置个Ipv6地址
R2(config-if)#ipv6 add autoconfig
R2(config-if)#do sh ipv6 int f0/0
FastEthernet0/0 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::C801:CFF:FE5C:0
Global unicast address(es):
2001:1::C801:CFF:FE5C:0, subnet is 2001:1::/64 [AUTOCONFIG] (自动配置的)
valid lifetime 2591937 preferred lifetime 604737
Joined group address(es):
FF02::1
FF02::2
FF02::1:FF5C:0
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.
除DHCPv6外都是无状态自动配置,因为没有为地址分配保留状态。
|
|