HCIP OSPF实验

任务:

1.使用三种解决ospf不规则区域的方法

2.路由器5、6、7、8、15使用mgre

3.使用各种优化

4.全网可达

5.保证更新安全

6.使用地址为172.16.0.0/16合理划分

7.每个路由器都有环回

拓扑图&IP划分如下:

第一步,配置IP&环回地址

以R1为例,R2~R15同理

cpp 复制代码
interface LoopBack 0               //进入环回接口
ip address 1.1.1.1 32              //配置环回地址
interface GigabitEthernet 0/0/0    //进入G0/0/0接口
ip address 192.168.1.1 24          //配置G0/0/0IP地址

第二步,配置OSPF

配置OSPF1

以R1为例,R2&R3同理

cpp 复制代码
ospf 1 router-id 1.1.1.1           //开启OSPF1,并输入id号
area 0                             //选择区域0
network 0.0.0.0 255.255.255.255    //全宣

R3

cpp 复制代码
ip route-static 0.0.0.0 0 34.1.1.2    //使缺省指向运营商
ospf 1
default-route-advertise               //下放缺省
acl 2000
rule permit source any
interface GigabitEthernet 0/0/1
nat outbound 2000                     //配置NAT,使R1~R2可以与运营商连通

R1ping isp环回

配置OSPF2

以R7为例,R5&R6&R8~R15同理,注意区分区域

cpp 复制代码
ospf 2 router-id 7.7.7.7        //开启OSPF2,并输入id号
area 0                          //选择区域0
network 172.16.16.1 0.0.0.0
network 7.7.7.7 0.0.0.0         //精准宣告
quit
area 4                          //选择区域4
network 172.16.128.1 0.0.0.0    //精准宣告

第三步,配置MGRE

R5

cpp 复制代码
interface Tunnel 0/0/0                       //进入Tunnel接口
tunnel-protocol gre p2mp                     //更改连接方式为p2mp
source 172.16.0.1                            //定义源地址
nhrp entry multicast dynamic
nhrp network-id 100
ip address 10.1.1.1 24
ospf 2
area 0
network 10.1.1.1 0.0.0.0                     //宣告
ip route-static 172.16.8.0 21 172.16.0.2
ip route-static 172.16.16.0 21 172.16.0.2
ip route-static 172.16.24.0 21 172.16.0.2    //写静态,引流
ospf network-type broadcast

R6,R7&R8同理

cpp 复制代码
interface Tunnel 0/0/0
tunnel-protocol gre p2mp
source 172.16.8.1
nhrp network-id 100
nhrp entry 10.1.1.1 172.16.0.1 reg
ip address 10.1.1.2 24
ospf 2
area 0
network 10.1.1.2 0.0.0.0
ip route-static 172.16.8.0 21 172.16.0.2
ip route-static 172.16.16.0 21 172.16.0.2
ip route-static 172.16.24.0 21 172.16.0.2
ospf network-type broadcast

R8pingR7

对R12进行双向重发布

R12

对R7&R13进行虚拟链路

对R3&R5进行隧道

R3,R5同理

测试

相关推荐
Me4神秘9 小时前
电信、移动、联通、广电跨运营商网速慢原因
网络
数通Dinner10 小时前
RSTP 拓扑收敛机制
网络·网络协议·tcp/ip·算法·信息与通信
liulilittle12 小时前
SNIProxy 轻量级匿名CDN代理架构与实现
开发语言·网络·c++·网关·架构·cdn·通信
tan77º12 小时前
【Linux网络编程】Socket - UDP
linux·服务器·网络·c++·udp
小白爱电脑13 小时前
光纤的最小弯曲半径是多少?
网络
花落已飘14 小时前
多线程 vs 异步
linux·网络·系统架构
qq_1715388516 小时前
TCP/IP协议精解:IP协议——互联网世界的邮政编码系统
网络·网络协议·tcp/ip
珹洺17 小时前
计算机网络:(七)网络层(上)网络层中重要的概念与网际协议 IP
网络·tcp/ip·计算机网络
兮动人17 小时前
获取终端外网IP地址
java·网络·网络协议·tcp/ip·获取终端外网ip地址
怦然星动_17 小时前
eNSP中实现vlan间路由通信(路由器)
网络·智能路由器