Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
RogerioF
New Contributor

Set AS PATH prepend on Route Map via GUI

Hello,

 

On Fortigate version 7.2.0 or 7.2.3 I want to set, via GUI, the AS PATH prepend of "65001 65001" to all routes advertised to a BGP peer, on route map.

 

If I add the two AS 65001 via GUI on route map the fortigate only accept one.

But if I go through CLI I can add the two AS.

 

The problem is the next time I update the route map it will override the CLI configuration.

 

There is any special configuration to solve this issue?

 

Thanks,

Rogerio.

3 REPLIES 3
gfleming
Staff
Staff

I can't reproduce this. I can't even get CLI to keep two of the same AS. Can you show your CLI config for the rule in question?

Cheers,
Graham
RogerioF
New Contributor

Thank you Graham for your update.

 

I have read these 2 post:

https://community.fortinet.com/t5/FortiGate/Technical-Tip-How-to-configure-BGP-AS-prepending/ta-p/19...

https://community.fortinet.com/t5/FortiGate/Technical-Tip-Prepending-AS-and-filtering-redistributed-...

 

and the solution via CLI is to configure the 2 same AS between quotation marks.

 

My FG configuration is:

config router route-map
 edit "RM_toUNTRUST-ZONE"
  set comments "BGP Peering to UNTRUST ZONE"
  config rule
   edit 1
    set set-aspath "65007 65007"
    set set-community "1555:2013"

And the BGP configuration:

config router bgp
 set as 65007
 set router-id 172.26.1.1
 config neighbor
  edit "172.26.1.14"
  set soft-reconfiguration enable
  set interface "OUT_LINK_VL101"
  set remote-as 1555
  set route-map-out "RM_toUNTRUST-ZONE"
  next
  end
  config network
   edit 1
    set prefix 172.25.1.0 255.255.255.240
   next
   end
   config redistribute "static"
    set status enable
    set route-map "RM_STATIC-2-BGP"
    end

 

On Cisco router I have both AS prepend to the routes advertised by Fortigate:

 

Route Distinguisher: 1555:1001 (default for vrf VPN1)
*> 91.1.1.1/32 172.26.1.1 0 65007 65007 65007 ?
*> 172.25.1.0/28 172.26.1.1 0 65007 65007 65007 i
*> 172.26.1.55/32 0.0.0.0 0 32768 ?
*> 194.194.194.0/27 0.0.0.0 0 32768 ?

 

The prepend of same AS several times to routes advertised by Cisco routers to eBGP peers is usual. And I have a customer that use this BGP attribute to select the best path.

 

Regards,

Rogerio.

zzoldi
Staff
Staff

HI @RogerioF 

Here is the screenshot where you can prepend your prefixes. You can add in "Set AS path" as many times as you would like to prepend.  Here is an example of prepend 3 times.

 

 

 

Screenshot 2023-11-13 at 4.18.23 PM.png

Receiving BGP peer will look like this (original AS + 3X AS)

Screenshot 2023-11-13 at 4.25.06 PM.png

Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors