BGP Configuration on FortiGate Firewall: Step-by-Step

 

BGP Configuration on FortiGate Firewall: Step-by-Step Blog

 

 

Border Gateway Protocol (BGP) is essential for dynamic routing between multiple networks and ISPs. Configuring BGP on a FortiGate 600F firewall is straightforward, and troubleshooting is simple if you know the correct steps. Here’s a clear guide to configuring BGP with practical troubleshooting tips. Screenshots cannot be provided directly, but GUI navigation steps substitute for visuals.


1. Initial Steps: Access the BGP Setup

  • Login to your FortiGate 600F's web GUI.
  • Navigate to Network > BGP.




2. Basic BGP Configuration: Core Settings

  • Local AS: Set your autonomous system number (e.g., 65001).
  • Router ID: Use a unique IP for identification (typically an interface IP, e.g., 10.0.1.1).

Example:

  • Local AS: 65001
  • Router ID: 10.0.1.1



3. Configuring BGP Neighbors

You need to define neighbors with whom you will share routes.

  • Click Create New in the Neighbors section.
  • Enter the neighbor’s IP address (the remote peer).
  • Set Remote AS (the peer’s AS number).
  • Enable Soft reconfiguration and route refresh for dynamic updates.

Example Neighbor Settings:

  • IP: 10.10.10.1
  • Remote AS: 65001
  • Soft reconfiguration: Enabled
  • Capability: Route refresh: Enabled

Repeat these steps if you have multiple neighbors or interfaces.



4. Advertising Networks

  • In the Networks section, add the subnets you want to advertise.
  • For instance:
    • IP/Netmask: 10.0.1.0/24



5. Advanced BGP Settings (Optional)

  • Keepalive: Set to 5 seconds.
  • Holdtime: Set to 15 seconds.
  • Enable options like IBGP multipath if you want to use path redundancy or load balancing.



6. Apply and Save

After all settings are done, click Apply.




CLI Configuration Snippet

For those comfortable with CLI, here’s an example:

bash

config router bgp

    set as 65001

    set router-id 10.0.1.1

    config neighbor

        edit "10.10.10.1"

            set remote-as 65001

            set soft-reconfiguration enable

            set capability route-refresh enable

        next

    end

    config network

        edit 1

            set prefix 10.0.1.0 255.255.255.0

        next

    end

end



7. Troubleshooting: Common Issues & Solutions

If BGP is not forming a neighbor relationship or routes aren't exchanged, follow these logical debugging steps:



A. Verify Connectivity

  • Ensure basic network connectivity (ping neighbor IPs).

B. Check BGP Status

  • Go to Network > BGP > Neighbors or run in CLI:

text

get router info bgp summary

  • States you might see:
    • Idle: BGP not started (often due to multi-hop settings missing).
    • Connect: No TCP connection—check routing, firewall policies.
    • Active: TCP connection attempted, no response—verify remote peer is configured and reachable.


C. VPN and Interface Checks

If using VPN tunnels, confirm that tunnels are up and interface IPs are correctly set.



D. Packet-Level Troubleshooting

To dig deeper:

bash

diagnose sniffer packet any 'tcp and port 179'

This helps capture BGP packets and troubleshoot connection issues.




E. Real-Time Debugging

Start BGP debug to view real-time logs:

bash

diagnose debug reset

diagnose ip router bgp all enable

diagnose ip router bgp level info

diagnose debug enable

Stop debugging with:

bash

diagnose debug disable






8. BGP Best Practices

  • Ensure firewall rules allow TCP port 179 between BGP peers.
  • Use loopback interfaces for peer source IPs for redundancy.
  • Enable eBGP multihop when necessary.





9. Verification of Route Advertisement

After setup, verify route announcement and neighbor status:

  • GUI: Review routes under Network > BGP summary.
  • CLI:

text

get router info bgp neighbors

get router info routing-table bgp





 

Comments