
实验环境:
操作系统:Mac OS X 10.11.5 beta 3(当时最新测试版),模拟器:GNS3 for Mac 1.4.6(当时最新版本)
注:本实验需要使用 12.4 的 IOS 镜像才可以进行实验,新版的 IOS 15.4 已经删除了 “ protocol pppoe ” 这条命令。
实验需求:
GW 通过 PPPoE 拨号上网;PC1 能访问互联网( Google :8.8.8.8 ,Baidu :61.1.1.1 )。
实验步骤:
GW :
!1、vpdn 虚拟线路启用 en vpdn enable vpdn-group PPPoE !2、物理口开启 interface FastEthernet0/1 !3、创建虚拟拨号口 interface Dialer1 !4、给内网做 DHCP int e 4/0 ip dhcp pool PC !5、给内网做 PAT access-list 1 per any int e 4/0 int dial 1 |
ISP-DSLAM :
en int l 1 int l 2 !1、vpdn 虚拟线路启用 vpdn enable vpdn-group PPPoE bba-group pppoe global !2、物理口开启 interface FastEthernet0/1 !3、建立虚拟接收终端口 interface Virtual-Template1 !4、创建 PPP 验证的用户名和密码 username HTPC password HTPC !5、使用 DHCP 分配 IP 地址 ip dhcp pool ADSL |
测试:
Welcome to Virtual PC Simulator, version 0.8c Dedicated to Daling. Build time: Feb 25 2016 00:35:23 Copyright (c) 2007-2015, Paul Meng (mirnshi@gmail.com) All rights reserved.VPCS is free software, distributed under the terms of the "BSD" licence. Source code and license can be found at vpcs.sf.net. For more information, please visit wiki.freecode.com.cn.Press '?' to get help. VPCS> show ip NAME : VPCS[1] IP/MASK : 0.0.0.0/0 GATEWAY : 0.0.0.0 DNS : MAC : 00:50:79:66:68:00 LPORT : 10001 RHOST:PORT : 192.168.69.1:10002 MTU : 1500 VPCS> ip dhcp ? ip dhcp [OPTION] Attempt to obtain IPv4 address, mask, gateway and DNS via DHCP OPTION: -d Show DHCP packet decode -r Renew DHCP lease -x Release DHCP lease VPCS> ip dhcp -r DORA IP 192.168.1.1/24 GW 192.168.1.254 VPCS> show ip NAME : VPCS[1] IP/MASK : 192.168.1.1/24 GATEWAY : 192.168.1.254 DNS : 114.114.114.114 DHCP SERVER : 192.168.1.254 DHCP LEASE : 86398, 86400/43200/75600 MAC : 00:50:79:66:68:00 LPORT : 10001 RHOST:PORT : 192.168.69.1:10002 MTU : 1500 VPCS> p 192.168.1.254 84 bytes from 192.168.1.254 icmp_seq=1 ttl=255 time=15.258 ms 84 bytes from 192.168.1.254 icmp_seq=2 ttl=255 time=7.105 ms 84 bytes from 192.168.1.254 icmp_seq=3 ttl=255 time=9.511 ms 84 bytes from 192.168.1.254 icmp_seq=4 ttl=255 time=9.907 ms 84 bytes from 192.168.1.254 icmp_seq=5 ttl=255 time=10.895 ms VPCS> p 8.8.8.8 84 bytes from 8.8.8.8 icmp_seq=1 ttl=254 time=29.187 ms 84 bytes from 8.8.8.8 icmp_seq=2 ttl=254 time=14.659 ms 84 bytes from 8.8.8.8 icmp_seq=3 ttl=254 time=35.580 ms 84 bytes from 8.8.8.8 icmp_seq=4 ttl=254 time=17.853 ms 84 bytes from 8.8.8.8 icmp_seq=5 ttl=254 time=21.825 ms
发表评论?