萬盛學電腦網

 萬盛學電腦網 >> 網絡應用技術 >> 應用教程 >> Cisco路由器的ADSL modem配置

Cisco路由器的ADSL modem配置

 路由器接入ADSL配置詳解 

1、Cisco路由器連接ADSL modem的PPPoE配置: 說明:此案例為北京電信adsl PPPoE接入,需要使用一個普通adsl modem和一台cisco 2500路由器(雙以太口),IOS 12.2(15)T,能夠實現局域網共享上網. 

此案例配置共分7步: 
第一步:配置vpdn vpdn e 
1、Cisco路由器連接ADSL modem的PPPoE配置:

說明:此案例為北京電信adsl PPPoE接入,需要使用一個普通adsl modem和一台cisco 2500路由器(雙以太口),IOS 12.2(15)T,能夠實現局域網共享上網.
此案例配置共分7步:
第一步:配置vpdn
vpdn enable(啟用路由器的虛擬專用撥號網絡---vpnd)
vpdn-group office(建立一個vpdn組,)
request-dialin(初始化一個vpnd tunnel,建立一個請求撥入的vpdn子組,)
protocol pppoe(vpdn子組使用pppoe建立會話隧道)

第二步: 配置路由器連接adsl modem的接口
interface Ethernet1
no ip address
pppoe enable允許以太接口運行pppoe
pppoe-client dial-pool-number 1將以太接口的pppoe撥號客戶端加入撥號池1

第三步:配置邏輯撥號接口:
interface Dialer1
ip address negotiated從adsl服務商動態協商得到ip地址
ip nat outside為該接口啟用NAT
encapsulation ppp為該接口封裝ppp協議
dialer pool 1該接口使用1號撥號池進行撥號
dialer-group 1該命令對於pppoe是意義不大的
ppp authentication pap callin啟用ppp pap驗證
ppp pap sent-username xxxxxxx password 0 yyyyyyy使用已經申請的用戶名和口令

第四步:配置內部網絡接口
interface Ethernet0(內部網絡接口)
ip address 10.1.1.1 255.255.255.0
ip nat inside為該接口啟用NAT

第五步:配置路由器為內部網絡主機提供dhcp服務
ip dhcp excluded-address 10.1.1.1
ip dhcp pool ABC
import all(導入dns和wins server)
network 10.1.1.0 255.255.255.0
default-router 10.1.1.1

第六步:配置NAT:
access-list 1 permit 10.1.1.0 0.0.0.255
cc

第七步:配置缺省路由
ip route 0.0.0.0 0.0.0.0 Dialer1


2、Cisco路由器連接ADSL WIC卡之PPPoE配置解:

!
vpdn enable
no vpdn logging <=由於ADSL的PPPoE應用是通過虛擬撥號來實現的所以在路由器中需要使用VPDN的功能
!
vpdn-group pppoe <=為PPPoE啟動了VPDN的進程
request-dialin
protocol pppoe <=設置撥號協議為PPPoE
!
interface FastEthernet0 <=設置公司內部網絡地址
ip address 192.168.0.1 255.255.255.0
ip nat inside <=為啟用NAT轉換,設置Fast ethernet端口為內部網絡,從內部網絡收到的數據的原地址轉換為公網地址

!
interface ATM0/0 <=設置ADSL端口
no ip address <=請不要設置地址
no atm ilmi-keepalive
bundle-enable
dsl operating-mode auto
hold-queue 224 in
interface ATM0/0.1 point-to-point <=ADSL的通訊 依靠VC,所以必須設定點到點VC
pvc 8/81 <=設置PVC的相關參數, 即VCI和VPI的值,如果不清楚請向局端查詢
pppoe-client dial-pool-number 1 <=PPPoE撥號進程使用了常規的撥號進程,這裡引用了dialer-pool 1
!
interface Dialer1 <=建立一個虛擬撥號端口 ip address negotiated <=由於局端提供動態地址,所以必須設定地址為協商獲得
ip mtu 1492 <=修改mtu值以適用於ADSL網絡
ip nat outside <=為啟用NAT轉換,設置該端口為外部網絡
encapsulation ppp <=使用PPP的幀格式
dialer pool 1
ppp authentication pap callin <=設置撥號的驗證方式為pap
ppp pap sent vip pass vip <=發送用戶名和密碼
ip nat inside source list 1 interface Dialer1 overload <=設置了NAT的轉換方式,使用了dialer 1端口的動態地址

ip classless
ip route 0.0.0.0 0.0.0.0 dialer1 <=將所有不可路由的數據報轉發給ADSL線路,設定缺省路由
no ip http server
!
access-list 1 permit 192.168.0.0 0.0.0.255


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

Cisco路由器連接ADSL modem的PPPoE配置:

hostname bjsite 

ip subnet-zero 
no ip domain-lookup 

vpdn enable 
no vpdn logging 

vpdn-group 1 
request-dialin 
protocol pppoe 

interface Ethernet0/0 
ip address 192.168.0.1 255.255.255.0 
ip nat inside 
no ip mroute-cache 




interface Ethernet0/1 
no ip address 
pppoe enable 
pppoe-client dial-pool-number 1 

interface Dialer1 
ip address negotiated 
ip nat outside 
ip mtu 1492 
encapsulation ppp 
no ip mroute-cache 
dialer pool 1 
dialer-group 1 
ppp authentication pap 
ppp pap sent-username [email protected] password xxxxxxxx

ip classless 
no ip http server 

dialer-list 1 protocol ip permit 
ip nat inside source list 1 interface Dialer1 overload
ip route 0.0.0.0 0.0.0.0 dialer1 
access-list 1 permit 192.168.0.0 0.0.0.255 

line con 0 
exec-timeout 0 0 
transport input none 
line vty 0 4 
login 

end

Cisco路由器連接ADSL WIC卡之PPPoE配置:
vpdn-group pppoe 
request-dialin 

!--- we are the PPPoE client requesting to establish 
!--- a session with the aggregation unit (6400 NRP). 

protocol pppoe 



!--- internal Ethernet network.


interface FastEthernet0 
ip address 10.92.1.182 255.255.255.0 
ip nat inside 


!--- DSL interface.


interface ATM0 
no ip address 
no atm ilmi-keepalive
bundle-enable
dsl operating-mode auto
hold-queue 224 in

!--- All defaults.




!--- PPPoE runs on top of AAL5SNAP, but the 
!--- encap aal5snap command is not used. 


interface ATM0.1 point-to-point 
pvc 1/1 
pppoe-client dial-pool-number 1

!--- pvc 1/1 is an example value that must be changed 
!--- to match the value used by the ISP. 





!--- The PPPoE client code ties into a dialer interface upon 
!--- which a virtual-access interface is cloned. 


interface Dialer1 
ip address negotiated 
ip mtu 1492

!--- Ethernet MTU default = 1500 (1492 + PPPoE headers = 1500)

ip nat outside 
encapsulation ppp 
dialer pool 1

!--- Ties to atm interface. 

ppp authentication chap callin 
ppp chap hostname <username> 
ppp chap password <password>


!--- The ISP will instruct you regarding 
!--- the type of authentication to use. 
!--- To change from PPP CHAP to PPP PAP, 
!--- replace the following three lines:
!--- ppp authentication chap callin 
!--- ppp chap hostname <username> 
!--- ppp chap password <password> 
!--- with the following two lines:
!--- ppp authentication pap callin
!--- ppp pap sent-username <username> password <password>


!--- For NAT we are going to overload on the Dialer1 
!--- interface and add a default rout

copyright © 萬盛學電腦網 all rights reserved