ipv6实验报告

该配置描述了如何通过6to4隧道连接两个局域网,并使用RIPng进行内部路由。R2配置了6to4隧道,R1通过RIPng接收默认路由。R5、R6、R7和R8之间使用OSPFv3协议交换路由信息,同时R4、R5之间建立BGP连接。R5作为反射器,将路由反射给R7。R4配置了出接口的隧道以访问左侧网络,并宣告默认路由给AS1。
摘要由CSDN通过智能技术生成

1、两个局域网基于6to4tunnel可达
2、R1可以访问R3的环回


[R1]ripng 1
[R1]int lo0
[R1-LoopBack0]ripng 1 enable
[R1-LoopBack0]int l01
[R1-LoopBack1]ripng 1 enable
[R1-LoopBack1]int g0/0/0
[R1-GigabitEthernet0/0/0]ripng 1 enable

R2
[R2]ripng 1
[R2]int lo0
[R2-LoopBack0]ripng 1 enable
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ripng 1 enable

在R2上配置Tunnel隧道
[R2]int Tunnel 0/0/0
[R2-Tunnel0/0/0]ipv6 enable
[R2-Tunnel0/0/0]ipv6 address 2002:1701:0101:0003::1/64
[R2-Tunnel0/0/0]tunnel-protocol ipv6-ipv4 6to4
[R2-Tunnel0/0/0]source GigabitEthernet 0/0/1

为经过tunnel配置缺省路由
[R2]ipv6 route-static 2002:: 16 Tunnel 0/0/0

R2通过RIPng给R1发送缺省
[R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]ripng default-route only

在R1上汇总环节接口
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ripng summary-address 2002:1701:101:: 64

4.为R4,R5,R6,R7,R8配置IP V6的地址
R4
[R4]ipv6
[R4]int lo0
[R4-LoopBack0]ipv6 enable
[R4-LoopBack0]ipv6 address 2002:2201:0102:0000::1/64
[R4-LoopBack0]int g0/0/1
[R4-GigabitEthernet0/0/1]ipv6 enable
[R4-GigabitEthernet0/0/1]ipv6 address 2002:2201:0102:0001::1 64

R5
[R5]ipv6
[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]ipv6 enable
[R5-GigabitEthernet0/0/0]ipv6 address 2002:2201:0102:0001::2 64
[R5-GigabitEthernet0/0/0]int g0/0/1
[R5-GigabitEthernet0/0/1]ipv6 enable
[R5]int lo0
[R5-LoopBack0]ipv6 enable
[R5-LoopBack0]ipv6 address 2002:2201:0102:8000::1 64
[R5]int g0/0/1
[R5-GigabitEthernet0/0/1]ipv6 address 2002:2201:0102:8001::1 64

R6
[R6]ipv6
[R6]int g0/0/0
[R6-GigabitEthernet0/0/0]ipv6 enable
[R6-GigabitEthernet0/0/0]ipv6 address 2002:2201:0102:8001::2 64
[R6-GigabitEthernet0/0/0]int lo0
[R6-LoopBack0]ipv6 enable
[R6-LoopBack0]ipv6 address 2002:2201:0102:8002::1 64
[R6-LoopBack0]int g0/0/1
[R6-GigabitEthernet0/0/1]ipv6 enable
[R6-GigabitEthernet0/0/1]ipv6 address 2002:2201:0102:8003::1 64

R7
[R7]ipv6
[R7]int g0/0/1
[R7-GigabitEthernet0/0/1]ipv6 enable
[R7-GigabitEthernet0/0/1]ipv6 address 2002:2201:0102:8003::2 64
[R7-GigabitEthernet0/0/1]int lo0
[R7-LoopBack0]ipv6 enable
[R7-LoopBack0]ipv6 address 2002:2201:0102:8004::1 64
[R7-LoopBack0]int g0/0/0
[R7-GigabitEthernet0/0/0]ipv6 enable
[R7-GigabitEthernet0/0/0]ipv6 address 2002:2201:0102:8005::1 64

[R8]ipv6
[R8]int g0/0/0
[R8-GigabitEthernet0/0/0]ipv6 enable
[R8-GigabitEthernet0/0/0]ipv6 address 2002:2201:0102:8005::2 64
[R8-GigabitEthernet0/0/0]int lo0
[R8]int lo0
[R8-LoopBack0]ipv6 enable
[R8-LoopBack0]ipv6 address 2002:2201:0102:8006::1 64

在R5,R6,R7,R8之间运行OSPFv3协议
[R5]ospfv3 1
[R5-ospfv3-1]router-id 5.5.5.5
[R5-ospfv3-1]int lo0
[R5-LoopBack0]ospfv3 1 area 0
[R5-LoopBack0]int g0/0/01
[R5-GigabitEthernet0/0/1]ospfv3 1 area 0

[R6]ospfv3 1
[R6-ospfv3-1]router-id 6.6.6.6
[R6-ospfv3-1]int lo0
[R6-LoopBack0]ospfv3 1 area 0
[R6-LoopBack0]int g0/0/0
[R6-GigabitEthernet0/0/0]ospfv3 1 area 0
[R6-GigabitEthernet0/0/0]int g0/0/1
[R6-GigabitEthernet0/0/1]ospfv3 1 area 0

[R7]ospfv3 1
[R7-ospfv3-1]router-id 7.7.7.7
[R7-ospfv3-1]int lo0
[R7-LoopBack0]ospfv3 1 area 0
[R7-LoopBack0]int g0/0/0
[R7-GigabitEthernet0/0/0]ospfv3 1 area 0
[R7-GigabitEthernet0/0/0]int g0/0/1
[R7-GigabitEthernet0/0/1]ospfv3 1 area 0

[R8]ospfv3 1
[R8-ospfv3-1]router-id 8.8.8.8
[R8-ospfv3-1]int lo0
[R8-LoopBack0]ospfv3 1 area 0
[R8-LoopBack0]int g0/0/0
[R8-GigabitEthernet0/0/0]ospfv3 1 area 0

R4 R5创建BGP
[R4]bgp 1
[R4-bgp]router-id 4.4.4.4
[R4-bgp]peer 2002:2201:102:1::2 as-number 2
[R4-bgp]ipv6-family
[R4-bgp-af-ipv6]peer 2002:2201:102:1::2 enable

[R5]bgp 64512
[R5-bgp]router-id 5.5.5.5
[R5-bgp]confederation id 2
[R5-bgp]peer 2002:2201:102:1::1 as-number 1
[R5-bgp]ipv6-family
[R5-bgp-af-ipv6]peer 2002:2201:102:1::1 enable

为R5 R6 R7 R8创建多宿主IPV6地址
[R5]int lo0
[R5-LoopBack0]ipv
[R5-LoopBack0]ipv6 add
[R5-LoopBack0]ipv6 address 5::5 64

[R6]int lo0
[R6-LoopBack0]ipv6 add
[R6-LoopBack0]ipv6 address 6::6 64

[R7]int lo0
[R7-LoopBack0]ipv6 add
[R7-LoopBack0]ipv6 address 7::7 64

[R8]int lo0
[R8-LoopBack0]ipv6 add
[R8-LoopBack0]ipv6 address 8::8 64

在R5 R6 R7 R8启用BGP
[R5]bgp 64512
[R5-bgp]peer 6::6 as-number 64512
[R5-bgp]peer 6::6 connect-interface LoopBack 0 5::5
[R5-bgp]ipv6-family
[R5-bgp-af-ipv6]peer 6::6 enable

[R6]bgp 64512
[R6-bgp]router-id 6.6.6.6
[R6-bgp]confederation id 2
[R6-bgp]peer 5::5 as-number 64512
[R6-bgp]peer 5::5 connect-interface LoopBack 0 6::6
[R6-bgp]ipv6-family
[R6-bgp-af-ipv6]peer 5::5 enable
[R6-bgp]peer 7::7 as-number 64512
[R6-bgp]peer 7::7 connect-interface LoopBack 0 6::6
[R6-bgp]ipv6-family
[R6-bgp-af-ipv6]peer 7::7 enable

[R7]bgp 64512
[R7-bgp]confederation id 2
[R7-bgp]confederation peer-as 64513
[R7-bgp]router-id 7.7.7.7
[R7-bgp]peer 6::6 as-number 64512
[R7-bgp]peer 6::6 connect-interface LoopBack 0 7::7
[R7-bgp]peer 8::8 as-number 64513
[R7-bgp]peer 8::8 connect-interface LoopBack 0 7::7
[R7-bgp]peer 8::8 ebgp-max-hop
[R7-bgp]ipv6-family
[R7-bgp-af-ipv6]peer 6::6 enable
[R7-bgp-af-ipv6]peer 8::8 enable

[R8]bgp 64513
[R8-bgp]confederation id 2
[R8-bgp]router-id 8.8.8.8
[R8-bgp]peer 7::7 as
[R8-bgp]confederation peer-as 64512
[R8-bgp]peer 7::7 as-number 64512
[R8-bgp]peer 7::7 connect-interface LoopBack 0 8::8
[R8-bgp]ipv6-family
[R8-bgp-af-ipv6]peer 7::7 enable
[R8-bgp]peer 7::7 ebgp-max-hop

汇总AS2的路由宣告发送给AS1
[R5]ipv6 route-static 2002:2201:0102:8000:: 49 NULL 0
[R5]bgp 64512
[R5-bgp]ipv6-family
[R5-bgp-af-ipv6]network 2002:2201:0102:8000:: 49

为R4配置出接口的tunnel,访问左边网络
[R4]int t
[R4]int Tunnel 0/0/0
[R4-Tunnel0/0/0]ipv6 enable
[R4-Tunnel0/0/0]ipv6 address 2002:2201:0102:0002::1/64
[R4-Tunnel0/0/0]tunnel-protocol ipv6-ipv4 6to4
[R4-Tunnel0/0/0]source GigabitEthernet 0/0/0
[R4]ipv6 route-static 2002:: 16 Tunnel 0/0/0

为AS2传递缺省
[R4]bgp 1
[R4-bgp]ipv6-family
[R4-bgp-af-ipv6]network 2002:: 16

修改下一跳
[R5-bgp]ipv6-family
[R5-bgp-af-ipv6]peer 6::6 next-hop-local

设置反射器,将R5为客户端,反射给R7
[R6]bgp 64512
[R6-bgp]ipv6-family
[R6-bgp-af-ipv6]peer 5::5 reflect-client

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值