< Home

Configuring OSPF to Import Routes of Other Protocols

If both OSPF and other routing protocols run on the router, you can configure OSPF to import routes generated by other protocols such as RIP, ISIS, BGP, static routes, and direct routes, and then advertise these routes through Type5 LSA or Type7 LSA.

Context

OSPF can ensure loop-free intra-area routes and inter-area routes; however, OSPF cannot prevent external routes from loops. Therefore, you should be cautious when configuring OSPF to import external routes.

Procedure

  1. Access the system view.

    system-view

  2. Access the OSPF process view.

    ospf [ process-id ]

  3. Import routes of other protocols.

    import-route { limit limit-number | { bgp [ permit-ibgp ] | direct | unr | rip [ process-id-rip ] | static | isis [ process-id-isis ] | ospf [ process-id-ospf ] } [ cost cost | type type | tag tag | route-policy route-policy-name ] * }

  4. (Optional) Filter imported routes.

    filter-policy { acl-number | ip-prefix ip-prefix-name | route-policy route-policy-name } export [ direct | static | unr | bgp | { rip | isis | ospf } [ process-id ] ]

    Only the routes that pass the filtering can be advertised.

    You can configure OSPF to filter the routing information of a protocol or a process by specifying the parameter direct, static, unr, bgp, rip [ process-id ], isis [ process-id ], ospf [ process-id ]. If direct, static, unr, bgp, rip [ process-id ], isis [ process-id ], ospf [ process-id ] is not specified, OSPF filters all the imported routing information.

    • The import-route command cannot be used to import the default routes of external routes.
    • OSPF filters the imported routes; that is, OSPF transforms only eligible external routes to Type5 LSAs and advertises them.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >