Saturday , July 13 2024
Home / IP Routing / Huawei route preferences

Huawei route preferences

Routing protocols are used to discover routes to a destination. Only one routing protocol at one time determines the optimal route to a destination.

What happens if we have different routes to the same destination learnt by different routing protocols?

When multiple routing information sources coexist on the same router, the router with the highest preference is selected as the optimal route.

Below you can find the default route preferences by each routing protocol (the smaller the value, the higher the preference is):

Of course you can change these default values manually.

But what happens if different routing protocols are configured with the same preference?

Huawei routers define external and internal preferences. Default external preferences are showed in the above table and can be set manually by users, whereas internal preferences are fixed and cannot be changed. For example, two routes, static and OSPF, which have the same route preference 5, set by command, can reach the destination According to the internal preferences listed below, route discovered by OSPF will be selected as an optimal route:

interface Ethernet0/0/0
undo shutdown
ip address
interface LoopBack0
ip address
ip route-static preference 5
ospf 1
preference 5
[labnario]display ip routing-table
Route Flags: R - relay, D - download to fib
Routing Tables: Public
Destinations : 6 Routes : 6
Destination/Mask Proto Pre Cost Flags NextHop Interface Direct 0 0 D LoopBack0 OSPF 5 1 D Ethernet0/0/0 Direct 0 0 D Ethernet0/0/0 Direct 0 0 D Ethernet0/0/0 Direct 0 0 D InLoopBack0 Direct 0 0 D InLoopBack0

Leave a Reply

Your email address will not be published. Required fields are marked *