Current configuration : 982 bytes ! version 12.2 service timestamps debug uptime service timestamps log uptime no service passWord-encryption ! hostname p2r3 ! ! ip subnet-zero ! vpdn enable(開啟vpdn) ! vpdn-group tyl request-dialin PRotocol pppoe(啟用pppoe協(xié)議) ! ! ! ! interface Ethernet0 no ip address pppoe enable pppoe-client dial-pool-number 1(將物理端口和虛擬撥號(hào)端口綁定) ! interface Ethernet1 ip address 192.168.1.254 255.255.255.0 ip nat inside ! interface Dialer1 ip address negotiated ip mtu 1492 (將原來的mtu1500變?yōu)?492,因pppoe 的包頭是8個(gè)字節(jié)) ip nat outside encapsulation ppp dialer pool 1 (通過撥號(hào)池,將物理端口和虛擬撥號(hào)端口綁定) ppp pap sent-username ******@163.gd password 0 ******(ppp pap的單向驗(yàn)證)
! ip nat inside source list 1 interface Dialer1 overload(NAT轉(zhuǎn)換) ip classless ip route 0.0.0.0 0.0.0.0 Dialer1(設(shè)置靜態(tài)路由) ip http server ip pim bidir-enable ! ! access-list 1 permit 192.168.1.0 0.0.0.255
! ! line con 0 exec-timeout 0 0 logging synchronous line aux 0 line vty 0 4 ! end