华为路由器配置OSPF

OSPF是什么

OSPF(Open Shortest Pass First,开放最短路径优先协议),是一个最常用的内部网管协议,是一个链路状态协议。

使用场景:适用于运营商、政府机构等大型网络中多节点要求互联互通

网络结构:支持两层结构 1骨干区域 2 子区域

 

OSPF基于IP

 

OSPF不属于网络层协议

 

 

PC12 配置好IP信息后启动

 

 

PC13 同样操作配置好IP信息后启动

 

路由设备配置部分

 

 

 

R6  基础环境配置

 

<Huawei>system-view    #切换模式

[Huawei]sysname R6    #给设备起个名字 R6

[R6]display ip interface brief    #查看设备接口信息

[R6]int GigabitEthernet 0/0/0    #进入 GE 0 接口

[R6]ip add 10.0.1.1 24    #配置IP

[R6]q    #退出并返回上一级目录

 

[R6]int GigabitEthernet 0/0/1    

[R6-GigabitEthernet0/0/1]ip add 20.0.2.1 24

[R6-GigabitEthernet0/0/1]

[R6-GigabitEthernet0/0/1]display ip interface brief 

 

 

R8  基础环境配置

 

<Huawei>

 

<Huawei>system-view    #切换模式

 

Enter system view, return user view with Ctrl+Z.

 

[Huawei]

 

[Huawei]sysname R8    #给设备起个名字 R8

 

[R8]

 

[R8]int GigabitEthernet 0/0/0    #进入 GE 0 接口

 

[R8-GigabitEthernet0/0/0]

 

[R8-GigabitEthernet0/0/0]ip add 20.0.2.2 24    #配置IP

 

[R8-GigabitEthernet0/0/0]

 

Mar  6 2019 11:07:24-08:00 R8 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

 

on the interface GigabitEthernet0/0/0 has entered the UP state.

 

[R8-GigabitEthernet0/0/0]

 

[R8-GigabitEthernet0/0/0]int GigabitEthernet 0/0/1    #进入 GE 1 接口

 

[R8-GigabitEthernet0/0/1]

 

[R8-GigabitEthernet0/0/1]ip add 30.0.3.2 24    #配置IP

 

Mar  6 2019 11:08:48-08:00 R8 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP

 

on the interface GigabitEthernet0/0/1 has entered the UP state.

 

[R8-GigabitEthernet0/0/1]q    #退出并返回上一级目录

 

[R8]

 

[R8]interface LoopBack0

 

[R8-LoopBack0]q    #退出并返回上一级目录

 

[R8]

 

[R8]interface LoopBack0    #配置回环口 0

 

[R8-LoopBack0]ip add 6.6.6.6 24    #配置IP

 

[R8-LoopBack0]q    #退出并返回上一级目录

 

[R8]

 

[R8]display ip interface brief    #查看设备接口信息

 

*down: administratively down

 

^down: standby

 

(l): loopback

 

(s): spoofing

 

The number of interface that is UP in Physical is 4

 

The number of interface that is DOWN in Physical is 0

 

The number of interface that is UP in Protocol is 4

 

The number of interface that is DOWN in Protocol is 0

 

 

 

Interface                         IP Address/Mask      Physical   Protocol  

 

GigabitEthernet0/0/0              20.0.2.2/24          up         up        

 

GigabitEthernet0/0/1              30.0.3.2/24          up         up        

 

LoopBack0                         6.6.6.6/24           up         up(s)     

 

NULL0                             unassigned           up         up(s)    

 

 

 

 

R9  基础环境配置

 

 

<Huawei>SY

<Huawei>system-view

Enter system view, return user view with Ctrl+Z.

[Huawei]

[Huawei]SY

[Huawei]sysname R9

[R9]

[R9]int

[R9]interface  gi

[R9]interface  GigabitEthernet 0/0/0

[R9-GigabitEthernet0/0/0]ip add 30.0.3.3 24

[R9-GigabitEthernet0/0/0]

Mar  6 2019 11:20:22-08:00 R9 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

on the interface GigabitEthernet0/0/0 has entered the UP state.

[R9-GigabitEthernet0/0/0]interface  GigabitEthernet 0/0/1

[R9-GigabitEthernet0/0/1]ip add 60.0.6.3 24

Mar  6 2019 11:20:55-08:00 R9 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP

on the interface GigabitEthernet0/0/1 has entered the UP state.

[R9-GigabitEthernet0/0/1]q

[R9]

[R9]display ip interface brief

*down: administratively down

^down: standby

(l): loopback

(s): spoofing

The number of interface that is UP in Physical is 3

The number of interface that is DOWN in Physical is 0

The number of interface that is UP in Protocol is 3

The number of interface that is DOWN in Protocol is 0

 

Interface                         IP Address/Mask      Physical   Protocol  

GigabitEthernet0/0/0              30.0.3.3/24          up         up        

GigabitEthernet0/0/1              60.0.6.3/24          up         up        

NULL0                             unassigned           up         up(s)     

[R9]

[R9]

 

OSPF配置部分

 

R6  配置OSPF

 

R8  配置OSPF

<R8>system-view    #切换模式

Enter system view, return user view with Ctrl+Z.

[R8]

[R8]ospf 2    #创建OSPF线程2

[R8-ospf-2]area 6    #创建区域 6

[R8-ospf-2-area-0.0.0.6]network 20.0.2.0 255.255.255.0    #宣告网段

[R8-ospf-2-area-0.0.0.6]network 30.0.3.0 255.255.255.0    #宣告网段

[R8-ospf-2-area-0.0.0.6]network 6.6.6.6 255.255.255.0    #宣告网段

[R8-ospf-2-area-0.0.0.6]q    #退出并返回上一级目录

[R8-ospf-2]

[R8-ospf-2]display this    #查看设备接口信息

[V200R003C00]

#

ospf 2

 area 0.0.0.6

  network 6.6.6.0 0.0.0.255

  network 20.0.2.0 0.0.0.255

  network 30.0.3.0 0.0.0.255

#

return

[R8-ospf-2]

 

 

R9  配置OSPF

 

转载于:https://www.cnblogs.com/Ryan2019/p/10524930.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值