H3C+L2TP+典型配置举例
- 格式:doc
- 大小:67.50 KB
- 文档页数:11
7 相关资料1 简介本文档介绍IPsec的典型配置举例。
2 配置前提本文档适用于使用Comware V7软件版本的MSR系列路由器,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。
如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文档假设您已了解IPsec特性。
3 使用iNode客户端基于证书认证的L2TP over IPsec功能配置举例3.1 组网需求如图1所示,PPP用户Host与Device建立L2TP隧道,Windows server 2003作为CA服务器,要求:•通过L2TP隧道访问Corporate network。
•用IPsec对L2TP隧道进行数据加密。
•采用RSA证书认证方式建立IPsec隧道。
图1 基于证书认证的L2TP over IPsec配置组网图3.2 配置思路由于使用证书认证方式建立IPsec隧道,所以需要在ike profile中配置local-identity 为dn,指定从本端证书中的主题字段取得本端身份。
3.3 使用版本本举例是在R0106版本上进行配置和验证的。
3.4 配置步骤3.4.1 Device的配置(1) 配置各接口IP地址# 配置接口GigabitEthernet2/0/1的IP地址。
<Device> system-view[Device] interface gigabitethernet 2/0/1[Device-GigabitEthernet2/0/1] ip address 192.168.100.50 24[Device-GigabitEthernet2/0/1] quit# 配置接口GigabitEthernet2/0/2的IP地址。
[Device] interface gigabitethernet 2/0/2[Device-GigabitEthernet2/0/2] ip address 102.168.1.11 24[Device-GigabitEthernet2/0/2] quit# 配置接口GigabitEthernet2/0/3的IP地址。
华为路由器L2TPVPN配置案例为了实现远程访问内部网络资源的需求,我们可以使用华为路由器的L2TPVPN功能。
本文将提供一个简单的案例来演示如何配置L2TPVPN。
以下是详细的步骤:1. 首先,我们需要登录到华为路由器的Web管理界面。
在浏览器中输入路由器的IP地址,并使用管理员账号和密码登录。
2.在管理界面中,找到“VPN”选项,并点击“VPN服务器”子选项。
这将打开L2TPVPN服务器的配置页面。
在这个页面上,可以配置L2TPVPN服务器的相关参数。
3.在配置页面中,我们首先需要启用L2TPVPN功能。
找到“L2TPVPN服务开关”选项,在选项旁边的复选框中打勾以启用。
然后,点击“应用”按钮保存更改。
4.接下来,我们要配置L2TPVPN服务器的IP地址池。
找到“IP地址池”选项,在选项旁边的复选框中打勾以启用。
然后,点击“添加”按钮添加一个新的IP地址池。
5.在添加IP地址池的界面中,输入一个名称来标识该IP地址池。
在“首地址”和“末地址”字段中,输入IP地址的范围。
然后,点击“应用”按钮保存更改。
7.在L2TPVPN服务器的配置页面上,还有其他一些可选的设置,如DNS服务器和MTU值。
根据需要进行配置,并点击“应用”按钮保存更改。
8.配置完成后,我们需要为L2TPVPN服务器指定一个用户。
找到“VPN用户信息”选项,在选项旁边的复选框中打勾以启用。
然后,点击“添加”按钮添加一个新的VPN用户。
9.在添加VPN用户的界面中,输入一个用户名和密码来标识该用户。
在“所在组”字段中,选择用户所属的用户组。
然后,点击“应用”按钮保存更改。
10.配置完成后,我们需要重启L2TPVPN服务器以应用所有更改。
找到“重启”选项,在选项旁边的复选框中打勾以启用。
然后,点击“应用”按钮重启服务器。
11.配置完成后,我们可以使用L2TPVPN客户端来连接到服务器。
将VPN客户端配置为使用服务器的IP地址、预共享密钥、用户名和密码等参数。
华为路由器上L2TP的配置Client:Now create configuration...Current configuration!version 1.65hostname R1!interface Aux0async mode interactiveencapsulation ppp!interface Ethernet0speed autoduplex autono loopback!interface Ethernet1speed autoduplex autono loopback!interface Serial0encapsulation pppppp pap sent-username Lemon@ password0 ***** ip address negotiate!interface Serial1clock-select DTECLK1encapsulation pppshutdown!voice-port 0!voice-port 1!endLAC:Now create configuration...Current configuration!version 1.65user Lemon@ service-type ppp password 0 ***** vpdn enableaaa-enableaaa authentication ppp default localaaa authentication login default localaaa accounting optionalhostname R2!interface Aux0async mode interactiveencapsulation ppp!interface Ethernet0speed autoduplex autono loopback!interface Ethernet1speed autoduplex autono loopback!interface Ethernet1speed autoduplex autono loopback!interface Serial0clock-select DTECLK1encapsulation pppppp authentication pap!interface Serial1encapsulation pppip address 202.103.1.21 255.255.255.252!vpdn-group 1request dialin l2tp ip 202.103.1.22 fullusername *****l2tp tunnel password 0 ****!endLNS:Now create configuration...Current configuration!version 1.65user Lemon@ service-type ppp password 0 ***** vpdn enableip local pool 1 192.168.1.2 192.168.1.254aaa-enableaaa authentication ppp default localaaa authentication login default localaaa accounting optionalhostname R3!interface Aux0async mode interactiveencapsulation ppp!interface Ethernet0speed autoduplex autono loopback!interface Serial0no loopback!interface Serial0encapsulation pppshutdown!interface Serial1clock-select DTECLK1encapsulation pppip address 202.103.1.22 255.255.255.252!interface Virtual-Template1encapsulation pppppp authentication pappeer default ip address pool 1ip address 192.168.1.1 255.255.255.0!vpdn-group 1accept dialin l2tp virtual-template 1 remote R2l2tp tunnel password 0 **** !end华为路由器配置VPN(2008-07-14 03:34:11)标签:l2tp vpn it分类:华为技术华为路由器配置VPN环境:路由器A公网IP:202.101.1.2/24Tunnel IP:192.168.0.1/30Source IP:202.101.1.2Destnation IP:202.101.2.2路由器B公网IP:202.101.2.2/24Tunnel IP192.168.0.2/30Source IP202.101.2.2Destnation IP202.101.1.2命令配置:命令版本 V3.40Router A#sysname RTA#interface Ethernet2/0ip address 202.101.1.2 255.255.255.0 /公网IP/#interface Ethernet2/1ip address 192.168.1.1 255.255.255.0 /内部私网IP/#interface Tunnel0 /创建tunnel 0/ip address 192.168.0.1 255.255.255.252 /tunnel IP和对方tunnel IP在同一网段/source 202.101.1.2 /源地址/destination 202.101.2.2 /目的地址/#ip route-static 0.0.0.0 0.0.0.0 202.101.1.1 preference 60 /到公网的默认路由/ip route-static 192.168.2.0 255.255.255.0 Tunnel 0 preference 60 /通过tunnel 访问对方私网的路由/Router B#sysname RTB#interface Ethernet2/0ip address 202.101.2.2 255.255.255.0 /内部私网IP/#interface Tunnel0 /创建tunnel 0/ip address 192.168.0.2 255.255.255.252 /tunnel IP和对方tunnel IP在同一网段/source 202.101.2.2 /源地址/destination 202.101.1.2 /目的地址/#ip route-static 0.0.0.0 0.0.0.0 202.101.2.1 preference 60 /到公网的默认路由/ip route-static 192.168.1.0 255.255.255.0 Tunnel 0 preference 60 /通过tunnel 访问对方私网的路由/#return2.5.4 lac 作为客户端典型应用1. 组网需求lac 同时作为l2tp 客户端,与lns 建立常连接。
#l2tp enable/使能l2tp/#domain systemip pool 1 192.168.0.2 192.168.0.100 /分配给拨号用户的地址/#local-user usera /创建用于验证用户的本地帐号/password simple useraservice-type ppp#interface Virtual-Template0ppp authentication-mode pap /PPP认证方式为PAP,使用system默认域/ip address 192.168.0.1 255.255.255.0remote address pool 1 /指定使用ip pool 1给用户分配地址/interface Ethernet2/0ip address 202.101.100.1 255.255.255.252#l2tp-group 1mandatory-lcp /LCP再协商/allow l2tp virtual-template 0 /接受任何LAC的l2tp请求,并绑定到VT0/undo tunnel authentication /不进行tunnel认证/#firewall zone trust add interface Ethernet1/2add interface Virtual-Template0 //把虚拟接口模板添加进入安全域pc欲使用l2tp拨号,所需要做的配置发起VPN请求时应禁止IPSec功能,在命令行模式下执行regedit命令,弹出“注册表编辑器”对话框。
在左侧注册表项目中逐级找到:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Rasm an\Parameters,单击Parameters参数,接着在右边窗口空白处单击鼠标右键,选择[新建/双字节值]并新建一个注册表值(名称为ProhibitIPSec,值为1),然后重新启动Windows2000。
7 相关资料1 简介本文档介绍IPsec的典型配置举例。
2 配置前提本文档适用于使用Comware V7软件版本的MSR系列路由器,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。
如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文档假设您已了解IPsec特性。
3 使用iNode客户端基于证书认证的L2TP over IPsec功能配置举例3.1 组网需求如图1所示,PPP用户Host与Device建立L2TP隧道,Windows server 2003作为CA服务器,要求:•通过L2TP隧道访问Corporate network。
•用IPsec对L2TP隧道进行数据加密。
•采用RSA证书认证方式建立IPsec隧道。
图1 基于证书认证的L2TP over IPsec配置组网图3.2 配置思路由于使用证书认证方式建立IPsec隧道,所以需要在ike profile中配置local-identity 为dn,指定从本端证书中的主题字段取得本端身份。
3.3 使用版本本举例是在R0106版本上进行配置和验证的。
3.4 配置步骤3.4.1 Device的配置(1) 配置各接口IP地址# 配置接口GigabitEthernet2/0/1的IP地址。
<Device> system-view[Device] interface gigabitethernet 2/0/1[Device-GigabitEthernet2/0/1] ip address 192.168.100.50 24[Device-GigabitEthernet2/0/1] quit# 配置接口GigabitEthernet2/0/2的IP地址。
[Device] interface gigabitethernet 2/0/2[Device-GigabitEthernet2/0/2] ip address 102.168.1.11 24[Device-GigabitEthernet2/0/2] quit# 配置接口GigabitEthernet2/0/3的IP地址。
实验三 L2TP VPN的路由器配置一、实验目的:了解CISCO 路由器下L2TP VPN的配置方法。
二、实验环境:●Windows server 2000操作系统●必须在连网的环境中进行三、实验内容及步骤:步骤一网络连通性配置1. 路由器基本配置:(略)2. 路由器接口配置:ISP:Isp(config)#int f0/0Isp(config-if)#ip add 10.1.1.1 255.255.255.0Isp(config-if)#no shutIsp(config-if)#int f0/1Isp(config-if)#ip add 192.168.1.1 255.255.255.0Isp(config-if)#no shutLNS:Lns(config)#int f0/0Lns(config-if)#ip add 192.168.1.2 255.255.255.0Lns(config-if)#no shutLNS(config)#int lo 0LNS(config-if)#ip add 100.1.1.1 255.255.255.03.配置LNS路由器的静态路由Lns(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.14. 配置VPN Client之前首先要保证能和LNS通信才行,将c0(客户端)的IP地址设为10.1.1.2,网关为10.1.1.1,通过ping命令测试c0到LNS路由器的连通性。
步骤二 L2TP VPN服务器的配置:LNS:LNS(config)#username hngy password cisco //配置登录VPN服务器的用户名和密码LNS(config)#vpdn enable //开启VPN服务(vpdn默认是关闭的)LNS(config-vpdn)#vpdn-group 1 //创建VPN组LNS(config-vpdn)#accept-dialin //接收VPN拨号访问LNS(config-vpdn-acc-in)#protocol l2tp //定义使用的VPN协议为L2TPLNS(config-vpdn-acc-in)#virtual-template 1//创建新的虚拟访问组1(一个虚拟拨号组里最多可以建立25个虚拟接口)LNS(config-vpdn-acc-in)#exitLNS(config-vpdn)#no l2tp tunnel authentication //取消L2TP通道验证功能(也可以开启认证功能,这时候,需要搭建一台CA,然后申请证书,并且客户端也需要申请证书才能连上R1,这样会更安全)LNS(config-vpdn)#exitLNS(config)#ip local pool pool1 100.1.1.100 100.1.1.254//配置分配给VPN客户端的地址池,并命名LNS(config)#interface Virtual-Template1//创建虚接口LNS(config-if)#encapsulation pppLNS(config-if)#ip unnumbered f0/0 //借用f0/0的IP地址来转发l2tp隧道协议传输的流量,也可以配置一个公网的IP地址,这样就需要花费购买一个公网IP地址LNS(config-if)#peer default ip address pool pool1//在接口上为拨入用户指定地址池LNS(config-if)#ppp authentication chap//使用chap认证LNS(config-if)#end步骤三 L2TP VPN客户端的配置1.参照实验一建立新的连接,连接到我的工作场所:点击完成即可。
h3c路由器配置案例#version 5.20, ESS 1807#sysname Navigator#l2tp enable#tcp syn-cookie enabletcp anti-naptha enabletcp state closing connection-number 500tcp state established connection-number 500tcp state fin-wait-1 connection-number 500tcp state fin-wait-2 connection-number 500tcp state last-ack connection-number 500tcp state syn-received connection-number 500#info-center source default channel 2 log level errors info-center source default channel 9 log level errors #domain default enable rzglj.vpdn.sd#dns resolvedns proxy enabledns server 219.146.1.66#telnet server enable#dar p2p signature-file flash:/p2p_default.mtdport-security enable#ip http acl 199#acl number 199rule 65534 permit#vlan 1#radius scheme rzteleprimary authentication *.*.*.* 1645 primary accounting *.*.*.* 1646key authentication 1231key accounting 1231#domain *.vpdn.sdauthentication ppp radius-scheme rztele authorization ppp radius-scheme rztele accounting ppp radius-scheme rztele access-limit disablestate activeidle-cut disableself-service-url disableip pool 1 10.0.0.2 10.0.0.254domain systemaccess-limit disablestate activeidle-cut disableself-service-url disablepki domain navigatorcrl check disable#pki domain tr069_vpn_domcrl check disable#ike proposal 1encryption-algorithm 3des-cbcdh group2#ike peer navigatorpre-shared-key cipher AD1LqehiOrugHKZPCChabQ== #ipsec proposal navigatorencapsulation-mode transportesp authentication-algorithm sha1esp encryption-algorithm 3des#ipsec proposal navigator1esp authentication-algorithm sha1esp encryption-algorithm 3des#ipsec policy-template gateway 1ike-peer navigatorproposal navigator navigator1#ipsec policy navigator 1 isakmp template gateway#dhcp server ip-pool vlan1 extendeduser-group system#local-user telecomadminpassword cipher QQB<1!!authorization-attribute level 3service-type telnetlocal-user useradminpassword cipher (@KW6^>_R%UH;C/!R%=1I authorization-attribute level 3service-type telnet#wlan rrmdot11b mandatory-rate 1 2dot11b supported-rate 5.5 11dot11g mandatory-rate 1 2 5.5 11dot11g supported-rate 6 9 12 18 24 36 48 54 #wlan service-template 1 clearssid ChinaNet-cszz#wlan service-template 2 cryptossid ChinaNet-000#wlan service-template 3 cryptossid ChinaNet-111cipher-suite tkipcipher-suite ccmpsecurity-ie rsnsecurity-ie wpaservice-template enable#ssl server-policy chinanetpki-domain navigator#cwmpundo cwmp enablecwmp acs username navigatorcwmp acs password navigatorcwmp cpe inform interval enablecwmp cpe inform interval 43200cwmp cpe username bbms password bbms#l2tp-group 1mandatory-lcpallow l2tp virtual-template 0 remote SHDLAC domain rzglj.vpdn.sdtunnel passwor<1!!d simple rzglj001tunnel name rztest#interface Ethernet0/0port link-mode routenat outboundip address *ipsec policy navigator#interface Ethernet0/1port link-mode routeinterface Virtual-T emplate0ppp authentication-mode pap domain rzglj.vpdn.sd remote address pool 1ip address 10.0.0.1 255.255.255.0#interface NULL0#interface Vlan-interface1ip address 192.168.10.1 255.255.255.0dhcp server apply ip-pool vlan1dhcp select relay#interface Ethernet0/2port link-mode bridge#interface Ethernet0/3port link-mode bridge#interface Ethernet0/4port link-mode bridge#interface Ethernet0/5port link-mode bridge#interface Ethernet0/6port link-mode bridge#interface Ethernet0/7port link-mode bridgeinterface Ethernet0/8port link-mode bridge#interface Ethernet0/9port link-mode bridge#interface WLAN-BSS0#interface WLAN-BSS1#interface WLAN-BSS2port-security port-mode pskport-security tx-key-type 11keyport-security preshared-key pass-phrase sdrz0633 #interface WLAN-Radio2/0service-template 1 interface wlan-bss 0service-template 2 interface wlan-bss 1service-template 3 interface wlan-bss 2#ip route-static 0.0.0.0 0.0.0.0 *#dhcp enable#ip https ssl-server-policy chinanetip https enable#nms primary monitor-interface Ethernet0/0#load xml-configuration#load tr069-configuration#user-interface con 0user-interface vty 0 4 authentication-mode scheme #return。
L2TP-VPN配置实验:L2TP的实现。
一. VPN接入服务器LNS侧的配置1. 建立VPN拨入用户帐号和地址池。
local-user abcpassword simple 123service-type pppdomain systemauthentication ppp local 采用本地帐号ip pool 1 172.16.20.1 172.16.20.102. 配置PPP会话参数:PPP认证方式、地址池。
PPP拨入的用户,按system域方案(本地账号),并采用CHAP进行认证。
认证通过后,从pool 1中为用户分配置IP地址。
interface Virtual-Template1ip address 172.16.20.251 255.255.255.0ppp authentication-mode chap domain systemremote address pool 13. 配置L2TP隧道参数:指定其对virtual-template 1的用户进行L2TP连接,隧道本端名称为LNS。
l2tp enablel2tp-group 1allow l2tp virtual-template 1tunnel name LNSundo tunnel authentication二、用户侧的配置●采用H3C iNode客户端方式采用H3C iNode客户端,选择L2TP IPSec VPN,输入账号:abc 123 ,即可连接。
C:\Documents and Settings\IBM>ipconfigEthernet adapter 本地连接3:Connection-specific DNS Suffix . :IP Address. . . . . . . . . . . . : 172.16.20.1Subnet Mask . . . . . . . . . . . : 255.255.255.255Default Gateway . . . . . . . . . : 172.16.20.1Ethernet adapter 本地连接:Connection-specific DNS Suffix . :IP Address. . . . . . . . . . . . : 123.1.1.2Subnet Mask . . . . . . . . . . . : 255.255.255.0Default Gateway . . . . . . . . . : 123.1.1.1查看:[r3]disp l2tp tunnelTotal tunnel = 1LocalTID RemoteTID RemoteAddress Port Sessions RemoteName1 1 123.1.1.2 1439 1 LAC●采用windows自带的L2TP客户端方式1、在注册表中禁用IPSec。
H3C L2TP 典型配置举例l2tp 的呼叫可以由nas(网络接入服务器)主动发起,也可以由客户端发起。
下面将分别针对这两种情况举例说明。
2.5.1 nas-initialized vpn1. 组网需求vpn 用户访问公司总部过程如下:用户以普通的上网方式进行拨号上网。
在接入服务器(nas)处对此用户进行验证,发现是vpn 用户,则由接入服务器向lns 发起隧道连接的请求。
在接入服务器与lns 隧道建立后,接入服务器把与vpn 用户已经协商的内容作为报文内容传给lns。
lns 再根据预协商的内容决定是否接受此连接。
用户与公司总部间的通信都通过接入服务器与lns 之间的隧道进行传输。
2. 组网图3. 配置步骤(1) 用户侧的配置在用户侧,在拨号网络窗口中输入vpn 用户名vpdnuser,口令hello,拨入号码为170。
在拨号后弹出的拨号终端窗口中输入radius 验证的用户名username 和口令userpass。
(2) nas 侧的配置# 在nas 上配置拨入号码为170。
# 在radius 服务器上设置一个用户名为username、口令为userpass 的vpn 用户,并设置相应的lns 侧设备的ip 地址(本例中lns 侧与通道相连接的以太口的ip 地址为202.38.160.2)。
# 将本端的设备名称定义为lac,需要进行通道验证,通道验证密码为tunnelpwd。
(3) 防火墙(lns 侧)的配置# 设置用户名及口令(应与用户侧的设置一致)。
[h3c] local-user vpdnuser[h3c-luser-vpdnuser] password simple hello[h3c-luser-vpdnuser] service-type ppp# 对vpn 用户采用本地验证。
[h3c] domain system[h3c-isp-system] scheme local[h3c-isp-system] ip pool 1 192.168.0.2 192.168.0.100# 启用l2tp 服务,并设置一个l2tp 组。
[h3c] l2tp enable[h3c] l2tp-group 1# 配置虚模板virtual-template 的相关信息。
[h3c] interface virtual-template 1[h3c-virtual-template1] ip address 192.168.0.1 255.255.255.0[h3c-virtual-template1] ppp authentication-mode chap domain system [h3c-virtual-template1] remote address pool 1# 配置lns 侧接收的通道对端名称。
[h3c] l2tp-group 1[h3c-l2tp1] allow l2tp virtual-template 1 remote lac# 启用通道验证并设置通道验证密码。
[h3c-l2tp1] tunnel authentication[h3c-l2tp1] tunnel password simple tunnelpwd2.5.2 client-initialized vpn1. 组网需求vpn 用户访问公司总部过程如下:用户首先连接internet,之后,直接由用户向lns 发起tunnel 连接的请求。
在lns 接受此连接请求之后,vpn 用户与lns 之间就建立了一条虚拟的tunnel。
用户与公司总部间的通信都通过vpn 用户与lns 之间的tunnel 进行传输。
2. 组网图3. 配置步骤(1) 用户侧的配置在用户侧主机上必须装有l2tp 的客户端软件,如winvpn client,并且用户通过拨号方式连接到internet。
然后再进行如下配置(设置的过程与相应的客户端软件有关,以下为设置的内容):# 在用户侧设置vpn 用户名为vpdnuser,口令为hello。
# 将lns 的ip 地址设为防火墙的internet 接口地址(本例中lns 侧与通道相连接的以太口的ip 地址为202.38.160.2)。
# 修改连接属性,将采用的协议设置为l2tp,将加密属性设为自定义,并选择chap验证,进行通道验证,通道的密码为:tunnelpwd。
(2) 防火墙(lns 侧)的配置# 设置用户名及口令(应与用户侧的设置一致)。
[h3c] local-user vpdnuser[h3c-luser-vpdnuser] password simple hello[h3c-luser-vpdnuser] service-type ppp# 对vpn 用户采用本地验证。
[h3c] domain system[h3c-isp-system] scheme local[h3c-isp-system] ip pool 1 192.168.0.2 192.168.0.100# 启用l2tp 服务,并设置一个l2tp 组。
[h3c] l2tp enable[h3c] l2tp-group 1# 配置虚模板virtual-template 的相关信息。
[h3c] interface virtual-template 1[h3c-virtual-template1] ip address 192.168.0.1 255.255.255.0[h3c-virtual-template1] ppp authentication-mode chap domain system[h3c-virtual-template1] remote address pool 1# 配置lns 侧接收的通道对端名称。
[h3c] l2tp-group 1[h3c-l2tp1] allow l2tp virtual-template 1# 启用通道验证并设置通道验证密码。
[h3c-l2tp1] tunnel authentication[h3c-l2tp1] tunnel password simple tunnelpwd2.5.3 l2tp 多域组网应用1. 组网需求企业中拥有两个域,pc1 为企业中 域的用户,pc2 为企业中 域的用户。
一般情况下,用户无法通过internet 直接访问企业内部的网络。
通过建立vpn并支持多域,不同域的用户将从lns 获得不同范围的地址,并可以访问企业内部网络。
2. 组网图3. 配置步骤(1) 用户侧的配置建一拨号网络,接收由lns 服务器端分配的地址。
对于pc1 而言,在弹出的拨号终端窗口中输入用户名vpdn1@,口令为11111(此用户名与口令已在lns 中注册)。
对于pc2 而言,在弹出的拨号终端窗口中输入用户名vpdn2@,口令为22222(此用户名与口令已在lns 中注册)。
(2) secpath1(lac 侧)的配置(本例中lac 侧的ethernet0/0/0 和ethernet1/0/0 是用户接入接口,ethernet0/0/1的ip 地址为202.38.160.1,lns 侧与通道相连接的ip 地址为202.38.160.2)。
# 设置用户名及口令。
[h3c] system-view[h3c] local-user vpdn1[h3c-luser-vpdn1] password simple 11111[h3c-luser-vpdn1] service-type ppp[h3c-luser-vpdn1] quit[h3c] local-user vpdn2[h3c-luser-vpdn2] password simple 22222[h3c-luser-vpdn2] service-type ppp[h3c-luser-vpdn2] quit# 配置域用户采用本地认证。
[h3c] domain [] scheme local[] quit[h3c] domain [] scheme local[] quit# 在ethernet0/0/0 和ethernet1/0/0 接口上配置pppoe server。
[h3c] interface ethernet0/0/0[h3c-ethernet0/0/0] pppoe-server bind virtual-template 100[h3c-ethernet0/0/0] interface ethernet1/0/0[h3c-ethernet1/0/0] pppoe-server bind virtual-template 101# 在ethernet0/0/1 接口上配置ip 地址。
[h3c-ethernet0/0/0] interface ethernet0/0/1[h3c-ethernet0/0/1] ip address 202.38.160.1 255.255.255.0# 在虚模板上启动chap 认证。
[h3c-ethernet0/0/1] interface virtual-template 100[h3c-virtual-template100] ppp authentication-mode chap domain [h3c-virtual-template100] interface virtual-template 101[h3c-virtual-template101] ppp authentication-mode chap domain [h3c-virtual-template101] quit# 设置两个l2tp 组并配置相关属性。
[h3c] l2tp enable[h3c] l2tp-group 1[h3c-l2tp1] tunnel name lac[h3c-l2tp1] start l2tp ip 202.38.160.2 domain [h3c-l2tp1] l2tp-group 2[h3c-l2tp2] tunnel name lac[h3c-l2tp2] start l2tp ip 202.38.160.2 domain # 启用通道验证并设置通道验证密码。
[h3c-l2tp2] tunnel authentication[h3c-l2tp2] tunnel password simple 12345[h3c-l2tp2] quit[h3c] l2tp-group 1[h3c-l2tp1] tunnel authentication[h3c-l2tp1] tunnel password simple 12345(3) secpath2(lns 侧)的配置。