了解Cisco路由器的ADSL modem實(shí)現(xiàn)上網(wǎng)設(shè)置
歡迎來到學(xué)習(xí)啦,本文為大家提供了解Cisco路由器的ADSL modem實(shí)現(xiàn)上網(wǎng)設(shè)置,歡迎大家閱讀學(xué)習(xí)。
路由器接入ADSL配置詳解
1、Cisco路由器連接ADSL modem的PPPoE配置: 說明:此案例為北京電信adsl PPPoE接入,需要使用一個普通adsl modem和一臺cisco 2500路由器(雙以太口),IOS 12.2(15)T,能夠?qū)崿F(xiàn)局域網(wǎng)共享上網(wǎng). 此案例配置共分7步: 第一步:配置vpdn vpdn e 1、Cisco路由器連接ADSL modem的PPPoE配置:說明:此案例為北京電信adsl PPPoE接入,需要使用一個普通adsl modem和一臺cisco 2500路由器(雙以太口),IOS 12.2(15)T,
能夠?qū)崿F(xiàn)局域網(wǎng)共享上網(wǎng).此案例配置共分7步:
第一步:配置vpdnvpdn enable(啟用路由器的虛擬專用撥號網(wǎng)絡(luò)---d)vpdn-group office(建立一個vpdn組,)request-dialin(初始化一個d tunnel,建立一個請求撥入的vpdn子組,)protocol pppoe(vpdn子組使用pppoe建立會話隧道
)第二步: 配置路由器連接adsl modem的接口interface Ethernet1no ip addresspppoe enable允許以太接口運(yùn)行pppoepppoe-client dial-pool-number 1將以太接口的pppoe撥號客戶端加入撥號池1
第三步:配置邏輯撥號接口:interface Dialer1ip address negotiated從adsl服務(wù)商動態(tài)協(xié)商得到ip地址ip nat outside為該接口啟用NATencapsulation ppp為該接口封裝ppp協(xié)議dialer pool 1該接口使用1號撥號池進(jìn)行撥號dialer-group 1該命令對于pppoe是意義不大的ppp authentication pap callin啟用ppp pap驗(yàn)證ppp pap sent-username xxxxxxx password 0 yyyyyyy使用已經(jīng)申請的用戶名和口令
第四步:配置內(nèi)部網(wǎng)絡(luò)接口interface Ethernet0(內(nèi)部網(wǎng)絡(luò)接口)ip address 10.1.1.1 255.255.255.0ip nat inside為該接口啟用NAT
第五步:配置路由器為內(nèi)部網(wǎng)絡(luò)主機(jī)提供dhcp服務(wù)ip dhcp excluded-address 10.1.1.1ip dhcp pool ABCimport all(導(dǎo)入dns和wins server)network 10.1.1.0 255.255.255.0default-router 10.1.1.1
第六步:配置NAT:access-list 1 permit 10.1.1.0 0.0.0.255cc第七步:配置缺省路由ip route 0.0.0.0 0.0.0.0 Dialer12、Cisco路由器連接ADSL WIC卡之PPPoE配置解:!vpdn enableno vpdn logging <=由于ADSL的PPPoE應(yīng)用是通過虛擬撥號來實(shí)現(xiàn)的所以在路由器中需要使用VPDN的功能!vpdn-group pppoe <=為PPPoE啟動了VPDN的進(jìn)程request-dialinprotocol pppoe <=設(shè)置撥號協(xié)議為PPPoE!interface FastEthernet0 <=設(shè)置公司內(nèi)部網(wǎng)絡(luò)地址ip address 192.168.0.1 255.255.255.0ip nat inside <=為啟用NAT轉(zhuǎn)換,設(shè)置Fast ethernet端口為內(nèi)部網(wǎng)絡(luò),從內(nèi)部網(wǎng)絡(luò)收到的數(shù)據(jù)的原地址轉(zhuǎn)換為公網(wǎng)地址!interface ATM0/0 <=設(shè)置ADSL端口no ip address <=請不要設(shè)置地址no atm ilmi-keepalivebundle-enabledsl operating-mode autohold-queue 224 ininterface ATM0/0.1 point-to-point <=ADSL的通訊 依靠VC,所以必須設(shè)定點(diǎn)到點(diǎn)VCpvc 8/81 <=設(shè)置PVC的相關(guān)參數(shù), 即VCI和VPI的值,如果不清楚請向局端查詢pppoe-client dial-pool-number 1 <=PPPoE撥號進(jìn)程使用了常規(guī)的撥號進(jìn)程,這里引用了dialer-pool 1!interface Dialer1 <=建立一個虛擬撥號端口 ip address negotiated <=由于局端提供動態(tài)地址,所以必須設(shè)定地址為協(xié)商獲得ip mtu 1492 <=修改mtu值以適用于ADSL網(wǎng)絡(luò)ip nat outside <=為啟用NAT轉(zhuǎn)換,設(shè)置該端口為外部網(wǎng)絡(luò)encapsulation ppp <=使用PPP的幀格式dialer pool 1ppp authentication pap callin <=設(shè)置撥號的驗(yàn)證方式為papppp pap sent vip pass vip <=發(fā)送用戶名和密碼ip nat inside source list 1 interface Dialer1 overload <=設(shè)置了NAT的轉(zhuǎn)換方式,使用了dialer 1端口的動態(tài)地址!ip classlessip route 0.0.0.0 0.0.0.0 dialer1 <=將所有不可路由的數(shù)據(jù)報轉(zhuǎn)發(fā)給ADSL線路,設(shè)定缺省路由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 dg48907653@163.gd password xxxxxxxx! ip classless no ip http server ! dialer-list 1 protocol ip permit ip nat inside source list 1 interface Dialer1 overloadip 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 ! endCisco路由器連接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-keepalivebundle-enabledsl operating-mode autohold-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 ppp chap 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 !--- ppp chap password !--- with the following two lines:!--- ppp authentication pap callin!--- ppp pap sent-username password !--- For NAT we are going to overload on the Dialer1 !--- interface and add a default route out !--- since dialer ip address can change. ip nat inside source list 1 interface Dialer1 overload ip classless ip route 0.0.0.0 0.0.0.0 dialer1 no ip http server ! access-list 1 permit 10.92.1.0 0.0.0.255-------------------------------------------用cisco路由器做PPPoE Server端配置enconf thostname Adsl_walkbirdusername walkbird password walkbirdvpdn enablevpdn-group pppoeaccept-dialinprotocol pppoevirtual-template 1exitexitinterface ethernet 0/0pppoe enableno shutdowninterface virtual-template 1mtu 1492 //PPP頭部最大傳輸單元ip unnumbered loopback //借用地址peer default ip address pool pppoe_ip_poolencapsulation pppppp authentication papexitip local pool pppoe_ip_pool 11.11.11.10 11.11.11.100interface lookback0ip address 1.1.1.1 255.255.255.0no shutdownexit三、實(shí)驗(yàn)測試sh ip routesh ip int briefdebug pppoe eventsh ip int dialer 1