cisco 路由器pppoe拨号

模拟PPPOE server配置

Router(config)#vpdn enable                                  //开启虚拟拨号功能
Router(config)#vpdn-group sz                              //虚拟拨号组
Router(config-vpdn)#accept-dialin                       //接受拨入
Router(config-vpdn-acc-in)#protocol pppoe         //协议pppoe
Router(config-vpdn-acc-in)#virtual-template 1     //添加虚拟模板1

Router(config)#interface fa2/0                             //进入接受拨号接口
Router(config-if)#no ip add                                 //不需要分配ip
Router(config-if)#no shutdown                            //接口要启用
Router(config-if)#pppoe enable                           //启用pppoe

Router(config)#interface virtual-template 1                             //进入虚拟模板1
Router(config-if)#ip add 200.1.1.1 255.255.255.0                //设置ip地址
Router(config-if)#peer default ip address pool PPPOE          //应用对等体ip地址池
Router(config-if)#ppp authenticaiton pap chap                      //设置认证方式

Router(config)#ip local pool PPPOE 200.1.1.2 200.1.1200 //设置地址池

Router(config)#username test password 0 test                       //定义认证用户和密码

 

PPPOE-Client

Router(config)#vpdn enable                                            //开启虚拟拨号
Router(config)#vpdn-group 1                                          //虚拟拨号组1
Router(config-vpdn)#request-dialin                                 //请求拨入
Router(config-vpdn-req-in)#protocol pppoe                   //协议pppoe

Router(config)#interface fa0/0                                         //进入内网口
Router(config-if)#ip add 192.168.20.1 255.255.255.0   //设置内网ip
Router(config-if)#ip nat inside                                         //设置nat inside

Router(config)#interface fa1/0                                        //进入外网口
Router(config-if)#no ip add                                            //不需要设置ip
Router(config-if)#pppoe enable                                      //启用pppoe
Router(config-if)#pppoe-client dial-pool-number 1         //设置pppoe拨号地址池

Router(config)#interface Dialer0                                    //进入虚拟拨号端口
Router(config-if)#ip add negotiated                               //设置ip地址协商
Router(config-if)#ip nat outside                                      //设置nat outside
Router(config-if)#encapsulation ppp                              //封装ppp
Router(config-if)#dialer pool 1                                       //拨号地址池1

Router(config-if)#ppp chap hostname test

Router(config-if)#ppp chap password 0 test                  //设置登录用户名密码

 

Router(config)#ip dhcp pool cisco                                               //设置内网dhcp
Router(dhcp-config)#network 192.168.20.0 255.255.255.0
Router(dhcp-config)#dns-server 210.21.196.6
Router(dhcp-config)#default-router 192.168.20.1
Router(dhcp-config)#lease 2

Router(config)#ip nat inside source list 2 interface Dialer0 overload  //启用nat

Router(config)#ip route 0.0.0.0 0.0.0.0  Dialer0                              //默认路由

Router(config)#access-list 2 permit 192.168.20.0 0.0.0.255           // 定义nat流量

 


 

你可能感兴趣的:(职场,Cisco,休闲,pppoe)