R0106-HP MSR Router Series Layer 3 - IP Routing Command Reference(V7)

375
allow-direct keyword, do not configure the if-match route-type rule for the routing policy. Otherwise, the
allow-direct keyword does not take effect.
med med-value: Specifies a MED value for redistributed routes, in the range of 0 to 4294967295. If no
MED is specified, the metric of a redistributed route is used as its MED.
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63
characters, to filter redistributed routes or set route attributes for redistributed routes.
Usage guidelines
The import-route command cannot redistribute default IGP routes. To redistribute default IGP routes, use
the default-route imported command together with the import-route command.
Only active routes can be redistributed. You can use the display ip routing-table protocol or display ipv6
routing-table protocol command to view route state information.
The ORIGIN attribute of routes redistributed by the import-route command is INCOMPLETE.
Examples
# In BGP IPv4 unicast address family view, redistribute routes from RIP process 1, and set the MED value
for redistributed routes to 100.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] address-family ipv4 unicast
[Sysname-bgp-ipv4] import-route rip 1 med 100
# In BGP-VPN IPv4 unicast address family view, redistribute routes from RIP process 1, and reference a
routing policy imprt to exclude route 1.1.1.0/24 from route redistribution.
<Sysname> system-view
[Sysname] ip prefix-list imprt deny 1.1.1.0 24
[Sysname] ip prefix-list imprt permit 0.0.0.0 0 less-equal 32
[Sysname] route-policy imprt permit node 0
[Sysname-route-policy-imprt-0] if-match ip address prefix-list imprt
[Sysname-route-policy-imprt-0] quit
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] address-family ipv4 unicast
[Sysname-bgp-ipv4-vpn1] import-route rip 1 route-policy imprt
# In BGP IPv6 unicast address family view, redistribute routes from RIP process 1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] address-family ipv6 unicast
[Sysname-bgp-ipv6] import-route ripng
# In BGP-VPN IPv6 unicast address family view, redistribute routes from RIP process 1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] address-family ipv6 unicast
[Sysname-bgp-ipv6-vpn1] import-route ripng
Related commands
display ip routing-table protocol