数据中心设备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

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

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

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

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

 

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

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

 

 

 

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

wozuimang

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值