原创文档,转载请注明出处:http://www.tllswa.com/?p=1455
注:c1841-ipbase版本不支持PPPoE需要使用高级版本,自己实验摸索出来的。
RT1841V4#show run
Building configuration…
Current configuration : 1870 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname RT1841V4
!
boot-start-marker
boot-end-marker
!
enable password cisco
!
no aaa new-model
memory-size iomem 20
ip cef
!
!
no ip dhcp use vrf connected
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
!
!
!
archive
log config
hidekeys
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
pppoe enable group global ‘启用PPPoE拨号全局组
pppoe-client dial-pool-number 1 ‘定义PPPoE拨号池号
!
interface FastEthernet0/1
ip address 192.168.110.254 255.255.255.0 ‘LAN侧DHCP动态分配IP地址
ip nat inside
ip virtual-reassembly
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 route 0.0.0.0 0.0.0.0 Dialer1 ‘默认路由出口指向拨号接口
!
!
ip http server
no ip http secure-server
ip nat inside source list 1 interface Dialer1 overload ‘NAT共享上网接口为拨号接口,复用上网
!
access-list 1 permit any ‘定义允许访问Internet的地址,这里定义的是全部允许
dialer-list 1 protocol ip permit
!
!
!
!
control-plane
!
!
banner exec ^
————————————-
hostname “RT_C1841”
Cisco 1841 Router
————————————-^
banner motd ^
————————————-
hostname “RT_C1841”
Cisco 1841 Router
————————————-^
!
line con 0
logging synchronous
line aux 0
line vty 0 4
password cisco
logging synchronous
login
!
scheduler allocate 20000 1000
end
RT1841V4#
评论