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

Question about BGP and prefix-lists

Hi all

 

I have three scenarios I need to figure out with prefix lists...and I just need someone to confirm that I am not totally wrong about my approach :)

 

Scenario 1:
I receive about 1'000 prefixes (including the default gateway of 0.0.0.0/0) and I want a route-map as preparation if I need to configure something special down the road.
In order to accept everything from my neighbor I would have used the following prefix-list:

config router prefix-list
    edit "accepteverything"
        config rule
            edit 1
                set prefix any
                unset ge
                unset le
            next
        end
    next
end

Would I be wrong with that?

 

Scenario 2:
Now that I have those 1'000 prefixes including the default gateway of 0.0.0.0/0. I would like to forward everything BUT the default route to another neighbor.
To achieve that I would have used the following prefix-list:

config router prefix-list
    edit "blockrule"
        config rule
            edit 1
                set action deny
                set prefix 0.0.0.0 0.0.0.0
                unset ge
                unset le
            next
            edit 2
                set prefix any
                unset ge
                unset le
            next
        end
    next
end

Would that achieve the goal of forwarding EVERYTHING BUT the default gateaway?

 

Scenario 3:
There is another neighbor I would like to forward nearly everything, but the default route and two other prefixes (192.168.100.0/24 and 192.168.120.0/24).
To achieve that I would have used the following prefix-list:

config router prefix-list
    edit "blockruleextended"
        config rule
            edit 1
                set action deny
                set prefix 0.0.0.0 0.0.0.0
                unset ge
                unset le
            next
            edit 2
                set action deny
                set prefix 192.168.100.0 255.255.255.0
                unset ge
                unset le
            next
            edit 3
                set action deny
                set prefix 192.168.120.0 255.255.255.0
                unset ge
                unset le
            next
            edit 4
                set prefix any
                unset ge
                unset le
            next
        end
    next
end

Would that achieve the goal of forwarding EVERYTHING BUT the default gateaway and said two networks?

 

In general the route-maps used (either route-map-in for scenario 1 or route-map-out for the other two scenaries) would only consist of the respective prefix-list for the moment.

 

Thanks a lot for your help

1 Solution
srajeswaran
Staff
Staff

All the three looks correct.

Regards,
Suraj
- Have you found a solution? Then give your helper a "Kudos" and mark the solution.

View solution in original post

2 REPLIES 2
srajeswaran
Staff
Staff

All the three looks correct.

Regards,
Suraj
- Have you found a solution? Then give your helper a "Kudos" and mark the solution.
scheuri

Thank you very much and very sorry for the double post.

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