SlideShare una empresa de Scribd logo
1 de 24
Descargar para leer sin conexión
【Cisco-Cisco】初心者+αネットワーク勉強会
@秋葉原UDX
2020/11/23(火祝)11時30分から
FORSE 1
【 Cisco-Cisco 】初心者ネットワーク勉強会@秋葉原UDX
FORSE
アジェンダ
1130~1140 今日出来るようになる事、自己紹介
1140~1200 まずは物理結線とスタティックルート
1200~1210 Wire Shark で通信確認
---- パン休憩 ----
1210~1215 【5分講義】VPNとは
1215~1245 VPN設定の投入
1245~1300 wiresharkで暗号化されたことを確認
参加いただきありがとうございます!!!
鈴木メモ
持ち物:PC×6、Router×4
LAN線×10、シリアルケーブル×4、 Switch×1
WireSharkは4SE-006に
今日、出来るようになる事
CiscoルータでVPN接続してみた
こんな要件
・新しく支店(グループ会社)を作成する
・支店は30名程度のユーザがいる。
・ユーザPCに新しいソフトウェアをインストールしたくない。
・専用線はコスト高いので、インターネットを利用する
・通信を途中で盗聴されても、中身が判らないようにしたい
・既存のデータセンターにてFortigateを利用している
以下は対象外です
・SSL-VPNのAnyConnect
・Ciscoでのスタティックルート → Ciscoラボ1へ
2
【 Cisco-Cisco 】支店間VPN システム構成図
FORSE 3
172.16.10.0/30
192.168.10.0/24 192.168.11.0/24
#Gi8
.10 .2
.1 .1
#Gi7 #Gi8 #Gi7
.2
上海海外現地法人
.10
RT10 RT20
データセンター
用語
インターネットVPN VPN(Vitual Private Network) 専用線、広域イーサネット→高い。 インターネット→安い。けど知らない人に見られちゃう。
IPsec SecurityArchitecture for Internet Protocol 通信相手を認証して、通信を暗号化して、のぞき見防止で安全に。
IKE Internet Key Exchange 鍵交換プロトコル。フェーズ1とフェーズ2に分かれて2段階
ISAKMP SA ネットワーク用語の最後の「P」はProtocol、InternetSecurityAssociation and KeyManagementProtocol で合意された。SecurityAssociation
ikeフェーズ1で作成する。通信監理、制御用
IPsec SA ikeフェーズ2で作成する。通信用のSA、送信用と受信用は別のSA
【5分講義】
白
#Gi0/1 #Gi0/2
#Gi0/8
白
【Cisco】初期設定 ルータ の設定1
FORSE
手順1
ルータは起動に時間がかかります
セットアップモードが起動したら、noと入力、もしくはcttl+c
手順2
メッセージが表示され、Enterキーを押します。Router>のプロンプトが表示されます
手順3
特権モードに移行します。Router#のプロンプトが表示されます
手順4
グローバルコンフィグレーションモードに移行します。Router(config)#が表示されます
手順5
ホスト名を設定します。設定後プロンプトがホスト名に変更された事を確認します。ホスト
名は講師が指示します
手順6
特権モードに戻ります。
手順7
タイプミス対策をします。
手順8
改行メッセージ対策します
--- System Configuration Dialog ---
Would you like to enter the initial configuration dialog? [yes/no]:no
Press RETURN to get started!
Router>
Router>enable
Router#
Router#configure terminal
Router(config)#
Router(config)#hostname RT-10(RT-20, RT-30…)
RT-xxx(cnofig)#
Router(config)#end
RT-xxx#
4
Router#configure terminal
Router(config)#no ip domain lookup
Router(config)#end
Router#configure terminal
Router(config)#line console 0
Router(config-line)#logging synchronous
Router(config-line)#end
【Cisco】PC接続用VLAN作成、仮想インターフェース ルータ (奇数) の設定2
FORSE 5
手順9
PC接続用のポート、VLANの作成、仮想インターフェースの作成
手順10
7番物理ポートにVLANをアサインします
手順11 検証します
手順12 結線して検証します
ping 192.168.10.1
RT-10#show vlan-switch
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Gi0, Gi1, Gi2, Gi3, Gi4, Gi5
Gi6
10 VLAN0010 active Gi7
RT-10#conf t
RT-10(config)#vlan 10←スペースあり(VLAN作成)
RT-10(config-vlan)#exit
RT-10(config)#interface vlan10 ←スペースなし(仮想インターフェース作成)
RT-10(config-if)#ip address 192.168.10.1 255.255.255.0
RT-10(config-if)#no shutdown
RT-10(config-if)#end
RT-10#
RT-10#configure terminal
RT-10(config)#interface gigabitEthernet 7
RT-10(config-if)#switchport access vlan 10
RT-10(config-if)#end
RT-10#
【Cisco】IPアドレス作成 ルータ (奇数) の設定3
FORSE 6
ここの部分
手順13
IPアドレスを設定して、結線をします
手順14 検証します
RT-10#conf t
RT-10(config)#interface gigabitEthernet 8
RT-10(config-if)#ip address 172.16.10.1 255.255.255.252
RT-10(config-if)#no shutdown
RT-10(config-if)#end
RT-10#
RT-10#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Async3 unassigned YES unset down down
BRI0 unassigned YES unset administratively down down
BRI0:1 unassigned YES unset administratively down down
BRI0:2 unassigned YES unset administratively down down
FastEthernet0 unassigned YES manual down down
GigabitEthernet0 unassigned YES unset down down
GigabitEthernet1 unassigned YES unset down down
GigabitEthernet2 unassigned YES unset down down
GigabitEthernet3 unassigned YES unset down down
GigabitEthernet4 unassigned YES unset down down
GigabitEthernet5 unassigned YES unset down down
GigabitEthernet6 unassigned YES unset down down
GigabitEthernet7 unassigned YES unset up up
GigabitEthernet8 172.16.10.1 YES manual down down
Vlan1 unassigned YES unset down down
Vlan10 192.168.10.1 YES manual up up
RT-10#
RT-10#show interfaces vlan10 | include Internet
Internet address is 192.168.10.1/24
RT-10#
RT-10#show interfaces gigabitEthernet8 | include Internet
Internet address is 172.16.10.1/30
RT-10#
【Cisco】スタティックルート作成 ルータ (奇数) の設定4
FORSE 7
手順15
スタティックルートを設定します
手順16
スタティックルートを検証します
RT-10#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RT-10(config)#ip route 192.168.11.0 255.255.255.0 172.16.10.2
RT-10(config)#end
RT-10#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop overrideGateway of last resort is not
set 172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.10.0/30 is directly connected, GigabitEthernet8
L 172.16.10.1/32 is directly connected, GigabitEthernet8
192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.10.0/24 is directly connected, Vlan10
L 192.168.10.1/32 is directly connected, Vlan10
S 192.168.11.0/24 [1/0] via 172.16.10.2
【Cisco】PC接続用VLAN作成、仮想インターフェース ルータ (偶数) の設定2
FORSE 8
手順9
PC接続用のポート、VLANの作成、仮想インターフェースの作成
手順10
7番物理ポートにVLANをアサインします
手順11 検証します
手順12 結線して検証します
ping 192.168.11.2
RT-20#show vlan-switch
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Gi0, Gi1, Gi2, Gi3, Gi4, Gi5
Gi6
10 VLAN0010 active Gi7
RT-20#conf t
RT-20(config)#vlan 10←スペースあり(VLAN作成)
RT-20(config-vlan)#exit
RT-20(config)#interface vlan10 ←スペースなし(仮想インターフェース作成)
RT-20(config-if)#ip address 192.168.11.2 255.255.255.0
RT-20(config-if)#no shutdown
RT-20(config-if)#end
RT-20#
RT-20#configure terminal
RT-20(config)#interface gigabitEthernet 7
RT-20(config-if)#switchport access vlan 10
RT-20(config-if)#end
RT-20#
【Cisco】IPアドレス作成 ルータ (偶数) の設定3
FORSE 9
ここの部分
手順13
IPアドレスを設定して、結線をします
手順14 検証します
RT-20#conf t
RT-20(config)#interface gigabitEthernet 8
RT-20(config-if)#ip address 172.16.10.2 255.255.255.252
RT-20(config-if)#no shutdown
RT-20(config-if)#end
RT-20#
RT-20#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Async3 unassigned YES unset down down
BRI0 unassigned YES unset administratively down down
BRI0:1 unassigned YES unset administratively down down
BRI0:2 unassigned YES unset administratively down down
FastEthernet0 unassigned YES manual down down
GigabitEthernet0 unassigned YES unset down down
GigabitEthernet1 unassigned YES unset down down
GigabitEthernet2 unassigned YES unset down down
GigabitEthernet3 unassigned YES unset down down
GigabitEthernet4 unassigned YES unset down down
GigabitEthernet5 unassigned YES unset down down
GigabitEthernet6 unassigned YES unset down down
GigabitEthernet7 unassigned YES unset up up
GigabitEthernet8 172.16.10.2 YES manual down down
Vlan1 unassigned YES unset down down
Vlan10 192.168.11.2 YES manual up up
RT-20#
RT-20#show interfaces vlan10 | include Internet
Internet address is 192.168.11.2/24
RT-20#
RT-20#show interfaces gigabitEthernet8 | include Internet
Internet address is 172.16.10.2/30
RT-10#
【Cisco】スタティックルート作成 ルータ (偶数) の設定4
FORSE 10
手順15
スタティックルートを設定します
手順16
スタティックルートを検証します
RT-20#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RT-20(config)#ip route 192.168.10.0 255.255.255.0 172.16.10.1
RT-20(config)#end
RT-20#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop overrideGateway of last resort is not
set 172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.10.0/30 is directly connected, GigabitEthernet8
L 172.16.10.2/32 is directly connected, GigabitEthernet8
192.168.11.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.11.0/24 is directly connected, Vlan10
L 192.168.11.2/32 is directly connected, Vlan10
S 192.168.10.0/24 [1/0] via 172.16.10.1
【Cisco】ミラーポートを作成してキャプチャする
FORSE
ルータとルータの間にスイッチをいれます
奇数の方がスイッチに設定投入して下さい
支店PCからデータセンターへ ping
内容が判ります
Switch(config)#monitor session 1 source interface GigabitEthernet 0/1
Switch(config)#monitor session 1 destination interface GigabitEthernet 0/8
11
172.16.10.0/30
#Gi8#Gi8
#Gi8 #Gi0/1 #Gi0/2
#Gi0/8
172.16.10.0/30
#Gi8
RT10
RT10
RT20
RT20
【Cisco】VPN接続前の確認 Ciscoルータ (奇数) の設定1
FORSE
tracert 192.168.11.10
VPNとは
https://www.infraexpert.com/study/study10.html
https://www.infraexpert.com/study/ipsec.html
https://www.infraexpert.com/study/ipsec2.html
https://www.infraexpert.com/study/ipsec8.html
12
手順1 isakmpの設定をする
手順2 対向のアドレスとパスワードを設定する
手順3 トランスフォームセットの名前定義
手順4 アクセスリストの作成
RT-10#configure terminal
RT-10(config)#crypto isakmp policy 1
RT-10(config-isakmp)#authentication pre-share
RT-10(config-isakmp)#encryption 3des ←暗号の可能方式
RT-10(config-isakmp)#group 1 ←DHグループ番号
RT-10(config-isakmp)#hash sha ←認証の方式
RT-10(config-isakmp)#lifetime 86400
RT-10(config-isakmp)#exit
RT-10(config)#
RT-10(config)#crypto isakmp key akbpassword address 172.16.10.2
RT-10(config)#ip access-list extended acl-ipsec
RT-10(config-ext-nacl)#permit ip 192.168.10.0 0.0.0.255 192.168.11.0 0.0.0.255
RT-10(config-ext-nacl)#exit
RT-10(config)#crypto ipsec transform-set TF-SET esp-3des esp-sha-hmac
RT-10(cfg-crypto-trans)#mode tunnel
RT-10(cfg-crypto-trans)#exit
【Cisco】VPN設定する Ciscoルータ (奇数) の設定2
FORSE
手順5 IPSecのポリシー定義
手順6 インターフェースへの適用
13
RT-10(config)#interface gigabitEthernet 8
RT-10(config-if)#crypto map CP-MAP
RT-10(config-if)#
*Aug 12 10:40:46.788: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is ON
RT-10(config-if)#
RT-10(config)#crypto map CP-MAP 1 ipsec-isakmp
% NOTE: This new crypto map will remain disabled until a peer
and a valid access list have been configured.
RT-10(config-crypto-map)#match address acl-ipsec ←アクセスリストを適用
RT-10(config-crypto-map)#set peer 172.16.10.2
RT-10(config-crypto-map)#set transform-set TF-SET
RT-10(config-crypto-map)#set security-association lifetime seconds 3600
RT-10(config-crypto-map)#exit
RT-10(config)#
RT-10(config)#ip route 192.168.11.0 255.255.255.0 172.16.10.2
RT-10(config)#end
これいる?すでにあるはず
手順7 投入設定の確認
手順8 状態確認
RT-10#sh run | section isakmp
crypto isakmp policy 1
encr 3des
authentication pre-share
crypto isakmp key akbpassword address 172.16.10.2
crypto map CP-MAP 1 ipsec-isakmp
set peer 172.16.10.2
set transform-set TF-SET
match address acl-ipsec
RT-10#
RT-10#sh run | section ip access-list
ip access-list extended acl-ipsec
permit ip 192.168.10.0 0.0.0.255 192.168.11.0 0.0.0.255
RT-10#
RT-10#show crypt session
Crypto session current status
Interface: GigabitEthernet8
Session status: DOWN
Peer: 172.16.10.2 port 500
IPSEC FLOW: permit ip 192.168.10.0/255.255.255.0 192.168.11.0/255.255.255.0
Active SAs: 0, origin: crypto map
RT-10#
RT-10#sh run | section interface GigabitEthernet8
interface GigabitEthernet8
ip address 172.16.10.1 255.255.255.252
duplex auto
speed auto
crypto map CP-MAP
RT-10#
【Cisco】検証する Ciscoルータ (奇数) の設定3
FORSE
手順9 192.168.11.10にpingを通し、検証する
RT-10#show crypto session
Crypto session current status
Interface: GigabitEthernet8
Session status: UP-ACTIVE ←疎通前はIDLE
Peer: 172.16.10.2 port 500
Session ID: 0
IKEv1 SA: local 172.16.10.1/500 remote 172.16.10.2/500 Active
IPSEC FLOW: permit ip 192.168.10.0/255.255.255.0
192.168.11.0/255.255.255.0
Active SAs: 2, origin: crypto map
RT-10#show crypto isakmp sa
IPv4 Crypto ISAKMP SA
dst src state conn-id status
172.16.10.1 172.16.10.2 QM_IDLE 2001 ACTIVE
IPv6 Crypto ISAKMP SA
RT-10#
14
【Cisco】検証する Ciscoルータ (奇数) の設定4
FORSE
手順10 検証する
15
つづき
CP-MAP
sa timing: remaining key lifetime (k/sec): (4289608/2302)
IV size: 8 bytes
replay detection support: Y
Status: ACTIVE(ACTIVE)
inbound ah sas:
inbound pcp sas:
outbound esp sas:
spi: 0x2FE73847(803682375)
transform: esp-3des esp-sha-hmac ,
in use settings ={Tunnel, }
conn id: 2, flow_id: Onboard VPN:2, sibling_flags 80004040, crypto map:
CP-MAP
sa timing: remaining key lifetime (k/sec): (4289609/2302)
IV size: 8 bytes
replay detection support: Y
Status: ACTIVE(ACTIVE)
outbound ah sas:
outbound pcp sas:
RT-10#
RT-10#show crypto ipsec sa
interface: GigabitEthernet8
Crypto map tag: CP-MAP, local addr 172.16.10.1
protected vrf: (none)
local ident (addr/mask/prot/port): (192.168.10.0/255.255.255.0/0/0)
remote ident (addr/mask/prot/port): (192.168.11.0/255.255.255.0/0/0)
current_peer 172.16.10.2 port 500
PERMIT, flags={origin_is_acl,}
#pkts encaps: 27, #pkts encrypt: 27, #pkts digest: 27
#pkts decaps: 21, #pkts decrypt: 21, #pkts verify: 21
#pkts compressed: 0, #pkts decompressed: 0
#pkts not compressed: 0, #pkts compr. failed: 0
#pkts not decompressed: 0, #pkts decompress failed: 0
#send errors 0, #recv errors 0
local crypto endpt.: 172.16.10.1, remote crypto endpt.: 172.16.10.2
plaintext mtu 1446, path mtu 1500, ip mtu 1500, ip mtu idb
GigabitEthernet8
current outbound spi: 0x2FE73847(803682375)
PFS (Y/N): N, DH group: none
inbound esp sas:
spi: 0x788E71CC(2022601164)
transform: esp-3des esp-sha-hmac ,
in use settings ={Tunnel, }
conn id: 1, flow_id: Onboard VPN:1, sibling_flags 80004040, crypto map:
つづく
【Cisco】VPN接続前の確認 Ciscoルータ (偶数) の設定1
FORSE
tracert 192.168.10.10
VPNとは
https://www.infraexpert.com/study/study10.html
https://www.infraexpert.com/study/ipsec.html
https://www.infraexpert.com/study/ipsec2.html
https://www.infraexpert.com/study/ipsec8.html
16
手順1 isakmpの設定をする
手順2 対向のアドレスとパスワードを設定する
手順3 トランスフォームセットの名前定義
手順4 アクセスリストの作成
RT-20#configure terminal
RT-20(config)#crypto isakmp policy 1
RT-20(config-isakmp)#authentication pre-share
RT-20(config-isakmp)#encryption 3des ←暗号の可能方式
RT-20(config-isakmp)#group 1 ←DHグループ番号
RT-20(config-isakmp)#hash sha ←認証の方式
RT-20(config-isakmp)#lifetime 86400
RT-20(config-isakmp)#exit
RT-20(config)#
RT-20(config)#crypto isakmp key akbpassword address 172.16.10.1
RT-20(config)#ip access-list extended acl-ipsec
RT-20(config-ext-nacl)#permit ip 192.168.11.0 0.0.0.255 192.168.10.0 0.0.0.255
RT-20(config-ext-nacl)#exit
RT-20(config)#crypto ipsec transform-set TF-SET esp-3des esp-sha-hmac
RT-20(cfg-crypto-trans)#mode tunnel
RT-20(cfg-crypto-trans)#exit
【Cisco】VPN設定する Ciscoルータ (偶数) の設定2
FORSE
手順5 IPSecのポリシー定義
手順6 インターフェースへの適用
17
RT-20(config)#interface gigabitEthernet 8
RT-20(config-if)#crypto map CP-MAP
RT-20(config-if)#
*Aug 12 10:40:46.788: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is ON
RT-20(config-if)#
RT-20(config)#crypto map CP-MAP 1 ipsec-isakmp
% NOTE: This new crypto map will remain disabled until a peer
and a valid access list have been configured.
RT-20(config-crypto-map)#match address acl-ipsec ←アクセスリストを適用
RT-20(config-crypto-map)#set peer 172.16.10.1
RT-20(config-crypto-map)#set transform-set TF-SET
RT-20(config-crypto-map)#set security-association lifetime seconds 3600
RT-20(config-crypto-map)#exit
RT-20(config)#
RT-20(config)#ip route 192.168.10.0 255.255.255.0 172.16.10.1
RT-20(config)#end
これいる?すでにあるはず
手順7 投入設定の確認
手順8 状態確認
RT-20#sh run | section isakmp
crypto isakmp policy 1
encr 3des
authentication pre-share
crypto isakmp key akbpassword address 172.16.10.1
crypto map CP-MAP 1 ipsec-isakmp
set peer 172.16.10.1
set transform-set TF-SET
match address acl-ipsec
RT-20#
RT-20#sh run | section ip access-list
ip access-list extended acl-ipsec
permit ip 192.168.11.0 0.0.0.255 192.168.10.0 0.0.0.255
RT-20#
RT-20#show crypt session
Crypto session current status
Interface: GigabitEthernet8
Session status: DOWN
Peer: 172.16.10.1 port 500
IPSEC FLOW: permit ip 192.168.11.0/255.255.255.0 192.168.10.0/255.255.255.0
Active SAs: 0, origin: crypto map
RT-20#
RT-20#sh run | section interface GigabitEthernet8
interface GigabitEthernet8
ip address 172.16.10.2 255.255.255.252
duplex auto
speed auto
crypto map CP-MAP
RT-20#
【Cisco】検証する Ciscoルータ (偶数) の設定3
FORSE
手順9 192.168.10.10にpingを通し、検証する
RT-20#show crypto session
Crypto session current status
Interface: GigabitEthernet8
Session status: UP-ACTIVE ←疎通前はIDLE
Peer: 172.16.10.1 port 500
Session ID: 0
IKEv1 SA: local 172.16.10.2/500 remote 172.16.10.1/500 Active
IPSEC FLOW: permit ip 192.168.11.0/255.255.255.0
192.168.10.0/255.255.255.0
Active SAs: 2, origin: crypto map
RT-20#show crypto isakmp sa
IPv4 Crypto ISAKMP SA
dst src state conn-id status
172.16.10.2 172.16.10.1 QM_IDLE 2001 ACTIVE
IPv6 Crypto ISAKMP SA
RT-20#
18
【Cisco】検証する Ciscoルータ (偶数) の設定4
19
FORSE
手順10 検証する
つづき
CP-MAP
sa timing: remaining key lifetime (k/sec): (4289608/2302)
IV size: 8 bytes
replay detection support: Y
Status: ACTIVE(ACTIVE)
inbound ah sas:
inbound pcp sas:
outbound esp sas:
spi: 0x2FE73847(803682375)
transform: esp-3des esp-sha-hmac ,
in use settings ={Tunnel, }
conn id: 2, flow_id: Onboard VPN:2, sibling_flags 80004040, crypto map:
CP-MAP
sa timing: remaining key lifetime (k/sec): (4289609/2302)
IV size: 8 bytes
replay detection support: Y
Status: ACTIVE(ACTIVE)
outbound ah sas:
outbound pcp sas:
RT-20#
RT-20#show crypto ipsec sa
interface: GigabitEthernet8
Crypto map tag: CP-MAP, local addr 172.16.10.2
protected vrf: (none)
local ident (addr/mask/prot/port): (192.168.11.0/255.255.255.0/0/0)
remote ident (addr/mask/prot/port): (192.168.10.0/255.255.255.0/0/0)
current_peer 172.16.10.1 port 500
PERMIT, flags={origin_is_acl,}
#pkts encaps: 27, #pkts encrypt: 27, #pkts digest: 27
#pkts decaps: 21, #pkts decrypt: 21, #pkts verify: 21
#pkts compressed: 0, #pkts decompressed: 0
#pkts not compressed: 0, #pkts compr. failed: 0
#pkts not decompressed: 0, #pkts decompress failed: 0
#send errors 0, #recv errors 0
local crypto endpt.: 172.16.10.2, remote crypto endpt.: 172.16.10.1
plaintext mtu 1446, path mtu 1500, ip mtu 1500, ip mtu idb
GigabitEthernet8
current outbound spi: 0x2FE73847(803682375)
PFS (Y/N): N, DH group: none
inbound esp sas:
spi: 0x788E71CC(2022601164)
transform: esp-3des esp-sha-hmac ,
in use settings ={Tunnel, }
conn id: 1, flow_id: Onboard VPN:1, sibling_flags 80004040, crypto map:
つづく
【Cisco】暗号化されました。
FOR SE
#検証する(wireshark) プロトコルが暗号化されました(ESP)
20
【Cisco】 パスワードが間違っていた場合
21
FORSE
RT-10#show crypto session
Crypto session current status
Interface: GigabitEthernet8
Session status: DOWN ←←←
Peer: 172.16.10.2 port 500
IPSEC FLOW: permit ip 192.168.10.0/255.255.255.0
192.168.11.0/255.255.255.0
Active SAs: 0, origin: crypto map
RT-10#show crypto isa
RT-10#show crypto isakmp sa
IPv4 Crypto ISAKMP SA
dst src state conn-id status
IPv6 Crypto ISAKMP SA
【Cisco】 つながらない?
22
FORSE
#show crypto session
の結果が正常
・「#show crypto ipsec sa」の結果がおかしい
・「%crypto-4-recvd_pkt_not_ipsec: rec‘d packet not an ipsec packet.
(ip) vrf/dest_addr=」のようなエラーが対向PCに出ている
→フェーズ2でのミス
acl間違い?
・Session statusがDOWNになっている
→フェーズ1でのミス
パスワード間違い?
RT-10#show crypto session
Crypto session current status
Interface: GigabitEthernet8
Session status: DOWN ←←←
Peer: 172.16.10.2 port 500
IPSEC FLOW: permit ip 192.168.10.0/255.255.255.0
192.168.11.0/255.255.255.0
Active SAs: 0, origin: crypto map
YES
NO
【 Cisco 】初期化
FORSE 23
ルーター初期化(工場出荷状態)
Teratermで以下のコマンドを入力し初期化する。
【 】さいごに
FORSE
実機ハンズオンat秋葉原
2020年6月20日 初回勉強会開催
2020年8月末 グループメンバーが増えてきました。 講義開催要求も多く頂き
謙虚に素直に、みなさまに必要とされるよう努力を続けます
現在のラボ(合計6つ)
Cisco #1~#4、Fortigate #1~2
今後の予定、2020年内、EtherChannel、ポートセキュリティ
当社にはCisco ASA検証機もあり、Cisco-ASAをゲートウェイにした支店VPNと
AnyConnectの勉強会もやりたい
来年の予定:サーバ系(Linux、ActiveDirecotry + ネットワーク)
今後は予約の取り易いpaypal前払いと、会場払いの2つを作っていく予定です
起業して1年経ちました。
前世の会社でお世話になったお客様たちの案件を2つ程度こなしました。
お客様たちが、前世の会社時と同じように「依頼、要求」を始めました
案件引合が多くて、、、休めません。
中途採用を募集しておりまして、もし良い方がいらっしゃれば紹介をお願いします
24

Más contenido relacionado

Destacado

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellSaba Software
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming LanguageSimplilearn
 

Destacado (20)

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 

Forse cisco-labo4

  • 2. 【 Cisco-Cisco 】初心者ネットワーク勉強会@秋葉原UDX FORSE アジェンダ 1130~1140 今日出来るようになる事、自己紹介 1140~1200 まずは物理結線とスタティックルート 1200~1210 Wire Shark で通信確認 ---- パン休憩 ---- 1210~1215 【5分講義】VPNとは 1215~1245 VPN設定の投入 1245~1300 wiresharkで暗号化されたことを確認 参加いただきありがとうございます!!! 鈴木メモ 持ち物:PC×6、Router×4 LAN線×10、シリアルケーブル×4、 Switch×1 WireSharkは4SE-006に 今日、出来るようになる事 CiscoルータでVPN接続してみた こんな要件 ・新しく支店(グループ会社)を作成する ・支店は30名程度のユーザがいる。 ・ユーザPCに新しいソフトウェアをインストールしたくない。 ・専用線はコスト高いので、インターネットを利用する ・通信を途中で盗聴されても、中身が判らないようにしたい ・既存のデータセンターにてFortigateを利用している 以下は対象外です ・SSL-VPNのAnyConnect ・Ciscoでのスタティックルート → Ciscoラボ1へ 2
  • 3. 【 Cisco-Cisco 】支店間VPN システム構成図 FORSE 3 172.16.10.0/30 192.168.10.0/24 192.168.11.0/24 #Gi8 .10 .2 .1 .1 #Gi7 #Gi8 #Gi7 .2 上海海外現地法人 .10 RT10 RT20 データセンター 用語 インターネットVPN VPN(Vitual Private Network) 専用線、広域イーサネット→高い。 インターネット→安い。けど知らない人に見られちゃう。 IPsec SecurityArchitecture for Internet Protocol 通信相手を認証して、通信を暗号化して、のぞき見防止で安全に。 IKE Internet Key Exchange 鍵交換プロトコル。フェーズ1とフェーズ2に分かれて2段階 ISAKMP SA ネットワーク用語の最後の「P」はProtocol、InternetSecurityAssociation and KeyManagementProtocol で合意された。SecurityAssociation ikeフェーズ1で作成する。通信監理、制御用 IPsec SA ikeフェーズ2で作成する。通信用のSA、送信用と受信用は別のSA 【5分講義】 白 #Gi0/1 #Gi0/2 #Gi0/8 白
  • 4. 【Cisco】初期設定 ルータ の設定1 FORSE 手順1 ルータは起動に時間がかかります セットアップモードが起動したら、noと入力、もしくはcttl+c 手順2 メッセージが表示され、Enterキーを押します。Router>のプロンプトが表示されます 手順3 特権モードに移行します。Router#のプロンプトが表示されます 手順4 グローバルコンフィグレーションモードに移行します。Router(config)#が表示されます 手順5 ホスト名を設定します。設定後プロンプトがホスト名に変更された事を確認します。ホスト 名は講師が指示します 手順6 特権モードに戻ります。 手順7 タイプミス対策をします。 手順8 改行メッセージ対策します --- System Configuration Dialog --- Would you like to enter the initial configuration dialog? [yes/no]:no Press RETURN to get started! Router> Router>enable Router# Router#configure terminal Router(config)# Router(config)#hostname RT-10(RT-20, RT-30…) RT-xxx(cnofig)# Router(config)#end RT-xxx# 4 Router#configure terminal Router(config)#no ip domain lookup Router(config)#end Router#configure terminal Router(config)#line console 0 Router(config-line)#logging synchronous Router(config-line)#end
  • 5. 【Cisco】PC接続用VLAN作成、仮想インターフェース ルータ (奇数) の設定2 FORSE 5 手順9 PC接続用のポート、VLANの作成、仮想インターフェースの作成 手順10 7番物理ポートにVLANをアサインします 手順11 検証します 手順12 結線して検証します ping 192.168.10.1 RT-10#show vlan-switch VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Gi0, Gi1, Gi2, Gi3, Gi4, Gi5 Gi6 10 VLAN0010 active Gi7 RT-10#conf t RT-10(config)#vlan 10←スペースあり(VLAN作成) RT-10(config-vlan)#exit RT-10(config)#interface vlan10 ←スペースなし(仮想インターフェース作成) RT-10(config-if)#ip address 192.168.10.1 255.255.255.0 RT-10(config-if)#no shutdown RT-10(config-if)#end RT-10# RT-10#configure terminal RT-10(config)#interface gigabitEthernet 7 RT-10(config-if)#switchport access vlan 10 RT-10(config-if)#end RT-10#
  • 6. 【Cisco】IPアドレス作成 ルータ (奇数) の設定3 FORSE 6 ここの部分 手順13 IPアドレスを設定して、結線をします 手順14 検証します RT-10#conf t RT-10(config)#interface gigabitEthernet 8 RT-10(config-if)#ip address 172.16.10.1 255.255.255.252 RT-10(config-if)#no shutdown RT-10(config-if)#end RT-10# RT-10#show ip interface brief Interface IP-Address OK? Method Status Protocol Async3 unassigned YES unset down down BRI0 unassigned YES unset administratively down down BRI0:1 unassigned YES unset administratively down down BRI0:2 unassigned YES unset administratively down down FastEthernet0 unassigned YES manual down down GigabitEthernet0 unassigned YES unset down down GigabitEthernet1 unassigned YES unset down down GigabitEthernet2 unassigned YES unset down down GigabitEthernet3 unassigned YES unset down down GigabitEthernet4 unassigned YES unset down down GigabitEthernet5 unassigned YES unset down down GigabitEthernet6 unassigned YES unset down down GigabitEthernet7 unassigned YES unset up up GigabitEthernet8 172.16.10.1 YES manual down down Vlan1 unassigned YES unset down down Vlan10 192.168.10.1 YES manual up up RT-10# RT-10#show interfaces vlan10 | include Internet Internet address is 192.168.10.1/24 RT-10# RT-10#show interfaces gigabitEthernet8 | include Internet Internet address is 172.16.10.1/30 RT-10#
  • 7. 【Cisco】スタティックルート作成 ルータ (奇数) の設定4 FORSE 7 手順15 スタティックルートを設定します 手順16 スタティックルートを検証します RT-10#conf t Enter configuration commands, one per line. End with CNTL/Z. RT-10(config)#ip route 192.168.11.0 255.255.255.0 172.16.10.2 RT-10(config)#end RT-10#show ip route Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP a - application route + - replicated route, % - next hop overrideGateway of last resort is not set 172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks C 172.16.10.0/30 is directly connected, GigabitEthernet8 L 172.16.10.1/32 is directly connected, GigabitEthernet8 192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.10.0/24 is directly connected, Vlan10 L 192.168.10.1/32 is directly connected, Vlan10 S 192.168.11.0/24 [1/0] via 172.16.10.2
  • 8. 【Cisco】PC接続用VLAN作成、仮想インターフェース ルータ (偶数) の設定2 FORSE 8 手順9 PC接続用のポート、VLANの作成、仮想インターフェースの作成 手順10 7番物理ポートにVLANをアサインします 手順11 検証します 手順12 結線して検証します ping 192.168.11.2 RT-20#show vlan-switch VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Gi0, Gi1, Gi2, Gi3, Gi4, Gi5 Gi6 10 VLAN0010 active Gi7 RT-20#conf t RT-20(config)#vlan 10←スペースあり(VLAN作成) RT-20(config-vlan)#exit RT-20(config)#interface vlan10 ←スペースなし(仮想インターフェース作成) RT-20(config-if)#ip address 192.168.11.2 255.255.255.0 RT-20(config-if)#no shutdown RT-20(config-if)#end RT-20# RT-20#configure terminal RT-20(config)#interface gigabitEthernet 7 RT-20(config-if)#switchport access vlan 10 RT-20(config-if)#end RT-20#
  • 9. 【Cisco】IPアドレス作成 ルータ (偶数) の設定3 FORSE 9 ここの部分 手順13 IPアドレスを設定して、結線をします 手順14 検証します RT-20#conf t RT-20(config)#interface gigabitEthernet 8 RT-20(config-if)#ip address 172.16.10.2 255.255.255.252 RT-20(config-if)#no shutdown RT-20(config-if)#end RT-20# RT-20#show ip interface brief Interface IP-Address OK? Method Status Protocol Async3 unassigned YES unset down down BRI0 unassigned YES unset administratively down down BRI0:1 unassigned YES unset administratively down down BRI0:2 unassigned YES unset administratively down down FastEthernet0 unassigned YES manual down down GigabitEthernet0 unassigned YES unset down down GigabitEthernet1 unassigned YES unset down down GigabitEthernet2 unassigned YES unset down down GigabitEthernet3 unassigned YES unset down down GigabitEthernet4 unassigned YES unset down down GigabitEthernet5 unassigned YES unset down down GigabitEthernet6 unassigned YES unset down down GigabitEthernet7 unassigned YES unset up up GigabitEthernet8 172.16.10.2 YES manual down down Vlan1 unassigned YES unset down down Vlan10 192.168.11.2 YES manual up up RT-20# RT-20#show interfaces vlan10 | include Internet Internet address is 192.168.11.2/24 RT-20# RT-20#show interfaces gigabitEthernet8 | include Internet Internet address is 172.16.10.2/30 RT-10#
  • 10. 【Cisco】スタティックルート作成 ルータ (偶数) の設定4 FORSE 10 手順15 スタティックルートを設定します 手順16 スタティックルートを検証します RT-20#conf t Enter configuration commands, one per line. End with CNTL/Z. RT-20(config)#ip route 192.168.10.0 255.255.255.0 172.16.10.1 RT-20(config)#end RT-20#show ip route Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP a - application route + - replicated route, % - next hop overrideGateway of last resort is not set 172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks C 172.16.10.0/30 is directly connected, GigabitEthernet8 L 172.16.10.2/32 is directly connected, GigabitEthernet8 192.168.11.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.11.0/24 is directly connected, Vlan10 L 192.168.11.2/32 is directly connected, Vlan10 S 192.168.10.0/24 [1/0] via 172.16.10.1
  • 11. 【Cisco】ミラーポートを作成してキャプチャする FORSE ルータとルータの間にスイッチをいれます 奇数の方がスイッチに設定投入して下さい 支店PCからデータセンターへ ping 内容が判ります Switch(config)#monitor session 1 source interface GigabitEthernet 0/1 Switch(config)#monitor session 1 destination interface GigabitEthernet 0/8 11 172.16.10.0/30 #Gi8#Gi8 #Gi8 #Gi0/1 #Gi0/2 #Gi0/8 172.16.10.0/30 #Gi8 RT10 RT10 RT20 RT20
  • 12. 【Cisco】VPN接続前の確認 Ciscoルータ (奇数) の設定1 FORSE tracert 192.168.11.10 VPNとは https://www.infraexpert.com/study/study10.html https://www.infraexpert.com/study/ipsec.html https://www.infraexpert.com/study/ipsec2.html https://www.infraexpert.com/study/ipsec8.html 12 手順1 isakmpの設定をする 手順2 対向のアドレスとパスワードを設定する 手順3 トランスフォームセットの名前定義 手順4 アクセスリストの作成 RT-10#configure terminal RT-10(config)#crypto isakmp policy 1 RT-10(config-isakmp)#authentication pre-share RT-10(config-isakmp)#encryption 3des ←暗号の可能方式 RT-10(config-isakmp)#group 1 ←DHグループ番号 RT-10(config-isakmp)#hash sha ←認証の方式 RT-10(config-isakmp)#lifetime 86400 RT-10(config-isakmp)#exit RT-10(config)# RT-10(config)#crypto isakmp key akbpassword address 172.16.10.2 RT-10(config)#ip access-list extended acl-ipsec RT-10(config-ext-nacl)#permit ip 192.168.10.0 0.0.0.255 192.168.11.0 0.0.0.255 RT-10(config-ext-nacl)#exit RT-10(config)#crypto ipsec transform-set TF-SET esp-3des esp-sha-hmac RT-10(cfg-crypto-trans)#mode tunnel RT-10(cfg-crypto-trans)#exit
  • 13. 【Cisco】VPN設定する Ciscoルータ (奇数) の設定2 FORSE 手順5 IPSecのポリシー定義 手順6 インターフェースへの適用 13 RT-10(config)#interface gigabitEthernet 8 RT-10(config-if)#crypto map CP-MAP RT-10(config-if)# *Aug 12 10:40:46.788: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is ON RT-10(config-if)# RT-10(config)#crypto map CP-MAP 1 ipsec-isakmp % NOTE: This new crypto map will remain disabled until a peer and a valid access list have been configured. RT-10(config-crypto-map)#match address acl-ipsec ←アクセスリストを適用 RT-10(config-crypto-map)#set peer 172.16.10.2 RT-10(config-crypto-map)#set transform-set TF-SET RT-10(config-crypto-map)#set security-association lifetime seconds 3600 RT-10(config-crypto-map)#exit RT-10(config)# RT-10(config)#ip route 192.168.11.0 255.255.255.0 172.16.10.2 RT-10(config)#end これいる?すでにあるはず 手順7 投入設定の確認 手順8 状態確認 RT-10#sh run | section isakmp crypto isakmp policy 1 encr 3des authentication pre-share crypto isakmp key akbpassword address 172.16.10.2 crypto map CP-MAP 1 ipsec-isakmp set peer 172.16.10.2 set transform-set TF-SET match address acl-ipsec RT-10# RT-10#sh run | section ip access-list ip access-list extended acl-ipsec permit ip 192.168.10.0 0.0.0.255 192.168.11.0 0.0.0.255 RT-10# RT-10#show crypt session Crypto session current status Interface: GigabitEthernet8 Session status: DOWN Peer: 172.16.10.2 port 500 IPSEC FLOW: permit ip 192.168.10.0/255.255.255.0 192.168.11.0/255.255.255.0 Active SAs: 0, origin: crypto map RT-10# RT-10#sh run | section interface GigabitEthernet8 interface GigabitEthernet8 ip address 172.16.10.1 255.255.255.252 duplex auto speed auto crypto map CP-MAP RT-10#
  • 14. 【Cisco】検証する Ciscoルータ (奇数) の設定3 FORSE 手順9 192.168.11.10にpingを通し、検証する RT-10#show crypto session Crypto session current status Interface: GigabitEthernet8 Session status: UP-ACTIVE ←疎通前はIDLE Peer: 172.16.10.2 port 500 Session ID: 0 IKEv1 SA: local 172.16.10.1/500 remote 172.16.10.2/500 Active IPSEC FLOW: permit ip 192.168.10.0/255.255.255.0 192.168.11.0/255.255.255.0 Active SAs: 2, origin: crypto map RT-10#show crypto isakmp sa IPv4 Crypto ISAKMP SA dst src state conn-id status 172.16.10.1 172.16.10.2 QM_IDLE 2001 ACTIVE IPv6 Crypto ISAKMP SA RT-10# 14
  • 15. 【Cisco】検証する Ciscoルータ (奇数) の設定4 FORSE 手順10 検証する 15 つづき CP-MAP sa timing: remaining key lifetime (k/sec): (4289608/2302) IV size: 8 bytes replay detection support: Y Status: ACTIVE(ACTIVE) inbound ah sas: inbound pcp sas: outbound esp sas: spi: 0x2FE73847(803682375) transform: esp-3des esp-sha-hmac , in use settings ={Tunnel, } conn id: 2, flow_id: Onboard VPN:2, sibling_flags 80004040, crypto map: CP-MAP sa timing: remaining key lifetime (k/sec): (4289609/2302) IV size: 8 bytes replay detection support: Y Status: ACTIVE(ACTIVE) outbound ah sas: outbound pcp sas: RT-10# RT-10#show crypto ipsec sa interface: GigabitEthernet8 Crypto map tag: CP-MAP, local addr 172.16.10.1 protected vrf: (none) local ident (addr/mask/prot/port): (192.168.10.0/255.255.255.0/0/0) remote ident (addr/mask/prot/port): (192.168.11.0/255.255.255.0/0/0) current_peer 172.16.10.2 port 500 PERMIT, flags={origin_is_acl,} #pkts encaps: 27, #pkts encrypt: 27, #pkts digest: 27 #pkts decaps: 21, #pkts decrypt: 21, #pkts verify: 21 #pkts compressed: 0, #pkts decompressed: 0 #pkts not compressed: 0, #pkts compr. failed: 0 #pkts not decompressed: 0, #pkts decompress failed: 0 #send errors 0, #recv errors 0 local crypto endpt.: 172.16.10.1, remote crypto endpt.: 172.16.10.2 plaintext mtu 1446, path mtu 1500, ip mtu 1500, ip mtu idb GigabitEthernet8 current outbound spi: 0x2FE73847(803682375) PFS (Y/N): N, DH group: none inbound esp sas: spi: 0x788E71CC(2022601164) transform: esp-3des esp-sha-hmac , in use settings ={Tunnel, } conn id: 1, flow_id: Onboard VPN:1, sibling_flags 80004040, crypto map: つづく
  • 16. 【Cisco】VPN接続前の確認 Ciscoルータ (偶数) の設定1 FORSE tracert 192.168.10.10 VPNとは https://www.infraexpert.com/study/study10.html https://www.infraexpert.com/study/ipsec.html https://www.infraexpert.com/study/ipsec2.html https://www.infraexpert.com/study/ipsec8.html 16 手順1 isakmpの設定をする 手順2 対向のアドレスとパスワードを設定する 手順3 トランスフォームセットの名前定義 手順4 アクセスリストの作成 RT-20#configure terminal RT-20(config)#crypto isakmp policy 1 RT-20(config-isakmp)#authentication pre-share RT-20(config-isakmp)#encryption 3des ←暗号の可能方式 RT-20(config-isakmp)#group 1 ←DHグループ番号 RT-20(config-isakmp)#hash sha ←認証の方式 RT-20(config-isakmp)#lifetime 86400 RT-20(config-isakmp)#exit RT-20(config)# RT-20(config)#crypto isakmp key akbpassword address 172.16.10.1 RT-20(config)#ip access-list extended acl-ipsec RT-20(config-ext-nacl)#permit ip 192.168.11.0 0.0.0.255 192.168.10.0 0.0.0.255 RT-20(config-ext-nacl)#exit RT-20(config)#crypto ipsec transform-set TF-SET esp-3des esp-sha-hmac RT-20(cfg-crypto-trans)#mode tunnel RT-20(cfg-crypto-trans)#exit
  • 17. 【Cisco】VPN設定する Ciscoルータ (偶数) の設定2 FORSE 手順5 IPSecのポリシー定義 手順6 インターフェースへの適用 17 RT-20(config)#interface gigabitEthernet 8 RT-20(config-if)#crypto map CP-MAP RT-20(config-if)# *Aug 12 10:40:46.788: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is ON RT-20(config-if)# RT-20(config)#crypto map CP-MAP 1 ipsec-isakmp % NOTE: This new crypto map will remain disabled until a peer and a valid access list have been configured. RT-20(config-crypto-map)#match address acl-ipsec ←アクセスリストを適用 RT-20(config-crypto-map)#set peer 172.16.10.1 RT-20(config-crypto-map)#set transform-set TF-SET RT-20(config-crypto-map)#set security-association lifetime seconds 3600 RT-20(config-crypto-map)#exit RT-20(config)# RT-20(config)#ip route 192.168.10.0 255.255.255.0 172.16.10.1 RT-20(config)#end これいる?すでにあるはず 手順7 投入設定の確認 手順8 状態確認 RT-20#sh run | section isakmp crypto isakmp policy 1 encr 3des authentication pre-share crypto isakmp key akbpassword address 172.16.10.1 crypto map CP-MAP 1 ipsec-isakmp set peer 172.16.10.1 set transform-set TF-SET match address acl-ipsec RT-20# RT-20#sh run | section ip access-list ip access-list extended acl-ipsec permit ip 192.168.11.0 0.0.0.255 192.168.10.0 0.0.0.255 RT-20# RT-20#show crypt session Crypto session current status Interface: GigabitEthernet8 Session status: DOWN Peer: 172.16.10.1 port 500 IPSEC FLOW: permit ip 192.168.11.0/255.255.255.0 192.168.10.0/255.255.255.0 Active SAs: 0, origin: crypto map RT-20# RT-20#sh run | section interface GigabitEthernet8 interface GigabitEthernet8 ip address 172.16.10.2 255.255.255.252 duplex auto speed auto crypto map CP-MAP RT-20#
  • 18. 【Cisco】検証する Ciscoルータ (偶数) の設定3 FORSE 手順9 192.168.10.10にpingを通し、検証する RT-20#show crypto session Crypto session current status Interface: GigabitEthernet8 Session status: UP-ACTIVE ←疎通前はIDLE Peer: 172.16.10.1 port 500 Session ID: 0 IKEv1 SA: local 172.16.10.2/500 remote 172.16.10.1/500 Active IPSEC FLOW: permit ip 192.168.11.0/255.255.255.0 192.168.10.0/255.255.255.0 Active SAs: 2, origin: crypto map RT-20#show crypto isakmp sa IPv4 Crypto ISAKMP SA dst src state conn-id status 172.16.10.2 172.16.10.1 QM_IDLE 2001 ACTIVE IPv6 Crypto ISAKMP SA RT-20# 18
  • 19. 【Cisco】検証する Ciscoルータ (偶数) の設定4 19 FORSE 手順10 検証する つづき CP-MAP sa timing: remaining key lifetime (k/sec): (4289608/2302) IV size: 8 bytes replay detection support: Y Status: ACTIVE(ACTIVE) inbound ah sas: inbound pcp sas: outbound esp sas: spi: 0x2FE73847(803682375) transform: esp-3des esp-sha-hmac , in use settings ={Tunnel, } conn id: 2, flow_id: Onboard VPN:2, sibling_flags 80004040, crypto map: CP-MAP sa timing: remaining key lifetime (k/sec): (4289609/2302) IV size: 8 bytes replay detection support: Y Status: ACTIVE(ACTIVE) outbound ah sas: outbound pcp sas: RT-20# RT-20#show crypto ipsec sa interface: GigabitEthernet8 Crypto map tag: CP-MAP, local addr 172.16.10.2 protected vrf: (none) local ident (addr/mask/prot/port): (192.168.11.0/255.255.255.0/0/0) remote ident (addr/mask/prot/port): (192.168.10.0/255.255.255.0/0/0) current_peer 172.16.10.1 port 500 PERMIT, flags={origin_is_acl,} #pkts encaps: 27, #pkts encrypt: 27, #pkts digest: 27 #pkts decaps: 21, #pkts decrypt: 21, #pkts verify: 21 #pkts compressed: 0, #pkts decompressed: 0 #pkts not compressed: 0, #pkts compr. failed: 0 #pkts not decompressed: 0, #pkts decompress failed: 0 #send errors 0, #recv errors 0 local crypto endpt.: 172.16.10.2, remote crypto endpt.: 172.16.10.1 plaintext mtu 1446, path mtu 1500, ip mtu 1500, ip mtu idb GigabitEthernet8 current outbound spi: 0x2FE73847(803682375) PFS (Y/N): N, DH group: none inbound esp sas: spi: 0x788E71CC(2022601164) transform: esp-3des esp-sha-hmac , in use settings ={Tunnel, } conn id: 1, flow_id: Onboard VPN:1, sibling_flags 80004040, crypto map: つづく
  • 21. 【Cisco】 パスワードが間違っていた場合 21 FORSE RT-10#show crypto session Crypto session current status Interface: GigabitEthernet8 Session status: DOWN ←←← Peer: 172.16.10.2 port 500 IPSEC FLOW: permit ip 192.168.10.0/255.255.255.0 192.168.11.0/255.255.255.0 Active SAs: 0, origin: crypto map RT-10#show crypto isa RT-10#show crypto isakmp sa IPv4 Crypto ISAKMP SA dst src state conn-id status IPv6 Crypto ISAKMP SA
  • 22. 【Cisco】 つながらない? 22 FORSE #show crypto session の結果が正常 ・「#show crypto ipsec sa」の結果がおかしい ・「%crypto-4-recvd_pkt_not_ipsec: rec‘d packet not an ipsec packet. (ip) vrf/dest_addr=」のようなエラーが対向PCに出ている →フェーズ2でのミス acl間違い? ・Session statusがDOWNになっている →フェーズ1でのミス パスワード間違い? RT-10#show crypto session Crypto session current status Interface: GigabitEthernet8 Session status: DOWN ←←← Peer: 172.16.10.2 port 500 IPSEC FLOW: permit ip 192.168.10.0/255.255.255.0 192.168.11.0/255.255.255.0 Active SAs: 0, origin: crypto map YES NO
  • 23. 【 Cisco 】初期化 FORSE 23 ルーター初期化(工場出荷状態) Teratermで以下のコマンドを入力し初期化する。
  • 24. 【 】さいごに FORSE 実機ハンズオンat秋葉原 2020年6月20日 初回勉強会開催 2020年8月末 グループメンバーが増えてきました。 講義開催要求も多く頂き 謙虚に素直に、みなさまに必要とされるよう努力を続けます 現在のラボ(合計6つ) Cisco #1~#4、Fortigate #1~2 今後の予定、2020年内、EtherChannel、ポートセキュリティ 当社にはCisco ASA検証機もあり、Cisco-ASAをゲートウェイにした支店VPNと AnyConnectの勉強会もやりたい 来年の予定:サーバ系(Linux、ActiveDirecotry + ネットワーク) 今後は予約の取り易いpaypal前払いと、会場払いの2つを作っていく予定です 起業して1年経ちました。 前世の会社でお世話になったお客様たちの案件を2つ程度こなしました。 お客様たちが、前世の会社時と同じように「依頼、要求」を始めました 案件引合が多くて、、、休めません。 中途採用を募集しておりまして、もし良い方がいらっしゃれば紹介をお願いします 24