「VRF」の編集履歴(バックアップ)一覧はこちら
「VRF」(2013/12/08 (日) 00:48:19) の最新版変更点
追加された行は緑色になります。
削除された行は赤色になります。
*VRF (Virtual Routing and Forwarding) Lite
>本来のルーティングテーブルGRT(Global Routing Table)に加えて、仮想ルーティングテーブルを持つことが出来る。
>>例)Catalyst3550のVRF-Liteにて、ルーティングテーブルを分離して(GRT, VRF-1)、OSPFによるルーティングを行う。このとき、VRF-1用のVLANとして、Vlan101を使用する。これにより、GRTではインターネットが不可に、VRF-1のみインターネットが可能になる。
>>※注意Catalyst 3550では以下のコマンドによるsdmの切り替え及び再起動が必要:「L3TCAM-3-SIZE_CONFLICT: [chars] requires enabling extended routing.」
>> Switch(config)# sdm prefer extended-match
>> Switch(config)# exit
>> Switch# reload
>>再起動後、VRF-1を作成する。Route Distinguisher番号は適当に100:1にしてみた。
>> Switch(config)# ip vrf VRF-1
>> Switch(config-vrf)# rd 100:1
>> Switch(config-vrf)# exit
>>各種インターフェースの設定、VRF-1用のVLANとしてvlan101、対向ルーター用の物理インターフェース、PC接続用物理インターフェースを設定し、VRF-1のルーティングテーブルに所属させる。
>>※すでにIPが設定されているインターフェースに「ip vrf forwarding」設定をするとIPが一旦削除されるので、注意!
>> Switch(config)# vlan 101
>> Switch(config-vlan)# name VRF1-VLAN01
>> Switch(config-vlan)# exit
>> Switch(config)# interface Vlan101
>> Switch(config-if)# ip vrf forwarding VRF-1
>> Switch(config-if)# ip address 192.168.101.254 255.255.255.0
>> Switch(config-if)# exit
>> Switch(config)# interface range FastEthernet0/1 - 16
>> Switch(config-if-range)# switchport access vlan 101
>> Switch(config)# exit
>> Switch(config)# interface Port-channel2
>> Switch(config-if)# no switchport
>> Switch(config-if)# no cdp enable
>> Switch(config-if)# no vtp
>> Switch(config-if)# ip vrf forwarding VRF-1
>> Switch(config-if)# ip address 172.16.254.253 255.255.255.0
>> Switch(config-if)# exit
>>OSPFでルーティングの設定を行う。
>>※ここで、Type3, 5のLSAを受け取るために「capability vrf-lite」を入れることに注意みたい(Type5 AS EX1が問題なく受信できてるけれどなぜ?)
>> Switch(config)# router ospf 1 vrf VRF-1
>> Switch(config-router)# network 192.168.101.254 0.0.0.0 area 1
>> Switch(config-router)# network 172.16.254.254 0.0.0.0 area 1
>> Switch(config-router)# capability vrf-lite
>> Switch(config-router)# exit
>参考:[[L3TCAM Messages >>http://www.cisco.com/en/US/docs/switches/lan/catalyst3550/software/release/12.1_12c_ea1/system/message/msg_desc.html]]
>参考:[[VRF-Lite>>http://packetlife.net/blog/2010/mar/29/inter-vrf-routing-vrf-lite/]]
>参考:[[capability vrf-lite コマンド>>http://blog.garenet.com/ryo/?p=78]]
>参考:[[TLS(広域イーサネットサービス)接続ネットワーク環境で VRF を使用した回線統合設定例>http://www.cisco.com/cisco/web/support/JP/102/1020/1020025_vrf.html]]
>*VRF環境にて各種コマンド実行時のVRF(source-interface)を指定する。
>例)copyコマンドのtftp指定時のVRF(source-interface vlan1001)を指定して接続する。
>(ping等はvrfの指定がオプションで出来るが、copy等はコマンド自体にvrf指定のオプションがない。)
>・Switch#ping vrf MGT-LAN 192.168.0.1
>・Switch(config)#ip tftp source-interface vlan1001
>また、sshのsource-interfaceも同様に指定できるが、以下のようにVRF環境のsource-interfaceまで指定できなかった・・・なぜ?
>・Switch(config)#ip ssh source-interface vlan1001
>Switch#ssh -l user01 172.16.0.254
>Destination unreachable; gateway or host down
>
>Route Target等は以下のリンク参照!
>
>参考:[[管理イーサネット インターフェイスの使用>http://www.cisco.com/cisco/web/support/JP/docs/RT/WANAggregationInternetEdgeRT/ASR1000AggregationServsRT/CG/001/Management_Ethernet.html]]
>参考:[[Cisco AutoInstall - # cat /var/log/stereocat | tail -n3>http://d.hatena.ne.jp/stereocat/20120203/1328281788]]
>参考:[[VRF Export Maps>http://packetlife.net/blog/2013/sep/26/vrf-export-maps/]]
>参考:[[Route Distinguishers and Route Targets>http://packetlife.net/blog/2013/jun/10/route-distinguishers-and-route-targets/]]
*VRF (Virtual Routing and Forwarding) Lite
>本来のルーティングテーブルGRT(Global [[Routing]] Table)に加えて、仮想ルーティングテーブルを持つことが出来る。
>>例)Catalyst3550のVRF-Liteにて、ルーティングテーブルを分離して(GRT, VRF-1)、[[OSPF]]によるルーティングを行う。このとき、VRF-1用の[[VLAN]]として、Vlan101を使用する。これにより、GRTではインターネットが不可に、VRF-1のみインターネットが可能になる。
>>※注意Catalyst 3550では以下のコマンドによるsdmの切り替え及び再起動が必要:「L3TCAM-3-SIZE_CONFLICT: [chars] requires enabling extended routing.」
>> Switch(config)# sdm prefer extended-match
>> Switch(config)# exit
>> Switch# reload
>>再起動後、VRF-1を作成する。Route Distinguisher番号は適当に100:1にしてみた。
>> Switch(config)# ip vrf VRF-1
>> Switch(config-vrf)# rd 100:1
>> Switch(config-vrf)# exit
>>各種インターフェースの設定、VRF-1用のVLANとしてvlan101、対向ルーター用の物理インターフェース、PC接続用物理インターフェースを設定し、VRF-1のルーティングテーブルに所属させる。
>>※すでにIPが設定されているインターフェースに「ip vrf forwarding」設定をするとIPが一旦削除されるので、注意!
>> Switch(config)# vlan 101
>> Switch(config-vlan)# name VRF1-VLAN01
>> Switch(config-vlan)# exit
>> Switch(config)# interface Vlan101
>> Switch(config-if)# ip vrf forwarding VRF-1
>> Switch(config-if)# ip address 192.168.101.254 255.255.255.0
>> Switch(config-if)# exit
>> Switch(config)# interface range FastEthernet0/1 - 16
>> Switch(config-if-range)# switchport access vlan 101
>> Switch(config)# exit
>> Switch(config)# interface Port-channel2
>> Switch(config-if)# no switchport
>> Switch(config-if)# no cdp enable
>> Switch(config-if)# no vtp
>> Switch(config-if)# ip vrf forwarding VRF-1
>> Switch(config-if)# ip address 172.16.254.253 255.255.255.0
>> Switch(config-if)# exit
>>OSPFでルーティングの設定を行う。
>>※ここで、Type3, 5のLSAを受け取るために「capability vrf-lite」を入れることに注意みたい(Type5 AS EX1が問題なく受信できてるけれどなぜ?)
>> Switch(config)# router ospf 1 vrf VRF-1
>> Switch(config-router)# [[network]] 192.168.101.254 0.0.0.0 area 1
>> Switch(config-router)# network 172.16.254.254 0.0.0.0 area 1
>> Switch(config-router)# capability vrf-lite
>> Switch(config-router)# exit
>参考:[[L3TCAM Messages >>http://www.cisco.com/en/US/docs/switches/lan/catalyst3550/software/release/12.1_12c_ea1/system/message/msg_desc.html]]
>参考:[[VRF-Lite>>http://packetlife.net/blog/2010/mar/29/inter-vrf-routing-vrf-lite/]]
>参考:[[capability vrf-lite コマンド>>http://blog.garenet.com/ryo/?p=78]]
>参考:[[TLS(広域イーサネットサービス)接続ネットワーク環境で VRF を使用した回線統合設定例>http://www.cisco.com/cisco/web/support/JP/102/1020/1020025_vrf.html]]
>*VRF環境にて各種コマンド実行時のVRF(source-interface)を指定する。
>例)copyコマンドのtftp指定時のVRF(source-interface vlan1001)を指定して接続する。
>(ping等はvrfの指定がオプションで出来るが、copy等はコマンド自体にvrf指定のオプションがない。)
>・Switch#ping vrf MGT-LAN 192.168.0.1
>・Switch(config)#ip tftp source-interface vlan1001
>また、sshのsource-interfaceも同様に指定できるが、以下のようにVRF環境のsource-interfaceまで指定できなかった・・・なぜ?
>・Switch(config)#ip ssh source-interface vlan1001
>Switch#ssh -l user01 172.16.0.254
>Destination unreachable; gateway or host down
>
>Route Target等は以下のリンク参照!
>
>参考:[[管理イーサネット インターフェイスの使用>http://www.cisco.com/cisco/web/support/JP/docs/RT/WANAggregationInternetEdgeRT/ASR1000AggregationServsRT/CG/001/Management_Ethernet.html]]
>参考:[[Cisco AutoInstall - # cat /var/log/stereocat | tail -n3>http://d.hatena.ne.jp/stereocat/20120203/1328281788]]
>参考:[[VRF Export Maps>http://packetlife.net/blog/2013/sep/26/vrf-export-maps/]]
>参考:[[Route Distinguishers and Route Targets>http://packetlife.net/blog/2013/jun/10/route-distinguishers-and-route-targets/]]