一、拓扑

 

数据中心设备N9K实现OSPF基本配置全网互通

二、需求及配置

配置OSPF实现DC1下面的N9K可以学到DC2下面N9K环回口路由反之亦然!

1、OSPF配置:

DC1配置:

interface Ethernet0/1

ip address 10.1.12.1 255.255.255.252

ip ospf 1 area 0

interface Ethernet0/0

ip address 20.1.1.2 255.255.255.252

ip ospf 1 area 0

DC2配置:

DC2#show run int e 0/0

interface Ethernet0/0

ip address 30.1.1.2 255.255.255.252

ip ospf 1 area 0

interface Ethernet0/2

ip address 10.1.23.2 255.255.255.252

ip ospf 1 area 0

duplex auto

SP配置:

SP#show run | s r ospf

router ospf 1

interface Ethernet0/1

ip address 10.1.12.2 255.255.255.252

ip ospf 1 area 0

interface Ethernet0/2

ip address 10.1

.23.1 255.255.255.252

ip ospf 1 area 0

数据中心N9K设备(NXOS1)配置:

feature ospf //开启OSPF功能

switch(config)# router ospf 1

//进入OSPF进程1

switch(config-router)# router-id 1.1.1.1 //配置RID

interface Ethernet1/1

no switchport

ip address 20.1.1.1/30

ip router ospf 1 area 0.0.0.0 //接口发布进OPSF区域0

no shutdown

数据中心N9K设备(NXOS2)配置:

switch(config)# feature ospf

switch(config)# router ospf 1

switch(config-router)# router-id 2.2.2.2

switch(config)# int e 1/1

switch(config-if)# no switchport

switch(config-if)# ip address 30.1.1.1 255.255.255.252

switch(config-if)# ip router ospf 1 area 0

三、验证OSPF邻居关系

1、SP:

SP#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface

30.1.1.1 1 FULL/BDR 00:00:32 10.1.23.2 Ethernet0/2

20.1.1.2 1 FULL/BDR 00:00:37 10.1.12.1 Ethernet0/1

2、N9K1(NXOS1)

switch# show ip ospf neighbors

OSPF Process ID 1 VRF default

Total number of neighbors: 1

Neighbor ID Pri State Up Time Address Interface

20.1.1.2 1 FULL/DR 00:09:00 20.1.1.2 Eth1/1

数据中心设备N9K实现OSPF基本配置全网互通

3、N9K2(NXOS2)

switch# show ip ospf neighbors

OSPF Process ID 1 VRF default

Total number of neighbors: 1

Neighbor ID Pri State Up Time Address Interface

30.1.1.1 1 FULL/DR 00:03:51 30.1.1.2 Eth1/1

数据中心设备N9K实现OSPF基本配置全网互通

4、查看N9K设备互相学到对端路由

N9K1(NXOS1)设备学到对端2.2.2.2的路由:

数据中心设备N9K实现OSPF基本配置全网互通

N9K2(NXOS2)设备学到对端1.1.1.1的路由:

数据中心设备N9K实现OSPF基本配置全网互通

 

每天关注的前10名小伙伴关注分享该WX Gongzhonghao: 

 华亿网络实验室 或   huayinetwork 进行资料下载

 

数据中心设备N9K实现OSPF基本配置全网互通

 

 

 

相关文章: