Routes with an internal flag
There are instances when the route gets installed in the routing table with flag as "~"
Flag "~" means that this is an internal route.
This article focuses on explaining a route with an internal flag.
Redistributing a route into the routing protocol
There are two ways of redistributing a route into the routing protocol like BGP or OSPF.
Method 1
Create a redistribution profile, then use this profile in redistribution rules. For detailed information through screenshots, please click here.
Method 2
Directly specify the route in the redistribution rule without creating a redistribution profile. This is mainly used when we have to advertise a route which is not present in the routing table or advertising a host route. For detailed information through screenshots, please click here.
When a route is redistributed into another routing protocol using Method 2, there is a route created in a routing table with flag as "~" which means that this is an internal route created only for redistribution purpose.
Following are some of the screenshots showing this behavior:
Routes specified directly in redistribution rule of BGP (with no redistribution profile):
Routes being advertised to the peer through BGP.
Since the routes were directly specified in redistribution rules without making use of redistribution profile, these routes are installed in routing table with flag "~":
Flag "~" means that this is an internal route used only for redistribution purpose hence, these routes are not installed in forwarding table therefore, do not affect actual routing or hinder with any routes on the device:
This is not only with BGP but with other routing protocols e.g OSPF too. If we specify route directly in Export rule without using redistribution profile, it will be installed with flag "~" but does not affect any actual routing on the device: