NETWORK ENGINEER BLOG

Tips and Reviews for Engineers

SEIL/x86 による疑似 VPN(L2TPv3 編)

SEIL/x86 の概要についてはこちらがご参考になれば幸いです。

検証環境

仮想ルータ(SEIL/x86)を使用して、L2TPv3 を構築する場合の設定例を紹介させて頂きます。基本的な環境はこちらと同様になります。

f:id:FriendsNow:20120211032749p:plain:w600

注意点があります。VMware の仮想スイッチは、プロミスキャスモードがデフォルトでは無効になっており、これが L2TPv3 の動作と矛盾してしまいます。具体的には、L2TPv3 により、L3 ネットワークをまたいで、対向の MAC アドレスを解決するため、ローカルホストは、仮想スイッチのポートグループが知らない 送信先 MAC アドレスを付与して、フレームを転送します。結果、仮想スイッチでフレームは破棄され、通信不可となります。回避策としては、仮想スイッチのプロミスキャスモードを有効にする以外にありません。なお、本検証環境では、各 LAN dvSwitch にて、有効にする必要があります。WAN dvSwitch では無効のままでも問題ありません。(Kobe, Osaka の SEIL/x86 は宛先 MAC を WAN_SEIL/x86 のそれに指定するため。)

設定例

各ルータの設定は以下のとおりです。

神戸拠点ルータ(SEIL/x86)
# show config l2tp
l2tp hostname Kobe_Router
l2tp router-id 10.1.1.1
l2tp add Osaka hostname Osaka_Router router-id 10.1.2.1 cookie off retry 10 hello-interval 60 password seil

# show config interface l2tp0
interface l2tp0 tunnel 10.1.1.1 10.1.2.1
interface l2tp0 l2tp Osaka remote-end-id L2TP-VPN

# show config bridge
bridge group add Bridge stp off
bridge interface lan2 group Bridge stp off
bridge interface l2tp0 group Bridge stp off

大阪拠点ルータ(SEIL/x86)
# show config l2tp
l2tp hostname Osaka_Router
l2tp router-id 10.1.2.1
l2tp add Kobe hostname Kobe_Router router-id 10.1.1.1 cookie off retry 10 hello-interval 60 password seil

# show config interface l2tp0
interface l2tp0 tunnel 10.1.2.1 10.1.1.1
interface l2tp0 l2tp Kobe remote-end-id L2TP-VPN

# show config bridge
bridge group add Bridge stp off
bridge interface lan2 group Bridge stp off
bridge interface l2tp0 group Bridge stp off

L2TPv3 確認例(神戸拠点ルータ)

# show status l2tp tunnel
L2TP Tunnel Status:
tunnel name=Osaka_10.1.2.1
    State            :established
    Peer Address     :10.1.2.1
    Remote Host Name :Osaka_Router
    Remote Router-ID :10.1.2.1
    Local Tunnel ID  :52599
    Remote Tunnel ID :45045
    Ns, Nr           :13, 15

# show status interface l2tp0
interface l2tp0:
        Description=""
        Status=L2TP state up, administratively up
        LastChange=2012/02/12 08:45:23
        Ipkts=605, Ierrs=0, Opkts=608, Oerrs=0, Colls=0
        InOctets=58249, OutOctets=58321, InDrops=0, OutDiscards=0
        InUnknownProtos=0
        Tunnel address=10.1.1.1 --> 10.1.2.1
        session id: local=65511, remote=24243

キャプチャ例:Kobe_WAN dvSwitch
f:id:FriendsNow:20120211085608j:plain

以上