FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
vponmuniraj
Staff
Staff
Article Id 197107

Description

 

This article describes how to tag the default route originated by OSPF.

Solution

 

The example below shows commands used for redistributing the default route with a tag of 1002.

Create an access list for the prefix(s):

 

config router access-list
    edit "Default_originate"
        config rule
            edit 1
                set prefix 0.0.0.0 0.0.0.0
                set exact-match enable
            next
        end
    next
end

 

Create a route map to match the prefix list configured above and set the tag.

 

config router route-map
    edit "Default_tag"
        config rule
            edit 1
                set match-ip-address "Default_originate"
                set set-tag 1002
            next
        end
    next
end

 

Configure the route map under OSPF.

 

config router ospf
    set default-information-originate enable
    set default-information-route-map "Default_tag"
end

 

To verify the tag, it is possible to use the command below:

Before.

 

Vigneshp # get router info ospf database self-originate

                AS External Link States

Link ID         ADV Router      Age  Seq#     CkSum Flag Route              Tag
0.0.0.0         10.5.20.66      3    8000021b 70d6  0021 E2 0.0.0.0/0       0    <-----

 

After.

 

Vigneshp # get router info ospf database self-originate

                AS External Link States

Link ID         ADV Router      Age  Seq#     CkSum Flag Route              Tag
0.0.0.0         10.5.20.66      439  8000021a 2a30  0021 E2 0.0.0.0/0       1002 <-----