Basic RIP example

In this example, a medium-sized network is configured using RIPv2.

  • Two core routers, RIP Router2 and RIP Router3, connect to the ISP router for two redundant paths to the internet.

  • Two other routers, RIP Router1 and RIP Router4, connect to the two core routers and to different local networks.

  • The ISP router is using RIP for its connections to the core routers, and redistributes its default route to the network - that is, default route injection is enabled.

  • The ISP router uses NAT and has a static route to the internet. None of the other routers use NAT or static routes.

All of the FortiGate routers are configured as shown, using netmask 255.255.255.0. Firewall policies have been configured to allow the required traffic to flow across the interfaces.

Router

Interface

Interface name

IP address

Router1

port1

LoSales

10.11.101.101

port2

vd12link0

10.11.201.101

port3

vd13link0

10.11.202.101

Router2

port1

vd23link0

10.12.101.102

port2

vd12link1

10.11.201.102

port3

vd42link1

10.14.201.102

port4

vdr2link1

172.20.120.102

Router3

port1

vd23link1

10.12.101.103

port2

vd13link1

10.11.202.103

port3

vd43link1

10.14.202.103

port4

vdr3link1

172.20.121.103

Router4

port1

LoAccounting

10.14.101.104

port2

vd42link0

10.14.201.104

port3

vd43link0

10.14.202.104

ISP Router

port1

port1

To internet

port2

vdr2link0

172.20.120.5

port3

vdr3link0

172.20.121.5

After configuring each router, you can check the status of the connections by viewing the RIP database, RIP interfaces, and routing table. See Verifying the configuration.

After the network is configured, you can test it to ensure that when network events occur, such as a downed link, routing updates are triggered and converge as expected. See Testing the configuration and routing changes.

ISP router

To configure the ISP Router in the GUI:
  1. Go to Network > RIP.

  2. Set the Version to 2.

  3. Under Networks, add two networks:

    • 172.20.120.0/255.255.255.0

    • 172.20.121.0/255.255.255.0

  4. Add the interfaces:

    1. In the Interfaces table, click Create New.

    2. Set Interface to port2.

    3. Leave the remaining settings as their default values.

    4. Click OK.

    5. Repeat these steps for port3.

  5. Under Advanced Options, enable Inject Default Route.

    This setting allows the ISP router to share its default 0.0.0.0 routes with other routers in the RIP network.

  6. Click Apply.

To configure the ISP Router in the CLI:
config router rip
    set default-information-originate enable
    config network
        edit 1
            set prefix 172.20.121.0 255.255.255.0
        next
        edit 2
            set prefix 172.20.120.0 255.255.255.0
        next
    end
    config interface
        edit "port2"
            set receive-version 2
            set send-version 2
        next
        edit "port3"
            set receive-version 2
            set send-version 2
        next
    end
end

Router2 and Router3

Router2 and Router3 RIP configurations have different IP addresses, but are otherwise the same.

To configure Router2 and Router3 in the GUI:
  1. Go to Network > RIP.

  2. Set the Version to 2.

  3. Under Networks, add the IP addresses for each port:

    Router2

    10.12.101.0/255.255.255.0

    10.11.201.0/255.255.255.0

    10.14.201.0/255.255.255.0

    172.20.120.0/255.255.255.0

    Router3

    10.12.101.0/255.255.255.0

    10.11.202.0/255.255.255.0

    10.14.202.0/255.255.255.0

    172.20.121.0/255.255.255.0

  4. Add the interfaces:

    1. In the Interfaces table, click Create New.

    2. Set Interface to port1.

    3. Leave the remaining settings as their default values.

    4. Click OK.

    5. Repeat these steps for port2, port3, and port4.

  5. Click Apply.

To configure Router2 in the CLI:
config router rip
    config network
        edit 1
            set prefix 10.12.101.0 255.255.255.0
        next
        edit 2
            set prefix 10.11.201.0 255.255.255.0
        next
        edit 3
            set prefix 10.14.201.0 255.255.255.0
        next
        edit 4
            set prefix 172.20.120.0 255.255.255.0
        next
    end
    config interface
        edit "port1"
            set receive-version 2
            set send-version 2
        next
        edit "port2"
            set receive-version 2
            set send-version 2
        next
        edit "port3"
            set receive-version 2
            set send-version 2
        next
        edit "port4"
            set receive-version 2
            set send-version 2
        next
    end
end
To configure Router3 in the CLI:
config router rip
    config network
        edit 1
            set prefix 10.12.101.0 255.255.255.0
        next
        edit 2
            set prefix 10.11.202.0 255.255.255.0
        next
        edit 3
            set prefix 10.14.202.0 255.255.255.0
        next
        edit 4
            set prefix 172.20.121.0 255.255.255.0
        next
    end
    config interface
        edit "port1"
            set receive-version 2
            set send-version 2
        next
        edit "port2"
            set receive-version 2
            set send-version 2
        next
        edit "port3"
            set receive-version 2
            set send-version 2
        next
        edit "port4"
            set receive-version 2
            set send-version 2
        next
    end
end

Router1 and Router4

Router1 and Router4 RIP configurations have different IP addresses, but are otherwise the same.

To configure Router1 and Router4 in the GUI:
  1. Go to Network > RIP.

  2. Set the Version to 2.

  3. Under Networks, add the IP addresses for each port:

    Router1

    10.11.101.0/255.255.255.0

    10.11.201.0/255.255.255.0