eNSP2.0模拟PPPoE实验

更新时间:2024-04-14 12:51:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

eNSP2.0模拟PPPoE实验

拓扑如下:

PPPoE服务器上的配置

sysname PPPoE-Server #

ip pool pool1 //创建地址池用来为客户端分配地址 network 192.168.10.10 mask 255.255.255.0 gateway-list 192.168.10.1 #

aaa //在AAA下配置认证方案和创建用于认证的账号 authentication-scheme system_a domain system

authentication-scheme system_a

local-user user1@system password cipher huawei local-user user1@system service-type ppp #

interface Virtual-Template1 //配置认证虚模板 ppp authentication-mode chap domain system remote address pool pool1

ip address 192.168.10.10 255.255.255.0 #

interface g0/0/0 //接口上开启PPPOE服务器的功能 pppoe-server bind Virtual-Template 1 #

interface LoopBack100 //模拟公网的地址 ip address 100.100.100.100 255.255.255.0 PPPoE客户端的配置 #

sysname PPPoE-Client #

dialer-rule //配置拨号规则,IP流量触发PPP拨号 dialer-rule 1 ip permit #

interface Dialer0 //配置拨号接口 0 link-protocol ppp //协议是PPP

ppp chap user user1@system //配置被认证方的chap账号 ppp chap password simple huawei //配置chap密码

mtu 1492 //修改MTU为1500-8=1492 ,1500是以太网最大传输单元,8是PPP头部长度

ip address ppp-negotiate //配置IP地址采用PPP协商方式获取,即通过服务器的地址池分配

dialer user user1@system //配置拨号用户,这个是非按需拨号时要配置 dialer bundle 1 //配置拨号捆绑的编号 1,1要和下面接口的的配置对应 #

interface g0/0/0

pppoe-client dial-bundle-number 1 #

ip route-static 0.0.0.0 0.0.0.0 Dialer0 //配置用于上网的默认路由,注意出口是拨号接口Dialer0,不用也没法指定下一跳IP return

如果路由器下面还有PC要上网,还要配置NAT acl 3000 rule permit ip inter dialer 0

nat outbound 3000

在客户端测试PPPoE的配置

[PPPoE-Client]dis ip inter bri

Interface IP Address/Mask Physical Protocol Dialer0 192.168.10.254/32 up up(s)

GigabitEthernet0/0/0 unassigned up down GigabitEthernet0/0/1 unassigned down down NULL0 unassigned up up(s)

[PPPoE-Client]ping 100.100.100.100

PING 100.100.100.100: 56 data bytes, press CTRL_C to break

Reply from 100.100.100.100: bytes=56 Sequence=1 ttl=255 time=100 ms Reply from 100.100.100.100: bytes=56 Sequence=2 ttl=255 time=10 ms Reply from 100.100.100.100: bytes=56 Sequence=3 ttl=255 time=10 ms Reply from 100.100.100.100: bytes=56 Sequence=4 ttl=255 time=10 ms Reply from 100.100.100.100: bytes=56 Sequence=5 ttl=255 time=10 ms --- 100.100.100.100 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss

round-trip min/avg/max = 10/28/100 ms

[PPPoE-Client]dis pppoe-client session summary PPPoE Client Session:

ID Bundle Dialer Intf Client-MAC Server-MAC State 1 1 0 GE0/0/0 00e0fc03c38b 00e0fc033c76 UP

在服务器上测试PPPoE的配置

dis ip routing-table

Route Flags: R - relay, D - download to fib

------------------------------------------------------------------------------ Routing Tables: Public

Destinations : 11 Routes : 11

Destination/Mask Proto Pre Cost Flags NextHop Interface 100.100.100.0/24 Direct 0 0 D 100.100.100.100 LoopBack100 100.100.100.100/32 Direct 0 0 D 127.0.0.1 LoopBack100 100.100.100.255/32 Direct 0 0 D 127.0.0.1 LoopBack100 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

192.168.10.0/24 Direct 0 0 D 192.168.10.10 Virtual-Template1 192.168.10.10/32 Direct 0 0 D 127.0.0.1 Virtual-Template1

192.168.10.254/32 Direct 0 0 D 192.168.10.254 Virtual-Template1 192.168.10.255/32 Direct 0 0 D 127.0.0.1 Virtual-Template1 255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

dis pppoe-server session all SID Intf State OIntf RemMAC LocMAC

1 Virtual-Template1:0 UP GE0/0/0 00e0.fc03.c38b 00e0.fc03.3c76

dis access-user

------------------------------------------------------------------------------ UserID Username IP address MAC

------------------------------------------------------------------------------ 145 user1@system - 00e0-fc03-c38b

------------------------------------------------------------------------------

Total 1,1 printed

本文来源:https://www.bwwdw.com/article/e7np.html

Top