展開モード

ルーティングの例

次に、仮想インラインの例に示すローカルサイトおよびリモートサイトの Cisco ルータの設定例を示します。ヘルスモニタリングを説明するために、ローカルサイトの構成にはヘルスモニタリングが含まれていますが、リモートサイトの構成には含まれていません。

注:ローカルサイトの構成では、pingモニターが既に構成されていることを前提としています。

例は、Cisco IOS CLIに準拠しています。他のベンダーのルーターには適用できない場合があります。

ローカルサイト、ヘルスチェックが有効:

``` pre codeblock ! ! For health-checking to work, do not forget to start ! the monitoring process. ! ! Original configuration is in normal type. ! appliance-specific configuration is in bold. ! ip cef ! interface FastEthernet0/0 ip address 10.10.10.5 255.255.255.0 ip policy route-map client_side_map ! interface FastEthernet0/1 ip address 172.68.1.5 255.255.255.0 ip policy route-map wan_side_map ! interface FastEthernet1/0 ip address 192.168.1.5 255.255.255.0 ! ip classless ip route 0.0.0.0 0.0.0.0 171.68.1.1 ! ip access-list extended client_side permit ip 10.10.10.0 0.0.0.255 10.16.20.0 0.0.0.255 ip access-list extended wan_side permit ip 10.16.20.0 0.0.0.255 10.10.10.0 0.0.0.255 ! route-map wan_side_map permit 20 match ip address wan_side !- Now set the appliance as the next hop, if it’s up. set ip next-hop verify-availability 192.168.1.200 20 track 123 ! route-map client_side_map permit 10 match ip address client_side set ip next-hop verify-availability 192.168.1.200 10 track 123


リモートサイト(ヘルスチェックなし):

``` pre codeblock
! This example does not use health-checking.
! Remember, health-checking is always recommended,
! so this is a configuration of last resort.
!
!
ip cef
!
interface FastEthernet0/0
ip address 20.20.20.5 255.255.255.0
ip policy route-map client_side_map
!
interface FastEthernet0/1
ip address 171.68.2.5 255.255.255.0
ip policy route-map wan_side_map
!
interface FastEthernet1/0
ip address 192.168.2.5 255.255.255.0
!
ip classless
ip route 0.0.0.0 0.0.0.0 171.68.2.1
!
ip access-list extended client_side
permit ip 10.16.20.0 0.0.0.255 10.10.10.0 0.0.0.255
ip access-list extended wan_side
permit ip 10.10.10.0 0.0.0.255 10.16.20.0 0.0.0.255
!
route-map wan_side_map permit 20
match ip address wan_side
set ip next-hop 192.168.2.200
!
route-map client_side_map permit 10
match ip address client_side
set ip next-hop 192.168.2.200
!_
<!--NeedCopy-->

上記の各例では、アクセスリストをルートマップに適用し、ルートマップをインターフェイスにアタッチします。アクセスリストは、一方の高速化されたサイトで発信され、もう一方のサイトで終了するすべてのトラフィックを識別します( 10.10.10.0/24 と目的地 20.20.20.0/24 またはその逆)。アクセスリストとルートマップの詳細については、ルーターのドキュメントを参照してください。

この構成は、一致するすべてのIPトラフィックをアプライアンスにリダイレクトします。TCPトラフィックのみをリダイレクトする場合は、アクセスリストの設定を次のように変更できます(リモート側の設定のみがここに表示されます)。

pre codeblock ! ip access-list extended client_side permit tcp 10.16.20.0 0.0.0.255 10.10.10.0 0.0.0.255 ip access-list extended wan_side permit tcp 10.10.10.0 0.0.0.255 10.16.20.0 0.0.0.255 ! <!--NeedCopy-->

アクセスリストの場合、通常のマスクは使用されないことに注意してください。代わりにワイルドカードマスクが使用されます。ワイルドカードマスクをバイナリで読み込む場合、「1」は「気にしない」ビットと見なされます。

ルーティングの例

この記事の概要