当前位置:首页 > 原创教程 > RouterOS基于EoIP Tunnel实现RIP异地组网

RouterOS基于EoIP Tunnel实现RIP异地组网

原创教程 / 星之宇 / 2023-3-28 19:46 / 浏览:2315 / 评论:0

路由信息协议RIP(Routing Information Protocol)是基于距离矢量算法的路由协议,利用跳数来作为计量标准。在带宽、配置和管理方面要求较低,主要适合于规模较小的网络中。


本文主要介绍通过RouterOS V7的EoIP-Tunnel来实现RIP异地组网。

一、组网准备

1、RouterOS v7.x 2个,这边使用的版本是7.8 (stable)

2、有公网IPv4的外网2个,我这边使用内网环境模拟


二、网络拓扑

地区1:R1路由外网IP:10.0.0.117 绑定域名:r1.77bx.com 内网:10.10.1.1/24 EoIP-Tunnel:10.255.255.1/24

地区2:R2路由外网IP:10.0.0.120 绑定域名:r2.77bx.com 内网:10.10.2.1/24 EoIP-Tunnel:10.255.255.2/24

234-1.png


三、基础配置

1、配置R1和R2上网,这边我就不详细写了,可以看看我以前的教程,已经写的很多了。


四、EoIP配置

1、配置R1和R2的EoIP Tunnel,Interfaces -> Interface -> + -> EoIP Tunnel ,设置Name、Remote Address、IPsec Secret和Allow Fast Path

R1 Name:eoip-tunnel-r1,Remote Address:r2.77bx.com,IPsec Secret:77bx,去掉Allow Fast Path的勾

R2 Name:eoip-tunnel-r2,Remote Address:r1.77bx.com,IPsec Secret:77bx,去掉Allow Fast Path的勾

注意:IPsec Serret设置了必须关闭Allow Fast Path,不设置IPsec Serret可以开启Allow Fast Path。如果路由器性能不够,可以关闭IPsec Secret加密并开启Allow Fast Path,以获取更高的速度。

234-2.png


2、配置R1和R2的EoIP Tunnel IP地址,IP -> Address -> + , 设置Address和Interface

R1 Address:10.255.255.1/24,Network:10.255.255.0,Interface:eoip-tunnel-r1

R2 Address:10.255.255.2/24,Network:10.255.255.0,Interface:eoip-tunnel-r2

234-3.png


以下是EoIP设置的所有操作命令:

[admin@R1] > interface eoip add name=eoip-tunnel-r1 remote-address=r2.77bx.com ipsec-secret=77bx allow-fast-path=no
[admin@R1] > ip address add address=10.255.255.1/24 interface=eoip-tunnel-r1
    
[admin@R2] > interface eoip add name=eoip-tunnel-r2 remote-address=r1.77bx.com ipsec-secret=77bx allow-fast-path=no
[admin@R2] > ip address add address=10.255.255.1/24 interface=eoip-tunnel-r2


五、RIP设置

1、R1和R2的RIP Instance设置。Routing -> RIP -> Instance -> + ,设置Name和Redistribute,其他的默认即可。

R1 Name:rip-instance-r1,Redistribute:connected

R2 Name:rip-instance-r2,Redistribute:connected

234-4.png


2、R1和R2的RIP Interfaces设置。Routing -> RIP -> Intface Templates -> + ,设置Name、Instance和Interfaces,其他的默认即可。

R1 Name:rip-interface-r1,Instance:rip-instance-r1,Interfaces:eoip-tunnel-r1

R2 Name:rip-interface-r2,Instance:rip-instance-r2,Interfaces:eoip-tunnel-r2

234-5.png


3、查看IP Routes看到宣告的网段了。

234-6.png


以下是RIP设置的所有命令

[admin@R1] > routing rip instance add name=rip-instance-r1 redistribute=connected
[admin@R1] > routing rip interface-template add name=rip-interface-r1 instance=rip-instance-r1 interfaces=eoip-tunnel-r1
    
[admin@R2] > routing rip instance add name=rip-instance-r2 redistribute=connected
[admin@R2] > routing rip interface-template add name=rip-interface-r2 instance=rip-instance-r2 interfaces=eoip-tunnel-r2


到此R1和R2已经组网成功,可以相互访问了。

目前有 0 条评论

    • 昵称
    • 邮箱
    • 网址