上犹电脑信息网我们一直在努力
您的位置:上犹电脑信息网 > 设置问题 > 华为二层隧道协议L2TP配置教程(二)-mtu设置

华为二层隧道协议L2TP配置教程(二)-mtu设置

作者:上犹日期:

返回目录:设置问题

2、配置接入呼叫发起L2TP连接的LAC

LAC在用户侧接入用户的呼叫请求,和用户进行PPP协商;同时配置L2TP参数,根据接入用户的名称或者域,发起到LNS的l2TP连接。

配置有如下注意事项:

远程用户发起拨号连接请求时,认证方式应和LAC用户侧虚拟接口模板的配置保持一致。LAC上连接用户侧的接口需要配置IP地址,无特定要求,配置后接口的IP协议生效。

L2TP缺省情况下使能隧道认证功能,未配置认证字。如果使用隧道认证功能,则配置认证字,且LAC和LNS保持一致。如果不使用隧道认证功能,则LAC和LNS都需要去使能隧道认证功能。

1、全局使能L2TP功能

[Huawei]l2tp enable

2、创建VT虚拟接口模板,并进入虚拟模板视图。作为远程用户的PPPoE服务接口,定义了PPP协商的参数

[Huawei]interface Virtual-Template ?

<0-1023> Virtual template interface number

[Huawei]interface Virtual-Template 1

[Huawei-Virtual-Template1]

3、配置PPP认证方式为pap或者chap,对远程用户进行认证。

LAC和LNS的认证方式应保持一致。PAP认证时,密码会在

[Huawei-Virtual-Template1]ppp authentication-mode ?

chap Enable CHAP authentication

pap Enable PAP authentication

[Huawei-Virtual-Template1]ppp authentication-mode chap

4、设置MTU值

与友商设备对接时,为了避免出现数据报文在其物理出接口进行分片后友商设备无法重组等对接失败问题,建议在VT虚拟接口配置MTU值,取值必须不大于L2TP报文的物理出接口MTU值(默认1500字节)减去L2TP报文封装头长度(携带序列号信息时为42字节,否则为38字节)。

例如,默认情况下L2TP报文的物理出接口MTU值为1500,L2TP报文封装头长度为42,该步骤中参数size取值必须不大于1458。

[Huawei-Virtual-Template1]mtu ?

<128-1500> MTU value

[Huawei-Virtual-Template1]mtu 1499

5、进入连接远程用户的物理接口视图,配置接口作为PPPoE服务器,绑定虚拟接口模板。

[Huawei-GigabitEthernet0/0/2]pppoe-server bind virtual-template ?

INTEGER<0-1023> Virtual-template number

[Huawei-GigabitEthernet0/0/2]pppoe-server bind virtual-template 1

6、创建L2TP组,并进入L2TP组视图。用于配置L2TP连接参数,根据接入的远程用户,向LNS发起L2TP连接。

[Huawei]l2tp-group ?

INTEGER<1-16> The number of L2TP group

[Huawei]l2tp-group 1

[Huawei-l2tp1]

7、配置L2TP隧道的密码,需要和LNS保持一致。

[Huawei-l2tp1]tunnel ?

authentication Enable authentication of the L2TP tunnel

avp-hidden Enable AVP hidden function of the L2TP tunnel

name Specify local name of the L2TP tunnel

password Specify the password of the L2TP tunnel

timer Specify the interval at which the L2TP tunnel will send HELLO

packet

[Huawei-l2tp1]tunnel password ?

cipher Encrypted text

simple Plain text

[Huawei-l2tp1]tunnel password cipher ?

STRING<1-16> The UNENCRYPTED/ENCRYPTED password string

[Huawei-l2tp1]tunnel password cipher www.023wg.com

8、配置隧道名称,用于发起L2TP连接时,LNS根据LAC的隧道名称接入。缺省设备名称作为隧道名称。

[Huawei-l2tp1]tunnel name ?

STRING<1-30> Local name of the L2TP tunnel

[Huawei-l2tp1]tunnel name 023wg

9、配置对端LNS的公网地址或者域名,发送控制消息的目的地址

[Huawei-l2tp1]start l2tp ?

ip Specify LNS IP address of the L2TP tunnel

[Huawei-l2tp1]start l2tp ip ?

IP_ADDR<X.X.X.X> IP address

[Huawei-l2tp1]start l2tp ip 10.2.2.2 ?

domain Specify the domain name of the client using the L2TP group

fullusername Specify the full name of the client using the L2TP group

ip Specify LNS IP address of the L2TP tunnel

fullusername,指定VPDN用户的名称。允许为具有相同名称的远程用户建立到达LNS的L2TP连接。

domain,指定VPDN用户的域名称。允许为具有相同域名称的远程用户建立到达LNS的L2TP连接。

3、配置响应L2TP连接的LNS

LNS配置L2TP参数,根据LAC的隧道名称,响应LAC发起的L2TP连接请求。配置有如下注意事项:

LNS在虚拟接口模板上配置PPP协商参数时,认证方式应和LAC保持一致。

如果L2TP组编号不为1,则需要指定对端LAC的隧道名称。

L2TP缺省情况下使能隧道认证功能,未配置认证字。如果使用隧道认证功能,则配置认证字,且LAC和LNS保持一致。如果不使用隧道认证功能,则LAC和LNS都需要去使能隧道认证功能。

当使用RADIUS认证时,如果RADIUS服务器为用户配置了Frame-IP、Frame-Route属性,LNS将Frame-IP和Frame-Route下发给拨号用户,不再从本地地址池分配地址(但是Frame-IP需要在本地地址池中)。

当使用RADIUS认证时,如果RADIUS服务器为用户配置了VPN实例属性,LNS上的VT口不支持绑定VPN实例。

LNS无法感知用户真实的MAC地址,使用的MAC地址是设备分配的虚拟MAC地址,和用户真实的MAC地址无关。该MAC地址不是固定的,不能用于静态地址绑定等业务。

1、全局使能L2TP功能

[Huawei]l2tp enable

2、创建一个全局IP地址池,用于为远程用户分配地址。

如果远程用户已经手工配置了静态IP地址,则无需配置地址池。L2TP只支持将ip pool命令配置的地址池的地址分配给用户,不支持其他地址池的属性信息。如果需要给用户分配DNS服务器地址,建议在配置AAA步骤中增加service-scheme命令。

[Huawei]ip pool ?

STRING<1-64> Pool name

[Huawei]ip pool 023wg.com

Info: It's successful to create an IP address pool.

[Huawei-ip-pool-023wg.com]

3、配置网段地址,作为远程用户的动态IP地址资源,网段内的IP地址会从大到小依次分配。

[Huawei-ip-pool-023wg.com]network ?

IP_ADDR<X.X.X.X> IP address

[Huawei-ip-pool-023wg.com]network 10.1.2.0 ?

mask Mask

<cr> Please press ENTER to execute command

[Huawei-ip-pool-023wg.com]network 10.1.2.0 mask 24

4、配置网关地址,分配给远程用户作为其网关地址。

[Huawei-ip-pool-023wg.com]gateway-list ?

IP_ADDR<X.X.X.X> Gateway's IP address

[Huawei-ip-pool-023wg.com]gateway-list 10.1.2.254

5、创建虚拟接口模板,作为远程用户的私网网关接口,接入远程用户的L2TP连接,定义了PPP协商的参数。

[Huawei]interface Virtual-Template ?

<0-1023> Virtual template interface number

[Huawei]interface Virtual-Template 1

Oct 23 2016 22:04:11-08:00 Huawei %%01IFPDT/4/IF_STATE(l)[0]:Interface Virtual-Template1 has turned into UP state.

[Huawei-Virtual-Template1]

6、用来配置设备作为LNS Server时,有入方向的流量就不发送心跳报文。

[Huawei-Virtual-Template1]ppp keepalive in-traffic check

7、配置IP地址,作为远程用户访问总部的网关地址

[Huawei-Virtual-Template1]ip address ?

IP_ADDR<X.X.X.X> IP address

ppp-negotiate Negotiated IP address with the remote

unnumbered Share an address with another interface

[Huawei-Virtual-Template1]ip address 10.1.2.254 ?

INTEGER<0-32> Length of IP address mask

IP_ADDR<X.X.X.X> IP address mask

[Huawei-Virtual-Template1]ip address 10.1.2.254 24 ?

sub Indicate a subordinate address

<cr> Please press ENTER to execute command

[Huawei-Virtual-Template1]ip address 10.1.2.254 24

8、指定地址池,为远程用户动态分配IP地址。

如果远程用户已经手工配置了静态IP地址,则无需此步骤。

当使用RADIUS认证时,如果RADIUS服务器为用户指定了地址池名称或者Frame-IP,则无需此步骤。LNS会从RADIUS服务器为该用户指定的地址池中为远程用户分配IP地址。

当多个用户携带相同的静态地址拨号时,如果LNS不采用强制地址分配方式,用户都可以显示上线,但不能保证用户业务正常,客户需要规划正确的静态地址。如果用户要求设备能够识别且只允许一个用户接入,需要保证用户规划的地址在地址池中并且配置ppp ipcp remote-address forced命令。

[Huawei-Virtual-Template1]remote address pool ?

STRING<1-64> Address pool name

[Huawei-Virtual-Template1]remote address pool 023wg.com

9、配置PPP认证方式为pap或者chap,对远程用户进行认证。

LAC和LNS的认证方式应保持一致。PAP认证时,密码会在网络中以明文形式传输,存在安全风险。推荐使用CHAP认证。

[Huawei-Virtual-Template1]ppp authentication-mode ?

chap Enable CHAP authentication

pap Enable PAP authentication

[Huawei-Virtual-Template1]ppp authentication-mode chap ?

call-in Call-in user authentication

domain Domain name

<cr> Please press ENTER to execute command

[Huawei-Virtual-Template1]ppp authentication-mode chap

10、配置MTU

[Huawei-Virtual-Template1]mtu ?

<128-1500> MTU value

11、创建L2TP组,并进入L2TP组视图。

用于配置L2TP连接参数,接入LAC发起的连接。当L2TP组编号为1时,可以配置为允许任意LAC接入。

[Huawei]l2tp-group ?

INTEGER<1-16> The number of L2TP group

[Huawei]l2tp-group 1

[Huawei-l2tp1]

12、使用隧道认证功能

[Huawei-l2tp1]tunnel authentication

12、配置L2TP隧道的密码,需要和LAC保持一致。

如果使用simple选项,密码将以明文形式保存在配置文件中,存在安全隐患。建议使用cipher选项,将密码加密保存。

[Huawei-l2tp1]tunnel password ?

cipher Encrypted text

simple Plain text

[Huawei-l2tp1]tunnel password cipher ?

STRING<1-16> The UNENCRYPTED/ENCRYPTED password string

[Huawei-l2tp1]tunnel password cipher www.023wg.com

13、配置隧道名称,用于响应L2TP连接时,建立隧道的协商参数

[Huawei-l2tp1]tunnel name ?

STRING<1-30> Local name of the L2TP tunnel

[Huawei-l2tp1]tunnel name 023w

14、配置L2TP组作为LNS侧,响应LAC发起的连接请求。

需要指定虚拟接口模板和接入的LAC隧道名称。当L2TP组编号为1时,可以不指定对端LAC的隧道名称,表示允许任意LAC接入。

[Huawei-l2tp1]allow l2tp virtual-template ?

INTEGER<0-1023> Virtual template number

[Huawei-l2tp1]allow l2tp virtual-template 1 ?

remote Specify the LAC name of the L2TP tunnel allowed by the L2TP group

<cr> Please press ENTER to execute command

[Huawei-l2tp1]allow l2tp virtual-template 1 remote ?

STRING<1-30> LAC name of the L2TP tunnel

[Huawei-l2tp1]allow l2tp virtual-template 1 remote 023wg.com ?

<cr> Please press ENTER to execute command

[Huawei-l2tp1]allow l2tp virtual-template 1 remote 023wg.com

相关阅读

关键词不能为空
极力推荐

电脑蓝屏_电脑怎么了_win7问题_win10问题_设置问题_文件问题_上犹电脑信息网

关于我们