【技术分享】如何通过PPPOE拨号上网

news/2025/3/1 20:30:49/

相关学习推荐:

华为实验讲解:实验6-2 配置PPPOE客户端icon-default.png?t=M4ADhttps://www.bilibili.com/video/BV18S4y1a7S7?spm_id_from=333.999.0.0

实验目的

 

1.理解PPPoE的原理

2.掌握PPPoE的配置

实验拓扑

 

实验需求

1.根据实验拓扑图,完成设备的基本配置;

2.R1是PPPoE服务器,R2是PPPoE客户端,R2去R1认证并获得IP地址。

实验步骤

步骤1:设备的基本配置

配置PC1:
VPCS> set pcname PC1   //设置主机名
PC1> ip 192.168.1.1/24 192.168.1.254   //设置IP地址与默认网关配置PC2:
VPCS> set pcname PC2   //设置主机名
PC2> ip 192.168.2.1/24 192.168.2.254   //设置IP地址与默认网关

配置R1:

Router>enable
Router#configure terminal
Router(config)#hostname R1
R1(config)#no ip domain-lookup
R1(config)#line console 0
R1(config-line)#exec-timeout 0 0
R1(config-line)#logging synchronous
R1(config-line)#end
R1#

配置R2:

Router>enable
Router#configure terminal
Router(config)#hostname R2
R2(config)#no ip domain-lookup
R2(config)#line console 0
R2(config-line)#exec-timeout 0 0
R2(config-line)#logging synchronous
R2(config-line)#exit
R2(config)#interface Eth0/1
R2(config-if)#ip address 192.168.1.254 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface Eth0/2
R2(config-if)#ip address 192.168.2.254 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#end
R2#

步骤2:配置PPPoE

配置R1:

R1(config)#username xmws password wisdom
R1(config)#bba-group pppoe ToR2
R1(config-bba-group)#virtual-template 1
R1(config-bba-group)#exit
R1(config)#interface ethernet0/0
R1(config-if)#pppoe enable group ToR2
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface virtual-template 1
R1(config-if)#ip address 12.1.1.1 255.255.255.252
R1(config-if)#ip mtu 1492
R1(config-if)#peer default ip address pool PoR2
R1(config-if)#ppp authentication chap
R1(config-if)#exit
R1(config)#ip local pool PoR2 12.1.1.2
R1(config)#end
R1#

配置R2:

R2(config)#interface ethernet0/0
R2(config-if)#pppoe enable
R2(config-if)#pppoe-client dial-pool-number 1
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface dialer 1  
R2(config-if)#ip mtu 1492
R2(config-if)#dialer pool 1
R2(config-if)#ip address negotiated
R2(config-if)#encapsulation ppp
R2(config-if)#ppp ipcp route default
R2(config-if)#ppp chap hostname xmws
R2(config-if)#ppp chap password wisdom
R2(config-if)#end
R2#

步骤3:检查PPPoE

检查R2:

R2#show ip interface brief
Interface                  IP-Address     OK? Method Status                Protocol
Ethernet0/0                unassigned      YES unset  up                    up     
Ethernet0/1                192.168.1.254   YES manual up                    up     
Ethernet0/2                192.168.2.254 YES manual up                    up     
Ethernet0/3                unassigned      YES unset  administratively down down   
Serial1/0                  unassigned      YES unset  administratively down down   
Serial1/1                  unassigned     YES unset  administratively down down  
Serial1/2                  unassigned      YES unset  administratively down down   
Serial1/3                  unassigned      YES unset  administratively down down   
Dialer1                    12.1.1.2        YES IPCP   up                    up     
Virtual-Access1            unassigned      YES unset  up                    up     
Virtual-Access2            unassigned      YES unset  up                    up R2#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static route, H - NHRP, l - LISPa - application route+ - replicated route, % - next hop override, p - overrides from PfRGateway of last resort is 12.1.1.1 to network 0.0.0.0S*    0.0.0.0/0 [1/0] via 12.1.1.112.0.0.0/32 is subnetted, 2 subnets
C        12.1.1.1 is directly connected, Dialer1
C       12.1.1.2 is directly connected, Dialer1192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.1.0/24 is directly connected, Ethernet0/1
L        192.168.1.254/32 is directly connected, Ethernet0/1192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.2.0/24 is directly connected, Ethernet0/2
L        192.168.2.254/32 is directly connected, Ethernet0/2R2#show interfaces dialer 1
Dialer1 is up, line protocol is up (spoofing)Hardware is UnknownInternet address is 12.1.1.2/32MTU 1492 bytes, BW 56 Kbit/sec, DLY 20000 usec,reliability 255/255, txload 1/255, rxload 1/255Encapsulation PPP, LCP Closed, loopback not setKeepalive set (10 sec)DTR is pulsed for 1 seconds on resetInterface is bound to Vi2Last input never, output never, output hang neverLast clearing of "show interface" counters 00:20:57Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0Queueing strategy: fifoOutput queue: 0/40 (size/max)5 minute input rate 0 bits/sec, 0 packets/sec5 minute output rate 0 bits/sec, 0 packets/sec6 packets input, 84 bytes250 packets output, 3500 bytes
Bound to:
Virtual-Access2 is up, line protocol is upHardware is Virtual Access interfaceMTU 1492 bytes, BW 56 Kbit/sec, DLY 20000 usec,reliability 255/255, txload 1/255, rxload 1/255--More--

步骤4:配置NAT上网

配置R2:

R2(config)#interface E0/1
R2(config-if)#ip nat inside
R2(config)#interface E0/2
R2(config-if)#ip nat inside
R2(config)#interface dialer 1
R2(config-if)#ip nat outside
R2(config)#ip nat inside source list 1 interface dialer 1 overloa

 


http://www.ppmy.cn/news/526470.html

相关文章

sim7600ce拨号上网

1、使用lsusb命令确认4G模块工作正常&#xff0c;没显示如下信息的话就是硬件有问题了。 另外&#xff0c;7600ce 4G模块上有一个蓝色的指示灯&#xff0c;sim卡插好了就会持续闪烁。 2、修改内核配置选项 make meunconfig修改 <*> USB Serial Converter Support ---&g…

拨号上网程序

大家知道&#xff0c;在Netants、DownLoad Expert等软件中都带有定时拨号上网下载软件的功能。而 一般用户的拨号上网&#xff0c;利用的是Windows的Remote Access Service&#xff08;RAS&#xff0c;远程访问服务&#xff09;。 下面介绍一下其在Visual C&#xff0b;&#x…

android 拨号上网流程

android 网络拨号流程: frameworks\base\services\java\com\android\server\ ConnectivityService.java ->[MyHandler ->handleMessage ->case EVENT_SET_MOBILE_DATA ->handleSetMobileData] frameworks\base\services\java\com\android\server\ ConnectivityServ…

通过电话拨号上网的家用计算机,拨号上网需计算机、电话线、帐号和()

相关题目与解析 使用电话线拨号上网的计算机必须配备(__)。A.网卡B.电话机C.调制解调器D.集线器 拨号上网需要准备的设备主要有()。A.计算机B.调制解调器C.电话线D.耳机 计算机和因特网的连接方式包括()。A、通过普通电话线拨号上网B、通过ISDN线路拨号上网C、宽带ADSL ●通过拨…

拨号上网和宽带区别

连接方式和带宽不一样&#xff1a; 拨号是用电话线&#xff0c;带宽14kbps-56kbps(Modem不同速度不同&#xff09;&#xff0c;而宽带用网线连到Adsl Modem&#xff0c;再连到电话线&#xff0c;须向营运商申请&#xff0c;带宽1&#xff0d;3Mbps都有&#xff0c;带宽大的速度…

拨号上网

电话拨号&#xff0c;上网的数据是调制在语音频段上的&#xff0c;局端是接入服务器。也就是说相当于电脑拨打了一个电话到接入服务器&#xff0c;如果网络一直连接&#xff0c;这个电话就不能挂断。由于语音带宽的限制&#xff0c;此方式上网的最大速率是56kbps左右&#xff0…

PPPOE拨号上网

因为没有真正的运营上账号和密码&#xff0c;这里就临时搭建测试 pppoe服务端配置 [Internet]ip pool pppoe 创建地址池 [Internet-ip-pool-pppoe]network 123.1.1.0 mask 24 配置IP地址段 [Internet-ip-pool-pppoe]dns-list 114.114.114.114 配置DNS [Internet-ip-pool-pp…

如何建立拨号上网连接

建立拨号上网连接是上网的第一步骤&#xff0c;如何正确地设置拨号连接是您能否上网的前提&#xff0c;下面将向你介绍建立拨号连接的方法。一、 WindowsXP/2003操作系统&#xff1a; 如果你使用的是WindowsXP/2003操作系统&#xff0c;可以直接在网上邻居中新建网络连接…