VLANを利用したL2TPv3/IPsec

SoftEther VPN に関するご質問はこのフォーラムにお気軽にご投稿ください。
Post Reply
MATSUI
Posts: 5
Joined: Mon Feb 05, 2018 8:59 am

VLANを利用したL2TPv3/IPsec

Post by MATSUI » Tue May 08, 2018 7:33 am

こんにちは

PacketiX VPN 4.0とCISCO 891FJをL2TPv3/IPsecで接続しようとしています。
VPNの設定に関して不明な点がありまして、どのようにルーター、またはPacketiX VPNを設定すれば上手く動作するのかアドバイスいただけないでしょうか。

ルーターは891FJを設置しています。
ルーターはPPPoEでISP経由でWAN側IPを取得し、
GigabitEthernet1にPCが接続されており、VLAN2とスイッチしています。
VLAN2からxconnectコマンドを発行してL2TPv3でセンター側と繋ごうとしています。
(コンフィグは下記)

PacketiX VPNはL2TPv3を待ち受ける設定がされています。
仮想NATと仮想DHCPの機能が有効になっており、下記のように構成されています。
仮想NATのNICのIPアドレス:100.64.0.1/24
DHCPの配布アドレス帯:100.64.0.64-127
(コンフィグは下記)

コンフィグをルーターに設定したところ、L2TPv3のセッションは構成できており、
PCのMACアドレスをPacketiXが取得しておりました。
しかし、PCにIPアドレスが割り当てられず、LANに参加できない状況になっています。
(DHCPでも、IPアドレスを設定してもダメでした。)
正常な動作は100.64.0.64が割り当てられて、100.64.0.1をゲートウェイとして動作すると思います。

GigabitEthernet1に接続しているPC上でWireSharkを用いてパケット解析したところ、
PCからDHCP Discovery メッセージがブロードキャストされた後は、DHCPに関する通信が行われていませんでした。

FastEthernet0(ルーティッドポート)を利用して接続した時はIPアドレスが上手く割り振られて通信ができたので、
VLANで接続する際との違いが分からず困っております。
ご指導の程、よろしくお願いします。


○L2TPv3接続時のルーターのshow xconnectの状態
Legend: XC ST=Xconnect State S1=Segment1 State S2=Segment2 State
UP=Up DN=Down AD=Admin Down IA=Inactive
SB=Standby HS=Hot Standby RV=Recovering NH=No Hardware
XC ST Segment 1 S1 Segment 2 S2
------+---------------------------------+--+---------------------------------+--
UP pri ac Vl2:2(Eth VLAN) UP l2tp x.x.x.x:1 UP
IA sec ac Vl2:2(Eth VLAN) UP l2tp y.y.y.y:2 SB

○ルーターコンフィグ
※一部余分な記載は省略しています。
version 15.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname JC891FJ
!
boot-start-marker
boot-end-marker
!
aqm-register-fnf
!
logging buffered 65535
enable password xxxxxxx
!
aaa new-model
!
aaa authentication login default line
!
aaa session-id common
clock timezone JST 9 0
!
ip inspect name ins1 ftp
ip inspect name ins1 dns
ip inspect name ins1 http
ip inspect name ins1 https
ip inspect name ins1 smtp
ip inspect name ins1 pop3
ip inspect name ins1 isakmp timeout 43200
ip inspect name ins1 tcp
ip inspect name ins1 udp
ip cef
no ipv6 cef
!
parameter-map type urlfpolicy local LOCAL
block-page message "URL Filter is Blocking"
parameter-map type urlf-glob PERMIT
!
multilink bundle-name authenticated
!
license udi pid C891FJ-K9 sn vvvvvvvvvvv
!
archive
log config
hidekeys
!
no spanning-tree vlan 1
no spanning-tree vlan 2
vtp mode transparent
!
vlan 2-3,8,100
no cdp run
!
pseudowire-class PWIRE-L2TPv3-Primary
encapsulation l2tpv3
ip local interface Dialer1
!
pseudowire-class PWIRE-L2TPv3-Secondary
encapsulation l2tpv3
ip local interface Dialer1
!
crypto isakmp policy 1
encr 3des
authentication pre-share
group 2
crypto isakmp key aaa address x.x.x.x
crypto isakmp key aaa address y.y.y.y
crypto isakmp keepalive 10 periodic
!
crypto ipsec transform-set IPSEC esp-3des esp-sha-hmac
mode transport
crypto ipsec fragmentation after-encryption
!
crypto map L2TPv3-VPN 1 ipsec-isakmp
set peer x.x.x.x default
set peer y.y.y.y
set transform-set IPSEC
match address IPSEC_MATCH_RULE
!
interface BRI0
no ip address
encapsulation hdlc
shutdown
isdn termination multidrop
!
interface FastEthernet0
no ip address
duplex auto
speed auto
no keepalive
arp timeout 300
!
interface GigabitEthernet0
no ip address
!
interface GigabitEthernet1
switchport access vlan 2
no ip address
no keepalive
arp timeout 300
!
interface GigabitEthernet2
no ip address
shutdown
!
interface GigabitEthernet8
no ip address
ip virtual-reassembly in
duplex auto
speed auto
pppoe enable group global
pppoe-client dial-pool-number 1
no cdp enable
!
interface Vlan1
ip address 192.168.100.40 255.255.255.0
ip access-group 151 out
no ip proxy-arp
ip nat inside
ip inspect ins1 in
ip virtual-reassembly in
ip tcp adjust-mss 1340
!
interface Vlan2
no ip address
no ip proxy-arp
ip tcp adjust-mss 1340
arp timeout 300
xconnect x.x.x.x 1 encapsulation l2tpv3 pw-class PWIRE-L2TPv3-Primary
backup peer y.y.y.y 2 pw-class PWIRE-L2TPv3-Secondary
bridge-group 1
!
interface Async3
no ip address
encapsulation slip
!
interface Dialer1
description Internet01
mtu 1454
ip address negotiated
ip access-group 101 in
ip access-group 102 out
ip nat outside
ip virtual-reassembly in
encapsulation ppp
dialer pool 1
dialer-group 1
ppp mtu adaptive
ppp authentication chap callin
ppp chap hostname hogehoge@aaa.co.jp
ppp chap password 0 fugafuga
ppp ipcp dns request
no cdp enable
crypto map L2TPv3-VPN
!
no ip forward-protocol nd
no ip http server
no ip http secure-server
!
ip dns view VIEW1
domain resolver source-interface Dialer1
domain name-server interface Dialer1
ip dns view-list VIEW-LIST
view VIEW1 1000
restrict name-group 1
ip dns name-list 1 permit .*.
ip dns server view-group VIEW-LIST
ip dns server
ip nat inside source list 161 interface Dialer1 overload
ip route 0.0.0.0 0.0.0.0 Dialer1
!
ip access-list extended IPSEC_MATCH_RULE
permit 115 any any
permit udp host z.z.z.z eq 1701 host x.x.x.x eq 1701
permit udp host z.z.z.z eq 1701 host y.y.y.y eq 1701
!
dialer-list 1 protocol ip permit
!
access-list 10 permit 192.168.100.0 0.0.0.255
access-list 10 deny any
access-list 101 permit ip any any
access-list 102 permit ip any any
access-list 151 permit ip any any
access-list 161 permit ip 192.168.100.0 0.0.0.255 any
!
control-plane
!
mgcp behavior rsip-range tgcp-only
mgcp behavior comedia-role none
mgcp behavior comedia-check-media-src disable
mgcp behavior comedia-sdp-force disable
!
mgcp profile default
!
banner login ^Coriginal^C
!
line con 0
exec-timeout 0 0
password xxxxx
logging synchronous
no modem enable
line aux 0
line 3
modem InOut
speed 115200
flowcontrol hardware
line vty 0 4
access-class 10 in
password xxxxx
transport input all
!
scheduler allocate 20000 1000
!
end




○PacketiX VPN コンフィグレーション
※一部余分な記載は省略しています。
declare root
{
uint ConfigRevision 3113
bool IPsecMessageDisplayed true
string Region JP
bool VgsMessageDisplayed false

declare DDnsClient
{
bool Disabled true
}
declare IPsec
{
bool EtherIP_IPsec true
string IPsec_Secret zzzzzzz
string L2TP_DefaultHub 5000050000001
bool L2TP_IPsec true
bool L2TP_Raw false

declare EtherIP_IDSettingsList
{
declare *
{
byte EncryptedPassword jjvj2WxqtA==
string HubName 5000050000001
string UserName v5000050000001
}
}
}
declare LicenseManager
{
declare License0
{
string LicenseKey zzzzzz-zzzzzz-zzzzzz-zzzzzz-zzzzzz
uint LicenseType 4021
}
}
declare ListenerList
{
declare Listener0
{
bool DisableDos false
bool Enabled true
uint Port 443
}
}
declare LocalBridgeList
{
bool EnableSoftEtherKernelModeDriver true
bool ShowAllInterfaces false
}
declare ServerConfiguration
{
bool AcceptOnlyTls true
uint64 AutoDeleteCheckDiskFreeSpaceMin 8589934592
uint AutoDeleteCheckIntervalSecs 300
uint AutoSaveConfigSpan 300
bool BackupConfigOnlyWhenModified true
string CipherName RC4-MD5
uint CurrentBuild 9656
bool DisableCoreDumpOnUnix false
bool DisableDeadLockCheck false
bool DisableDosProction false
bool DisableGetHostNameWhenAcceptTcp false
bool DisableIntelAesAcceleration false
bool DisableIPv6Listener false
bool DisableNatTraversal false
bool DisableOpenVPNServer true
bool DisableSessionReconnect false
bool DisableSSTPServer true
bool DontBackupConfig false
bool EnableLegacySSL false
bool EnableVpnOverDns false
bool EnableVpnOverIcmp false
bool FW_SECURE false
byte HashedPassword zzzzzz
string KeepConnectHost keepalive.softether.org
uint KeepConnectInterval 50
uint KeepConnectPort 80
uint KeepConnectProtocol 1
uint64 LoggerMaxLogSize 1073741823
uint MaxConcurrentDnsClientThreads 512
uint MaxConnectionsPerIP 256
uint MaxUnestablishedConnections 1000
bool NoDebugDump false
bool NoHighPriorityProcess false
bool NoSendSignature false
string OpenVPNDefaultClientOption dev-type$20tun,link-mtu$201500,tun-mtu$201500,cipher$20AES-128-CBC,auth$20SHA1,keysize$20128,key-method$202,tls-client
string OpenVPN_UdpPortList 1194
bool SaveDebugLog false
byte ServerCert zzzz
byte ServerKey zzzzz
uint ServerLogSwitchType 4
uint ServerType 0
bool StrictSyslogDatetimeFormat false
bool Tls_Disable1_0 false
bool Tls_Disable1_1 false
bool Tls_Disable1_2 false
bool UseKeepConnect false
bool UseWebTimePage false
bool UseWebUI false

declare GlobalParams
{
uint FIFO_BUDGET 10240000
uint HUB_ARP_SEND_INTERVAL 5000
uint IP_TABLE_EXPIRE_TIME 60000
uint IP_TABLE_EXPIRE_TIME_DHCP 300000
uint MAC_TABLE_EXPIRE_TIME 600000
uint MAX_BUFFERING_PACKET_SIZE 2560000
uint MAX_HUB_LINKS 1024
uint MAX_IP_TABLES 65536
uint MAX_MAC_TABLES 65536
uint MAX_SEND_SOCKET_QUEUE_NUM 128
uint MAX_SEND_SOCKET_QUEUE_SIZE 2560000
uint MAX_STORED_QUEUE_NUM 1024
uint MEM_FIFO_REALLOC_MEM_SIZE 655360
uint MIN_SEND_SOCKET_QUEUE_SIZE 320000
uint QUEUE_BUDGET 2048
uint SELECT_TIME 256
uint SELECT_TIME_FOR_NAT 30
uint STORM_CHECK_SPAN 500
uint STORM_DISCARD_VALUE_END 1024
uint STORM_DISCARD_VALUE_START 3
}
declare SyslogSettings
{
string HostName $
uint Port 0
uint SaveType 0
}
}
declare VirtualHUB
{
declare 5000050000001
{
uint64 CreatedTime 1508793943381
byte HashedPassword L6gctAq3uQkdO4bqWJ292Jak15c=
uint64 LastCommTime 1525730704622
uint64 LastLoginTime 1525715518095
uint NumLogin 298
bool Online true
bool RadiusConvertAllMsChapv2AuthRequestToEap false
string RadiusRealm $
uint RadiusRetryInterval 0
uint RadiusServerPort 1812
string RadiusSuffixFilter $
bool RadiusUsePeapInsteadOfEap false
byte SecurePassword CwkoYYFGc2Ze3WwpIIV+QkT+3lE=
uint Type 0

declare AccessList
{
}
declare AdminOption
{
uint allow_hub_admin_change_option 0
uint deny_bridge 0
uint deny_change_user_password 0
uint deny_empty_password 0
uint deny_hub_admin_change_ext_option 0
uint deny_qos 0
uint deny_routing 0
uint max_accesslists 0
uint max_bitrates_download 0
uint max_bitrates_upload 0
uint max_groups 0
uint max_multilogins_per_user 0
uint max_sessions 0
uint max_sessions_bridge 0
uint max_sessions_client 0
uint max_sessions_client_bridge_apply 0
uint max_users 0
uint no_access_list_include_file 0
uint no_cascade 0
uint no_change_access_control_list 0
uint no_change_access_list 0
uint no_change_admin_password 0
uint no_change_cert_list 0
uint no_change_crl_list 0
uint no_change_groups 0
uint no_change_log_config 0
uint no_change_log_switch_type 0
uint no_change_msg 0
uint no_change_users 0
uint no_delay_jitter_packet_loss 0
uint no_delete_iptable 0
uint no_delete_mactable 0
uint no_disconnect_session 0
uint no_enum_session 0
uint no_offline 0
uint no_online 0
uint no_query_session 0
uint no_read_log_file 0
uint no_securenat 0
uint no_securenat_enabledhcp 0
uint no_securenat_enablenat 0
}
declare CascadeList
{
}
declare LogSetting
{
uint PacketLogSwitchType 2
uint PACKET_LOG_ARP 0
uint PACKET_LOG_DHCP 2
uint PACKET_LOG_ETHERNET 0
uint PACKET_LOG_ICMP 1
uint PACKET_LOG_IP 2
uint PACKET_LOG_TCP 0
uint PACKET_LOG_TCP_CONN 1
uint PACKET_LOG_UDP 0
bool SavePacketLog true
bool SaveSecurityLog true
uint SecurityLogSwitchType 4
}
declare Option
{
uint AccessListIncludeFileCacheLifetime 30
uint AdjustTcpMssValue 0
bool ApplyIPv4AccessListOnArpPacket false
bool AssignVLanIdByRadiusAttribute false
bool BroadcastLimiterStrictMode false
uint BroadcastStormDetectionThreshold 0
uint ClientMinimumRequiredBuild 0
bool DenyAllRadiusLoginWithNoVlanAssign false
uint DetectDormantSessionInterval 0
bool DisableAdjustTcpMss false
bool DisableCheckMacOnLocalBridge false
bool DisableCorrectIpOffloadChecksum false
bool DisableHttpParsing false
bool DisableIPParsing false
bool DisableIpRawModeSecureNAT false
bool DisableKernelModeSecureNAT false
bool DisableUdpAcceleration false
bool DisableUdpFilterForLocalBridgeNic false
bool DisableUserModeSecureNAT false
bool DoNotSaveHeavySecurityLogs false
bool DropArpInPrivacyFilterMode true
bool DropBroadcastsInPrivacyFilterMode true
bool FilterBPDU false
bool FilterIPv4 false
bool FilterIPv6 false
bool FilterNonIP false
bool FilterOSPF false
bool FilterPPPoE false
uint FloodingSendQueueBufferQuota 33554432
bool ManageOnlyLocalUnicastIPv6 true
bool ManageOnlyPrivateIP true
uint MaxLoggedPacketsPerMinute 0
uint MaxSession 0
bool NoArpPolling false
bool NoDhcpPacketLogOutsideHub true
bool NoEnum false
bool NoIpTable false
bool NoIPv4PacketLog false
bool NoIPv6AddrPolling false
bool NoIPv6DefaultRouterInRAWhenIPv6 true
bool NoIPv6PacketLog false
bool NoLookBPDUBridgeId false
bool NoMacAddressLog true
bool NoManageVlanId false
bool NoPhysicalIPOnPacketLog false
bool NoSpinLockForPacketDelay false
bool RemoveDefGwOnDhcpForLocalhost true
uint RequiredClientId 0
uint SecureNAT_MaxDnsSessionsPerIp 0
uint SecureNAT_MaxIcmpSessionsPerIp 0
uint SecureNAT_MaxTcpSessionsPerIp 0
uint SecureNAT_MaxTcpSynSentPerIp 0
uint SecureNAT_MaxUdpSessionsPerIp 0
bool SecureNAT_RandomizeAssignIp false
bool SuppressClientUpdateNotification false
bool UseHubNameAsDhcpUserClassOption false
bool UseHubNameAsRadiusNasId false
string VlanTypeId 0x8100
bool YieldAfterStorePacket false
}
declare SecureNAT
{
bool Disabled false
bool SaveLog true

declare VirtualDhcpServer
{
string DhcpDnsServerAddress 10.100.10.111
string DhcpDnsServerAddress2 10.100.10.112
string DhcpDomainName $
bool DhcpEnabled true
uint DhcpExpireTimeSpan 7200
string DhcpGatewayAddress 0.0.0.0
string DhcpLeaseIPEnd 100.64.0.126
string DhcpLeaseIPStart 100.64.0.64
string DhcpPushRoutes 10.0.0.0/255.0.0.0/100.64.0.1
string DhcpSubnetMask 255.255.255.0
}
declare VirtualHost
{
string VirtualHostIp 100.64.0.1
string VirtualHostIpSubnetMask 255.255.255.128
string VirtualHostMacAddress 00-AC-4B-82-60-28
}
declare VirtualRouter
{
bool NatEnabled true
uint NatMtu 1500
uint NatTcpTimeout 1800
uint NatUdpTimeout 60
}
}
declare SecurityAccountDatabase
{
declare GroupList
{
declare test1
{
string Note $
string RealName Test
}
}
declare UserList
{
declare v5000050000001
{
string AuthNtUserName v5000050000001
uint AuthType 5
uint64 CreatedTime 1508793944038
uint64 ExpireTime 0
uint64 LastLoginTime 1525715518095
string Note $
uint NumLogin 241
string RealName ルーター
uint64 UpdatedTime 1525712682683

declare Policy
{
bool Access true
bool ArpDhcpOnly false
uint AutoDisconnect 0
bool CheckIP false
bool CheckIPv6 false
bool CheckMac false
bool DHCPFilter false
bool DHCPForce false
bool DHCPNoServer false
bool DHCPv6Filter false
bool DHCPv6NoServer false
bool FilterIPv4 false
bool FilterIPv6 false
bool FilterNonIP false
bool FixPassword false
uint MaxConnection 32
uint MaxDownload 1500000
uint MaxIP 0
uint MaxIPv6 0
uint MaxMac 0
uint MaxUpload 1500000
bool MonitorPort false
uint MultiLogins 0
bool NoBridge false
bool NoBroadcastLimiter false
bool NoIPv6DefaultRouterInRA false
bool NoIPv6DefaultRouterInRAWhenIPv6 false
bool NoQoS false
bool NoRouting false
bool NoRoutingV6 false
bool NoSavePassword false
bool NoServer false
bool NoServerV6 false
bool PrivacyFilter false
bool RAFilter false
bool RSandRAFilter false
uint TimeOut 20
uint VLanId 0
}
}
}
}
}
}

cedar
Site Admin
Posts: 2070
Joined: Sat Mar 09, 2013 5:37 am

Re: VLANを利用したL2TPv3/IPsec

Post by cedar » Tue May 08, 2018 10:14 am

セッション一覧のMACアドレステーブルではPCは認識されているでしょうか。

MATSUI
Posts: 5
Joined: Mon Feb 05, 2018 8:59 am

Re: VLANを利用したL2TPv3/IPsec

Post by MATSUI » Fri May 11, 2018 7:53 am

認識されております。
仮想NATが有効ですので、仮想NATとPCのMACアドレスが表示されています。

IPアドレステーブルでは仮想NATのIPアドレスのみとなります。

cedar
Site Admin
Posts: 2070
Joined: Sat Mar 09, 2013 5:37 am

Re: VLANを利用したL2TPv3/IPsec

Post by cedar » Fri May 11, 2018 9:34 am

仮想HUBまではパケットが届いているようですが、仮想HUBから出たパケットが、LANまでのどこかで消えているように思われます。
ただ、問題がある箇所は分かりませんでした。

VPNサーバーのログにも不審な記録はないでしょうか。

MATSUI
Posts: 5
Joined: Mon Feb 05, 2018 8:59 am

Re: VLANを利用したL2TPv3/IPsec

Post by MATSUI » Mon May 14, 2018 10:03 am

サーバーログと全てのパケットログを取得状態で接続を実施してみましたが、それらしい記録はありませんでした。

ルーター間のVLAN同士の設定を真似てやってみたのですが、単純に同じ考え方で設定してもダメなのでしょうか。

cedar
Site Admin
Posts: 2070
Joined: Sat Mar 09, 2013 5:37 am

Re: VLANを利用したL2TPv3/IPsec

Post by cedar » Mon May 14, 2018 10:08 am

すみません。
VLAN の接続を行った経験がないため、具体的にこの設定でどこに問題があるかは分かりません。

Post Reply