龙空技术网

IPv4+IPv6双栈综合实验,骨干网接入层部署OSPF/OSPFv3

亓官以铱 587

前言:

而今兄弟们对“骨干网接入控制设备”大致比较注重,大家都想要了解一些“骨干网接入控制设备”的相关内容。那么小编在网摘上收集了一些有关“骨干网接入控制设备””的相关资讯,希望朋友们能喜欢,朋友们快快来了解一下吧!

IPv4+IPv6双栈综合实验

实验介绍

学习目标

实现MP-BGP配置 实现IS-IS双栈配置 实现OSPF双栈配置

实验组网介绍

图3-1 IPv4+IPv6双栈实验拓扑

IP互联地址、BGP AS号如图所示。R3为路由反射器,R1、R2、R4、R5为R3的客户端。BGP AS 65100内通过OSPF与IS-IS构建底层网络。

实验背景

某企业网络需要部署IPv4+IPv6业务,使得分支1与分支2之间的IPv4网段与IPv6网段能够互通。

该企业网络规模较大,有自身的骨干网,其中骨干网接入层使用OSPF/OSPFv3建立网络,骨干网核心层使用IS-IS/IS-IS(IPv6)建立网络。

骨干网核心层有部分纯IPv4网络,无法部署IPv6。

实验任务

任务思路

1. 设备IP/IPv6地址配置。

2. 在骨干网接入层部署OSPF/OSPFv3。

3. 在骨干网核心层部署IS-IS/IS-IS(IPv6)。

4. IS-IS与OSPF双向引入,IS-IS与OSPFv3双向引入。

5. R1、R2、R4、R5与RR建立IBGP对等体关系,并将R3部署为RR。

6. S1、S2与R1、R5建立EBGP对等体关系,并发布IPv4与IPv6路由。

任务步骤

步骤 1 互联接口、环回口IP/IPv6地址配置

#设备命名

#关闭本实验中未使用的接口 略

#配置R1的GE0/0/2、GE0/0/3、Loopback0接口IP地址

[R1]interface LoopBack0 [R1-LoopBack0] ip address 10.10.10.1 255.255.255.255 [R1-LoopBack0] quit [R1]interface GigabitEthernet0/0/2 [R1-GigabitEthernet0/0/2] ip address 10.0.12.1 255.255.255.0 [R1-GigabitEthernet0/0/2] quit [R1]interface GigabitEthernet0/0/3 [R1-GigabitEthernet0/0/3] ip address 10.0.11.2 255.255.255.0[R1-GigabitEthernet0/0/3] quit 

#配置R1的GE0/0/2、GE0/0/3、Loopback0接口IPv6地址

[R1]ipv6 [R1]interface LoopBack0 [R1-LoopBack0] ipv6 enable [R1-LoopBack0] ipv6 address 1::1/128 [R1-LoopBack0] quit [R1]interface GigabitEthernet0/0/2 [R1-GigabitEthernet0/0/2] ipv6 enable [R1-GigabitEthernet0/0/2] ipv6 address 2001:DB8:12::1/64 [R1-GigabitEthernet0/0/2] quit [R1]interface GigabitEthernet0/0/3[R1-GigabitEthernet0/0/3] ipv6 enable [R1-GigabitEthernet0/0/3] ipv6 address 2001:DB8:11::2/64 [R1-GigabitEthernet0/0/3] quit 

#配置R2的GE0/0/1、GE0/0/2、GE0/0/3、Loopback0接口IP地址

[R2]interface LoopBack0 [R2-LoopBack0] ip address 10.10.10.2 255.255.255.255 [R2-LoopBack0] quit[R2]interface GigabitEthernet0/0/1[R2-GigabitEthernet0/0/1] ip address 10.0.24.2 255.255.255.0 [R2-GigabitEthernet0/0/1] quit [R2]interface GigabitEthernet0/0/2 [R2-GigabitEthernet0/0/2] ip address 10.0.23.2 255.255.255.0[R2-GigabitEthernet0/0/2] quit [R2]interface GigabitEthernet0/0/3 [R2-GigabitEthernet0/0/3] ip address 10.0.12.2 255.255.255.0 [R2-GigabitEthernet0/0/3] quit 

#配置R2的GE0/0/2、GE0/0/3、Loopback0接口IPv6地址,GE0/0/1只能支持IPv4,无需配置IPv6

[R2]ipv6 [R2]interface LoopBack0 [R2-LoopBack0] ipv6 enable [R2-LoopBack0] ipv6 address 2::2/128 [R2-LoopBack0] quit [R2]interface GigabitEthernet0/0/2 [R2-GigabitEthernet0/0/2] ipv6 enable [R2-GigabitEthernet0/0/2] ipv6 address 2001:DB8:23::2/64 [R2-GigabitEthernet0/0/2] quit [R2]interface GigabitEthernet0/0/3[R2-GigabitEthernet0/0/3] ipv6 enable [R2-GigabitEthernet0/0/3] ipv6 address 2001:DB8:12::2/64 [R2-GigabitEthernet0/0/3] quit 

#配置R3的GE0/0/2、GE0/0/3、Loopback0接口IP地址

[R3]interface LoopBack0 [R3-LoopBack0] ip address 10.10.10.3 255.255.255.255 [R3-LoopBack0] quit [R3]interface GigabitEthernet0/0/2 [R3-GigabitEthernet0/0/2] ip address 10.0.34.3 255.255.255.0 [R3-GigabitEthernet0/0/2] quit[R3]interface GigabitEthernet0/0/3 [R3-GigabitEthernet0/0/3] ip address 10.0.23.3 255.255.255.0[R3-GigabitEthernet0/0/3] quit 

#配置R3的GE0/0/2、GE0/0/3、Loopback0接口IPv6地址

[R3]ipv6 [R3]interface LoopBack0[R3-LoopBack0] ipv6 enable[R3-LoopBack0] ipv6 address 3::3/128 [R3-LoopBack0] quit [R3]interface GigabitEthernet0/0/2 [R3-GigabitEthernet0/0/2] ipv6 enable[R3-GigabitEthernet0/0/2] ipv6 address 2001:DB8:23::3/64 [R3-GigabitEthernet0/0/2] quit [R3]interface GigabitEthernet0/0/3 [R3-GigabitEthernet0/0/3] ipv6 enable [R3-GigabitEthernet0/0/3] ipv6 address 2001:DB8:34::3/64[R3-GigabitEthernet0/0/3] quit 

#配置R4的GE0/0/1、GE0/0/2、GE0/0/3、Loopback0接口IP地址

[R4]interface LoopBack0[R4-LoopBack0] ip address 10.10.10.4 255.255.255.255 [R4-LoopBack0] quit[R4]interface GigabitEthernet0/0/1[R4-GigabitEthernet0/0/1] ip address 10.0.24.4 255.255.255.0[R4-GigabitEthernet0/0/1] quit [R4]interface GigabitEthernet0/0/2[R4-GigabitEthernet0/0/2] ip address 10.0.45.4 255.255.255.0[R4-GigabitEthernet0/0/2] quit [R4]interface GigabitEthernet0/0/3 [R4-GigabitEthernet0/0/3] ip address 10.0.34.4 255.255.255.0[R4-GigabitEthernet0/0/3] quit 

#配置R4的GE0/0/2、GE0/0/3、Loopback0接口IPv6地址,GE0/0/1只能支持IPv4,无需配置IPv6

[R4]ipv6 [R4]interface LoopBack0 [R4-LoopBack0] ipv6 enable[R4-LoopBack0] ipv6 address 4::4/128[R4-LoopBack0] quit[R4]interface GigabitEthernet0/0/2 [R4-GigabitEthernet0/0/2] ipv6 enable[R4-GigabitEthernet0/0/2] ipv6 address 2001:DB8:45::4/64 [R4-GigabitEthernet0/0/2] quit[R4]interface GigabitEthernet0/0/3[R4-GigabitEthernet0/0/3] ipv6 enable [R4-GigabitEthernet0/0/3] ipv6 address 2001:DB8:34::4/64 [R4-GigabitEthernet0/0/3] quit 

#配置R5的GE0/0/3、GE0/0/4、Loopback0接口IP地址

[R5]interface LoopBack0 [R5-LoopBack0] ip address 10.10.10.5 255.255.255.255 [R5-LoopBack0] quit [R5]interface GigabitEthernet0/0/3[R5-GigabitEthernet0/0/3] ip address 10.0.45.5 255.255.255.0 [R5-GigabitEthernet0/0/3] quit [R5]interface GigabitEthernet0/0/4[R5-GigabitEthernet0/0/4] ip address 10.0.25.5 255.255.255.0 [R5-GigabitEthernet0/0/4] quit 

#配置R5的GE0/0/2、GE0/0/3、Loopback0接口IPv6地址

[R5]ipv6 [R5]interface LoopBack0 [R5-LoopBack0] ipv6 enable[R5-LoopBack0] ipv6 address 5::5/128 [R5-LoopBack0] quit [R5]interface GigabitEthernet0/0/3 [R5-GigabitEthernet0/0/2] ipv6 enable[R5-GigabitEthernet0/0/2] ipv6 address 2001:DB8:45::5/64 [R5-GigabitEthernet0/0/2] quit [R5]interface GigabitEthernet0/0/4 [R5-GigabitEthernet0/0/3] ipv6 enable [R5-GigabitEthernet0/0/3] ipv6 address 2001:DB8:25::2/64 [R5-GigabitEthernet0/0/3] quit 

#配置S1的GE0/0/1所属VLAN以及VLANIF 1、Loopback0接口IP地址

[S1]interface LoopBack0[S1-LoopBack0] ip address 10.0.1.1 255.255.255.255[S1-LoopBack0] quit[S1]interface GigabitEthernet0/0/1[S1-GigabitEthernet0/0/1] port link-type access[S1-GigabitEthernet0/0/1] port default vlan 1 [S1-GigabitEthernet0/0/1] quit [S1]interface Vlanif 1 [S1-Vlanif1] ip address 10.1.11.1 24[S1-Vlanif1] quit 

#配置S1的GE0/0/1所属VLAN以及VLANIF 1、Loopback0接口IPv6地址

[S1]ipv6 [S1]interface LoopBack0 [S1-LoopBack0] ipv6 enable [S1-LoopBack0] ipv6 address 2001:DB8::1/128 [S1-LoopBack0] quit [S1]interface GigabitEthernet0/0/1 [S1-GigabitEthernet0/0/1] ipv6 enable[S1-GigabitEthernet0/0/1] ipv6 address 2001:DB8:11::1/64 [S1-GigabitEthernet0/0/1] quit

#配置S2的GE0/0/5所属VLAN以及VLANIF 1、Loopback0接口IP地址

[S2]interface LoopBack0[S2-LoopBack0] ip address 10.0.2.1 255.255.255.255 [S2-LoopBack0] quit[S2]interface GigabitEthernet0/0/5[S2-GigabitEthernet0/0/5] port link-type access[S2-GigabitEthernet0/0/5] port default vlan 1 [S2-GigabitEthernet0/0/5] quit [S2]interface Vlanif 1[S2-Vlanif1] ip address 10.0.25.2 24[S2-Vlanif1] quit 

#配置S2的GE0/0/5所属VLAN以及VLANIF 1、Loopback0接口IPv6地址

[S2]ipv6 [S2]interface LoopBack0[S2-LoopBack0] ipv6 enable[S2-LoopBack0] ipv6 address 2001:DB8::2/128 [S2-LoopBack0] quit[S2]interface GigabitEthernet0/0/1 [S2-GigabitEthernet0/0/5] ipv6 enable[S2-GigabitEthernet0/0/5] ipv6 address 2001:DB8:25::2/64 [S2-GigabitEthernet0/0/5] quit 

#在R1、R3、R5上检查互联地址连通性(以IPv6为例)

<R1>ping ipv6 2001:0db8:11::1 <R1>ping ipv6 2001:0db8:12::2 <R3>ping ipv6 2001:0db8:23::2 <R3>ping ipv6 2001:0db8:34::4<R5>ping ipv6 2001:0db8:45::4 <R5>ping ipv6 2001:0db8:25::5 

步骤 2 骨干网接入层配置OSPF与OSPFv3协议,搭建底层网络

按照拓扑设计在R1、R2、R4、R5上部署OSPF进程,进程号使用1,区域号为0,Router ID使用路由器的环回口地址,以R1为例:10.10.10.1。

宣告OSPF接口时,使用精确宣告的方式,将所有AS65100内的接口均宣告入OSPF。

OSPFv3的配置类似,进程号为1,区域号为0,实例号为1,Router ID使用路由器的环回口,以R1为例:10.10.10.1。

#配置R1 OSPF

[R1]router id 10.10.10.1 [R1]ospf 1[R1-ospf-1] area 0 [R1-ospf-1-area-0.0.0.0] network 10.10.10.1 0.0.0.0 [R1-ospf-1-area-0.0.0.0] network 10. 0.12.1 0.0.0.0 

#配置R1 OSPFv3

[R1]ospfv3 1[R1-ospfv3-1] router-id 10.10.10.1 [R1-ospfv3-1] quit[R1]interface GigabitEthernet0/0/2 [R1-GigabitEthernet0/0/2] ospfv3 1 area 0 instance 1 [R1-GigabitEthernet0/0/2] quit [R1]interface LoopBack0 [R1-LoopBack0] ospfv3 1 area 0 instance 1 

#配置R2 OSPF

[R2]router id 10.10.10.2 [R2]ospf 1[R2-ospf-1] area 0[R2-ospf-1-area-0.0.0.0] network 10.0.12.2 0.0.0.0 

#配置R2 OSPFv3

[R2]ospfv3 1[R2-ospfv3-1] router-id 10.10.10.2[R2-ospfv3-1] quit[R2]interface GigabitEthernet0/0/3[R2-GigabitEthernet0/0/3] ospfv3 1 area 0 instance 1 [R2-GigabitEthernet0/0/3] quit 

#配置R4 OSPF

[R4]router id 10.10.10.4[R4]ospf 1 [R4-ospf-1] area 0 [R4-ospf-1-area-0.0.0.0] network 10.0.45.4 0.0.0.0 

#配置R4 OSPFv3

[R4]ospfv3 1 [R4-ospfv3-1] router-id 10.10.10.4[R4-ospfv3-1] quit [R4]interface GigabitEthernet0/0/2 [R4-GigabitEthernet0/0/2] ospfv3 1 area 0 instance 1 [R4-GigabitEthernet0/0/2] quit 

#配置R5 OSPF

[R5]router id 10.10.10.5 [R5]ospf 1 [R5-ospf-1] area 0 [R5-ospf-1-area-0.0.0.0] network 10.10.10.5 0.0.0.0 [R5-ospf-1-area-0.0.0.0] network 10.0.45.5 0.0.0.0 

#配置R5 OSPFv3

[R5]ospfv3 1 [R5-ospfv3-1] router-id 10.10.10.5[R5-ospfv3-1] quit [R5]interface GigabitEthernet0/0/3[R5-GigabitEthernet0/0/3] ospfv3 1 area 0 instance 1 [R5-GigabitEthernet0/0/3] quit [R5]interface LoopBack0[R5-LoopBack0] ospfv3 1 area 0 instance 1 

检查OSPF/OSPFv3配置结果

#在R2、R4查看OSPF邻居

[R2]display ospf peer brief [R4]display ospf peer brief 

#在R1、R5查看OSPFv3邻居

[R1]display ospfv3 peer [R5]display ospfv3 peer 

#在路由器上检查OSPF路由表与OSPFv3路由表,以R1路由器为例

[R1]display ospf routing [R1]display ospfv3 routing 

从输出信息可以看到IPv4与IPv6的路由已经被路由器学到。

标签: #骨干网接入控制设备