路由器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
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,这里面就不做演示了。


本文转自 Jhuster 51CTO博客,原文链接:http://blog.51cto.com/xwnet/143153,如需转载请自行联系原作者
相关文章
|
7天前
|
监控 网络安全 网络虚拟化
在 Cisco 设备上配置 GRE 隧道
【8月更文挑战第31天】
16 0
在 Cisco 设备上配置 GRE 隧道
|
11月前
|
存储 网络协议 分布式数据库
网络名词术语解析 | 路由、交换机、集线器、半/全双工、DNS、LAN、WAN、端口、MTU
网络名词术语解析 | 路由、交换机、集线器、半/全双工、DNS、LAN、WAN、端口、MTU
248 0
|
网络架构
交换机与路由器技术-08-路由器上配置DHCP
交换机与路由器技术-08-路由器上配置DHCP
28 0
|
数据安全/隐私保护 网络架构
PPPoE拨号小案例配置
PPPoE拨号小案例配置
163 0
PPPoE拨号小案例配置
|
数据安全/隐私保护 Python
移动 ZN-M180G 光猫 获取 PPPOE 信息
移动 ZN-M180G 光猫 获取 PPPOE 信息
|
数据安全/隐私保护 网络架构
H3C_路由器_Telnet配置
H3C_路由器_Telnet配置
H3C_路由器_Telnet配置
|
网络架构 网络协议 iOS开发