ROS软路由论坛 ROSABC.com 网络方案网络工程交流

 找回密码
 会员注册

QQ登录

只需一步,快速开始

路由器的通用的PPPOE拨号配置的操作方法

2014-12-9 18:00| 发布者: admin| 查看: 1820| 评论: 0

摘要: 现在大多数家庭和宽带依然都是PPPOE方式的拨号,为了跟大家讲些路由器的pppoe拨号的操作方法和过程,下文以一个实验来说明,并且列出所有配置文件,共广大网管参考和学习。 实验拓扑图 IP地址规划 客户机:192.16 ...
现在大多数家庭和宽带依然都是PPPOE方式的拨号,为了跟大家讲些路由器的pppoe拨号的操作方法和过程,下文以一个实验来说明,并且列出所有配置文件,共广大网管参考和学习。
实验拓扑图
 
 
IP地址规划
客户机:192.168.1.1 255.255.255.0
R1:
f0/0 192.168.1.254 255.255.255.0
R2:
f1/0 1.1.1.1 255.255.255.0
 
基本配置步骤:
 
R1
Router>en
Router#conf t
Router(config)#hostname R1
R1(config)#int f1/0  
R1(config-if)#pppoe enable 
R1(config-if)#pppoe-client dial-pool-number 1
R1(config-if)#no sh
R1(config-if)#exit
R1(config)#int dialer 1
R1(config-if)#ip address negotiated
R1(config-if)#encapsulation ppp
R1(config-if)#ppp pap sent-username xiaowu password xiaowu
R1(config-if)#ppp authentication pap callin
R1(config-if)#mtu 1492
R1(config-if)#dialer pool 1
R1(config-if)#end
R1#conf t
R1(config)#int f0/0
R1(config-if)#ip address 192.168.1.254 255.255.255.0
R1(config-if)#no sh
R1(config-if)#end
R1#
 
==========================================================
 
R2
Router>en
Router#conf t
Router(config)#hostname R2
R2(config)#vpdn enable
R2(config)#vpdn-group 1
R2(config-vpdn)#accept-dialin
R2(config-vpdn-acc-in)#protocol pppoe
R2(config-vpdn-acc-in)#virtual-template 1
R2(config-vpdn-acc-in)#end
R2#conf t
R2(config)#int virtual-template 1
http://www.luyouqiwang.com/14107
R2(config-if)#ip address 1.1.1.1 255.255.255.0
R2(config-if)#encapsulation ppp
R2(config-if)#peer default ip address pool xiaowu
R2(config-if)#ppp authentication pap

R2(config-if)#no sh
R2(config-if)#exit
R2(config)#ip local pool xiaowu 100.1.1.1 100.1.1.100
R2(config)#username xiaowu password xiaowu
R2(config)#int f1/0
R2(config-if)#pppoe enable
R2(config-if)#no sh
R2(config-if)#end
R2#
 
 
观察路由表
 
R1
 
R1#show ip route
*Mar 28 13:36:57.495: %SYS-5-CONFIG_I: Configured from console by console
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2


       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Dialer1
     100.0.0.0/32 is subnetted, 1 subnets
C       100.1.1.1 is directly connected, Dialer1
C    192.168.1.0/24 is directly connected, FastEthernet0/0
R1#
 
===========================================================
 
R2
 
R2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Virtual-Access1.1
     100.0.0.0/32 is subnetted, 1 subnets
C       100.1.1.1 is directly connected, Virtual-Access1.1
R2#
 
我们所配置100.0.0.0网段已经被注入到对方,这就是PPP的一个特点,连接PPP的一条线路的两端无需是同一个网段,NCP会自动将对端注入到路由之中。当然,这样配置完成仅仅是拨号成功,客户端依然不能上网,需要做NAT,准确的说是PAT,这里面就不做演示了。
不良信息举报Q:2000617

软路由

不良信息举报Q:2000617|Archiver|ROS软路由论坛 ROSABC.com 网络方案网络工程交流

GMT+8, 2024-4-25 07:18 , Processed in 0.183937 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部