GNS3模拟ADSL宽带拨号上网

GNS3模拟ADSL宽带需搭建的网络拓扑图如下:


ADSL-1

R1:在GNS中添加c7200平台的路由器,根据本实验的要求,R1分别需要一个以太网端口和一个ATM端口。在工作区添加c7200路由器和端口的方法如下:

将GNS中的c7200路由器拖入工作区后,为其改名为“R1”。右键单击工作区的R1路由器——配置,在“节点配置”页面中点击R1——插槽,在适配卡中分别添加“C7200-IO-FE(快速以太网端口)”和“PA-A1(ATM端口)”,点击“OK”完成。


图ADSL-2

R2:采用c7200平台的路由器。在GNS中添加R2的方法和R1的添加方法相似,只需将c7200的名称更改为R2,并在适配卡中添加以太网端口和ATM端口,如图ADSL-3所示:

图ADSL-3

R3、Host和PPPoE这三台路由器和端口的添加方法和R1、R2的添加方法都差不多,区别是R3、Host和PPPoE这三台路由器就不必添加ATM端口了。本实验中,R3 和Host采用c7200平台的路由器,PPPoE采用c3640型号的路由器。

因为ATM端口需要配置VPI/VCI参数,所以ATM设备的添加就稍显麻烦些,将ATM交换机拖入工作区,右键单击ATM交换机——配置,在“节点配置”页面中单击ATM交换机,在对话框的右边会出现源点和目的需要添加的VPI和VCI参数。为了简单起见,我们就不自己自定义这些VPI和VCI参数了,按照图ADSL-3中提供的默认参数进行添加即可。单击“添加”,将VPI/VCI参数添加到映射关系的对话框中,添加过程和添加之后的效果如图ADSL-4和ADSL-5所示。


图ADSL-4


图ADSL-5

本实验中的各台设备模拟的角色分析如下:

路由器R1充当ADSL拨号中的CPE设备即用户前端设备,它模拟宽带用户的调制解调器。

ATM交换机不必多说了,模拟的是ISP(运营商)网络中承载用户ADSL宽带业务的ATM网络。

路由器R2充当ATM网络中的桥接设备,该桥接设备将ATM网络与以太网进行桥接。通过这种桥接可以让PPPoE拨号用户顺利地从R3(汇聚路由器)那里租到一个公网IP地址。

路由器R3模拟汇聚路由器,同时为了在本实验中简化网络拓朴结构R3还充当ISP网络中的BAS设备,BAS (宽带接入服务器)是一种设置在网络汇聚层的用户接入服务设备,可以智能化地实现对ADSL宽带用户的汇聚、认证、计费等服务,还可以根据用户的需要,方便地提供多种IP增值业务。在本实验中,为ADSL拨号用户动态分配IP地址的工作也由路由器R3完成。

路由器Host模拟互联网上的一台主机。

路由器PPPoE模拟进行宽带拨号的企业路由器。

PC1用来模拟企业内网的用户。

以上各网络设备ADSL具体配置如下(加粗的指令为关键指令):

---------------------------------------------------------------------

R1的主要配置:

no ip routing

!

interfaceFastEthernet0/0

 no ip address

 no ip route-cache

 duplex full

 bridge-group1

!

interfaceATM1/0

 no ip address

 no ip route-cache

 no atm ilmi-keepalive

 bridge-group1

 pvc 0/100

encapsulation aal5snap

!

bridge1 protocol ieee

-----------------------------------------

R2的主要配置:

no ip routing

!

interfaceFastEthernet0/0

 no ip address

 no ip route-cache

 duplex full

 bridge-group1

!

interfaceATM2/0

 no ip address

 no ip route-cache

 no atm ilmi-keepalive

 bridge-group1

 pvc0/200

encapsulation aal5snap

!

bridge1 protocol ieee

--------------------------------------------------------

R3的主要配置:

vpdnenable

!

usernamesyl_88505088 password 0 sy88505088

!

vpdn-group1

 accept-dialin

protocol pppoe

virtual-template 1

!

interfaceLoopback0

 ip address 113.224.0.1 255.255.0.0

interfaceFastEthernet0/0

 no ip address

 duplex auto

 speed auto

 pppoeenable

!

interfaceFastEthernet0/1

 ipaddress 100.100.100.1 255.255.255.0

 duplex auto

 speed auto

!

interfaceVirtual-Template1

 ipunnumbered Loopback0

 peer default ip address pool ADSL-POOL

 ppp authentication chap

!

iplocal pool ADSL-POOL 113.224.0.2 113.224.255.254

-------------------------------------------------------------------------

PPPoE的主要配置:

 

vpdnenable

!

vpdn-group 1

 request-dialin

protocolpppoe

!

interfaceFastEthernet0/0

 no ip address

 speed 100

 full-duplex

 pppoeenable group global

 pppoe-client dial-pool-number 1

!

interfaceFastEthernet1/0

 ipaddress 192.168.0.5 255.255.255.0

 ip nat inside

 ip virtual-reassembly

 duplex auto

 speed auto

!

interfaceDialer0

 ip address negotiated

 ip nat outside

 ip virtual-reassembly

 encapsulation ppp

 dialer pool 1

 ppp chap hostname syl_88505088

 ppp chap password 0 sy88505088

!

iproute 0.0.0.0 0.0.0.0 Dialer0

!

ipnat inside source list 100 interface Dialer0 overload

!

access-list100 permit ip 192.168.0.0 0.0.0.255 any

!

---------------------------------------------------------

Host的配置:

noip routing

!

interfaceFastEthernet0/0

 ip address 100.100.100.2 255.255.255.0

 no ip route-cache

 duplex auto

 speed auto

!

ipdefault-gateway 100.100.100.1

-----------------------------------------------------------

PC1的配置:

为PC1分配一个192.168.0.0/24网络中的IP地址,比如192.168.0.100,网关设置为192.168.0.5,如果以上设备的配置没有问题,那么PC1就可以ping通Host主机(100.100.100.2)的地址了。

---------------------------------------------------------------

使用show命令在PPPoE路由器上验证ADSL拨号成功:

PPPoE#show interfacesdialer 0

Dialer0is up, line protocol is up (spoofing)

  Hardware is Unknown

  Internetaddress is 113.224.0.2/32

  MTU 1500 bytes, BW 56 Kbit, DLY 20000 usec,

     reliability 255/255, txload 1/255, rxload1/255

  Encapsulation PPP, loopback not set

  Keepalive set (10 sec)

  DTR is pulsed for 1 seconds on reset

  Interface is bound to Vi2

  Last input never, output never, output hangnever

  Last clearing of "show interface"counters 00:00:49

  Input queue: 0/75/0/0(size/max/drops/flushes); Total output drops: 0

  Queueing strategy: weighted fair

  Output queue: 0/1000/64/0 (size/maxtotal/threshold/drops)

     Conversations  0/0/16 (active/max active/max total)

     Reserved Conversations 0/0 (allocated/maxallocated)

     Available Bandwidth 42 kilobits/sec

  5 minute input rate 0 bits/sec, 0 packets/sec

  5 minute output rate 0 bits/sec, 0 packets/sec

     14 packets input, 900 bytes

     16 packets output, 1304 bytes

以上输出的关于dialer0接口的信息表明,dialer0拨号成功并开启,线路协议也是up状态,同时该拨号接口还从汇聚路由器(R3)的地址池中获取了一个公网IP地址(113.224.0.2)。此时PPPoE路由器可以使用该地址ping通模拟互联网的那台Host主机(100.100.100.2)。

猜你喜欢

转载自blog.csdn.net/lnboxue/article/details/80722535