Origin属性とは
BGPの最適パスの選択に使用される属性の1つで、あるプレフィックスがどこから発生したのか記録されます。この属性値には、IGP、EGP、Incompleteがあります。
EGPは現在使われていないため、忘れても結構です。
IGPは、networkコマンドにより発生したルート、Incompleteは、BGPへ再配布され発生したルートを示します。同じBGPプレフィックスに対しては、IncompleteよりIGPが優先パスとされます。
検証
構成と設定

23.23.23.23/32 をR2では、networkコマンドで、R3ではredistributeコマンドでアドバタイズします。
R2(config)# int loopback 23
R2(config-if)# ip add 23.23.23.23 255.255.255.255
R2(config)# router bgp 23
R2(config-router)# network 23.23.23.23 mask 255.255.255.255
R2(config-router)# neighbor 192.168.26.6 remote-as 6
R3(config)# int loopback 23
R3(config-if)# ip add 23.23.23.23 255.255.255.255
R3(config)# router bgp 23
R3(config-router)# redistribute connected
R6(config)# router bgp 6 R6(config-router)# neighbor 192.168.26.2 remote-as 23 R6(config-router)# neighbor 192.168.36.3 remote-as 23
確認
R6のBGPテーブルを確認します。
R6# show ip bgp BGP table version is 9, local router ID is 6.6.6.6 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path * 23.23.23.23/32 192.168.36.3 0 0 23 ? *> 192.168.26.2 0 0 23 i
23.23.23.23/32の経路を詳しくみてみます。
R6# show bgp 23.23.23.23 BGP routing table entry for 23.23.23.23/32, version 4 Paths: (2 available, best #2, table default) Advertised to update-groups: 1 23 192.168.36.3 from 192.168.36.3 (3.3.3.3) Origin incomplete, metric 0, localpref 100, valid, external rx pathid: 0, tx pathid: 0 23 192.168.26.2 from 192.168.26.2 (2.2.2.2) Origin IGP, metric 0, localpref 100, valid, external, best rx pathid: 0, tx pathid: 0x0
R2からのルートはOriginがIGP 、R3からのルートはOriginがincomplete です。 そのため、R2の経路をベストパスとして認識します。
その他 BGP関連記事は >> ルーティングプロトコル(BGP)まとめ << より参照できます。
コメント