FortiGate CLI配置RIP和Cisco/H3C/华为都不太一样,希望此文对大家有帮助!

实验使用的FortiGate使用的是80E和60E,对接设备为Cisco 4331。

注:本文只写出ForGate端的配置命令。


拓扑图

目的:

ForGate和Cisco建立RIP连接关系,动态学习路由。相关的IP信息如拓扑图所示。


配置思路:

1.宣告网段

2.将接口加入RIP进程下

3.将静态路由重分发进RIP


命令行配置:

1.宣告网段:

config router rip

   config network

       edit 1

           set prefix 134.118.19.0 255.255.255.0

       next

   end

 

2.将接口加入RIP进程下:

   config interface

       edit "internal1"

           set receive-version 1 2 //接收RIP version 1和version 2更新

           set send-version 1 2 //发送RIP version 1和version 2更新

       next

   end

 

3.将静态路由重分发进RIP:

   config redistribute "static"

       set status enable

   end

此时配置结束。

注:敲完 next或end 配置就会保存。


验证效果:

1.4.1查看RIP database

NPTJ-Firewall # get router info ripdatabase

 

Codes: R - RIP, Rc - RIP connected, Rs -RIP static, K - Kernel,

      C - Connected, S - Static, O - OSPF, I - IS-IS, B - BGP

 

  Network            Next Hop         Metric From            If     Time

R 10.0.0.0/8        134.118.19.1          2134.118.19.1    internal1 02:37

R 134.0.0.0/8       134.118.19.1          2134.118.19.1    internal1 02:37

R 134.111.0.0/16    134.118.19.1          2134.118.19.1    internal1 02:37

R 134.118.0.0/16     134.118.19.1          2 134.118.19.1    internal1 02:37

R 134.118.15.0/24   134.118.19.252        2134.118.19.252  internal1 02:49

R 134.118.16.0/24   134.118.19.252        2134.118.19.252  internal1 02:49

R 134.118.17.0/24   134.118.19.252        2134.118.19.252  internal1 02:49

Rc 134.118.19.0/24                          1                 internal1

R 134.118.22.0/24   134.118.19.252        2134.118.19.252  internal1 02:49

R 134.118.30.0/23   134.118.19.252        2134.118.19.252  internal1 02:49

R 134.118.32.0/23   134.118.19.252        2134.118.19.252  internal1 02:49

R 134.118.34.0/24   134.118.19.252        2134.118.19.252  internal1 02:49

R 134.118.35.0/24   134.118.19.252        2134.118.19.252  internal1 02:49

R 134.118.36.0/23   134.118.19.252        2134.118.19.252  internal1 02:49

R 134.118.40.0/22   134.118.19.252        2134.118.19.252  internal1 02:49

R 134.118.50.0/24   134.118.19.252        2134.118.19.252  internal1 02:49

R 134.118.70.0/24   134.118.19.252        2 134.118.19.252  internal1 02:49

R 134.118.80.0/24   134.118.19.252        2134.118.19.252  internal1 02:49

R 134.118.90.0/24   134.118.19.252        2134.118.19.252  internal1 02:49

R 134.118.100.0/24  134.118.19.252        2134.118.19.252  internal1 02:49

R 134.118.106.0/24  134.118.19.252        2134.118.19.252  internal1 02:49

R 134.118.110.0/24  134.118.19.252        2134.118.19.252  internal1 02:49

R 134.118.111.0/24  134.118.19.252        2134.118.19.252  internal1 02:49

R  134.118.112.0/24   134.118.19.252        2 134.118.19.252  internal1 02:49

R 134.118.113.0/24  134.118.19.252        2134.118.19.252  internal1 02:49

R 134.118.114.0/24  134.118.19.252        2134.118.19.252  internal1 02:49

R 134.118.115.0/24  134.118.19.252        2134.118.19.252  internal1 02:49

R 134.118.118.0/24  134.118.19.252        2134.118.19.252  internal1 02:49

R 134.118.121.0/24  134.118.19.252        2134.118.19.252  internal1 02:49

R 134.119.0.0/16     134.118.19.1          2 134.118.19.1    internal1 02:37

R 134.120.0.0/16    134.118.19.1          2134.118.19.1    internal1 02:37

R 134.121.0.0/16    134.118.19.1          2134.118.19.1    internal1 02:37

R 134.124.0.0/16    134.118.19.1          2134.118.19.1    internal1 02:37

R 134.125.0.0/16    134.118.19.1          2134.118.19.1    internal1 02:37

R 134.127.0.0/16    134.118.19.1          2134.118.19.1    internal1 02:37

R 134.128.0.0/16    134.118.19.1          2134.118.19.1    internal1 02:37

R 134.129.0.0/16    134.118.19.1          2134.118.19.1    internal1 02:37

R 134.132.0.0/16    134.118.19.1          2134.118.19.1    internal1 02:37

R 134.133.0.0/16    134.118.19.1          2134.118.19.1    internal1 02:37

R 134.134.0.0/16    134.118.19.1          2134.118.19.1    internal1 02:37

R 172.16.0.0/16     134.118.19.1          2134.118.19.1    internal1 02:37

R 172.17.0.0/16     134.118.19.1          2134.118.19.1    internal1 02:37

R 192.168.2.0/30     134.118.19.1          2 134.118.19.1    internal1 02:37

R 192.168.3.0/30    134.118.19.1          2134.118.19.1    internal1 02:37

R 192.168.4.0/30    134.118.19.1          2134.118.19.1    internal1 02:37

R 192.168.15.0/24   134.118.19.1          2 134.118.19.1    internal1 02:37

R 192.168.20.0/30   134.118.19.1          2134.118.19.1    internal1 02:37

R 192.168.22.0/30   134.118.19.1          2134.118.19.1    internal1 02:37

R 192.168.53.0/30   134.118.19.1          2134.118.19.1    internal1 02:37

R 192.168.58.0/30   134.118.19.1          2134.118.19.1    internal1 02:37

R 192.168.60.0/30   134.118.19.1          2134.118.19.1    internal1 02:37

R 192.168.200.0/24  134.118.19.1          2134.118.19.1    internal1 02:37

 

1.4.2查看通过RIP学习到的路由

NPTJ-Firewall # get router inforouting-table rip

R      10.0.0.0/8 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      134.0.0.0/8 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      134.111.0.0/16 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      134.118.0.0/16 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      134.118.15.0/24 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.16.0/24 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.17.0/24 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.22.0/24 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.30.0/23 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.32.0/23 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.34.0/24 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.35.0/24 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.36.0/23 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.40.0/22 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.50.0/24 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.70.0/24 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.80.0/24 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.90.0/24 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.100.0/24 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.106.0/24 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.110.0/24 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.111.0/24 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.112.0/24 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.113.0/24 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.114.0/24 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.115.0/24 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.118.0/24 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.118.121.0/24 [120/2] via 134.118.19.252, internal1, 1d18h51m

R      134.119.0.0/16 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      134.120.0.0/16 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      134.121.0.0/16 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      134.124.0.0/16 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      134.125.0.0/16 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      134.127.0.0/16 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      134.128.0.0/16 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      134.129.0.0/16 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      134.132.0.0/16 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      134.133.0.0/16 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      134.134.0.0/16 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      172.16.0.0/16 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      172.17.0.0/16 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      192.168.2.0/30 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      192.168.3.0/30 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      192.168.4.0/30 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      192.168.15.0/24 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      192.168.20.0/30 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      192.168.22.0/30 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      192.168.53.0/30 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      192.168.58.0/30 [120/2] via 134.118.19.1, internal1, 1d18h51m

R      192.168.60.0/30 [120/2] via 134.118.19.1, internal1, 1d18h51m


成功建立邻接关系,也学习到了路由,配置成功!