SlideShare une entreprise Scribd logo
VTI の中身
浅間 正和 @ 有限会社 銀座堂
VTI とは?


•   Virtual Tunnel Interface の略で Vyatta ( Network
    OS | Core ) 6.5R1 から実装された中身が暗号化
    される IP-IP tunnel のようなモノ
Benefits

•   They are capable of having traffic routed to them 
•   They are capable of passing routing protocols over 
    them 
•   They do not require local or remote subnets to be 
    specified 
•   They operate as if the peer interfaces are directly 
    connected 

(Vyatta VPN Reference Guide 6.5R1 v01 より引用)
Vyatta configuration の違い
                                    interfaces {
                                      vti vti0 {
                                      }
                                    }
vpn {
                                    protocols {
  ipsec {
                                      static
    site-to-site {
                                        interface-route 192.168.2.0/24 {
      peer 172.16.1.2 {
                                          next-hop-interface vti0 {
        default-esp-group ESP-G
                                          }
        ike-group IKE-G
                                        }
        local-address 172.16.1.1
                                      }
        tunnel 1 {
                                    }
          local {
                                    vpn {
            prefix 192.168.1.0/24
                                      ipsec {
          }
                                        site-to-site {
          remote {
                                          peer 172.16.1.2 {
            prefix 192.168.2.0/24
                                             ike-group IKE-G
          }
                                             local-address 172.16.1.1
        }
                                            vti {
      }
                                               bind vti0
    }
                                               esp-group ESP-G
  }
                                            }
}
                                          }
                                        }
                                      }
                                    }
                 従来                                   VTI
/etc/ipsec.conf の違い

                                     conn peer-172.16.1.2-tunnel-vti
conn peer-172.16.1.2-tunnel-1                left=172.16.1.1
        left=172.16.1.1                      right=172.16.1.2
        right=172.16.1.2                     leftsubnet=0.0.0.0/0
        leftsubnet=192.168.1.0/24            rightsubnet=0.0.0.0/0
        rightsubnet=192.168.2.0/24           ike=aes256-sha1!
        leftsourceip=192.168.1.1             ikelifetime=28800s
        ike=aes256-sha1!                     esp=aes256-sha1!
        ikelifetime=28800s                   keylife=3600s
        esp=aes256-sha1!                     rekeymargin=540s
        keylife=3600s                        type=tunnel
        rekeymargin=540s                     pfs=yes
        type=tunnel                          compress=no
        pfs=yes                              authby=secret
        compress=no                          mark=2415919105
        authby=secret                        leftupdown="/usr/lib/ipsec/vti-
        auto=start                   up-down.sh vti0"
        keyingtries=%forever                 auto=start
                                             keyingtries=%forever




                 従来                                    VTI
ip xfrm policy list 実行結果の違い


                                        src 0.0.0.0/0 dst 0.0.0.0/0
                                          dir out priority 2051
src 192.168.1.0/24 dst 192.168.2.0/24
                                          mark -1879048191/0xffffffff
  dir out priority 1859
                                          tmpl src 172.16.1.1 dst 172.16.1.2
  tmpl src 172.16.1.1 dst 172.16.1.2
                                            proto esp reqid 16384 mode tunnel
    proto esp reqid 16384 mode tunnel
                                        src 0.0.0.0/0 dst 0.0.0.0/0
src 192.168.2.0/24 dst 192.168.1.0/24
                                          dir fwd priority 2051
  dir fwd priority 1859
                                          mark -1879048191/0xffffffff
  tmpl src 172.16.1.2 dst 172.16.1.1
                                          tmpl src 172.16.1.2 dst 172.16.1.1
    proto esp reqid 16384 mode tunnel
                                            proto esp reqid 16384 mode tunnel
src 192.168.2.0/24 dst 192.168.1.0/24
                                        src 0.0.0.0/0 dst 0.0.0.0/0
  dir in priority 1859
                                          dir in priority 2051
  tmpl src 172.16.1.2 dst 172.16.1.1
                                          mark -1879048191/0xffffffff
    proto esp reqid 16384 mode tunnel
                                          tmpl src 172.16.1.2 dst 172.16.1.1
                                            proto esp reqid 16384 mode tunnel




                 従来                                       VTI
設定時の流れ
•   /opt/vyatta/sbin/vpn-config.pl が実行される
    •   /etc/ipsec.conf の生成と ipsec start の実行
•   /opt/vyatta/sbin/vyatta-vti-config.pl が実行される
    •   sudo /opt/vyatta/sbin/cfgvti add name $tunName  
        key $mark remote $remote local $local の実行
    •   sudo iptables -t mangle -D PREROUTING -s  
        $remote -d $local ( -p esp | -p udp --dport 4500 ) 
        -j MARK --set-mark $mark の実行
/opt/vyatta/sbin/cfgvti
•   git repo の build-iso/pkgs/vyatta-cfg-vpn/src/cfgvti.c 
•   … C で書かれたプログラム…なぜ…?
•   なななんと実は VTI は net/ipv4/ipip.ko ではなく
    net/ipv4/ip_vti.ko だった…。

    commit 1181412c1a671ed4e8fb1736f17e6ec617c68059
    Author: Saurabh <saurabh.mohan@vyatta.com>
    Date:   Tue Jul 17 09:44:54 2012 +0000

        net/ipv4: VTI support new module for ip_vti.

        New VTI tunnel kernel module, Kconfig and Makefile changes.

        Signed-off-by: Saurabh Mohan <saurabh.mohan@vyatta.com>
        Reviewed-by: Stephen Hemminger <shemminger@vyatta.com>
        Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_vti.ko

•   Linux kernel の main line には v3.6 から merge
•   (Vyatta 6.5R1 は v3.3 なので backport?)
•   net/ipv4/ipip.ko を元にしているが xfrm の esp
    が処理してくれる encap/decap は省かれている
•   一番重要な違いは xmit 時に mark を付けるこ
    とで xfrm policy に引っ掛けるようにしている
    こと
送受信時の流れ
•   送信時の流れ
    •   net/ipv4/ip_vti.ko の vti_tunnel_xmit が呼ば
        れる
    •   VTI を一意に表す mark を付け xfrm に流す
    •   xfrm が encap し暗号化
•   受信時の流れ
    •   Netfilter が mask を付ける
    •   mark から xfrm policy が判明し復号化と
        decap 処理
まとめ
•   Dynamic routing や QoS と組み合わせて使え
    るのはかなり便利?
•   もとは Cisco さんが最初にやった方式?
    Vyatta VPN Reference にも compatible with 3rd
    party VTI/route-based VPN connections と書か
    れているので相互接続性もバッチリ?
•   ちなみに … and is sometimes required for
    connectivity with pubic cloud offerings だそう
    です…

Contenu connexe

Tendances

The Forefront of the Development for NVDIMM on Linux Kernel (Linux Plumbers c...
The Forefront of the Development for NVDIMM on Linux Kernel (Linux Plumbers c...The Forefront of the Development for NVDIMM on Linux Kernel (Linux Plumbers c...
The Forefront of the Development for NVDIMM on Linux Kernel (Linux Plumbers c...
Yasunori Goto
 
POWER10 innovations for HPC
POWER10 innovations for HPCPOWER10 innovations for HPC
POWER10 innovations for HPC
Ganesan Narayanasamy
 
OpenStackで始めるクラウド環境構築入門(Horizon 基礎編)
OpenStackで始めるクラウド環境構築入門(Horizon 基礎編)OpenStackで始めるクラウド環境構築入門(Horizon 基礎編)
OpenStackで始めるクラウド環境構築入門(Horizon 基礎編)
VirtualTech Japan Inc.
 
Osic tech talk presentation on ironic inspector
Osic tech talk presentation on ironic inspectorOsic tech talk presentation on ironic inspector
Osic tech talk presentation on ironic inspector
Annie Lezil
 
ACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introduction
ACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introductionACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introduction
ACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introduction
Project ACRN
 
Profiling the ACPICA Namespace and Event Handing
Profiling the ACPICA Namespace and Event HandingProfiling the ACPICA Namespace and Event Handing
Profiling the ACPICA Namespace and Event Handing
SUSE Labs Taipei
 
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
Linaro
 
OpenStack概要 ~仮想ネットワーク~
OpenStack概要 ~仮想ネットワーク~OpenStack概要 ~仮想ネットワーク~
OpenStack概要 ~仮想ネットワーク~
Masaya Aoyama
 
日本OpenStackユーザ会 第37回勉強会
日本OpenStackユーザ会 第37回勉強会日本OpenStackユーザ会 第37回勉強会
日本OpenStackユーザ会 第37回勉強会
Yushiro Furukawa
 
Qemu Pcie
Qemu PcieQemu Pcie
Accelerating Virtual Machine Access with the Storage Performance Development ...
Accelerating Virtual Machine Access with the Storage Performance Development ...Accelerating Virtual Machine Access with the Storage Performance Development ...
Accelerating Virtual Machine Access with the Storage Performance Development ...
Michelle Holley
 
Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)
Andriy Berestovskyy
 
The Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast StorageThe Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast Storage
Kernel TLV
 
Quick and Easy Device Drivers for Embedded Linux Using UIO
Quick and Easy Device Drivers for Embedded Linux Using UIOQuick and Easy Device Drivers for Embedded Linux Using UIO
Quick and Easy Device Drivers for Embedded Linux Using UIO
Chris Simmonds
 
FD.IO Vector Packet Processing
FD.IO Vector Packet ProcessingFD.IO Vector Packet Processing
FD.IO Vector Packet Processing
Kernel TLV
 
DPDK & Layer 4 Packet Processing
DPDK & Layer 4 Packet ProcessingDPDK & Layer 4 Packet Processing
DPDK & Layer 4 Packet Processing
Michelle Holley
 
Qemu device prototyping
Qemu device prototypingQemu device prototyping
Qemu device prototyping
Yan Vugenfirer
 
FPGAs : An Overview
FPGAs : An OverviewFPGAs : An Overview
FPGAs : An Overview
Sanjiv Malik
 
Enable DPDK and SR-IOV for containerized virtual network functions with zun
Enable DPDK and SR-IOV for containerized virtual network functions with zunEnable DPDK and SR-IOV for containerized virtual network functions with zun
Enable DPDK and SR-IOV for containerized virtual network functions with zun
heut2008
 
OpenWhiskを使ってみた
OpenWhiskを使ってみたOpenWhiskを使ってみた
OpenWhiskを使ってみた
Kozo Fukugauchi
 

Tendances (20)

The Forefront of the Development for NVDIMM on Linux Kernel (Linux Plumbers c...
The Forefront of the Development for NVDIMM on Linux Kernel (Linux Plumbers c...The Forefront of the Development for NVDIMM on Linux Kernel (Linux Plumbers c...
The Forefront of the Development for NVDIMM on Linux Kernel (Linux Plumbers c...
 
POWER10 innovations for HPC
POWER10 innovations for HPCPOWER10 innovations for HPC
POWER10 innovations for HPC
 
OpenStackで始めるクラウド環境構築入門(Horizon 基礎編)
OpenStackで始めるクラウド環境構築入門(Horizon 基礎編)OpenStackで始めるクラウド環境構築入門(Horizon 基礎編)
OpenStackで始めるクラウド環境構築入門(Horizon 基礎編)
 
Osic tech talk presentation on ironic inspector
Osic tech talk presentation on ironic inspectorOsic tech talk presentation on ironic inspector
Osic tech talk presentation on ironic inspector
 
ACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introduction
ACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introductionACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introduction
ACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introduction
 
Profiling the ACPICA Namespace and Event Handing
Profiling the ACPICA Namespace and Event HandingProfiling the ACPICA Namespace and Event Handing
Profiling the ACPICA Namespace and Event Handing
 
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
 
OpenStack概要 ~仮想ネットワーク~
OpenStack概要 ~仮想ネットワーク~OpenStack概要 ~仮想ネットワーク~
OpenStack概要 ~仮想ネットワーク~
 
日本OpenStackユーザ会 第37回勉強会
日本OpenStackユーザ会 第37回勉強会日本OpenStackユーザ会 第37回勉強会
日本OpenStackユーザ会 第37回勉強会
 
Qemu Pcie
Qemu PcieQemu Pcie
Qemu Pcie
 
Accelerating Virtual Machine Access with the Storage Performance Development ...
Accelerating Virtual Machine Access with the Storage Performance Development ...Accelerating Virtual Machine Access with the Storage Performance Development ...
Accelerating Virtual Machine Access with the Storage Performance Development ...
 
Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)
 
The Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast StorageThe Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast Storage
 
Quick and Easy Device Drivers for Embedded Linux Using UIO
Quick and Easy Device Drivers for Embedded Linux Using UIOQuick and Easy Device Drivers for Embedded Linux Using UIO
Quick and Easy Device Drivers for Embedded Linux Using UIO
 
FD.IO Vector Packet Processing
FD.IO Vector Packet ProcessingFD.IO Vector Packet Processing
FD.IO Vector Packet Processing
 
DPDK & Layer 4 Packet Processing
DPDK & Layer 4 Packet ProcessingDPDK & Layer 4 Packet Processing
DPDK & Layer 4 Packet Processing
 
Qemu device prototyping
Qemu device prototypingQemu device prototyping
Qemu device prototyping
 
FPGAs : An Overview
FPGAs : An OverviewFPGAs : An Overview
FPGAs : An Overview
 
Enable DPDK and SR-IOV for containerized virtual network functions with zun
Enable DPDK and SR-IOV for containerized virtual network functions with zunEnable DPDK and SR-IOV for containerized virtual network functions with zun
Enable DPDK and SR-IOV for containerized virtual network functions with zun
 
OpenWhiskを使ってみた
OpenWhiskを使ってみたOpenWhiskを使ってみた
OpenWhiskを使ってみた
 

En vedette

Hydrogen → Helium での Linux kernel の違い
Hydrogen → Helium での Linux kernel の違いHydrogen → Helium での Linux kernel の違い
Hydrogen → Helium での Linux kernel の違い
Masakazu Asama
 
AndroidStudioのインストールをゼロからしてみる
AndroidStudioのインストールをゼロからしてみるAndroidStudioのインストールをゼロからしてみる
AndroidStudioのインストールをゼロからしてみる
Shigeo Ueda
 
VTI presentation
VTI presentationVTI presentation
VTI presentation
jleui
 
MRAI, BGP Widthdrawn and Packet Loss
MRAI, BGP Widthdrawn and Packet LossMRAI, BGP Widthdrawn and Packet Loss
MRAI, BGP Widthdrawn and Packet Loss
Shintaro Kojima
 
中高生向けUnity講座
中高生向けUnity講座中高生向けUnity講座
中高生向けUnity講座
MakotoItoh
 
Unity恐くないよ!!
Unity恐くないよ!!Unity恐くないよ!!
Unity恐くないよ!!
nakamura001
 
さくらのクラウドでVyOS使ってみた
さくらのクラウドでVyOS使ってみたさくらのクラウドでVyOS使ってみた
さくらのクラウドでVyOS使ってみた
SAKURA Internet Inc.
 
ASAMAP 開発秘話
ASAMAP 開発秘話ASAMAP 開発秘話
ASAMAP 開発秘話
Masakazu Asama
 
Variable Valve Timing
Variable Valve TimingVariable Valve Timing
Variable Valve Timing
Sourav Bagchi
 
Variable Valve Timing (VVT)
Variable Valve Timing (VVT)Variable Valve Timing (VVT)
Variable Valve Timing (VVT)
Kaustubh Gaonkar
 

En vedette (10)

Hydrogen → Helium での Linux kernel の違い
Hydrogen → Helium での Linux kernel の違いHydrogen → Helium での Linux kernel の違い
Hydrogen → Helium での Linux kernel の違い
 
AndroidStudioのインストールをゼロからしてみる
AndroidStudioのインストールをゼロからしてみるAndroidStudioのインストールをゼロからしてみる
AndroidStudioのインストールをゼロからしてみる
 
VTI presentation
VTI presentationVTI presentation
VTI presentation
 
MRAI, BGP Widthdrawn and Packet Loss
MRAI, BGP Widthdrawn and Packet LossMRAI, BGP Widthdrawn and Packet Loss
MRAI, BGP Widthdrawn and Packet Loss
 
中高生向けUnity講座
中高生向けUnity講座中高生向けUnity講座
中高生向けUnity講座
 
Unity恐くないよ!!
Unity恐くないよ!!Unity恐くないよ!!
Unity恐くないよ!!
 
さくらのクラウドでVyOS使ってみた
さくらのクラウドでVyOS使ってみたさくらのクラウドでVyOS使ってみた
さくらのクラウドでVyOS使ってみた
 
ASAMAP 開発秘話
ASAMAP 開発秘話ASAMAP 開発秘話
ASAMAP 開発秘話
 
Variable Valve Timing
Variable Valve TimingVariable Valve Timing
Variable Valve Timing
 
Variable Valve Timing (VVT)
Variable Valve Timing (VVT)Variable Valve Timing (VVT)
Variable Valve Timing (VVT)
 

Similaire à VTI の中身

Container Networking Deep Dive
Container Networking Deep DiveContainer Networking Deep Dive
Container Networking Deep Dive
Hirofumi Ichihara
 
コンテナネットワーキング(CNI)最前線
コンテナネットワーキング(CNI)最前線コンテナネットワーキング(CNI)最前線
コンテナネットワーキング(CNI)最前線
Motonori Shindo
 
FD.io VPP事始め
FD.io VPP事始めFD.io VPP事始め
FD.io VPP事始め
tetsusat
 
VPP事始め
VPP事始めVPP事始め
VPP事始め
npsg
 
Openvswitch vps 20120429資料
Openvswitch vps 20120429資料Openvswitch vps 20120429資料
Openvswitch vps 20120429資料Daisuke Nakajima
 
SCUGJ第19回勉強会:RASGWとなにかでつないでみた
SCUGJ第19回勉強会:RASGWとなにかでつないでみたSCUGJ第19回勉強会:RASGWとなにかでつないでみた
SCUGJ第19回勉強会:RASGWとなにかでつないでみた
wind06106
 
Interrupt Affinityについて
Interrupt AffinityについてInterrupt Affinityについて
Interrupt AffinityについてTakuya ASADA
 
「さくらのクラウド」におけるVyattaの活用事例
「さくらのクラウド」におけるVyattaの活用事例「さくらのクラウド」におけるVyattaの活用事例
「さくらのクラウド」におけるVyattaの活用事例SAKURA Internet Inc.
 
自宅スケーラブル・ファイルシステムのご紹介
自宅スケーラブル・ファイルシステムのご紹介自宅スケーラブル・ファイルシステムのご紹介
自宅スケーラブル・ファイルシステムのご紹介Kentaro Mitsuyasu
 
Bird in show_net
Bird in show_netBird in show_net
Bird in show_net
Tomoya Hibi
 
SDN Lab環境でのRobotFramework実践活用
SDN Lab環境でのRobotFramework実践活用SDN Lab環境でのRobotFramework実践活用
SDN Lab環境でのRobotFramework実践活用Toshiki Tsuboi
 
「前回の COMSTAR ネタに刺激されてしまったので、オレも COMSTAR を使ってみた。」(仮)
「前回の COMSTAR ネタに刺激されてしまったので、オレも COMSTAR を使ってみた。」(仮)「前回の COMSTAR ネタに刺激されてしまったので、オレも COMSTAR を使ってみた。」(仮)
「前回の COMSTAR ネタに刺激されてしまったので、オレも COMSTAR を使ってみた。」(仮)Kazuyuki Sato
 
VYATTA USERS MEETING Autumn 2013_idcf
VYATTA USERS MEETING Autumn 2013_idcfVYATTA USERS MEETING Autumn 2013_idcf
VYATTA USERS MEETING Autumn 2013_idcf
IDC Frontier
 
HaskellではじめるCortex-M3組込みプログラミング
HaskellではじめるCortex-M3組込みプログラミングHaskellではじめるCortex-M3組込みプログラミング
HaskellではじめるCortex-M3組込みプログラミングKiwamu Okabe
 
FreeBSDでおうちのルーター
FreeBSDでおうちのルーターFreeBSDでおうちのルーター
FreeBSDでおうちのルーター
hoo0005
 
OpenStack + OpenContrailで実現するマルチテナントIaaSのご紹介
OpenStack + OpenContrailで実現するマルチテナントIaaSのご紹介OpenStack + OpenContrailで実現するマルチテナントIaaSのご紹介
OpenStack + OpenContrailで実現するマルチテナントIaaSのご紹介
Takashi Sogabe
 
Technical report for IPv6 Routing w/ bgp4+
Technical report for IPv6 Routing w/ bgp4+Technical report for IPv6 Routing w/ bgp4+
Technical report for IPv6 Routing w/ bgp4+
Toshiki Tsuboi
 
スタート低レイヤー #0
スタート低レイヤー #0スタート低レイヤー #0
スタート低レイヤー #0Kiwamu Okabe
 
ほしいプロトコルはトンネルすればいいじゃない at JAWS DAYS 2014 Tech Deep Dive
ほしいプロトコルはトンネルすればいいじゃない at JAWS DAYS 2014 Tech Deep Diveほしいプロトコルはトンネルすればいいじゃない at JAWS DAYS 2014 Tech Deep Dive
ほしいプロトコルはトンネルすればいいじゃない at JAWS DAYS 2014 Tech Deep Dive
Yasuhiro Araki, Ph.D
 

Similaire à VTI の中身 (20)

Container Networking Deep Dive
Container Networking Deep DiveContainer Networking Deep Dive
Container Networking Deep Dive
 
コンテナネットワーキング(CNI)最前線
コンテナネットワーキング(CNI)最前線コンテナネットワーキング(CNI)最前線
コンテナネットワーキング(CNI)最前線
 
FD.io VPP事始め
FD.io VPP事始めFD.io VPP事始め
FD.io VPP事始め
 
VPP事始め
VPP事始めVPP事始め
VPP事始め
 
Openvswitch vps 20120429資料
Openvswitch vps 20120429資料Openvswitch vps 20120429資料
Openvswitch vps 20120429資料
 
SCUGJ第19回勉強会:RASGWとなにかでつないでみた
SCUGJ第19回勉強会:RASGWとなにかでつないでみたSCUGJ第19回勉強会:RASGWとなにかでつないでみた
SCUGJ第19回勉強会:RASGWとなにかでつないでみた
 
Interrupt Affinityについて
Interrupt AffinityについてInterrupt Affinityについて
Interrupt Affinityについて
 
「さくらのクラウド」におけるVyattaの活用事例
「さくらのクラウド」におけるVyattaの活用事例「さくらのクラウド」におけるVyattaの活用事例
「さくらのクラウド」におけるVyattaの活用事例
 
自宅スケーラブル・ファイルシステムのご紹介
自宅スケーラブル・ファイルシステムのご紹介自宅スケーラブル・ファイルシステムのご紹介
自宅スケーラブル・ファイルシステムのご紹介
 
Bird in show_net
Bird in show_netBird in show_net
Bird in show_net
 
SDN Lab環境でのRobotFramework実践活用
SDN Lab環境でのRobotFramework実践活用SDN Lab環境でのRobotFramework実践活用
SDN Lab環境でのRobotFramework実践活用
 
「前回の COMSTAR ネタに刺激されてしまったので、オレも COMSTAR を使ってみた。」(仮)
「前回の COMSTAR ネタに刺激されてしまったので、オレも COMSTAR を使ってみた。」(仮)「前回の COMSTAR ネタに刺激されてしまったので、オレも COMSTAR を使ってみた。」(仮)
「前回の COMSTAR ネタに刺激されてしまったので、オレも COMSTAR を使ってみた。」(仮)
 
VYATTA USERS MEETING Autumn 2013_idcf
VYATTA USERS MEETING Autumn 2013_idcfVYATTA USERS MEETING Autumn 2013_idcf
VYATTA USERS MEETING Autumn 2013_idcf
 
HaskellではじめるCortex-M3組込みプログラミング
HaskellではじめるCortex-M3組込みプログラミングHaskellではじめるCortex-M3組込みプログラミング
HaskellではじめるCortex-M3組込みプログラミング
 
FreeBSDでおうちのルーター
FreeBSDでおうちのルーターFreeBSDでおうちのルーター
FreeBSDでおうちのルーター
 
OpenStack + OpenContrailで実現するマルチテナントIaaSのご紹介
OpenStack + OpenContrailで実現するマルチテナントIaaSのご紹介OpenStack + OpenContrailで実現するマルチテナントIaaSのご紹介
OpenStack + OpenContrailで実現するマルチテナントIaaSのご紹介
 
Technical report for IPv6 Routing w/ bgp4+
Technical report for IPv6 Routing w/ bgp4+Technical report for IPv6 Routing w/ bgp4+
Technical report for IPv6 Routing w/ bgp4+
 
Inside winnyp
Inside winnypInside winnyp
Inside winnyp
 
スタート低レイヤー #0
スタート低レイヤー #0スタート低レイヤー #0
スタート低レイヤー #0
 
ほしいプロトコルはトンネルすればいいじゃない at JAWS DAYS 2014 Tech Deep Dive
ほしいプロトコルはトンネルすればいいじゃない at JAWS DAYS 2014 Tech Deep Diveほしいプロトコルはトンネルすればいいじゃない at JAWS DAYS 2014 Tech Deep Dive
ほしいプロトコルはトンネルすればいいじゃない at JAWS DAYS 2014 Tech Deep Dive
 

Plus de Masakazu Asama

openconfigd
openconfigdopenconfigd
openconfigd
Masakazu Asama
 
NETCONFとYANGの話
NETCONFとYANGの話NETCONFとYANGの話
NETCONFとYANGの話
Masakazu Asama
 
Linux packet-forwarding
Linux packet-forwardingLinux packet-forwarding
Linux packet-forwardingMasakazu Asama
 
ASAMAP Update
ASAMAP UpdateASAMAP Update
ASAMAP Update
Masakazu Asama
 
Vyatta 改造入門
Vyatta 改造入門Vyatta 改造入門
Vyatta 改造入門
Masakazu Asama
 
MAP 実装してみた
MAP 実装してみたMAP 実装してみた
MAP 実装してみた
Masakazu Asama
 

Plus de Masakazu Asama (6)

openconfigd
openconfigdopenconfigd
openconfigd
 
NETCONFとYANGの話
NETCONFとYANGの話NETCONFとYANGの話
NETCONFとYANGの話
 
Linux packet-forwarding
Linux packet-forwardingLinux packet-forwarding
Linux packet-forwarding
 
ASAMAP Update
ASAMAP UpdateASAMAP Update
ASAMAP Update
 
Vyatta 改造入門
Vyatta 改造入門Vyatta 改造入門
Vyatta 改造入門
 
MAP 実装してみた
MAP 実装してみたMAP 実装してみた
MAP 実装してみた
 

Dernier

生成AIがもたらすコンテンツ経済圏の新時代  The New Era of Content Economy Brought by Generative AI
生成AIがもたらすコンテンツ経済圏の新時代  The New Era of Content Economy Brought by Generative AI生成AIがもたらすコンテンツ経済圏の新時代  The New Era of Content Economy Brought by Generative AI
生成AIがもたらすコンテンツ経済圏の新時代  The New Era of Content Economy Brought by Generative AI
Osaka University
 
論文紹介:Deep Learning-Based Human Pose Estimation: A Survey
論文紹介:Deep Learning-Based Human Pose Estimation: A Survey論文紹介:Deep Learning-Based Human Pose Estimation: A Survey
論文紹介:Deep Learning-Based Human Pose Estimation: A Survey
Toru Tamaki
 
Generating Automatic Feedback on UI Mockups with Large Language Models
Generating Automatic Feedback on UI Mockups with Large Language ModelsGenerating Automatic Feedback on UI Mockups with Large Language Models
Generating Automatic Feedback on UI Mockups with Large Language Models
harmonylab
 
「進化するアプリ イマ×ミライ ~生成AIアプリへ続く道と新時代のアプリとは~」Interop24Tokyo APPS JAPAN B1-01講演
「進化するアプリ イマ×ミライ ~生成AIアプリへ続く道と新時代のアプリとは~」Interop24Tokyo APPS JAPAN B1-01講演「進化するアプリ イマ×ミライ ~生成AIアプリへ続く道と新時代のアプリとは~」Interop24Tokyo APPS JAPAN B1-01講演
「進化するアプリ イマ×ミライ ~生成AIアプリへ続く道と新時代のアプリとは~」Interop24Tokyo APPS JAPAN B1-01講演
嶋 是一 (Yoshikazu SHIMA)
 
ロジックから状態を分離する技術/設計ナイト2024 by わいとん @ytnobody
ロジックから状態を分離する技術/設計ナイト2024 by わいとん @ytnobodyロジックから状態を分離する技術/設計ナイト2024 by わいとん @ytnobody
ロジックから状態を分離する技術/設計ナイト2024 by わいとん @ytnobody
azuma satoshi
 
Humanoid Virtual Athletics Challenge2024 技術講習会 スライド
Humanoid Virtual Athletics Challenge2024 技術講習会 スライドHumanoid Virtual Athletics Challenge2024 技術講習会 スライド
Humanoid Virtual Athletics Challenge2024 技術講習会 スライド
tazaki1
 
ハイブリッドクラウド研究会_Hyper-VとSystem Center Virtual Machine Manager セッションMM
ハイブリッドクラウド研究会_Hyper-VとSystem Center Virtual Machine Manager セッションMMハイブリッドクラウド研究会_Hyper-VとSystem Center Virtual Machine Manager セッションMM
ハイブリッドクラウド研究会_Hyper-VとSystem Center Virtual Machine Manager セッションMM
osamut
 

Dernier (7)

生成AIがもたらすコンテンツ経済圏の新時代  The New Era of Content Economy Brought by Generative AI
生成AIがもたらすコンテンツ経済圏の新時代  The New Era of Content Economy Brought by Generative AI生成AIがもたらすコンテンツ経済圏の新時代  The New Era of Content Economy Brought by Generative AI
生成AIがもたらすコンテンツ経済圏の新時代  The New Era of Content Economy Brought by Generative AI
 
論文紹介:Deep Learning-Based Human Pose Estimation: A Survey
論文紹介:Deep Learning-Based Human Pose Estimation: A Survey論文紹介:Deep Learning-Based Human Pose Estimation: A Survey
論文紹介:Deep Learning-Based Human Pose Estimation: A Survey
 
Generating Automatic Feedback on UI Mockups with Large Language Models
Generating Automatic Feedback on UI Mockups with Large Language ModelsGenerating Automatic Feedback on UI Mockups with Large Language Models
Generating Automatic Feedback on UI Mockups with Large Language Models
 
「進化するアプリ イマ×ミライ ~生成AIアプリへ続く道と新時代のアプリとは~」Interop24Tokyo APPS JAPAN B1-01講演
「進化するアプリ イマ×ミライ ~生成AIアプリへ続く道と新時代のアプリとは~」Interop24Tokyo APPS JAPAN B1-01講演「進化するアプリ イマ×ミライ ~生成AIアプリへ続く道と新時代のアプリとは~」Interop24Tokyo APPS JAPAN B1-01講演
「進化するアプリ イマ×ミライ ~生成AIアプリへ続く道と新時代のアプリとは~」Interop24Tokyo APPS JAPAN B1-01講演
 
ロジックから状態を分離する技術/設計ナイト2024 by わいとん @ytnobody
ロジックから状態を分離する技術/設計ナイト2024 by わいとん @ytnobodyロジックから状態を分離する技術/設計ナイト2024 by わいとん @ytnobody
ロジックから状態を分離する技術/設計ナイト2024 by わいとん @ytnobody
 
Humanoid Virtual Athletics Challenge2024 技術講習会 スライド
Humanoid Virtual Athletics Challenge2024 技術講習会 スライドHumanoid Virtual Athletics Challenge2024 技術講習会 スライド
Humanoid Virtual Athletics Challenge2024 技術講習会 スライド
 
ハイブリッドクラウド研究会_Hyper-VとSystem Center Virtual Machine Manager セッションMM
ハイブリッドクラウド研究会_Hyper-VとSystem Center Virtual Machine Manager セッションMMハイブリッドクラウド研究会_Hyper-VとSystem Center Virtual Machine Manager セッションMM
ハイブリッドクラウド研究会_Hyper-VとSystem Center Virtual Machine Manager セッションMM
 

VTI の中身

  • 1. VTI の中身 浅間 正和 @ 有限会社 銀座堂
  • 2. VTI とは? • Virtual Tunnel Interface の略で Vyatta ( Network OS | Core ) 6.5R1 から実装された中身が暗号化 される IP-IP tunnel のようなモノ
  • 3. Benefits • They are capable of having traffic routed to them  • They are capable of passing routing protocols over  them  • They do not require local or remote subnets to be  specified  • They operate as if the peer interfaces are directly  connected  (Vyatta VPN Reference Guide 6.5R1 v01 より引用)
  • 4. Vyatta configuration の違い interfaces { vti vti0 { } } vpn { protocols { ipsec { static site-to-site { interface-route 192.168.2.0/24 { peer 172.16.1.2 { next-hop-interface vti0 { default-esp-group ESP-G } ike-group IKE-G } local-address 172.16.1.1 } tunnel 1 { } local { vpn { prefix 192.168.1.0/24 ipsec { } site-to-site { remote { peer 172.16.1.2 { prefix 192.168.2.0/24 ike-group IKE-G } local-address 172.16.1.1 } vti { } bind vti0 } esp-group ESP-G } } } } } } } 従来 VTI
  • 5. /etc/ipsec.conf の違い conn peer-172.16.1.2-tunnel-vti conn peer-172.16.1.2-tunnel-1 left=172.16.1.1 left=172.16.1.1 right=172.16.1.2 right=172.16.1.2 leftsubnet=0.0.0.0/0 leftsubnet=192.168.1.0/24 rightsubnet=0.0.0.0/0 rightsubnet=192.168.2.0/24 ike=aes256-sha1! leftsourceip=192.168.1.1 ikelifetime=28800s ike=aes256-sha1! esp=aes256-sha1! ikelifetime=28800s keylife=3600s esp=aes256-sha1! rekeymargin=540s keylife=3600s type=tunnel rekeymargin=540s pfs=yes type=tunnel compress=no pfs=yes authby=secret compress=no mark=2415919105 authby=secret leftupdown="/usr/lib/ipsec/vti- auto=start up-down.sh vti0" keyingtries=%forever auto=start keyingtries=%forever 従来 VTI
  • 6. ip xfrm policy list 実行結果の違い src 0.0.0.0/0 dst 0.0.0.0/0 dir out priority 2051 src 192.168.1.0/24 dst 192.168.2.0/24 mark -1879048191/0xffffffff dir out priority 1859 tmpl src 172.16.1.1 dst 172.16.1.2 tmpl src 172.16.1.1 dst 172.16.1.2 proto esp reqid 16384 mode tunnel proto esp reqid 16384 mode tunnel src 0.0.0.0/0 dst 0.0.0.0/0 src 192.168.2.0/24 dst 192.168.1.0/24 dir fwd priority 2051 dir fwd priority 1859 mark -1879048191/0xffffffff tmpl src 172.16.1.2 dst 172.16.1.1 tmpl src 172.16.1.2 dst 172.16.1.1 proto esp reqid 16384 mode tunnel proto esp reqid 16384 mode tunnel src 192.168.2.0/24 dst 192.168.1.0/24 src 0.0.0.0/0 dst 0.0.0.0/0 dir in priority 1859 dir in priority 2051 tmpl src 172.16.1.2 dst 172.16.1.1 mark -1879048191/0xffffffff proto esp reqid 16384 mode tunnel tmpl src 172.16.1.2 dst 172.16.1.1 proto esp reqid 16384 mode tunnel 従来 VTI
  • 7. 設定時の流れ • /opt/vyatta/sbin/vpn-config.pl が実行される • /etc/ipsec.conf の生成と ipsec start の実行 • /opt/vyatta/sbin/vyatta-vti-config.pl が実行される • sudo /opt/vyatta/sbin/cfgvti add name $tunName   key $mark remote $remote local $local の実行 • sudo iptables -t mangle -D PREROUTING -s   $remote -d $local ( -p esp | -p udp --dport 4500 )  -j MARK --set-mark $mark の実行
  • 8. /opt/vyatta/sbin/cfgvti • git repo の build-iso/pkgs/vyatta-cfg-vpn/src/cfgvti.c  • … C で書かれたプログラム…なぜ…? • なななんと実は VTI は net/ipv4/ipip.ko ではなく net/ipv4/ip_vti.ko だった…。 commit 1181412c1a671ed4e8fb1736f17e6ec617c68059 Author: Saurabh <saurabh.mohan@vyatta.com> Date: Tue Jul 17 09:44:54 2012 +0000 net/ipv4: VTI support new module for ip_vti. New VTI tunnel kernel module, Kconfig and Makefile changes. Signed-off-by: Saurabh Mohan <saurabh.mohan@vyatta.com> Reviewed-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
  • 9. net/ipv4/ip_vti.ko • Linux kernel の main line には v3.6 から merge • (Vyatta 6.5R1 は v3.3 なので backport?) • net/ipv4/ipip.ko を元にしているが xfrm の esp が処理してくれる encap/decap は省かれている • 一番重要な違いは xmit 時に mark を付けるこ とで xfrm policy に引っ掛けるようにしている こと
  • 10. 送受信時の流れ • 送信時の流れ • net/ipv4/ip_vti.ko の vti_tunnel_xmit が呼ば れる • VTI を一意に表す mark を付け xfrm に流す • xfrm が encap し暗号化 • 受信時の流れ • Netfilter が mask を付ける • mark から xfrm policy が判明し復号化と decap 処理
  • 11. まとめ • Dynamic routing や QoS と組み合わせて使え るのはかなり便利? • もとは Cisco さんが最初にやった方式? Vyatta VPN Reference にも compatible with 3rd party VTI/route-based VPN connections と書か れているので相互接続性もバッチリ? • ちなみに … and is sometimes required for connectivity with pubic cloud offerings だそう です…