1.IPv6地址的各种情况
2.配置通过DHCP-PD方式分配前缀信息
3.IPv6路由基本配置
4.IPv6路由--RIPng
5.IPv6路由--EIGRPv6
6.IPv6路由--OSPFv3
7.IPv6组播
8.IPv6路由--MP-BGP
9.IPv6路由-ISISV6
10.IPv4和IPv6的共存和过度_1
11.IPv4和IPv6的共存和过度_2

enable
conf t
no ip do lo
enable pass cisco
line con 0
logg sync
exec-t 0 0
exit
line vty 0 4
pass cisco
logg sync
exit
host

1.IPv6地址的各种情况
------------------------------------------------------------------------------------
实验目的
1).掌握IPv6地址的不同配置方法,无状态自动配置和有状态自动配置
2).观察IPv6 EUI地址的生成
3).观察路由器IPv6的接口地址
4).掌握IPv6的debug方法
5).观察IPv6的地址解析过程
6).观察IPv6邻居关系的状态变迁


7).观察IPv6的DAD检查

R2:
ipv6 unicast-routing
int l0
ipv6 add 2022::1/128
exit
int f0/0
ipv6 add 2023::2/64
no shut
exit

R3:
ipv6 unicast-routing
int l0
ipv6 add 2033::1/128
exit
int f0/0
ipv6 add 2023::3/64
no shut
exit

R2:
show ipv6 int brief
show int f0/0

int f0/1
ipv6 add 2222::0/64 eui-64
exit

show ipv6 int brief

int f0/1
ipv6 add fe80::2 link-local
exit

show ipv6 int brief
show run interface f0/1

default int f0/1
int f0/1
ipv6 enable
exit

show ipv6 int brief
debug ipv6 nd

default int f0/0
int f0/0
ipv6 add autoconfig
exit

show ipv6 int brief
show ipv6 route

int f0/0
ipv6 add autoconfig default
exit

show ipv6 route

R3:
int f0/0
ipv6 nd prefix 2023::/64 no-advertise
ipv6 nd prefix 2888::/64 2000 1000
ipv6 nd other-config-flag
ipv6 dhcp server kaka
exit

ipv6 dhcp pool kaka
dns-server 2222::2
domain-name yeslab.org
exit

int f0/0
ipv6 nd prefix 2023::/64 no-advertise
ipv6 nd managed-config-flag
ipv6 nd other-config-flag
ipv6 dhcp server kaka
exit

ipv6 dhcp pool kaka
address prefix 2333::/64
dns-server 2222::2
domain-name yeslab.org

2.配置通过DHCP-PD方式分配前缀信息
------------------------------------------------------------------------------------
实验目的
1).掌握DHCP-PD的应用场景
2).掌握DHCP-PD的配置方法
3).掌握DHCP-PD的检查方法

3.IPv6路由基本配置
------------------------------------------------------------------------------------
实验目的
1).掌握静态路由配置方法
2).掌握缺省路由配置方法
3).掌握访问控制列表配置方法
4).掌握基本的IPv6测试工具

R7:
ipv6 unicast-routing
int s2/0
encapsulation ppp
ipv6 add 2027::7/64
no shut
exit
int l0
ipv6 add 2077::1/128
exit

R2:
ipv6 unicast-routing
int s2/0
encapsulation ppp
ipv6 add 2027::2/64
no shut
exit
int f0/0
ipv6 add 2023::2/64
no shut
exit
int l0
ipv6 add 2022::1/128
exit

R3:
ipv6 unicast-routing
int f0/0
ipv6 add 2023::3/64
no shut
exit
int l0
ipv6 add 2033::1/128
exit

R7:
ipv6 route ::0/0 2027::2

R2:
ipv6 route 2033::1/128 2023::3
ipv6 route 2077::1/128 2027::7

R3:
ipv6 route 2077::1/128 2023::2

R7:
ping 2033::1 source l0
telnet 2033::1 /source-interface l0

配置任务:在R2的f0/0的入方向配置ACL,使得R2只能用loopback0为源地址telnet和ping R7的loopback0
R2:
ipv6 access-list yeslab
permit tcp host 2033::1 host 2077::1 eq telnet
permit icmp host 2033::1 host 2077::1
exit
int f0/0
ipv6 traffic-filter yeslab in
exit

R3:
ping 2077::1
ping 2077::1 source l0

telnet 2077::1
telnet 2077::1 /source-interface l0

4.IPv6路由--RIPng
------------------------------------------------------------------------------------
实验目的
1).掌握RIPng的配置方法
2).理解并配置水平分割
3).掌握在帧中继环境下出现的各种问题及其解决方法
4).掌握在RIPng里注入一条缺省路由的方法
5).掌握在RIPng里配置路由汇总的方法
6).掌握在RIPng里配置路由重分布的方法
7).理解并配置毒性反转

接口配置:

R1:
ipv6 unicast-routing
int l0
ipv6 add 2011::1/128
exit
int f0/0
ipv6 add 2123::1/64
no shut
exit

R2:
ipv6 unicast-routing
int l0
ipv6 add 2022::1/128
exit
int f0/0
ipv6 add 2123::2/64
no shut
exit

R4:
frame-relay switching
int s2/0
encap frame-relay
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 305 int s2/1 503
frame-relay route 306 int s2/2 603
no shut
exit
int s2/1
encap frame-relay
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 503 int s2/0 305
no shut
exit
int s2/2
encap frame-relay
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 603 int s2/0 306
no shut
exit

R3:
ipv6 unicast-routing
int l0
ipv6 add 2033::1/128
exit
int f0/0
ipv6 add 2123::3/64
no shut
exit
int s2/0
encapsulation frame-relay
no shut
exit
int s2/0.1 multipoint
ipv6 add 2356::3/64
frame-relay map ipv6 2356::5 305 broadcast
frame-relay map ipv6 2356::6 306 broadcast
exit

R5:
ipv6 unicast-routing
int l0
ipv6 add 2055::1/128
exit
int s2/0
encapsulation frame-relay
no shut
exit
int s2/0.1 multipoint
ipv6 add 2356::5/64
frame-relay map ipv6 2356::3 503 broadcast
frame-relay map ipv6 2356::6 503 broadcast
exit

R6:
ipv6 unicast-routing
int l0
ipv6 add 2066::1/128
exit
int s2/0
encapsulation frame-relay
no shut
exit
int s2/0.1 multipoint
ipv6 add 2356::6/64
frame-relay map ipv6 2356::3 603 broadcast
frame-relay map ipv6 2356::5 603 broadcast
exit

R3:
ping ipv6 2123::1
ping ipv6 2123::2
ping ipv6 2356::5
ping ipv6 2356::6
View Code

配置RIPng:

R1/R2:
ipv6 router rip yeslab
exit
int l0
ipv6 rip yeslab enable
exit
int f0/0
ipv6 rip yeslab enable
exit

R3:
ipv6 router rip yeslab
exit
int l0
ipv6 rip yeslab enable
exit
int f0/0
ipv6 rip yeslab enable
exit
int s2/0.1
ipv6 rip yeslab enable
exit

R5/6:
ipv6 router rip yeslab
exit
int l0
ipv6 rip yeslab enable
exit
int s2/0.1
ipv6 rip yeslab enable
exit

R5/R6:
show ipv6 route
View Code

需要在R3的帧中继接口上关闭水平分割。
R3:
ipv6 router rip yeslab
no split-horizon
exit

R5:
ping ipv6 2066::1

R5/R6学习到的路由的下一跳均为邻居的link-local地址,但是在R5/R6上没有link-local地址的帧中继映射关系。
R3:
show ipv6 int brief

R5:
int s2/0.1
frame-relay map ipv6 FE80::C802:36FF:FEE0:8 503 broadcast
exit

R6:
int s2/0.1
frame-relay map ipv6 FE80::C802:36FF:FEE0:8 603 broadcast
exit

show ipv6 int brief

R3:
int s2/0.1
frame-relay map ipv6 FE80::C804:37FF:FE6C:8 305 broadcast
frame-relay map ipv6 FE80::C805:37FF:FE6C:8 306 broadcast
exit

注入一条缺省路由。
R1:
int f0/0
ipv6 rip yeslab default-information originate
exit

R6:
show ipv6 route rip

执行路由汇总。
R3:
int s2/0.1
ipv6 rip yeslab summary-add 2011::0/64
exit

重分布路由进入RIPng。
R6:
int l1
ipv6 add 2666::1/128
exit
route-map l00p1
match interface loopback 1
exit
ipv6 router rip yeslab
redistribute connected route-map loop1
exit

R1:
show ipv6 route rip

RIPng防环机制支持水平分割和毒性反转,缺省情况下是水平分割。当打开毒性反转功能后,路由器从一个接口收到的路由信息,会将跳数值更改为16,重新通告回原接口。
R2:
ipv6 router rip yeslab
poison-reverse
exit

debug ipv6 rip

查看RIPng定时器。
R5:
show ipv6 rip

5.IPv6路由--EIGRPv6
------------------------------------------------------------------------------------
实验目的
1).掌握EIGRPv6的配置方法
2).理解并配置水平分割
3).掌握在帧中继环境下出现的各种问题及其解决方法
4).学会查看拓扑数据库
5).了解EIGRPv6的metric计算方法
6).掌握在EIGRPv6里注入一条缺省路由的方法
7).掌握在EIGRPv6里配置路由汇总的方法
8).掌握在EIGRPv6里配置路由重分布的方法

配置接口:

R1:
ipv6 unicast-routing
int l0
ipv6 add 2011::1/128
exit
int f0/0
ipv6 add 2123::1/64
no shut
exit

R2:
ipv6 unicast-routing
int l0
ipv6 add 2022::1/128
exit
int f0/0
ipv6 add 2123::2/64
no shut
exit

R4:
frame-relay switching
int s2/0
encap frame-relay
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 305 int s2/1 503
frame-relay route 306 int s2/2 603
no shut
exit
int s2/1
encap frame-relay
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 503 int s2/0 305
no shut
exit
int s2/2
encap frame-relay
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 603 int s2/0 306
no shut
exit

R3:
ipv6 unicast-routing
int l0
ipv6 add 2033::1/128
exit
int f0/0
ipv6 add 2123::3/64
no shut
exit
int s2/0
encapsulation frame-relay
no shut
exit
int s2/0.1 multipoint
ipv6 add 2356::3/64
frame-relay map ipv6 2356::5 305 broadcast
frame-relay map ipv6 2356::6 306 broadcast
exit

R5:
ipv6 unicast-routing
int l0
ipv6 add 2055::1/128
exit
int s2/0
encapsulation frame-relay
no shut
exit
int s2/0.1 multipoint
ipv6 add 2356::5/64
frame-relay map ipv6 2356::3 503 broadcast
frame-relay map ipv6 2356::6 503 broadcast
exit

R6:
ipv6 unicast-routing
int l0
ipv6 add 2066::1/128
exit
int s2/0
encapsulation frame-relay
no shut
exit
int s2/0.1 multipoint
ipv6 add 2356::6/64
frame-relay map ipv6 2356::3 603 broadcast
frame-relay map ipv6 2356::5 603 broadcast
exit

R3:
ping ipv6 2123::1
ping ipv6 2123::2
ping ipv6 2356::5
ping ipv6 2356::6
View Code

配置EIGRPv6:

R1:
int l0
ip add 11.1.1.1 255.255.255.255
exit
ipv6 router eigrp 100
no shut
exit
int l0
ipv6 eigrp 100
exit
int f0/0
ipv6 eigrp 100
exit

R2:
int l0
ip add 22.1.1.1 255.255.255.255
exit
ipv6 router eigrp 100
no shut
exit
int l0
ipv6 eigrp 100
exit
int f0/0
ipv6 eigrp 100
exit

R3:
int l0
ip add 33.1.1.1 255.255.255.255
exit
ipv6 router eigrp 100
no shut
exit
int l0
ipv6 eigrp 100
exit
int f0/0
ipv6 eigrp 100
exit
int s2/0.1
ipv6 eigrp 100
exit

R5:
int l0
ip add 55.1.1.1 255.255.255.255
exit
ipv6 router eigrp 100
no shut
exit
int l0
ipv6 eigrp 100
exit
int s2/0.1
ipv6 eigrp 100
exit

R6:
int l0
ip add 66.1.1.1 255.255.255.255
exit
ipv6 router eigrp 100
no shut
exit
int l0
ipv6 eigrp 100
exit
int s2/0.1
ipv6 eigrp 100
exit

R3:
show ipv6 eigrp neighbors

R5/R6学习到的路由的下一跳均为邻居的link-local地址,但是在R5/R6上没有link-local地址的帧中继映射关系。
R3:
show ipv6 int brief

R5:
int s2/0.1
frame-relay map ipv6 FE80::C802:36FF:FEE0:8 503 broadcast
exit

R6:
int s2/0.1
frame-relay map ipv6 FE80::C802:36FF:FEE0:8 603 broadcast
exit

R5/R6:
show ipv6 int brief

R3:
int s2/0.1
frame-relay map ipv6 FE80::C804:37FF:FE6C:8 305 broadcast
frame-relay map ipv6 FE80::C805:37FF:FE6C:8 306 broadcast
exit
View Code

水平分割对帧中继环境下EIGRPv6路由学习的影响。
R6:
show ipv6 route eigrp

R3:
int s2/0.1
no ipv6 split-horizon eigrp 100
exit

R6:
show ipv6 route eigrp

查看metric计算。
R3:
show ipv6 eigrp topology
show ipv6 protocols
show int f0/0

R1:
show int l0

Metric = (10^7 / 100000 + (5000 + 100)) * 256 = 156160(FD)

注入默认路由和重分布路由。
R1:
int f0/0
ipv6 summary-add eigrp 100 ::0/0
exit

R6:
show ipv6 route eigrp
抑制明细路由,有明确的方向性。

R1:
int f0/0
no ipv6 summary-add eigrp 100 ::0/0
exit

ipv6 route ::0/0 null 0
ipv6 router eigrp 100
redistribute static metric 100000 10 255 1 1500
exit
学习到外部路由,没有方向性。

路由汇总:
R3:
int s2/0.1
ipv6 summary-address eigrp 100 2011::0/64
exit

R5:
show ipv6 route eigrp


6.IPv6路由--OSPFv3
------------------------------------------------------------------------------------
实验目的
1).掌握OSPFv3的配置方法
2).掌握在帧中继环境下OSPFv3的配置方法
3).OSPFv3 NSSA的配置方法
4).学会查看OSPFv3数据库
5).掌握外部路由汇总的配置
6).掌握区域间路由汇总的配置
7).掌握虚链路的配置
8).掌握往OSPFv3区域注入一条缺省路由的方法
9).掌握修改OSPFv3网络类型的方法

接口配置:

R1:
ipv6 unicast-routing
int l0
ipv6 add 2011::1/128
exit
int f0/0
ipv6 add 2123::1/64
no shut
exit
int f1/0
ipv6 add 2017::1/64
no shut
exit

R2:
ipv6 unicast-routing
int l0
ipv6 add 2022::1/128
exit
int f0/0
ipv6 add 2123::2/64
no shut
exit
int s2/0
ipv6 add 2027::2/64
no shut
exit

R3:
ipv6 unicast-routing
int l0
ipv6 add 2033::1/128
exit
int f0/0
ipv6 add 2123::3/64
no shut
exit
int s2/0
encapsulation frame-relay
no shut
exit
int s2/0.1 multipoint
ipv6 add 2356::3/64
frame-relay map ipv6 2356::5 305 broadcast
frame-relay map ipv6 2356::6 306 broadcast
frame-relay map ipv6 FE80::C804:37FF:FE6C:8 305 broadcast
frame-relay map ipv6 FE80::C805:37FF:FE6C:8 306 broadcast
exit

R4:
frame-relay switching
int s2/0
encap frame-relay
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 305 int s2/1 503
frame-relay route 306 int s2/2 603
no shut
exit
int s2/1
encap frame-relay
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 503 int s2/0 305
no shut
exit
int s2/2
encap frame-relay
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 603 int s2/0 306
no shut
exit

R5:
ipv6 unicast-routing
int l0
ipv6 add 2055::1/128
exit
int s2/0
encapsulation frame-relay
no shut
exit
int s2/0.1 multipoint
ipv6 add 2356::5/64
frame-relay map ipv6 2356::3 503 broadcast
frame-relay map ipv6 2356::6 503 broadcast
frame-relay map ipv6 FE80::C802:36FF:FEE0:8 503 broadcast
exit

R6:
ipv6 unicast-routing
int l0
ipv6 add 2066::1/128
exit
int s2/0
encapsulation frame-relay
no shut
exit
int s2/0.1 multipoint
ipv6 add 2356::6/64
frame-relay map ipv6 2356::3 603 broadcast
frame-relay map ipv6 2356::5 603 broadcast
frame-relay map ipv6 FE80::C802:36FF:FEE0:8 603 broadcast
exit

R7:
ipv6 unicast-routing
int l0
ipv6 add 2077::1/128
exit
int f0/0
ipv6 add 2078::7/64
no shut
exit
int f1/0
ipv6 add 2017::7/64
no shut
exit
int s2/0
ipv6 add 2027::7/64
no shut
exit

R8:
ipv6 unicast-routing
int l0
ipv6 add 2088::1/128
exit
int f0/0
ipv6 add 2078::8/64
no shut
exit
View Code

配置OSPFv3:

R1:
ipv6 router ospf 1
router-id 11.1.1.1
area 1 nssa
exit
int f0/0
ipv6 ospf 1 area 0
exit
int l0
ipv6 ospf 1 area 0
exit
int f1/0
ipv6 ospf 1 area 1
exit

R2:
ipv6 router ospf 1
router-id 22.1.1.1
area 1 nssa
exit
int f0/0
ipv6 ospf 1 area 0
exit
int l0
ipv6 ospf 1 area 0
exit
int s2/0
ipv6 ospf 1 area 1
exit

R3:
ipv6 router ospf 1
router-id 33.1.1.1
exit
int f0/0
ipv6 ospf 1 area 0
exit
int l0
ipv6 ospf 1 area 0
exit
int s2/0.1
ipv6 ospf 1 area 2
ipv6 ospf neighbor FE80::C804:37FF:FE6C:8
ipv6 ospf neighbor FE80::C805:37FF:FE6C:8
exit

R5:
ipv6 router ospf 1
router-id 55.1.1.1
exit
int l0
ipv6 ospf 1 area 2
exit
int s2/0.1
ipv6 ospf 1 area 2
ipv6 ospf priority 0
exit

R6:
ipv6 router ospf 1
router-id 66.1.1.1
exit
int l0
ipv6 ospf 1 area 2
exit
int s2/0.1
ipv6 ospf 1 area 2
ipv6 ospf priority 0
exit

R7:
ipv6 router ospf 1
router-id 77.1.1.1
area 1 nssa
exit
int l0
ipv6 ospf 1 area 1
exit
int f1/0
ipv6 ospf 1 area 1
exit
int s2/0
ipv6 ospf 1 area 1
exit

R3:
show ipv6 ospf neighbor

R5:
show ipv6 route ospf
ping 2011::1
ping 2033::1
ping 2066::1
ping 2077::1
View Code

引入外部路由类型5和外部路由类型7.
R1:
int l1
ipv6 add 2111::1/128
exit
ipv6 router ospf 1
redistribute connected
exit

R8:
ipv6 router rip yeslab
exit
int f0/0
ipv6 rip yeslab enable
exit
int l0
ipv6 rip yeslab enable
exit

R7:
ipv6 router rip yeslab
exit
int f0/0
ipv6 rip yeslab enable
exit

ipv6 router ospf 1
redistribute rip yeslab
redistribute connected
exit

LSA Type LSA Function Code LSA Type Value OSPF Database Type
Router-LSA 1 0x2001 router
Network-LSA 2 0x2002 network
Inter-Area-Prefix-LSA 3 0x2003 inter-area prefix
Inter-Area-Router-LSA 4 0x2004 inter-area router
AS-External-LSA 5 0x2005 external
Type-7-LSA 7 0x2007 nssa-external
Link-LSA 8 0x2008 link
Intra-Area-Prefix-LSA 9 0x2009 prefix

1) Router-LSA: 每个Router-LSA包含若干链路描述(link description),每个LSA描述路由器和路由器的连接关系,连接关系用邻居之间彼此的Interface ID来标识。
R7:
show ipv6 ospf neighbor
show ipv6 ospf database router adv-router 77.1.1.1

2) Network-LSA: 在Broadcast或NBMA网络由DR生成一个Network-LSA,一个Network-LSA列出了这个链路上所有相连的路由器。
R3:
show ipv6 ospf neighbor
show ipv6 ospf database network adv-router 33.1.1.1

3) Inter-Area-Prefix-LSA: 相当于OSPFv2的Type 3 Summary-LSA,用于描述区域间的路由,由ABR生成。
R3:
show ipv6 ospf database inter-area prefix adv-router 33.1.1.1

4) Inter-Area-Router-LSA和AS-External-LSA
当重分布路由到OSPFv3区域时,AS-External-LSA由ASBR生成,当AS-External-LSA穿过ABR,传到另外的区域时,由ABR生成一条Inter-Area-Router-LSA,告诉另外的区域ASBR可以通过ABR到达
在R1上重分布了一条路由2111::1/128进入OSPFv3区域,R1生成一条AS-External-LSA,当这条AS-External-LSA穿过ABR R3到达区域2时,R3生成一条Inter-Area-Router-LSA
R5:
show ipv6 ospf database external adv-router 11.1.1.1
show ipv6 ospf database inter-area router 11.1.1.1

5) nssa-external-LSA: 由NSSA区域的ASBR生成。在通过ASBR重分布外部路由进入NSSA区域时,由ASBR生成。
R1:
show ipv6 ospf database nssa-external adv-router 77.1.1.1

6) Link-LSA: 用于通告链路的link-local地址和该接口上附加的全局单播网段,由每个路由器生成,传播范围只在链路范围,用于通告邻居自己的link-local地址
R3:
int f0/0
ipv6 add 2188::3/64
exit

show running-config int f0/0

R1:
show ipv6 ospf database link adv-router 33.1.1.1

7) Intra-Area-Prefix-LSA:由每个路由器生成,用于通告每条链路的非link-local的IPv6前缀。对于Broadcast和NBMA网络类型,由DR生成Intra-Area-Prefix-LSA,通告该网段的所有非link-local前缀信息;其他网络类型的前缀信息,由路由器自身生成Intra-Area-Prefix-LSA来通告。
R1:
show ipv6 ospf neighbor
show ipv6 ospf database prefix adv-router 33.1.1.1

show ipv6 ospf database <OSPF Database Type>

外部路由汇总
R1:
ipv6 router ospf 1
summary-prefix 2111::0/64
exit

R5:
show ipv6 route ospf

区域间汇总

R3:
ipv6 router ospf 1
area 0 range 2011::0/64
exit

R5:
show ipv6 route ospf
View Code

虚链路配置方法

R6:
int l1
ipv6 add 2166::1/128
ipv6 ospf 1 area 3
exit

ipv6 router ospf 1
area 2 virtual-link 33.1.1.1
exit

R3:
ipv6 router ospf 1
area 2 virtual-link 66.1.1.1
exit

R6:
show ipv6 ospf virtual-links

R2:
show ipv6 route ospf
View Code

修改OSPFv3网络类型

R1:
int f1/0
ipv6 ospf network point-to-point
exit

R7:
int f1/0
ipv6 ospf network point-to-point
exit

show ipv6 ospf neighbor
View Code

7.IPv6组播
------------------------------------------------------------------------------------
实验目的
1).掌握IPv6组播的配置方法
2).掌握IPv6组播配置RR的方法
3).分析共享树和源树的生成
4).分析并配置共享树向源树的切换
5).了解IPv6组播tunnel生成的原因
6).掌握配置嵌入RP的组播地址
7).掌握BSR的配置方法
8).掌握SSM的配置方法
9).熟悉MLD的工作过程

实验任务
R5模拟组播接收者,发送MLD报文加入组。R8做为组播源,发送组播流量。R1、R2、R3和R7构成组播网络。关闭R6的S2/0接口。

基础IGP环境配置

R1/R2/R7:
ipv6 router ospf 1
no area 1 nssa
exit

R7:
int f0/0
ipv6 ospf 1 area 1
exit

R8:
ipv6 router ospf 1
router-id 88.1.1.1
exit
int l0
ipv6 ospf 1 area 1
exit
int f0/0
ipv6 ospf 1 area 1
exit
View Code

组播配置

R1/R2/R3/R7:
ipv6 multicast-routing

R2:
show ipv6 pim neighbor
show ipv6 pim interface

R1/R2/R3/R7:
ipv6 pim rp-address 2022::1

R7:
show ipv6 pim range-list

int s2/0
ipv6 ospf cost 1
exit
View Code

加入组播组

R5:
int s2/0.1
ipv6 mld join-group ff18::1
exit

R3:
show ipv6 mld groups
show ipv6 mroute

ipv6 pim spt-threshold infinity

R8:
ping ipv6 ff18::1 timeout 3 repeat 2

R7/R2/R3:
show ipv6 mroute

R3:
no ipv6 pim spt-threshold

R8:
ping ipv6 ff18::1 repeat 2

R3/R1/R7:
show ipv6 mroute

R3:
show ipv6 pim tunnel
show int tunnel 0
show int tunnel 1

R2:
show ipv6 pim tunnel
View Code

组播地址中嵌入RP地址

FF7E:0F40:2001:0DB8:BEEF:FEED::1234->2001:0DB8:BEEF:FEED::F
转换规则:
1)组播地址Network Prefix字段的前plen位作为RP地址的网络前缀
2)组播地址RIID字段田冲到RP地址的最低4位
3)RP地址的其余位补0

配置任务
将R1的loopback0接口地址嵌入到组播地址中,在R5中加入该组播地址,在R8上发送数据流测试该组播地址。组播地址设置为:FF7E:0140:2011::1234

R7:
no ipv6 pim rp-address 2022::1

R1:
ipv6 pim rp-address 2011::1

R5:
int s2/0.1
ipv6 mld join-group FF7E:0140:2011::1234
exit

R3:
show ipv6 mroute

R8:
ping ipv6 FF7E:0140:2011::1234 repeat 2
View Code

配置任务
配置R2为BSR,R7为C-RP

R2:
ipv6 pim bsr candidate bsr 2022::1

R7:
ipv6 pim bsr candidate rp 2077::1

show ipv6 pim bsr election

R3:
show ipv6 pim range-list
View Code

配置任务
在R5加入指定源2078::8的指定组FF3E::1234,然后从R8发送组播流来验证

R5:
int s2/0.1
ipv6 mld join-group FF3E::1234 2078::8
exit

R3/R1:
show ipv6 mroute FF3E::1234

R8:
ping ipv6 FF3E:1234 repeat 2

R3:
show ipv6 mld int s2/0.1
View Code


8.IPv6路由--MP-BGP
------------------------------------------------------------------------------------
实验目的
1).掌握利用MP-BGP传递IPv6的路由配置方法
2).配置几个影响MP-BGP选路的方法

接口及IGP配置

R1:
ipv6 unicast-routing
int l0
ip add 11.1.1.1 255.255.255.255
ipv6 add 2011::1/128
ipv6 ospf 1 area 0
exit
int f0/0
ipv6 add 2012::1/64
ipv6 ospf 1 area 0
no shut
exit
int f1/0
ipv6 add 2017::1/64
ipv6 ospf 1 area 0
no shut
exit

R2:
ipv6 unicast-routing
int l0
ip add 22.1.1.1 255.255.255.255
ipv6 add 2022::1/128
ipv6 ospf 1 area 0
exit
int f0/0
ipv6 add 2012::2/64
ipv6 ospf 1 area 0
no shut
exit
int s2/0
ipv6 add 2027::2/64
ipv6 ospf 1 area 0
no shut
exit

R7:
ipv6 unicast-routing
int l0
ip add 77.1.1.1 255.255.255.255
ipv6 add 2077::1/128
exit
int f1/0
ipv6 add 2017::7/64
no shut
exit
int s2/0
ipv6 add 2027::7/64
no shut
exit

ping ipv6 2017::1
ping ipv6 2027::2
View Code

BGP配置

R1:
router bgp 100
no bgp default ipv4-unicast
neighbor 2022::1 remote-as 100
neighbor 2022::1 update-source l0
neighbor 2017::7 remote-as 200
address-family ipv6
neighbor 2022::1 activate
neighbor 2017::7 activate
exit

int l1
ipv6 add 2111::1/64
exit
ipv6 route 2112::0/64 null 0
router bgp 100
address-family ipv6
network 2111::0/64
network 2112::0/64
exit

R2:
router bgp 100
no bgp default ipv4-unicast
neighbor 2011::1 remote-as 100
neighbor 2011::1 update-source l0
neighbor 2027::7 remote-as 200
address-family ipv6
neighbor 2011::1 activate
neighbor 2027::7 activate
exit

show ip bgp ipv6 unicast
show ipv6 route bgp
show ip bgp ipv6 unicast neighbors

R7:
router bgp 200
no bgp default ipv4-unicast
neighbor 2011::1 remote-as 100
neighbor 2022::1 remote-as 100
address-family ipv6
neighbor 2011::1 activate
neighbor 2022::1 activate
exit

show ip bgp ipv6 unicast
View Code

选路配置

R7:
ipv6 access-list aspath
permit 2111::0/64 any
exit
route-map aspath
match ipv6 address aspath
set as-path prepend 100
exit
route-map aspath 20
exit
router bgp 200
address-family ipv6
neighbor 2017::1 route-map aspath in
exit

clear ip bgp ipv6 unicast 100 soft in
show ip bgp ipv6 unicast

ipv6 access-list preference
permit 2112::0/64 any
exit
route-map preference
match ipv6 address preference
set local-preference 120
exit
route-map preference 20
exit
router bgp 200
address-family ipv6
neighbor 2027::2 route-map aspath in
exit

clear ip bgp ipv6 unicast 100 soft in
show ip bgp ipv6 unicast
View Code


9.IPv6路由-ISISV6
------------------------------------------------------------------------------------
实验目的
1).掌握ISISv6的基本配置方法
2).察看传递IPv6路由的TLV

接口配置

R1:
ipv6 unicast-routing
int l0
ipv6 add 2011::1/128
exit
int f0/0
ipv6 add 2012::1/64
no shut
exit
int f1/0
ipv6 add 2017::1/64
no shut
exit

R2:
ipv6 unicast-routing
int l0
ipv6 add 2022::1/128
exit
int f0/0
ipv6 add 2012::2/64
no shut
exit
int s2/0
ipv6 add 2027::2/64
no shut
exit

R7:
ipv6 unicast-routing
int l0
ipv6 add 2077::1/128
exit
int f1/0
ipv6 add 2017::7/64
no shut
exit
int s2/0
ipv6 add 2027::7/64
no shut
exit

ping ipv6 2017::1
ping ipv6 2027::2
View Code

IS-IS配置

R1:
router isis yeslab
is-type level-2-only
net 49.0001.0000.0000.0001.00
log-adjacency-changes
exit
int l0
ipv6 router isis yeslab
exit
int f0/0
ipv6 router isis yeslab
exit
int f1/0
ipv6 router isis yeslab
exit

R2:
router isis yeslab
is-type level-2-only
net 49.0001.0000.0000.0002.00
log-adjacency-changes
exit
int l0
ipv6 router isis yeslab
exit
int f0/0
ipv6 router isis yeslab
exit
int s2/0
ipv6 router isis yeslab
exit

R7:
router isis yeslab
is-type level-2-only
net 49.0001.0000.0000.0007.00
log-adjacency-changes
exit
int l0
ipv6 router isis yeslab
exit
int f1/0
ipv6 router isis yeslab
exit
int s2/0
ipv6 router isis yeslab
exit

show isis neighbors
show ipv6 route isis
ping ipv6 2011::1
ping ipv6 2022::1

ISIS为了传送IPv6路由,增加了两个TLV,分别是IPv6 Reachability TLV和IPv6 Interface Address TLV.
View Code


10.IPv4和IPv6的共存和过度_1
------------------------------------------------------------------------------------
实验目的
1).掌握双栈方式的配置方法
2).掌握GRE tunnel的配置方法
3).掌握mannul tunnel的配制方法
4).掌握6to4的配置方法
5).掌握ISATAP的配置方法

接口及IPv4/IPv6配置

R1:
int l0
ip add 11.1.1.1 255.255.255.255
ip ospf 1 area 0
exit
int f0/0
ip add 123.1.1.1 255.255.255.0
ip ospf 1 area 0
no shut
exit

R2:
int l0
ip add 22.1.1.1 255.255.255.255
ip ospf 1 area 0
exit
int f0/0
ip add 123.1.1.2 255.255.255.0
ip ospf 1 area 0
no shut
exit
int s2/0
ip add 27.1.1.2 255.255.255.0
encapsulation ppp
ip ospf 1 area 0
no shut
exit

R3:
ipv6 unicast-routing
int l0
ip add 33.1.1.1 255.255.255.255
ip ospf 1 area 0
ipv6 add 2033::1/128
exit
int f0/0
ip add 123.1.1.3 255.255.255.0
ip ospf 1 area 0
no shut
exit

R7:
ipv6 unicast-routing
int l0
ip add 77.1.1.1 255.255.255.255
ip ospf 1 area 0
ipv6 add 2077::1/128
ipv6 ospf 1 area 0
exit
int s2/0
ip add 27.1.1.7 255.255.255.0
encapsulation ppp
ip ospf 1 area 0
no shut
exit
int f0/0
ipv6 add 2078::7/64
ipv6 ospf 1 area 0
no shut
exit

R8:
ipv6 unicast-routing
int l0
ipv6 add 2088::1/128
ipv6 ospf 1 area 0
exit
int f0/0
ipv6 add 2078::8/128
ipv6 ospf 1 area 0
no shut
exit

ipv6 router ospf 1
router-id 88.1.1.1
exit

R7:
ping 2088::1
View Code

配置任务:通过在核心网络上配置双栈,使得两个IPv孤岛可以相互访问

R7:
int s2/0
ipv6 add 2027::7/64
ipv6 ospf 1 area 0
exit

R2:
ipv6 unicast-routing
int s2/0
ipv6 add 2027::2/64
ipv6 ospf 1 area 0
exit
int f0/0
ipv6 add 2123::2/64
ipv6 ospf 1 area 0
exit

R3:
int f0/0
ipv6 add 2123::3/64
ipv6 ospf 1 area 0
exit
int l0
ipv6 ospf 1 area 0
exit

R8:
show ipv6 route ospf
ping 2033::1

R7:
int s2/0
no ipv6 add 2027::7/64
no ipv6 ospf 1 area 0
exit

R2:
no ipv6 unicast-routing
int s2/0
no ipv6 add 2027::2/64
no ipv6 ospf 1 area 0
exit
int f0/0
no ipv6 add 2123::2/64
no ipv6 ospf 1 area 0
exit

R3:
int f0/0
no ipv6 add 2123::3/64
no ipv6 ospf 1 area 0
exit
int l0
no ipv6 ospf 1 area 0
exit 
View Code

配置任务:通过GRE隧道,使得两个IPv6孤岛可以相互访问

R7:
int tunnel 1
ipv6 add 2037::7/64
tunnel source l0
tunnel destination 33.1.1.1
tunnel mode gre ip
ipv6 ospf 1 are 0
exit

R3:
int tunnel 1
ipv6 add 2037::3/64
tunnel source l0
tunnel destination 77.1.1.1
tunnel mode gre ip
ipv6 ospf 1 area 0
exit
int l0
ipv6 ospf 1 area 0
exit

show ipv6 ospf neighbor
show ipv6 route ospf
ping ipv6 2088::1

R7:
no int tunnel 1

R3:
no int tunnel 1
int l0
no ipv6 ospf 1 area 0
exit
View Code

配置任务:通过手动的IPv6隧道,使得两个IPv6孤岛可以相互访问

R7:
int tunnel 1
ipv6 add 2037::7/64
tunnel source l0
tunnel destination 33.1.1.1
tunnel mode ipv6ip
ipv6 ospf 1 are 0
exit

R3:
int tunnel 1
ipv6 add 2037::3/64
tunnel source l0
tunnel destination 77.1.1.1
tunnel mode ipv6ip
ipv6 ospf 1 area 0
exit
int l0
ipv6 ospf 1 area 0
exit

show ipv6 ospf neighbor
show ipv6 route ospf
ping ipv6 2088::1

R7:
no int tunnel 1

R3:
no int tunnel 1
int l0
no ipv6 ospf 1 area 0
exit
View Code

GRE隧道的封装方式是:ipV4报头+GRE报头+IPv6报头
Ipv6IP隧道的封装方式是:ipV4报头+IPv6报头
GRE隧道的GRE报头占4byte,可以承载除Ipv6外的其他IPv4协议,隧道的承载范围更广;IPv6IP隧道,只能承载IPv6数据包,但是隧道的承载效率更高。

6to4隧道的配置
1.配置用6to4方式编制的两个IPv6孤岛之间相互通信
2.配置6to4 relay
3.配置主机通过6to4隧道访问internet

配置任务1:
R3和R7上各新起一个loopback1接口,采用6to4的编址方式
R3:
(2101:0101--嵌入的IPv4地址33.1.1.1)
int l1
ipv6 add 2002:2101:0101:3::3333/128
配置6to4隧道接口和静态路由
int tunnel 1
ipv6 add 2002:2101:0101::1/128 --嵌入tunnel source的IPv4地址
tunnel source l0
tunnel mode ipv6ip 6to4
exit
ipv6 route 2002::0/16 tunnel 1 --配置静态路由,使得R3访问所有用6to4编址的站点都从tunnel1口出去

R7:
(4d01:0101--嵌入的IPv4地址77.1.1.1)
int l1
ipv6 add 2002:4d01:0101:7::7777/128

int tunnel 1
ipv6 add 2002:4d01:0101::1/128
tunnel source l0
tunnel mode ipv6ip 6to4
exit
ipv6 route 2002::0/16 tunnel 1

R3:
ping ipv6 2002:4d01:0101:7::7777 source l1

配置任务2:
让R3的loopback1(6to4地址)接口可以访问R7和R8组成的IPv6 internet

R3写一条缺省路由,下一跳为R7的6to4 tunnel接口地址
R3:
ipv6 route ::/0 2002:4d01:0101::1

R7上把静态路由2002::/16,重分布到ospfv3
R7:
ipv6 access-list static6to4
permit 2002::/16 any
exit
route-map static6to4
match ipv6 add static6to4
exit
ipv6 router ospf 1
redistribute static route-map static6to4
exit

R8:
show ipv6 route

R3:
ping ipv6 2088::1 source l1

配置任务3:
配置PC的VMnet1接口IPv4地址为123.1.1.100,然后加一条静态路由,只想R7的loopback0接口
IPv4属性
123.1.1.100
255.255.255.0
123.1.1.2

cmd.exe
route add 77.1.1.1 mask 255.255.255.255 123.1.1.2
ping 77.1.1.1

cmd.exe
netsh
interface
ipv6
6to4
set state enabled
set relay 77.1.1.1
show relay
show state
exit

ping -6 2002:4d01:0101:7::7777
ipconfig

ping -6 2088::1

ISATAP的配置
把R7设置为ISATAP网关,向PC分配前缀,然后从PC去访问R8
配置PC的VMnet1接口IPv4地址为123.1.1.100,然后加一条静态路由,只想R7的loopback0接口
IPv4属性
123.1.1.100
255.255.255.0
123.1.1.2

cmd.exe
route add 77.1.1.1 mask 255.255.255.255 123.1.1.2

R7:
int tunnel 1
ipv6 add 2777::0/64 eui-64
no ipv6 nd ra suppress --必须要关掉对RA请求的抑制功能
tunnel source l0
tunnel mode ipv6ip isatap
exit

show ipv6 interface brief

PC:
netsh
interface
ipv6
isatap
set state enabled
set router 77.1.1.1
exit

ipconfig

R7:
int tunnel 1
ipv6 ospf 1 area 0
exit

PC:
ping 2088::1


11.IPv4和IPv6的共存和过度_2
------------------------------------------------------------------------------------
实验目的
1).掌握6PE的配置方法
2).理解IPv6的路由信息如何传递
3).理解IPv6的数据包如何穿越IPv4的网络
4).理解标签分配机制和学会查看标签信息
5).掌握测试6PE的方法

IPv4网络基本配置

R2:
ip cef
int l0
ip add 22.1.1.1 255.255.255.255
ip ospf 1 area 0
exit
int s2/0
ip add 27.1.1.2 255.255.255.0
encapsulation ppp
ip ospf 1 area 0
mpls ip
no shut
exit
int f0/0
ip add 23.1.1.2 255.255.255.0
ip ospf 1 area 0
mpls ip
no shut
exit

R3:
ip cef
int l0
ip add 33.1.1.1 255.255.255.255
ip ospf 1 area 0
exit
int f0/0
ip add 23.1.1.3 255.255.255.0
ip ospf 1 area 0
mpls ip
no shut
exit

R7:
ip cef
int l0
ip add 77.1.1.1 255.255.255.255
ip ospf 1 area 0
exit
int s2/0
ip add 27.1.1.7 255.255.255.0
encapsulation ppp
ip ospf 1 area 0
mpls ip
no shut
exit

ping 33.1.1.1
View Code

IPv6网络基本配置

R3:
ipv6 unicast-routing
ipv6 cef
int l0
ipv6 add 2033::1/128
ipv6 ospf 1 area 0
exit
int f1/0
ipv6 add 2035::3/64
ipv6 ospf 1 area 0
no shut
exit

R5:
ipv6 unicast-routing
ipv6 cef
ipv6 router ospf 1
router-id 55.1.1.1
exit
int l0
ipv6 add 2055::1/128
ipv6 ospf 1 area 0
exit
int f1/0
ipv6 add 2035::5/64
ipv6 ospf 1 area 0
no shut
exit

R7:
ipv6 unicast-routing
ipv6 cef
int l0
ipv6 add 2077::1/128
ipv6 ospf 1 area 0
exit
int f0/0
ipv6 add 2078::7/64
ipv6 ospf 1 area 0
no shut
exit

R8:
ipv6 unicast-routing
ipv6 cef
ipv6 router ospf 1
router-id 88.1.1.1
exit
int l0
ipv6 add 2088::1/64
ipv6 ospf 1 area 0
exit
int f0/0
ipv6 add 2078::8/64
ipv6 ospf 1 area 0
no shut
exit
View Code

配置MP-BGP

R3:
router bgp 100
bgp router-id 33.1.1.1
neighbor 77.1.1.1 remote-as 100
neighbor 77.1.1.1 update-source l0
neighbor 2055::1 remote-as 60035
neighbor 2055::1 update-source l0
neighbor 2055::1 ebgp-multihop
address-family ipv6
neighbor 77.1.1.1 activate
neighbor 77.1.1.1 send-label
neighbor 2055::1 activate
exit-address-family
exit

R5:
int l1
ipv6 add 2155::1/64
exit

router bgp 60035
bgp router-id 55.1.1.1
neighbor 2033::1 remote-as 100
neighbor 2033::1 update-source l0
neighbor 2033::1 ebgp-multihop
address-family ipv6
neighbor 2033::1 activate
network 2155::0/64
exit-address-family
exit

R7:
router bgp 100
bgp router-id 77.1.1.1
neighbor 33.1.1.1 remote-as 100
neighbor 33.1.1.1 update-source l0
neighbor 2088::1 remote-as 60078
neighbor 2088::1 update-source l0
neighbor 2088::1 ebgp-multihop
address-family ipv6
neighbor 33.1.1.1 activate
neighbor 33.1.1.1 send-label
neighbor 2088::1 activate
exit-address-family
exit

R8:
int l1
ipv6 add 2188::1/64
exit

router bgp 60078
bgp router-id 88.1.1.1
neighbor 2077::1 remote-as 100
neighbor 2077::1 update-source l0
neighbor 2077::1 ebgp-multihop
address-family ipv6
neighbor 2077::1 activate
network 2188::0/64
exit-address-family
exit

R3:
show ip bgp ipv6 unicast
show ipv6 route
show ipv6 cef detail
show mpls forwarding-table

R5:
show ipv6 route bgp
ping ipv6 2188::1 source l1
View Code

 

posted on 2013-08-10 10:37  逝者如斯(乎)  阅读(1966)  评论(0编辑  收藏  举报