L2TP是一種工業標準的Internet隧道協議,功能大致和PPTP協議類似,比如同樣可以對網路資料流進行加密。那麼H3C路由器L2TP怎麼配置呢?下面跟yjbys小編一起來看看吧!
system-view
[liuxugang] local-user h3c
[liuxugang-luser-h3c] password simple h3c
[liuxugang-luser-h3c] service-type ppp
[liuxugang-luser-h3c] quit
[liuxugang] domain system 進入預設的域system
[liuxugang-isp-system] ip pool 1 給VPN使用者設定地址池
[liuxugang] quit
[liuxugang] l2tp enable 使能l2tp功能
[liuxugang] interface Virtual-Template 0 建立虛模版0
[liuxugang-Virtual-Template0] ip address 設定IP地址
[liuxugang-Virtual-Template0] ppp authentication-mode pap 使用pap驗證方式
[liuxugang-Virtual-Template0] remote address pool 1 引用地址池
[liuxugang-Virtual-Template0] quit
[liuxugang] l2tp-group 1 建立l2tp組
[liuxugang-l2tp1] mandatory-lcp 強制LCP自協商
[liuxugang-l2tp1] allow l2tp virtual-template 0 在虛介面商啟用l2tp
[liuxugang-l2tp1] undo tunnel authentication 取消隧道驗證。預設啟用
[liuxugang-l2tp1] quit
save
l2tp enable ==》啟用l2tp
domain system
authentication ppp local ==》本地認證
access-limit disable
state active
idle-cut disable
self-service-url disable
ip pool 1 ==》分配給撥號使用者的地址段
l2tp-group 1 ==》
undo tunnel authentication ==》不進行tunnel認證
allow l2tp virtual-template 0 ==》接受任何LAC的.l2tp請求,並繫結到VT0
tunnel password cipher $c$3$G1eL8v28QOPGIdqwR2XTBE/gCZSkyQ==
tunnel name LNS
#
interface Virtual-Template0
ppp authentication-mode chap domain system ==》認證方式chap,使用system預設域
remote address pool 1
ip address
local-user yunwei ==》配置用於本地認證的使用者名稱和密碼
password cipher $c$3$LsR7NXmVKcnrFxhVVwg2bsTWh7F8GhdXVSPh/qp5
service-type ppp