FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
VinayHM
Staff
Staff
Article Id 326703
Description This article describes how to advertise a single IP in the whole Network statically via BGP.
Scope FortiGate.
Solution

For example, this can happen when advertising 192.168.1.1/32 on BGP statically.

 

Routing table:

 

get router info routing-table details 192.168.1.1

Routing table for VRF=0
Routing entry for 192.168.1.0/24
Known via "static", distance 10, metric 0, best
* vrf 0 192.168.1.254, via port2

 

Command to check the advertised-routes to neighbors:

 

get router info bgp neighbors x.x.x.x advertised-routes


192.168.1.1/32 will not be shown on the advertised routes. Since the active route on routing-table is only 192.168.1.0/24, it shows a /24 network in the BGP advertised routes.

 

Solution:
While advertising a single IP in the whole network, it is necessary to create a separate static route for the IP to have an active route and be advertised in the BGP.

 

In GUI, go to Network -> Static Routes and select 'Create New'.

 

Destination: 192.168.1.1/32.

Gateway Address: 192.168.1.254.

Interface: port2.

Administrative Distance: 10.

Status: Enable.

 

In CLI:

 

config router static

    edit 0

        set dst 192.168.1.1/32

        set gateway 192.168.1.254

        set device port2

        set status enable

    next

end

 

For reference on creating a static route via GUI but in this case, 192.168.1.1/32 will be set as the destination address:

Technical Tip: How to create a static route on FortiGate from the GUI Interface


After creating a static route for the single IP, it will be possible to see the IP information in 'advertised BGP routes'.

Comments
knaveenkumar
Staff
Staff

usefull