CISCO路由器PPPoE实验报告

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

CISCO路由器PPPoE实验报告
题⽬:PPPOE实验
实验拓扑如下:
实验要求:
1.在pppoe-client2路由器上使⽤NAT协议,让内部主机能够上⽹
2.路由器pppoe-client2和pppoe-client1通过pppoe协议拨号连接pppoe-server服务器,
3.在pppoe-server和ISP-router之间使⽤ospf路由选择协议
实验⽬的:
掌握1.pppoe在路由器上的配置过程
2.NAT
3.单区域ospf
实验步骤:
1.使⽤⼩凡模拟器搭建实验环境。

2.
2.在pppoe-server 路由器上配置如下
PPPoe-server(config-if)#username cisco password cisco 创建⼀个拨号帐号。

PPPoe-server(config)#vpdn enable //启⽤vpdn虚拟私有拨号⽹络协议
PPPoe-server(config)#vpdn-group adsl0 //创建⼀个虚拟私有拨号⽹络组,起名为adsl0 PPPoe-server(config-vpdn)#accept-dialin //允许拨⼊改组
PPPoe-server(config-vpdn-acc-in)#protocol pppoe //并启⽤pppoe协议
%Only one PPPoE VPDN group can be configured
PPPoe-server(config-vpdn-acc-in)#virtual-template 1 //关联⼀个虚拟接⼝
PPPoe-server(config-vpdn-acc-in)#exit
PPPoe-server(config-vpdn)#pppoe limit per-mac 10 //限制拨号连接的mac数⽬为10
PPPoe-server(config)#int f0/0 启⽤物理接⼝
PPPoe-server(config-if)#ip add 1.1.1.1 255.255.255.0 配置ip地址
PPPoe-server(config-if)#no shut
PPPoe-server(config-if)#pppoe enable 并在该物理接⼝下启⽤pppoe协议
PPPoe-server(config-if)#int virtual-template1 配置虚拟接⼝
PPPoe-server(config-if)#ip address 200.0.0.1 255.255.255.0
PPPoe-server(config-if)#peer default ip address pool ad 指定拨⼊端的iP池,名字为ad PPPoe-server(config-if)#ppp
authentication chap pap callin 启⽤混合认证⽅式
PPPoe-server(config-if)#ppp ipcp dns 202.102.128.68 202.102.134.68 给拨⼊端指派dns PPPoe-server(config-if)#ip local pool vt1 200.0.0.20 200.0.0.254 指定拨⼊端能够使⽤的ip范围
PPPoe-server(config)#
PPPoe-server(config)#router ospf 10 启⽤ospf路由选择协议
PPPoe-server(config-router)#net 200.0.0.0 0.0.0.255 area 0 通告直连⽹络号
PPPoe-server(config-router)#net 100.0.0.0 0.0.0.255 area 0
PPPoe-server(config-router)#
pppoe-server(config)#do sho ip rou ospf 查看ospf路由表
5.0.0.0/32 is subnetted, 1 subnets
O 5.5.5.5 [110/11] via 100.0.0.2, 00:03:07, FastEthernet1/0
pppoe-server(config)#
pppoe-server(config)#do ping 5.5.5.5 测试
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/211/364 ms
pppoe-server(config)#do sho ip rou ospf
5.0.0.0/32 is subnetted, 1 subnets
O 5.5.5.5 [110/11] via 100.0.0.2, 00:03:07, FastEthernet1/0
pppoe-server(config)#
在pppoe-client2上配置如下
pppoe-client2(config)#vpdn enable 同上,在路由器作为拨⼊端时也要启⽤vpdn协议pppoe-client2(config)#int f0/0 pppoe-client2(config-if)#no shut 启⽤连接拨号的物理接⼝
pppoe-client2(config-if)#
*Mar 1 00:19:54.511: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 00:19:55.511: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up pppoe-client2(config-if)#pppoe enable 同样启⽤pppoe协议
pppoe-client2(config-if)#
*Mar 1 00:20:56.283: %LINK-3-UPDOWN: Interface Virtual-Access1, changed state to up
*Mar 1 00:20:57.283: %LINEPROTO-5-UPDOWN: Line protocol on Interface Virtual-Access1, changed state to up pppoe-client2(config-if)#pppoe-client dial-pool-number ?
<1-255> Dialer pool number
pppoe-client2(config-if)#pppoe-client dial-pool-number 1 定义⼀个拨号池为1
pppoe-client2(config-if)#exit
pppoe-client2(config)#int dialer0 启⽤拨号接⼝
pppoe-client2(config-if)#ip add negotiated ip地址协商
pppoe-client2(config-if)#ip mtu 1492 默认mtu为1500由于pppoe包头占⽤8字节
pppoe-client2(config-if)#no shut
pppoe-client2(config-if)#encapsulation ppp 启⽤封装协议
pppoe-client2(config-if)#ppp authentication chap pap callin 指定认证⽅式
pppoe-client2(config-if)#ppp chap hostname cisco
pppoe-client2(config-if)#ppp chap password cisco
pppoe-client2(config-if)#ppp pap sent-username cisco password cisco
pppoe-client2(config-if)#dialer pool 1 启⽤拨号池此时拨号⾃动开始连接
pppoe-client2(config-if)#ppp ipcp dns request 请求获取dns
pppoe-client2(config-if)#exit
pppoe-client2(config)#int f0/0
pppoe-client2(config-if)#ip add 2.2.2.2 255.255.255.0
pppoe-client2(config-if)#no shut
pppoe-client2(config-if)#exit
pppoe-client2(config)#int f0/0
pppoe-client2(config-if)#shut
pppoe-client2(config-if)#
*Mar 1 00:38:58.891: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down
*Mar 1 00:38:59.891: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down pppoe-client2(config-if)#
*Mar 1 00:39:55.127: %DIALER-6-UNBIND: Interface Vi2 unbound from profile Di0
pppoe-client2(config-if)#
*Mar 1 00:39:55.135: %LINK-3-UPDOWN: Interface Virtual-Access2, changed state to down pppoe-client2(config-if)# *Mar 1 00:39:56.115: %LINEPROTO-5-UPDOWN: Line protocol on Interface Virtual-Access2, changed state to down pppoe-client2(config-if)#
pppoe-client2(config-if)#
pppoe-client2(config-if)#no shut
pppoe-client2(config-if)#
*Mar 1 00:41:33.659: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 00:41:34.659: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up pppoe-client2(config-if)#exi
*Mar 1 00:41:50.519: %DIALER-6-BIND: Interface Vi2 bound to profile Di0
pppoe-client2(config-if)#ex
*Mar 1 00:41:50.527: %LINK-3-UPDOWN: Interface Virtual-Access2, changed state to up pppoe-client2(config-if)#
pppoe-client2#^Z
pppoe-client2#
*Mar 1 00:41:54.491: %SYS-5-CONFIG_I: Configured from console by console
*Mar 1 00:41:55.159: %LINEPROTO-5-UPDOWN: Line protocol on Interface Virtual-Access2, changed state to up
pppoe-client2#sho ip int bri 获取到pppoe-server分配的ip地址,拨号成功
Interface IP-Address OK? Method Status Protocol FastEthernet0/0 2.2.2.2 YES manual up up Ethernet1/0 unassigned YES unset administratively down down Ethernet1/1 unassigned YES unset administratively down down Ethernet1/2 unassigned YES unset administratively down down Ethernet1/3 unassigned YES unset administratively down down Virtual-Access1 unassigned YES unset up up Virtual-Access2 unassigned YES unset up up Dialer0 200.0.0.20 YES IPCP up up pppoe-client2#ping 200.0.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 200.0.0.1, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/175/392 ms
pppoe-client2#
以下是为了内⽹主机能够通过pppoe-client来nat上⽹的配置。

pppoe-client2(config)#ip dhcp pool ad
pppoe-client2(dhcp-config)#network 192.168.1.0 255.255.255.0
pppoe-client2(dhcp-config)#defaul
pppoe-client2(dhcp-config)#default-router 192.168.1.1
pppoe-client2(dhcp-config)#dns
pppoe-client2(dhcp-config)#dns-server 202.102.128.68 202.102.134.68
pppoe-client2(dhcp-config)#
pppoe-client2(dhcp-config)#exit
pppoe-client2(config)#acce
pppoe-client2(config)#access-list list 10 permit 192.168.1.0 0.0.0.255
^
% Invalid input detected at '^' marker.
pppoe-client2(config)#access-list 10 permit 192.168.1.0 0.0.0.255
pppoe-client2(config)#
pppoe-client2(config)#int dialer 0
pppoe-client2(config-if)#ip nat outside
pppoe-client2(config-if)#exit
pppoe-client2(config)#ip nat inside source list 10 interface dialer0 overload
pppoe-client2(config)#
pppoe-client2(config)#service dhcp
pppoe-client2(config)#
pppoe-client2(config)#
pppoe-client2(config)#exit
pppoe-client2#
在ISP-router上配置如下
ISP-router(config)#int f0/0
ISP-router(config-if)#no shut
ISP-router(config-if)#ioip
^
% Invalid input detected at '^' marker.
ISP-router(config-if)#
ISP-router(config-if)#ip add 10
*Mar 1 01:22:26.143: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 01:22:27.143: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
ISP-router(config-if)#ip add 100.0.0.2 255.255.255.0
ISP-router(config-if)#nj
^
% Invalid input detected at '^' marker.
ISP-router(config-if)#
ISP-router(config-if)#
ISP-router(config-if)#exit
ISP-router(config)#router ospf 10
ISP-router(config-router)#network 100.0.0.0 0.0.0.255 area 0
ISP-router(config-router)#no auto
ISP-router(config-router)#int loo0
ISP-router(config-if)#ip
*Mar 1 01:23:17.583: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up
ISP-router(config-if)#ip add 5.5.5.5 255.255.255.0
ISP-router(config-if)#router ospf 10
ISP-router(config-router)#network 5.5.5.0 0.0.0.255 area 0
ISP-router(config-router)#exit
ISP-router(config)#
ISP-router(config)#
ISP-router(config)#
*Mar 1 01:26:13.727: %OSPF-5-ADJCHG: Process 10, Nbr 200.0.0.1 on FastEthernet0/0 from LOADING to FULL, Loading Done
ISP-router(config)#
使⽤虚拟机测试连通性:
两个⽤户使⽤相同的帐号同时拨号成功
实验结论:该实验报告在⽇常中⽐较实⽤,个⼈利⽤业余时间倾⼼制作,以供⼤家分享。

相关文档
最新文档