上一篇:
去了趟广州
去了趟广州
距离上次教一个朋友配cisco的路由器做adsl拨号和 NAT已经好几年了,自己都忘记光了。
天热了,公司的小宽带路由器老罢工,正好公司的Cisco2821还在,拿来上架,把NAT PPPOE和DHCP都配了一遍,总算搞好了 :)
具体的配置如下,留个日记吧
cisco2821#sh run
Building configuration...
Current configuration : 1674 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname cisco2821
!
boot-start-marker
boot-end-marker
!
! card type command needed for slot/vwic-slot 0/0
enable secret 5 $1$/xZ.$1FeMyhAs.HW6qrcg5Y8hs/
enable password xxxxxxxx
!
no aaa new-model
!
resource policy
!
ip subnet-zero
!
!
ip cef
no ip dhcp use vrf connected
no ip dhcp conflict logging
ip dhcp excluded-address 192.168.7.1 192.168.7.39
ip dhcp excluded-address 192.168.7.200 192.168.7.254
!
ip dhcp pool choiceway
network 192.168.7.0 255.255.255.0
dns-server 202.201.128.86 202.96.134.133
default-router 192.168.7.2
lease 7
!
!
!
voice-card 0
no dspfarm
!
!
!
!
bba-group pppoe global
!
!
interface GigabitEthernet0/0
ip address 192.168.7.2 255.255.255.0
ip nat inside
duplex auto
speed auto
no mop enabled
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed 10
pppoe enable group global
pppoe-client dial-pool-number 1
no cdp enable
!
interface Dialer1
ip address negotiated
ip mtu 1492
ip nat outside
encapsulation ppp
dialer pool 1
dialer idle-timeout 0
no cdp enable
ppp authentication pap chap callin
ppp chap hostname xxxxxxxx@163.gd
ppp chap password 0 xxxxxxxx
ppp pap sent-username xxxx@163.gd password 0 xxxxxxxx
!
ip classless
ip route 0.0.0.0 0.0.0.0 Dialer1
!
!
ip http server
no ip http secure-server
ip nat inside source list 10 interface Dialer1 overload
!
access-list 10 permit 192.168.7.0 0.0.0.255
!
!
!
control-plane
!
!
!
line con 0
line aux 0
line vty 0 4
password xxxxxxx
login
!
scheduler allocate 20000 1000
!
end
cisco2821#
天热了,公司的小宽带路由器老罢工,正好公司的Cisco2821还在,拿来上架,把NAT PPPOE和DHCP都配了一遍,总算搞好了 :)
具体的配置如下,留个日记吧
cisco2821#sh run
Building configuration...
Current configuration : 1674 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname cisco2821
!
boot-start-marker
boot-end-marker
!
! card type command needed for slot/vwic-slot 0/0
enable secret 5 $1$/xZ.$1FeMyhAs.HW6qrcg5Y8hs/
enable password xxxxxxxx
!
no aaa new-model
!
resource policy
!
ip subnet-zero
!
!
ip cef
no ip dhcp use vrf connected
no ip dhcp conflict logging
ip dhcp excluded-address 192.168.7.1 192.168.7.39
ip dhcp excluded-address 192.168.7.200 192.168.7.254
!
ip dhcp pool choiceway
network 192.168.7.0 255.255.255.0
dns-server 202.201.128.86 202.96.134.133
default-router 192.168.7.2
lease 7
!
!
!
voice-card 0
no dspfarm
!
!
!
!
bba-group pppoe global
!
!
interface GigabitEthernet0/0
ip address 192.168.7.2 255.255.255.0
ip nat inside
duplex auto
speed auto
no mop enabled
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed 10
pppoe enable group global
pppoe-client dial-pool-number 1
no cdp enable
!
interface Dialer1
ip address negotiated
ip mtu 1492
ip nat outside
encapsulation ppp
dialer pool 1
dialer idle-timeout 0
no cdp enable
ppp authentication pap chap callin
ppp chap hostname xxxxxxxx@163.gd
ppp chap password 0 xxxxxxxx
ppp pap sent-username xxxx@163.gd password 0 xxxxxxxx
!
ip classless
ip route 0.0.0.0 0.0.0.0 Dialer1
!
!
ip http server
no ip http secure-server
ip nat inside source list 10 interface Dialer1 overload
!
access-list 10 permit 192.168.7.0 0.0.0.255
!
!
!
control-plane
!
!
!
line con 0
line aux 0
line vty 0 4
password xxxxxxx
login
!
scheduler allocate 20000 1000
!
end
cisco2821#
多事之春
2008/04/08 19:11 | by

