Fortinet black logo

Cookbook

Configuring the router-bgp on the branches

6.2.0
Copy Link
Copy Doc ID 2d0f1673-0a61-11ea-8977-00505692583a:198101
Download PDF

Configuring the router-bgp on the branches

Use a script to configure the router-bgp in the branches.

To create the CLI script:
  1. Go to Device Manager > Scripts.
  2. In the toolbar, click Create New.
  3. Enter the script details such as the Script Name, Type, and Run script on.
  4. In the Script details field, paste the script:
  5. In the toolbar, click Run Script, and then select the devices you want to run the script on. Click Run Now.

Branch script example

config router bgp

set as 65501

set router-id 10.254.40.2

set keepalive-timer 1

set holdtime-timer 3

set ebgp-multipath enable

set scan-time 5

set distance-external 1

config neighbor

edit "10.254.40.1"

set advertisement-interval 1

set link-down-failover enable

set soft-reconfiguration enable

set remote-as 65500

set keep-alive-timer 1

set holdtime-timer 3

next

edit "10.254.41.1"

set advertisement-interval 1

set link-down-failover enable

set soft-reconfiguration enable

set remote-as 65500

set keep-alive-timer 1

set holdtime-timer 3

next

end

config network

edit 1

set prefix 10.100.4.0 255.255.255.0

next

end

end

Configuring the router-bgp on the branches

Use a script to configure the router-bgp in the branches.

To create the CLI script:
  1. Go to Device Manager > Scripts.
  2. In the toolbar, click Create New.
  3. Enter the script details such as the Script Name, Type, and Run script on.
  4. In the Script details field, paste the script:
  5. In the toolbar, click Run Script, and then select the devices you want to run the script on. Click Run Now.

Branch script example

config router bgp

set as 65501

set router-id 10.254.40.2

set keepalive-timer 1

set holdtime-timer 3

set ebgp-multipath enable

set scan-time 5

set distance-external 1

config neighbor

edit "10.254.40.1"

set advertisement-interval 1

set link-down-failover enable

set soft-reconfiguration enable

set remote-as 65500

set keep-alive-timer 1

set holdtime-timer 3

next

edit "10.254.41.1"

set advertisement-interval 1

set link-down-failover enable

set soft-reconfiguration enable

set remote-as 65500

set keep-alive-timer 1

set holdtime-timer 3

next

end

config network

edit 1

set prefix 10.100.4.0 255.255.255.0

next

end

end