#amazon(4844322214)
スタティック ルーティング †
設定 †
rt(config)# ip route network netmask next-router [distance]
- network
- netmask
- next-router
- distance
- アドミニストレーティブ ディスタンス
- ルーティング情報の信頼度
- 0~254、255は到達不可能として破棄される
デフォルト ルート †
ソース ルーティング †
確認 †
rt# show ip route
設定解除 †
ルート フィルタ †
パッシブ インターフェース †
ディストリビュート リスト †
- ACL の場合
rt(config)# access-list acl-num permit|deny ip-addr wildcard-mask
- ip-addr wildcard-mask
- permit|deny
- 特定の情報のみ送信/受信する場合は、permit を使う
- 特定の情報を送信/受信しない場合は、deny を使う
- プレフィックス リストの場合
rt(config)# ip prefix-list list-name seq num permit|deny ip-addr/length [ge ge-length] [le le-length]
- num
- ip-addr/length
- ge-length
- le-length
- フィルタの適用
rt(config)# router protocol
rt(config-router)# distribute-list acl-num|list-name in|out if|routing-process
- in|out
- routing-process
- 再配布元のルーティング プロセス (out 時のみ可能)
- static、connected、ospf area-id、eigrp as-num
ポリシー ベース ルーティング †
概要 †
- 条件に一致するパケットを、ルーティング テーブルを無視して経路を変更する
- 制御したい条件のアクセスリストを作成する
- それを元に、ルート マップで経路を設定する
- 最後に、目的のパケットを受信する I/F にポリシーを適用する
設定 †
- アクセス リストの作成 (条件がパケット サイズの場合は不要)
rt(config)# access-list acl-num permit|deny ip-addr wildcard-bits
- ルートマップの作成
rt(config)# route-map map-name [permit|deny] [seq-num]
- map-name
- permit|deny
- seq-num
- 条件を設定
rt(config-route-map)# match foo bar
- 動作を設定
rt(config-route-map)# set foo bar
- 目的のパケットを受信する I/F で設定する
rt(config)# interface type mod/num
rt(config-if)# ip policy route-map map-name
- 高速スイッチング
rt(config-if)# ip route-cache policy
- デフォルトはプロセス スイッチング
- IOS 12.0 以降で対応
条件指定 †
- AND 条件
rt(config-route-map)# match AAA
rt(config-route-map)# match BBB
- OR 条件
rt(config-route-map)# match AAA BBB
動作指定 †
- パケットを指定したルータへ転送
rt(config-route-map)# set ip next-hop ip-addr
- パケットを指定したインターフェースから転送
rt(config-route-map)# set interface type mod/num [type mod/num...]
- type mod/num
- 送信するインターフェース
- 複数ある場合は、有効なもののうち最初に設定された I/F が使われる
- 一致するルーティングが存在しない場合、パケットを指定したルータへ転送
rt(config-route-map)# set ip default next-hop ip-addr
- 一致するルーティングが存在しない場合、パケットを指定したルータから転送
rt(config-route-map)# set default interface
- TOS フィールド内の CoS を設定
rt(config-route-map)# set ip tos
- TOS フィールド内の QoS を設定
rt(config-route-map)# set ip precedence
確認 †
rt# show ip policy
rt# show route-map [map-name]
rt# debug ip policy
VRF [Virtual Routing and Forwarding] †
概要 †
- 1 台のルータに、仮想的に複数のルーティング テーブルを持たせる
設定 †
- VRF の有効化
rt(config)# ip vrf name
- インターフェースへの適用
rt(config)# interface type mod/num
rt(config-if)# ip vrf forwarding name
rt(config-if)# ip address ip-addr netmask
スタティック ルーティング †
rt(config)# ip route vrf name ip-addr netmask nexthop
ダイナミック ルーティング †
確認 †