Fortinet black logo

Examples

Configuring the router BGP on the hub

Copy Link
Copy Doc ID 5ecc39ba-34cd-11eb-96b9-00505692583a:425990
Download PDF

Configuring the router BGP on the hub

Create and run a script to configure the router-bgp on the hub.

To configure the router BGP on the hub:
  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.

Example hub script

config vdom

edit root

config router bgp

set as 65500

set router-id 10.10.40.1

set ebgp-multipath enable

set scan-time 5

set graceful-restart enable

config aggregate-address

edit 1

set prefix 10.100.0.0 255.255.0.0

set summary-only enable

next

end

config neighbor

edit "10.200.1.2"

set remote-as 65500

next

end

config neighbor-group

edit "branch-peers-1"

set advertisement-interval 1

set link-down-failover enable

set soft-reconfiguration enable

set remote-as 65501

set keep-alive-timer 1

set holdtime-timer 3

next

end

config neighbor-range

edit 1

set prefix 10.254.40.0 255.255.255.0

set neighbor-group "branch-peers-1"

next

edit 2

set prefix 10.254.41.0 255.255.255.0

set neighbor-group "branch-peers-1"

next

end

config network

edit 1

set prefix 10.200.1.0 255.255.255.0

next

edit 2

set prefix 10.200.0.0 255.255.255.0

next

edit 3

set prefix 10.200.3.0 255.255.255.0

next

end

end

end

Configuring the router BGP on the hub

Create and run a script to configure the router-bgp on the hub.

To configure the router BGP on the hub:
  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.

Example hub script

config vdom

edit root

config router bgp

set as 65500

set router-id 10.10.40.1

set ebgp-multipath enable

set scan-time 5

set graceful-restart enable

config aggregate-address

edit 1

set prefix 10.100.0.0 255.255.0.0

set summary-only enable

next

end

config neighbor

edit "10.200.1.2"

set remote-as 65500

next

end

config neighbor-group

edit "branch-peers-1"

set advertisement-interval 1

set link-down-failover enable

set soft-reconfiguration enable

set remote-as 65501

set keep-alive-timer 1

set holdtime-timer 3

next

end

config neighbor-range

edit 1

set prefix 10.254.40.0 255.255.255.0

set neighbor-group "branch-peers-1"

next

edit 2

set prefix 10.254.41.0 255.255.255.0

set neighbor-group "branch-peers-1"

next

end

config network

edit 1

set prefix 10.200.1.0 255.255.255.0

next

edit 2

set prefix 10.200.0.0 255.255.255.0

next

edit 3

set prefix 10.200.3.0 255.255.255.0

next

end

end

end