コンフィグレーションコマンドレファレンス Vol.1

[目次][索引][前へ][次へ]


attribute-list【OP-BGP】

アトリビュート・リストはアトリビュート・フィルタ情報とアトリビュート変更情報から構成されます。各情報には識別子が付与され,各々複数の情報を設定できます。本情報をインポート・フィルタやエキスポート・フィルタと組み合わせて使用すると,BGPを使用し送受信される経路に対し,BGP属性に基づくフィルタリングやBGP属性の変更が制御できます。アトリビュート・フィルタ情報は送受信する経路のフィルタ情報として,アトリビュート変更情報は送受信する経路のBGP属性変更情報として使用します。attribute-listコマンドは上記BGP属性でのフィルタ情報やBGP属性の変更情報を設定するコマンドです。本コマンドはIPv4,IPv6共用コマンドです。

[入力モード]

グローバルコンフィグモード

[入力形式]

アトリビュート・フィルタ情報の設定・変更
attribute-list attribute-filter <Id>
 >>移行モード:attribute-list attribute-filter

アトリビュート変更情報の設定・変更
attribute-list set-attribute <Id>
 >>移行モード:attribute-list set-attribute

アトリビュート・フィルタ情報の削除
delete attribute-list attribute-filter <Id>

アトリビュート変更情報の削除
delete attribute-list set-attribute <Id>

情報の削除
delete attribute-list

情報の表示
show attribute-list

[サブコマンド入力形式]

アトリビュート・フィルタ情報の設定・変更
aspath <Aspath>
aspath-regexp <Extended Regular Expression>
origin <Origin>
community { no-export | no-advertise | no-export-subconfed | none | <As> : <Comm_id> }
comm-split <As> <Comm_id>
community-regexp <Extended Regular Expression>

アトリビュート・フィルタ情報の削除
delete aspath
delete aspath-regexp <Extended Regular Expression>
delete origin
delete community { no-export | no-advertise | no-export-subconfed | none | <As> : <Comm_id> }
delete comm-split <As> <Comm_id>
delete community-regexp <Extended Regular Expression>

アトリビュート変更情報の設定・変更
med <Metric>
localpref <Local_Preference>
origin <Origin>
ascount <count>
community { no-export | no-advertise | no-export-subconfed | none | <As> : <Comm_id> }
comm-split <As> <Comm_id>
remove-community { <As> : <Comm_id> | "* : <Comm_id>" | "<As> : *" | "* : *" }

アトリビュート変更情報の削除
delete med
delete localpref
delete origin
delete ascount
delete community { no-export | no-advertise | no-export-subconfed | none | <As> : <Comm_id> }
delete comm-split <As> <Comm_id>
delete remove-community { <As> : <Comm_id> | "* : <Comm_id>" | "<As> : *" | "* : *" }

[モード階層]

attribute-list attribute-filter
attribute-list set-attribute

[パラメータ]

<Id>
各々のアトリビュート・フィルタ情報またはアトリビュート変更情報を識別するための識別子を指定します。
本識別子はインポート・フィルタやエキスポート・フィルタとのマッピングに使用します。
  1. 本パラメータ省略時の初期値
    なし(省略不可)
  2. 値の設定範囲
    <Id>に1〜65535(10進数),または32文字以内の文字列を指定します。
    文字列には,先頭が英字の場合,英数字と"−"(ハイフン),"_"(アンダースコア),"."(ピリオド)が使用できます。先頭が数字の場合,数字と"−"(ハイフン)が使用できます。

[サブコマンド]

aspath <Aspath> (attribute-filter用)
ASPATH属性をフィルタ条件として使用する場合に指定します。また,複数のASPATH属性の指定もできます。複数のASPATH属性を指定した場合は,指定したASPATH属性の何れかに一致する経路情報がフィルタリングの対象となります。なお,フィルタ条件にはパスタイプAS_SET,およびCONFEDERATION_SETを含みます。
  1. 本サブコマンド省略時の初期値
    ASPATH属性をフィルタ条件として使用しません。
  2. 値の設定範囲
    Aspathは次の形式で指定します。
 
<Aspath> := { "<Aspath_Term>..." | '^$' }
<Aspath_Term> := <Aspath_Symbol>[{ {m,n} | {m} | {m,} | * | + | ? }]
<Aspath_Symbol> := { <As> | . }
 
^$:空のASパスを意味します。
{m,n}:Aspath_Symbolをm回からn回,繰り返すことを意味します。
m,nの設定範囲は0〜255です。
{m}:Aspath_Symbolをm回,繰り返すことを意味します。
mの設定範囲は0〜255です。
{m,}:Aspath_Symbolをm回以上,繰り返すことを意味します。
mの設定範囲は0〜255です。
*:Aspath_Symbolを0回以上,繰り返すことを意味します。
+:Aspath_Symbolを1回以上,繰り返すことを意味します。
?:Aspath_Symbolを0回または1回,繰り返すことを意味します。
([Ctrl]+[V]を入力後[?]を入力してください)
<As>:指定したAS番号を意味します。設定範囲は1〜4294967295(10進数)です。
.:任意のAS番号を意味します。
また,aspathには<Aspath>を「|」で連結して最大八つの<Aspath>を指定できます。<Aspath>を複数指定した場合,各条件の論理和がフィルタリング条件となります。記述例(空,AS番号65000だけ,AS番号65001だけのどれかのASパス)を次に示します。
 
aspath "^$ | 65000 | 65001"
 
  1. 注意事項
    同一attribute-filter文中で,aspathとaspath_regexpの両方は指定できません。

aspath-regexp <Extended Regular Expression> (attribute-filter用)
AS_PATH属性のフィルタ条件に拡張正規表現を使用する場合に指定します。また,複数のAS_PATH属性の指定もできます。複数のAS_PATH属性を指定した場合は,指定したAS_PATH属性のどれかに一致(OR条件)する経路情報がフィルタリングの対象となります。なお,フィルタ条件にはパスタイプAS_SEQ,AS_SET,およびAS_CONFED_SETを含みます。
  1. 本サブコマンド省略時の初期値
    拡張正規表現によるAS_PATH属性フィルタを行いません。
  2. 値の設定範囲
    <Extended Regular Expression>は拡張正規表現でAS_PATH属性を指定します。<Extended Regular Expression>の前後を「”(ダブルクォート)」で囲んで指定してください。
    拡張正規表現の指定方法については,「解説書 Vol.1 13.4.1(3) 拡張正規表現」を参照してください。
  3. 注意事項
    同一attribute-filter文中で,aspathとaspath_regexpの両方は指定できません。

origin <Origin> (attribute-filter用)
ORIGIN属性をフィルタ条件として使用する場合に指定します。
  1. 本サブコマンド省略時の初期値
    ORIGIN属性をフィルタ条件として使用しません。
  2. 値の設定範囲
    anyまたはigp,egp,incompleteを「|」で連結して指定します。また,文字列を「“」で囲んで指定します。設定例を次に示します。
  • origin “igp | egp”

comm-split <As> <Comm_id>

community <As> : <Comm_id>

community { no-export | no-advertise | no-export-subconfed | none }
(attribute-filter用)
Community属性をフィルタ条件として使用する場合に指定します。
  1. 本サブコマンド省略時の初期値
    Community属性をフィルタ条件として使用しません。
  2. 値の設定範囲
    本サブコマンドは次の形式で指定できます。また,複数のCommunity属性の指定もできます。複数のCommunity属性を指定した場合は,指定したすべてのCommunity属性を持つ経路情報だけがフィルタリング対象となります。

comm-split <As> <Comm_id>:

community <As> : <Comm_id>:
<As>(上位16ビット),<Comm_id>(下位16ビット)で指定されたCommunity属性を持つ経路情報を対象とします。
<As>には1〜65534(10進数),<Comm_id>には0〜65535(10進数)を指定します。

community { no-export | no-advertise | no-export-subconfed | none }:
no-export(FFFFFF01:16進数),no-advertise(FFFFFF02:16進数),no-export-subconfed(FFFFFF03:16進数)のCommunity属性を持つ経路を対象とします。
例外として,none指定時はCommunity属性を持たない経路情報を対象とすることを指定します。
  1. 注意事項
    同一attribute-filter文中で,comm-splitやcommunityと,community-regexpの両方は指定できません。

community-regexp <Extended Regular Expression> (attribute-filter用)
Community属性のフィルタ条件に拡張正規表現を使用する場合に指定します。また,複数のCommunity属性の指定もできます。複数のCommunity属性を指定した場合は,指定したCommunity属性のどれかに一致(OR条件)する経路情報がフィルタリング対象となります。
  1. 本サブコマンド省略時の初期値
    拡張正規表現によるCommunity属性フィルタを行いません。
  2. 値の設定範囲
    <Extended Regular Expression>は拡張正規表現でCommunity属性を指定します。<Extended Regular Expression>の前後を「”(ダブルクォート)」で囲んで指定してください。
    拡張正規表現の指定方法については,「解説書 Vol.1 13.4.1(3) 拡張正規表現」を参照してください。
  3. 注意事項
    同一attribute-filter文中で,comm-splitやcommunityと,community-regexpの両方は指定できません。

med <Metric> (set-attribute用)
経路情報に設定するMED属性値,またはMED属性値に±する値を指定します。インポート・フィルタとマッピング時は,受信経路のMED属性値を変更します。エキスポート・フィルタとマッピング時は広告経路のMED属性値を変更します。また,数値(10進数)指定時は指定値をMED属性値として使用します。±(10進数)指定時はMED属性値を指定した値だけプラス,またはマイナスします。inherit-metric指定は,エキスポート・フィルタとマッピング時だけ有効であり,広告元経路のメトリック値をMED属性値として引き継ぎます。同様に,internal-metric指定は,エキスポート・フィルタとマッピング時だけ有効であり,広告するBGP4またはBGP4+経路のnexthop解決に使用しているIGP経路のメトリック値をMED属性値として使用します。
  1. 本サブコマンド省略時の初期値
    MED属性を変更しません。
  2. 値の設定範囲
    <Metric>に0〜4294967295(10進数),または+1〜+4294967295(10進数),-1〜-4294967295(10進数),inherit-metric,internal-metricを指定します。
    なお,±指定によって経路情報のMED属性値がマイナスになる場合は0に,4294967295を超える場合は4294967295に設定されます。

localpref <Local_Preference> (set-attribute用)
広告する経路情報のLOCAL_PREF属性値,またはLOCAL_PREF属性値に±する値を指定します。広告先ピアのピアグループがinternal,routingおよびexternal(メンバーAS間ピア)時だけ有効です。
  1. 本サブコマンド省略時の初期値
    LOCAL_PREF属性を変更対象としません。
  2. 値の設定範囲
    <Local_Preference>に0〜65535(10進数),または+1〜+65535(10進数),-1〜-65535(10進数)を指定します。0は最低の優先度,65535は最高の優先度を示します。
    ±指定の場合,広告する経路のLOCAL_PREF属性を指定した値だけプラスまたはマイナスします。なお,±指定でLOCAL_PREF属性値がマイナスになる場合は0に,65535を超える場合は65535に設定されます。

origin <Origin> (set-attribute用)
広告する経路情報のORIGIN属性値を指定します。
  1. 本サブコマンド省略時の初期値
    ORIGIN属性を変更対象としません。
  2. 値の設定範囲
    igp,egp,incompleteのどれかを指定します。

ascount <Count> (set-attribute用)
広告する経路情報のASPATH属性に追加する自AS番号の数を指定します。指定した数分のAS番号が追加されます。広告先ピアのピアグループがexternal(メンバーAS間ピアを除く)時だけ有効です。
  1. 本サブコマンド省略時の初期値
    1個の自AS番号がASPATH属性に追加されます。
  2. 値の設定範囲
    <Count>に1〜25(10進数)を指定します。

comm-split <As> <Comm_id>

community <As> : <Comm_id>

community { no-export | no-advertise | no-export-subconfed | none }
(set-attribute用)
広告する経路情報に追加するCommunity属性値を指定します。
  1. 本サブコマンド省略時の初期値
    Community属性を変更対象としません。
  2. 値の設定範囲
    本サブコマンドは次の形式で指定できます。また,複数のCommunity属性の指定もできます。

comm-split <As> <Comm_id>

community <As> : <Comm_id>:
<As>(上位16ビット),<Comm_id>(下位16ビット)で指定されたCommunity属性を経路情報に追加します。
<As>には1〜65534(10進数),<Comm_id>には0〜65535(10進数)を指定します。なお,本サブコマンドとremove-communityを同時に指定した場合は,remove-communityを先に実行します。

community { no-export | no-advertise | no-export-subconfed | none }:
no-export(FFFFFF01:16進数),no-advertise(FFFFFF02:16進数),no-export-subconfed(FFFFFF03:16進数)のCommunity属性を経路情報に追加します。
例外として,none指定時は経路情報に付加されたすべてのCommunity属性を削除します。
none指定とその他の指定(none指定以外)を併用した場合は,すべてのCommunity属性を削除後,その他の指定で指定されたCommunity属性を追加します(Community属性の置換え)。

remove-community { <As> : <Comm_id> | "* : <Comm_id>" | "<As> : *" | "* : * "}
(set-attribute用)
広告する経路情報から削除するCommunity属性値を指定します。
  1. 本サブコマンド省略時の初期値
    個別のCommunity属性を削除しません。
  2. 値の設定範囲
    <As>(上位16ビット),<Comm_id>(下位16ビット)で指定されたCommunity属性を経路情報から削除します。
    <As>には1〜65534(10進数)または1〜65534の範囲の任意の値を削除する“ * ”, <Comm_id>には0〜65535(10進数)または0〜65535の範囲の任意の値を削除する“ * ”を指定します。また,複数のCommunity属性を指定できます。
“ * : * ”を指定した場合は, no-export, no-advertise, no-export-subconfed以外のCommunity属性をすべて削除します。なお,本サブコマンドとcommunityまたはcomm-splitを同時に指定した場合は,remove-communityを先に実行します。

[入力例]

  1. アトリビュート・フィルタ情報および変更情報の設定
    AS_PATH属性がない経路はLOCAL_PREF属性値を100に,AS_PATH属性がAS100またはAS200を経由した経路はLOCAL_PREF属性値を200に設定します。また,AS300からの値400のCommunity属性だけを持つ経路はCommunity属性を取り除いたあとに取り込み,その他の経路は廃棄します。
     
    (config)# attribute-list set-attribute 10
    [attribute-list set-attribute 10]
    (config)# localpref 100
    [attribute-list set-attribute 10]
    (config)# exit
    (config)# attribute-list set-attribute 20
    [attribute-list set-attribute 20]
    (config)# localpref 200
    [attribute-list set-attribute 20]
    (config)# exit
    (config)# attribute-list set-attribute 30
    [attribute-list set-attribute 30]
    (config)# community none
    [attribute-list set-attribute 30]
    (config)# exit
    (config)# attribute-list attribute-filter 10
    [attribute-list attribute-filter 10]
    (config)# aspath-regexp "^$"
    [attribute-list attribute-filter 10]
    (config)# exit
    (config)# attribute-list attribute-filter 20
    [attribute-list attribute-filter 20]
    (config)# aspath-regexp "_(100|200)_"
    [attribute-list attribute-filter 20]
    (config)# exit
    (config)# attribute-list attribute-filter 30
    [attribute-list attribute-filter 30]
    (config)# community-regexp "^300:400$"
    [attribute-list attribute-filter 30]
    (config)# exit
    (config)# show attribute-list
    attribute-list set-attribute 10
      localpref 100
    !
    attribute-list set-attribute 20
      localpref 200
    !
    attribute-list set-attribute 30
      community none
    !
    attribute-list attribute-filter 10
      aspath-regexp "^$"
    !
    attribute-list attribute-filter 20
      aspath-regexp "_(100|200)_"
    !
    attribute-list attribute-filter 30
      community-regexp "^300:400$"
    (config)# import proto bgp attribute-filter 10 set-attribute 10
    [import proto bgp attribute-filter 10 set-attribute 10]
    (config)# exit
    (config)# import proto bgp attribute-filter 20 set-attribute 20
    [import proto bgp attribute-filter 20 set-attribute 20]
    (config)# exit
    (config)# import proto bgp attribute-filter 30 set-attribute 30
    [import proto bgp attribute-filter 30 set-attribute 30]
    (config)# exit
    (config)# import proto bgp restrict
    (config)# show import proto bgp
    import proto bgp attribute-filter 10 set-attribute 10
    !
    import proto bgp attribute-filter 20 set-attribute 20
    !
    import proto bgp attribute-filter 30 set-attribute 30
    !
    import proto bgp restrict
    (config)# apply
    (config)# 
     
  2. 情報の変更
    AS_PATH属性がない経路に設定するLOCAL_PREF属性値を150に変更します。
     
    (config)# attribute-list set-attribute 10
    [attribute-list set-attribute 10]
    (config)# localpref 150
    [attribute-list set-attribute 10]
    (config)# exit
    (config)# show attribute-list
    attribute-list set-attribute 10
      localpref 150
    !
    attribute-list set-attribute 20
      localpref 200
    !
    attribute-list set-attribute 30
      community none
    !
    attribute-list attribute-filter 10
      aspath-regexp "^$"
    !
    attribute-list attribute-filter 20
      aspath-regexp "_(100|200)_"
    !
    attribute-list attribute-filter 30
      community-regexp "^300:400$"
    (config)# apply
    (config)# 
     
  3. 設定情報の表示
    アトリビュート・リスト情報を表示します。
     
    (config)# show attribute-list
    attribute-list set-attribute 10
      localpref 150
    !
    attribute-list set-attribute 20
      localpref 200
    !
    attribute-list set-attribute 30
      community none
    !
    attribute-list attribute-filter 10
      aspath-regexp "^$"
    !
    attribute-list attribute-filter 20
      aspath-regexp "_(100|200)_"
    !
    attribute-list attribute-filter 30
      community-regexp "^300:400$"
    (config)# 
     
  4. 設定情報の削除
    アトリビュートフィルタ情報(識別子20)のaspath-regexpサブコマンド,アトリビュートフィルタ情報(識別子30)のcommunity-regexpサブコマンドを削除します。
     
    (config)# show attribute-list
    attribute-list set-attribute 10
      localpref 150
    !
    attribute-list set-attribute 20
      localpref 200
    !
    attribute-list set-attribute 30
      community none
    !
    attribute-list attribute-filter 10
      aspath-regexp "^$"
    !
    attribute-list attribute-filter 20
      aspath-regexp "_(100|200)_"
    !
    attribute-list attribute-filter 30
      community-regexp "^300:400$"
    (config)# attribute-list attribute-filter 20
    [attribute-list attribute-filter 20]
    (config)# delete aspath-regexp "_(100|200)_"
    [attribute-list attribute-filter 20]
    (config)# exit
    (config)# attribute-list attribute-filter 30
    [attribute-list attribute-filter 30]
    (config)# delete community-regexp "^300:400$"
    [attribute-list attribute-filter 30]
    (config)# exit
    (config)# show attribute-list
    attribute-list set-attribute 10
      localpref 150
    !
    attribute-list set-attribute 20
      localpref 200
    !
    attribute-list set-attribute 30
      community none
    !
    attribute-list attribute-filter 10
      aspath-regexp "^$"
    !
    attribute-list attribute-filter 20
    !
    attribute-list attribute-filter 30
    (config)# 
     
    アトリビュート・リスト情報を削除します。
     
    (config)# show attribute-list
    attribute-list set-attribute 10
      localpref 150
    !
    attribute-list set-attribute 20
      localpref 200
    !
    attribute-list set-attribute 30
      community none
    !
    attribute-list attribute-filter 10
      aspath-regexp "^$"
    !
    attribute-list attribute-filter 20
    !
    attribute-list attribute-filter 30
    (config)# delete attribute-list attribute-filter 20
    (config)# show attribute-list
    attribute-list set-attribute 10
      localpref 150
    !
    attribute-list set-attribute 20
      localpref 200
    !
    attribute-list set-attribute 30
      community none
    !
    attribute-list attribute-filter 10
      aspath-regexp "^$"
    !
    attribute-list attribute-filter 30
    (config)# delete attribute-list
    (config)# show attribute-list
    no such attribute-list
    (config)# 
     

[関連コマンド]

import(インポート・フィルタ情報)

export(エキスポート・フィルタ情報)

apply(ルーティングプロトコルコンフィグレーション反映)

update(コンフィグレーション反映)

[注意事項]

  1. system config_update autoが定義されていない時に本コマンドを使用しコンフィグレーションの変更を行った場合は,applyコマンドを投入してください。
  2. system config_update autoが定義されている時に本コマンドを使用しコンフィグレーションの変更を行った場合は,update bgp-filterコマンドを投入してください。

[目次][前へ][次へ]


[他社商品名称に関する表示]

Copyright (c)2005, 2011, ALAXALA Networks Corporation. All rights reserved.