> 2001:**:**:2a20::/64

2001:**:**:fc::6
0 645** 645** 645** ?
[/text]

local preference値を付与するroute-mapを作成する

Peerからの経路は全てLocal preference値を付与するので、matchによるprefixの指定は行いません。LPというroute-mapを作成し、local-preference値400を付与します。line5-6の部分です。

[text]
route-map LP {
description set-Local-Preference
rule 100 {
action permit
set {
local-preference 400
}
}
}
[/text]

route-mapをpeerと関連付ける

peerとの関連付けは、その?で作成したpeer-groupで行います。peer-group IHAnet に先程作成したroute-mapを関連付けます。line19-20の部分です。

[text]
protocols {
bgp 64585 {
address-family {
ipv6-unicast {
network 2001:e41:31d4:3648::/64 {
}
}
}
peer-group IHAnet {
address-family {
ipv6-unicast {
filter-list {
import peer-path
}
prefix-list {
export this-network
import Special-Use-prefix
}
route-map {
import LP
}
soft-reconfiguration {
inbound
}
[/text]

設定後の確認

peerから受け取った経路2001:**:**:2a20::/64のLocPrfに400が付与されています。この状態でトランジットから同じ経路を広告されたとしても、トランジット側のLocal Preference値は何もしていない=デフォルトの100なので、Peer側の経路がベストパスとして選択されます。

[text]
# show ipv6 bgp
BGP table version is 0, local router ID is 49.212.54.72
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path