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

 找回密码
 会员注册

QQ登录

只需一步,快速开始

客户机、出口路由器和PPPOE拨号配置的方法

2014-9-22 07:15| 发布者: admin| 查看: 875| 评论: 0

摘要: 网络的组网拓扑是一台客户机(PC)连接企业出口宽带路由器(R1)和PPPOE服务器(R2),三台设备组成一个链式网络。下面主要是给大家介绍PPPOE拨号的配置方法,对已一些基本的设置方法也会有提及,了解了这个实验,能 ...

网络的组网拓扑是一台客户机(PC)连接企业出口宽带路由器(R1)和PPPOE服务器(R2),三台设备组成一个链式网络。下面主要是给大家介绍PPPOE拨号的配置方法,对已一些基本的设置方法也会有提及,了解了这个实验,能巩固大家头脑里的联网知识。

三台设备的IP地址规划如下:

客户机PC:192.168.1.1 255.255.255.0
企业出口宽带路由器R1:
f0/0 192.168.1.254 255.255.255.0
PPPOE服务器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
http://www.luyouqiwang.com/14249/
R2(config-vpdn-acc-in)#end
R2#conf t
R2(config)#int virtual-template 1
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 09:59 , Processed in 0.105486 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部