当前位置: 代码迷 >> 综合 >> OSPF+静态路由,按需求做实验
  详细解决方案

OSPF+静态路由,按需求做实验

热度:24   发布时间:2024-02-01 00:27:04.0

示例图

一.实验目的

1.完成上述要求

二.注意事项

1.OSPF协议的cost=带宽开销值100M/带宽,不足1的值取1

三.简单配置

AR1

sysname AR1
#
interface GigabitEthernet0/0/0ip address 10.0.13.1 255.255.255.0 
#
interface GigabitEthernet0/0/1ip address 10.0.12.1 255.255.255.0 ospf timer hello 15    配置Hello报文的间隔时间,默认为10
#
interface LoopBack1ip address 10.0.1.1 255.255.255.255 
#
ospf 1 router-id 10.0.1.1 bandwidth-reference 10000       修改默认开销值area 0.0.0.0 authentication-mode md5 1 cipher huawei   配置区域认证network 10.0.1.1 0.0.0.0 network 10.0.12.0 0.0.0.255 network 10.0.13.0 0.0.0.255 
#
return

AR2

sysname AR2
#
interface GigabitEthernet0/0/0ip address 100.0.24.2 255.255.255.0 
#
interface GigabitEthernet0/0/1ip address 10.0.12.2 255.255.255.0 ospf timer hello 15
#
interface LoopBack1ip address 10.0.2.2 255.255.255.255 
#
ospf 1 router-id 10.0.2.2 default-route-advertise     引入缺省路由,并发布出去bandwidth-reference 10000area 0.0.0.0 authentication-mode md5 1 cipher huaweinetwork 10.0.2.2 0.0.0.0 network 10.0.12.0 0.0.0.255 
#
ip route-static 0.0.0.0 0.0.0.0 100.0.24.4
#
return

AR3

sysname AR3
#
interface GigabitEthernet0/0/0ip address 10.0.13.3 255.255.255.0 
#
interface GigabitEthernet0/0/1ip address 10.0.10.254 255.255.255.0 
#
interface LoopBack1ip address 10.0.3.3 255.255.255.0 ospf network-type broadcast
#
ospf 1 router-id 10.0.3.3 bandwidth-reference 10000area 0.0.0.0 authentication-mode md5 1 cipher huaweinetwork 10.0.3.3 0.0.0.0 network 10.0.10.0 0.0.0.255 network 10.0.13.0 0.0.0.255 
#
return

R4-ISP

sysname R4-ISP
#
interface GigabitEthernet0/0/0ip address 100.0.24.4 255.255.255.0 
#
interface LoopBack1ip address 100.1.1.1 255.255.255.255 
#
interface LoopBack2ip address 100.1.1.2 255.255.255.255 
#
interface LoopBack3ip address 100.1.1.3 255.255.255.255 
#
ip route-static 10.0.10.0 255.255.255.0 100.0.24.2
#
return