基本配置
conf ter
int e 0/0
ipv6 enable
ipv6 address 2001::1/64
no shutdown
show ipv6 neighbor
show ipv6 interface ethernet 0/0
自动分配地址R1——>R2
R2(client)
int e 0/0
no ipv6 address
ipv6 address autoconfig
R1(server)
conf ter
ipv6 unicast-routing
int e 0/0
ipv6 enable
ipv6 address 2001::1/64
no shutdown
conf ter
ipv6 nd suppress-ra
访问控制列表
conf ter
ipv6 access-list DAVY
permit host 2001:1::1 any
int e 0/0
ipv6 traffic-filter DAVY out (对比ipv4 ip access-group DAVY out)
permit icmp any any nd-ns
permit icmp any any nd-na
deny ipv6 any any 三条隐含
静态路由
R1
conf ter
int lo0
ipv6 address 1::1 /64
int e 0/0
ipv6 address 2001::1 /64
no sh
ipv6 router 2:: /64 2001::2 (或ipv6 router 2:: /64 e 0/0)
show ipv6 route
R2
conf ter
int lo0
ipv6 address 2::2 /64
int e 0/0
ipv6 address 2001::2 /64
no sh
RIPng协议 udp端口 521 组播地址 FF02::9
conf ter
ipv6 unicast-routing
ipv6 router rip DAVY
int lo0
ipv6 rip DAVY enable
int e 0/0
ipv6 rip DAVY enable
debug ipv6 rip
show ipv6 route
ping
traceroute
ip split-horizon(ipv4接口下开启水平分割)
split-horizon(ipv6在进程下开启水平分割)
OSPFv3协议 协议号89 组播地址 FF02::5 FF02::6
conf ter
ipv6 unicast-routing
ipv6 router ospf 100
router-id 1.1.1.1
int lo0
ipv6 ospf 100 area 0
int e 0/0
ipv6 ospf 100 area 0
show ipv6 ospf neighbor
show ipv6 ospf route
ipv6 ospf network point-point(接口下还原掩码128——>64)
ISIS协议 二层头部 L1 L2
conf ter
#ipv6 unicast-routing
router isis
net 49.0001.1111.1111.1111.00
log-adjacency-changes all
int lo0
ipv6 router isis
int e 0/0
ipv6 router isis
show clns neighbor
int lo1
ipv6 address 100::1 /64
router isis
address-family ipv6 (ipv4中从发布直连redistribute connected)
BGP4+协议
R1
conf ter
router bgp 1
bgp router-id 1.1.1.1
no synchronization
no auto-summary
neighbor 2001::2 remote-as 2
address-family ipv6
neighbor 2001::2 activate
address-family ipv6
network 1:: /64 (宣告)
R2
conf ter
router bgp 2
bgp router-id 2.2.2.2
no synchronization
no auto-summary
neighbor 2001::1 remote-as 1
address-family ipv6
neighbor 2001::1 activate
on bgp default ipv4-unicast (在bgp进程中禁用ipv4)
show bgp ipv6 summary
show bgp ipv6
ipv4与ipv6混合使用
1.DUAL STACK
在主机上安装配置
2.overlay tunnel
R1
conf ter
int s 0/0
ip add 12.1.1.1 255.255.255.0
no sh
lo0
ip add 1.1.1.1 255.255.255.0
int e 1/0
ipv address 1:1 /64
no sh
router ospf 100
router-id 1.1.1.1
network 12.1.1.0 0.0.0.255 area 0
network 1.1.1.0 0.0.0.255 area 0
interface tunnel 1
tunnel source 1.1.1.1
tunnel destination 3.3.3.3
tunnel mode ipv6ip
ipv6 enable
ipv6 unicast-routing
ipv6 rip DAVY
exit
int tunnel 1
ipv6 rip DAVY enable
int e 1/0
ipv6 rip DAVY enable
R2
conf ter
int s 0/0
ip add 12.1.1.2 255.255.255.0
clock rate 64000
no sh
int s 0/1
ip add 23.1.1.2 255.255.255.0
no sh
lo0
ip add 2.2.2.2 255.255.255.0
router ospf 100
router-id 2.2.2.2
network 12.1.1.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0
network 2.2.2.0 0.0.0.255 area 0
R3
conf ter
int s 0/0
ip add 23.1.1.3 255.255.255.0
clock rate 64000
no sh
lo0
ip add 3.3.3.3 255.255.255.0
int e 1/0
ipv address 3:3 /64
no sh
router ospf 100
router-id 3.3.3.3
network 23.1.1.0 0.0.0.255 area 0
network 3.3.3.0 0.0.0.255 area 0
interface tunnel 3
tunnel source 3.3.3.3
tunnel destination 1.1.1.1
tunnel mode ipv6ip
ipv6 enable
ipv6 unicast-routing
ipv6 rip DAVY
exit
int tunnel 3
ipv6 rip DAVY enable
int e 1/0
ipv6 rip DAVY enable
3.6to4 tunnel (核心是自动tunnel 路由较少)
R1
conf ter
int s 0/0
ip add 12.1.1.1 255.255.255.0
no sh
lo0
ip add 1.1.1.1 255.255.255.0
int e 1/0
ipv address 2002:101:101::1 /64
no sh
router ospf 100
router-id 1.1.1.1
network 12.1.1.0 0.0.0.255 area 0
network 1.1.1.0 0.0.0.255 area 0
int tunnel 1
tunnel source 1.1.1.1
tunnel mode ip6ip 6to4
ipv6 unnumbered ethernet 1/0
ipv6 route 2002:: /16 tunnel 1
R2
conf ter
int s 0/0
ip add 12.1.1.2 255.255.255.0
clock rate 64000
no sh
int s 0/1
ip add 23.1.1.2 255.255.255.0
no sh
lo0
ip add 2.2.2.2 255.255.255.0
router ospf 100
router-id 2.2.2.2
network 12.1.1.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0
network 2.2.2.0 0.0.0.255 area 0
R3
conf ter
int s 0/0
ip add 23.1.1.3 255.255.255.0
clock rate 64000
no sh
lo0
ip add 3.3.3.3 255.255.255.0
int e 1/0
ipv address 2002:303:303::3 /64
no sh
router ospf 100
router-id 3.3.3.3
network 23.1.1.0 0.0.0.255 area 0
network 3.3.3.0 0.0.0.255 area 0
int tunnel 3
tunnel source 3.3.3.3
tunnel mode ip6ip 6to4
ipv6 unnumbered ethernet 1/0
ipv6 route 2002:: /16 tunnel 3