23. ローカル環境の用意
Vyattaの設定
$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface
IP Address
S/L Description
-------------------- -----------
eth0
133.242.48.93/24
u/u
eth1
u/u
lo
127.0.0.1/8
u/u
::1/128
インタフェース
の設定確認
!
$ configure
# set interfaces ethernet eth1 address 172.16.200.10/24
eth1にアドレスを付与
!
$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface
IP Address
S/L Description
-------------------- -----------
eth0
133.242.48.93/24
u/u
eth1
172.16.200.10/24
u/u
lo
127.0.0.1/8
u/u
::1/128
24. ローカル環境の用意
Vyattaの設定
$ configure
!
#
#
#
#
#
#
#
DHCPサーバの設定
edit service dhcp-server shared-network-name m-private
set subnet 172.16.200.0/24 default-router 172.16.200.10
set subnet 172.16.200.0/24 dns-server 133.242.0.3
set subnet 172.16.200.0/24 dns-server 133.242.0.4
set subnet 172.16.200.0/24 start 172.16.200.100 stop 172.16.200.200
set subnet 172.16.200.0/24 static-mapping server01 ip-address 172.16.200.50
set subnet 172.16.200.0/24 static-mapping server01 mac-address 9C:A3:BA:21:2D:BB
※
!
# exit
※コントロールパネルで設定済みの場合は省略可
MAC Addressはコントロールパネルから確認できます
51. 8.接続確認
# run show vpn ike sa
Peer ID / IP
-----------153.146.159.210
!
!
!
State
----up
Encrypt
------aes256
Hash
---sha1
Local ID / IP
-------------
133.242.48.93
D-H Grp
------2
# run show vpn ipsec sa
Peer ID / IP
-----------153.146.159.210
!
Tunnel
-----1
State
----up
Bytes Out/In
------------0.0/0.0
NAT-T
----no
A-Time
-----1028
L-Time
------
86400
Local ID / IP
-------------
133.242.48.93
Encrypt
------aes256
Hash
---sha1
NAT-T
----no
A-Time
-----937
L-Time
-----3600
Proto
-----
all
52. 8.接続確認
vyatta→Cloudn
$ ping -c 3 192.168.100.72
PING 192.168.100.72 (192.168.100.72) 56(84) bytes of data.
64 bytes from 192.168.100.72: icmp_req=1 ttl=62 time=22.9 ms
64 bytes from 192.168.100.72: icmp_req=2 ttl=62 time=22.3 ms
64 bytes from 192.168.100.72: icmp_req=3 ttl=62 time=22.1 ms
!
--- 192.168.100.72 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 22.139/22.481/22.991/0.367 ms
!
$ ssh cloudn@192.168.100.72
cloudn@192.168.100.72's password:
Welcome to Ubuntu 12.10 (GNU/Linux 3.5.0-17-generic x86_64)
!
!
!
!
!
* Documentation:
https://help.ubuntu.com/
System information as of Mon Dec 30 21:08:08 JST 2013
System load:
Usage of /:
Memory usage:
Swap usage:
0.07
8.3% of 12.51GB
2%
0%
Processes:
70
Users logged in:
1
IP address for eth0: 192.168.100.72
Graph this data and manage this system at https://landscape.canonical.com/
Last login: Mon Dec 30 21:07:57 2013 from 172.16.200.50
53. 8.接続確認
Cloudn→ローカル
$ ping -c 3 172.16.200.50
PING 172.16.200.50 (172.16.200.50) 56(84) bytes of data.
64 bytes from 172.16.200.50: icmp_req=1 ttl=62 time=22.5 ms
64 bytes from 172.16.200.50: icmp_req=2 ttl=62 time=22.1 ms
64 bytes from 172.16.200.50: icmp_req=3 ttl=62 time=22.2 ms
!
--- 172.16.200.50 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 22.176/22.309/22.515/0.226 ms
!
$ ssh ubuntu@172.16.200.50
ubuntu@172.16.200.50's password:
Welcome to Ubuntu 12.04.3 LTS (GNU/Linux 3.8.0-29-generic x86_64)
!
!
!
!
!
* Documentation:
https://help.ubuntu.com/
System information as of Mon Dec 30 21:04:26 JST 2013
System load:
Usage of /:
Memory usage:
Swap usage:
0.0
5.8% of 17.73GB
6%
0%
Processes:
84
Users logged in:
1
IP address for eth0: 172.16.200.50
Graph this data and manage this system at https://landscape.canonical.com/
Last login: Mon Dec 30 21:03:57 2013 from 192.168.100.72