原创文档,转载请注明出处:http://www.tllswa.com/?p=1459

RT2821-SB#show run
Building configuration…
Current configuration : 2314 bytes
!
! Last configuration change at 11:27:07 UTC Tue May 23 2017
version 15.1
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname RT2821-SB
!
boot-start-marker
boot-end-marker
!
!
! card type command needed for slot/vwic-slot 0/2
enable password cisco
!
no aaa new-model
!
!
dot11 syslog
ip source-route
!
!
ip cef
!
ip dhcp excluded-address 192.168.110.1 192.168.110.10 ‘定义DHCP排除的地址范围
ip dhcp excluded-address 192.168.110.250 192.168.110.254 ‘定义DHCP排除的地址范围
!
ip dhcp pool ciscopool ‘定义DHCP地址池名ciscopool
network 192.168.110.0 255.255.255.0 ‘定义网络段
default-router 192.168.110.254 ‘定义默认网关
domain-name tllswa.com ‘定义域名
dns-server 61.177.7.1 221.228.255.1 ‘定义DNS
lease 0 0 30 ‘定义租期
!
!
no ip domain lookup
ip multicast-routing
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
voice-card 0
!
crypto pki token default removal timeout 0
!
!
!
!
license udi pid CISCO2821 sn FHK1447F3BP
!
redundancy
!
!
!
!
!
!
!
!
!
!
interface GigabitEthernet0/0
no ip address
duplex auto
speed auto
pppoe enable group global ‘启用PPPoE拨号全局组
pppoe-client dial-pool-number 1 ‘定义PPPoE拨号池号
!
interface GigabitEthernet0/1
ip address 192.168.110.254 255.255.255.0 ‘LAN侧DHCP动态分配IP地址
ip nat inside
ip virtual-reassembly in
duplex auto
speed auto
!
!
interface Dialer1 ‘定义拨号信息组1 
ip address negotiated ‘拨号接口的地址是通过协商获得的
ip mtu 1492 ‘有时候需要设置MTU值比,如MTU=1492
ip nat outside
ip virtual-reassembly in
encapsulation ppp ‘封装为ppp协议
ip tcp adjust-mss 1452 ‘该命令用来避免客户机未能自动调整有效载荷的长度而发生打不开网页的情况。
dialer pool 1 ‘建立拨号池为 1
dialer idle-timeout 0 ‘将空闲超时设置为无限
dialer-group 1 ‘建立拨号组1
ppp authentication pap chap callin ‘加密的验证模式
ppp chap hostname pppoeusername ‘认证主机名
ppp chap password 0 pppoepassword ‘认证密码
ppp pap sent-username pppoeusername password 0 pppoepassword ‘发送用户名和密码
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!
!
ip nat inside source list 1 interface Dialer1 overload ‘NAT共享上网接口为拨号接口,复用上网
ip route 0.0.0.0 0.0.0.0 Dialer1 ‘默认路由出口指向拨号接口
!
access-list 1 permit any ‘定义允许访问Internet的地址,这里定义的是全部允许
dialer-list 1 protocol ip permit
nls resp-timeout 1
cpd cr-id 1
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp profile default
!
!
!
!
!
gatekeeper
shutdown
!
!
banner exec ^
————————————-
hostname “RT_C2821”
Cisco 2821 Router
————————————-^
banner motd ^
————————————-
hostname “RT_C2821”
Cisco 2821 Router
————————————-^
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
exec-timeout 0 0
password cisco
logging synchronous
login
transport input all
!
scheduler allocate 20000 1000
end

RT2821-SB#