当前位置:文档之家› CISCO路由器PPPoE实验报告

CISCO路由器PPPoE实验报告

题目:PPPOE实验实验拓扑如下:实验要求:1.在pppoe-client2路由器上使用NAT协议,让内部主机能够上网2.路由器pppoe-client2和pppoe-client1通过pppoe协议拨号连接pppoe-server服务器,3.在pppoe-server和ISP-router之间使用ospf路由选择协议实验目的:掌握1.pppoe在路由器上的配置过程2.NAT3.单区域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 configuredPPPoe-server(config-vpdn-acc-in)#virtual-template 1 //关联一个虚拟接口PPPoe-server(config-vpdn-acc-in)#exitPPPoe-server(config-vpdn)#pppoe limit per-mac 10 //限制拨号连接的mac数目为10PPPoe-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 shutPPPoe-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.0PPPoe-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 0PPPoe-server(config-router)#pppoe-server(config)#do sho ip rou ospf 查看ospf路由表5.0.0.0/32 is subnetted, 1 subnetsO 5.5.5.5 [110/11] via 100.0.0.2, 00:03:07, FastEthernet1/0pppoe-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 mspppoe-server(config)#do sho ip rou ospf5.0.0.0/32 is subnetted, 1 subnetsO 5.5.5.5 [110/11] via 100.0.0.2, 00:03:07, FastEthernet1/0pppoe-server(config)#在pppoe-client2上配置如下pppoe-client2(config)#vpdn enable 同上,在路由器作为拨入端时也要启用vpdn协议pppoe-client2(config)#int f0/0pppoe-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 uppppoe-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 uppppoe-client2(config-if)#pppoe-client dial-pool-number ?<1-255> Dialer pool numberpppoe-client2(config-if)#pppoe-client dial-pool-number 1 定义一个拨号池为1pppoe-client2(config-if)#exitpppoe-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 shutpppoe-client2(config-if)#encapsulation ppp 启用封装协议pppoe-client2(config-if)#ppp authentication chap pap callin 指定认证方式pppoe-client2(config-if)#ppp chap hostname ciscopppoe-client2(config-if)#ppp chap password ciscopppoe-client2(config-if)#ppp pap sent-username cisco password ciscopppoe-client2(config-if)#dialer pool 1 启用拨号池此时拨号自动开始连接pppoe-client2(config-if)#ppp ipcp dns request 请求获取dnspppoe-client2(config-if)#exitpppoe-client2(config)#int f0/0pppoe-client2(config-if)#ip add 2.2.2.2 255.255.255.0pppoe-client2(config-if)#no shutpppoe-client2(config-if)#exitpppoe-client2(config)#int f0/0pppoe-client2(config-if)#shutpppoe-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 downpppoe-client2(config-if)#*Mar 1 00:39:55.127: %DIALER-6-UNBIND: Interface Vi2 unbound from profile Di0pppoe-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 downpppoe-client2(config-if)#pppoe-client2(config-if)#pppoe-client2(config-if)#no shutpppoe-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 uppppoe-client2(config-if)#exi*Mar 1 00:41:50.519: %DIALER-6-BIND: Interface Vi2 bound to profile Di0pppoe-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#^Zpppoe-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 uppppoe-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.1Type 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 mspppoe-client2#以下是为了内网主机能够通过pppoe-client来nat上网的配置。

相关主题