首页 > 其他分享 >思科与华为设备OSPF配置命令对比

思科与华为设备OSPF配置命令对比

时间:2022-10-10 20:34:34浏览次数:53  
标签:思科 area ospf Huawei 华为 Cisco config OSPF

思科与华为设备OSPF配置命令对比

[Huawei]ospf 1 //启动OSPF进程,进入OSPF视图

Cisco(config)#router ospf 110

[Huawei]ospf 1 router-id 10.1.1.1 //启动OSPF进程,进入OSPF视图,手动输入router-id

Cisco(config-router)#router-id 1.1.1.1

[Huawei-ospf-1]area 0 //创建并进入OSPF区域视图(骨干区域)

[Huawei-ospf-1-area-0.0.0.0]network 10.0.1.0 0.0.0.255 //配置区域所包含的网段

[Huawei-GigabitEthernet0/0/1]ospf enable 1 area 0 //在接口上使能OSPF

Cisco(config-router)#network 20.1.1.0 0.0.0.255 area 0

[Huawei-ospf-1-area-0.0.0.0]vlink-peer 10.1.1.2 //创建并配置虚连接,在虚连接的另一端也需要配置此命令

Cisco(config-router)#area 2 virtual-link 3.3.3.3  //配置虚链路

[Huawei]display ospf peer //查看OSPF邻居的信息

Cisco#show ip ospf neighbor

[Huawei]display ospf interface //查看OSPF接口的信息

Cisco#show ip ospf interface

[Huawei]display ospf lsdb //查看OSPF的LSDB信息

Cisco#show ip ospf database  //查看LSDB摘要信息

[Huawei-GigabitEthernet0/0/1]ospf network-type broadcast //配置OSPF接口的网络类型,缺省以太网接口的网络类型为广播

[Huawei-GigabitEthernet0/0/1]ospf network-type nbma

[Huawei-GigabitEthernet0/0/1]ospf network-type p2mp

[Huawei-GigabitEthernet0/0/1]ospf network-type p2p

Cisco(config-if)#ip ospf network broadcast  //修改接口的网络类型

Cisco(config-if)#ip ospf network non-broadcast  

Cisco(config-if)#ip ospf network point-to-multipoint

[Huawei]display ospf routing router-id 10.0.1.1 //查看OSPF的路由表信息

Cisco#show ip route ospf  //查看学习到的OSPF路由

[Huawei-ospf-1-area-0.0.0.1]stub //配置当前区域为STUB区域

Cisco(config-router)#area 1 stub  //配置stub区域

[Huawei-ospf-1-area-0.0.0.1]stub no-summary //配置当前区域为STUB区域, 禁止ABR向Stub区域内发送Type-3 LSA(Summary LSA)

Cisco(config-router)#area 1 stub no-summary  //配置完全stub区域

[Huawei-ospf-1-area-0.0.0.1]stub -default-cost 1 //配置发送到Stub区域缺省路由的开销,缺省值为1

Cisco(config-router)#area 1 default-cost 2  //修改下发的默认三类LSA的cost为2,默认为1

[Huawei-ospf-1-area-0.0.0.2]nssa //配置当前区域为NSSA区域

Cisco(config-router)#area 1 nssa  //配置nssa区域

[Huawei-ospf-1-area-0.0.0.2]nssa default-route-advertise //在ASBR上配置产生缺省的Type7 LSA到NSSA区域

Cisco(config-router)#area 1 nssa default-information-originate  //在NSSA区域的ABR上手工下发默认路由

[Huawei-ospf-1-area-0.0.0.2]nssa no-summary //禁止ABR向NSSA区域内发送Summary LSA(Type3 LSA)

Cisco(config-router)#area 1 nssa no-summary  //配置完全nssa区域

[Huawei-GigabitEthernet0/0/1]ospf cost 1 //设置OSPF接口的开销值

Cisco(config-if)#ip ospf cost 100  //修改接口cost值

[Huawei-ospf-1]bandwidth-reference 100 //配置带宽参考值

Cisco(config-if)#bandwidth 1000000  //修改参考带宽

[Huawei-ospf-1]default-route-advertise //将缺省路由通告到OSPF路由区域

Cisco(config-router)#default-information originate  //在OSPF中注入默认路由

[Huawei-ospf-1]default-route-advertise always //无论本机是否存在激活的非本OSPF进程的缺省路由,都会产生并发布一个描述缺省路由的LSA

Cisco(config-router)#default-information originate always  //不论有没有静态默认路由,都向OSPF中注入默认路由

[Huawei-ospf-1-area-0.0.0.0]abr-summary 10.1.1.0 255.255.0.0 //配置OSPF的ABR路由聚合

Cisco(config-router)#area 1 range 172.16.0.0 255.255.0.0

[Huawei-ospf-1]asbr-summary 10.1.1.0 255.255.0.0 //配置OSPF的ASBR路由聚合

Cisco(config-router)#summary-address 10.1.0.0 255.255.0.0  //在ASBR上对外部路由进行汇总

[Huawei-GigabitEthernet0/0/1]ospf timer hello 10 //配置接口发送Hello报文的时间间隔。缺省,P2P、Broadcast类型接口发送Hello报文的时间间隔的值为10秒;P2MP、NBMA类型接口发送Hello报文的时间间隔的值为30秒;且同一接口上邻居失效时间是Hello间隔时间的4倍

Cisco(config-if)#ip ospf hello-interval 10  //修改hello间隔时间,死亡时间随之改变(4倍)

[Huawei-ospf-1]preference 10 //配置OSPF协议的优先级, 缺省为10

Cisco(config-if)#ip ospf priority 1

[Huawei-ospf-1]silent-interface all //禁止OSPF接口发送和接收协议报文, 只对本进程已经使能的接口起作用,对其它进程的接口不起作用

Cisco(config-router)#passive-interface default  //把所有接口变为被动接口

[Huawei-ospf-1-area-0.0.0.0]authentication-mode simple cipher abc@123 //配置OSPF区域的验证模式(简单验证)

Cisco(config-if)#ip ospf authentication-key abc123  //配置OSPF认证密码

Cisco(config-router)#area 0 authentication  //启用OSPF区域认证

[Huawei-ospf-1-area-0.0.0.0]authentication-mode hmac-md5 //配置OSPF区域的验证密文模式

Cisco(config-if)#ip ospf message-digest-key 1 md5 abc123  //配置OSPF密文认证密码

Cisco(config-router)#area 0 authentication message-digest  //启用OSPF区域的密文认证

[Huawei-GigabitEthernet0/0/1]ospf authentication-mode simple cipher abc@123 //配置OSPF接口的验证模式(简单验证)

Cisco(config-if)#ip ospf authentication-key abc123  //配置OSPF认证密码

Cisco(config-if)#ip ospf authentication  //启用OSPF接口认证

[Huawei-GigabitEthernet0/0/1]ospf authentication-mode hmac-md5 //配置OSPF接口的验证密文模式

Cisco(config-if)#ip ospf message-digest-key 1 md5 abc123  //配置OSPF密文认证密码

Cisco(config-if)#ip ospf authentication message-digest  //启用OSPF接口密文认证

reset ospf process //重启OSPF进程

Cisco#clear ip ospf process  //清理OSPF进程

标签:思科,area,ospf,Huawei,华为,Cisco,config,OSPF
From: https://blog.51cto.com/u_13699905/5745229

相关文章

  • 思科设备OSPF配置命令
    Cisco(config)#routerospf110 Cisco(config-router)#router-id1.1.1.1 Cisco(config-router)#network20.1.1.00.0.0.255area0Cisco#showipospfneighborCis......
  • 华为设备访问控制基本命令
    配置基本的访问控制表acl2000创建一个编号型ACL,基本ACL的范围是2000~29999rule5permitsource1.1.1.10指定规则ID为5,允许数据源地址为1.1.1.1的报文通过,反掩码全......
  • 华为路由器DHCP配置基本命令
    配置基于接口地址池DHCP(动态主机配置协议)[R1]dhcpenable路由器上开启DHCP[R1]intg0/0/0[R1-GigabitEthernet0/0/0]dhcpselectinterface开启接口DHCP功能[R1-Gig......
  • 华为路由器NAT基本配置命令
    NAT地址转换静态[R1]intg0/0/0[R1-GigabitEthernet0/0/0]natstaticglobal202.169.10.5inside172.16.1.1静态地址转换[R1]displaynatstatic查看Nat静态配置信......
  • 华为路由器vrrp(虚拟路由器冗余协议)基本配置命令
    vrrp(虚拟路由器冗余协议)基本配置intg0/0/0vrrpvrid1virtual-ip172.16.1.254创建VRRP备份组,备份组号为1,配置虚拟IP为172.16.1.254vrrpvrid1priority120修改......
  • 华为交换机配置聚合链路常用命令
    配置Eth-Trunk1聚合链路interfaceEth-Trunk1创建Eth-Trunk1接口modemanualload-balance指定为手工负载分担模式intg0/0/1进入接口eth-trunk1将接口g0/0......
  • 华为路由器配置静态路由命令
    配置静态路由命令iproute-static目标网络子网掩码/前缀下一跳/出接口配置浮动静态路由实现路由备份(网络冗余)iproute-static192.168.20.02410.0.12.2preference......
  • 华为交换机STP常用命令
    STP配置和选路规则stpenable在交换机上启用STPstpmodestpdisstp查看stp配置disstpbrief查看接口摘要信息stppriority4096修改交换机优先级为4096stpro......
  • 华为交换机GVRP基础配置
    GVRP基础配置intG0/0/1portlink-typetrunk配置接口类型为trunkporttrunkallow-passvlanall允许所有VLAN通过inte0/0/1portlink-typeaccess配置接口类型......
  • 华为设备配置telnet远程登陆命令
    user-interfacevty04进入0~4前五个的VTY用户界面进行整体配置authentication-modepassword设置验证方式为密码userprivilegelevel3设置用户登陆级别aaa进入a......