Вы находитесь на странице: 1из 5

路由器 PPPoE 配置综合案例

如图所示,路由器 Router 做为 PPPOE 接入服务器(本地认证),同时 router 也


作为 PPPOE 上 internet 的客户端,另外还使用了 NAT 功能。
配置:
access-list 1 permit 192.168.0.0/24
aaa-enable
aaa authentication login default local
aaa authentication ppp default local
username 163 privilege 1 password 163
username admin privilege 1 password harbour
pppoe virtual-template 0
ip local pool ip-pool 192.168.0.2 192.168.0.255
dialer-list 1 protocol ip permit
!
interface eth1/0
pppoe-client dial-pool-number 1
!
interface eth2/0
pppoe enable

!
interface async0/0
!
interface dialer0
ip address negotiated
ip nat outside
ppp pap sent-username 163 password 163
dialer pool 1
dialer-group 1
dialer permit-dial-null-string
!
interface virtual-template0
ip address 192.168.0.1/24
ip nat inside
peer default ip address pool ip-pool
ppp authentication chap default
compress stac;此命令需要与客户端配合(如果客户端选择了压缩,则在路由器
上要配上压缩,否则就不需要配了),否则网络注册比较慢(大概 20 秒种)!
ppp ipcp DNS 91.21.80.1
!
!Rip config
router rip
!
ip route 0.0.0.0/0 eth1/0
ip nat on
ip nat inside source list 1 interface eth1/0
line console 0
line aux 0
line vty 0
password harbour
login authentication default
line vty 1 9

我写个吧,跟楼主的一样
r1#sh run
Building configuration...

Current configuration : 1356 bytes


!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r1
!
boot-start-marker
boot-end-marker
!
no aaa new-model
ip subnet-zero
!
no ip domain lookup
!
ip cef
vpdn enable
!
vpdn-group home1
accept-dialin
protocol pppoe
virtual-template 1
!
username aaa password 0 111
!
interface FastEthernet0/0
no ip address
duplex half
pppoe enable
pppoe-client dial-pool-number 9
!
interface FastEthernet1/0
no ip address
duplex half
pppoe enable
!
interface Virtual-Template1
mtu 1492
ip address 192.168.0.1 255.255.255.0
ip nat inside
peer default ip address pool pool1
ppp authentication pap
ppp ipcp dns 202.96.134.133
!
interface Dialer1
ip address negotiated
ip mtu 1492
ip nat outside
encapsulation ppp
dialer pool 9
dialer-group 5
ppp authentication pap callin
ppp pap sent-username sziwer99@163.gd password 0 LOUJQPRR
!
ip local pool pool1 192.168.0.100 192.168.0.200
ip nat inside source list 22 interface Dialer1 overload
ip classless
ip route 0.0.0.0 0.0.0.0 Dialer1
no ip http server
!
!
access-list 22 permit 192.168.0.0 0.0.255.255
dialer-list 5 protocol ip permit
!
!
!
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
exec-timeout 0 0
logging synchronous
stopbits 1
line aux 0
stopbits 1
line vty 0 4
login
!
!
end

dynamips net 文件:

autostart = false
[localhost]
port = 7200
udp = 10000
workingdir = ..\tmp\

[[router r1]]
image = ..\ios\unzip-c7200-js-mz.123-20.bin
model = 7200
console = 3001
npe = npe-400
ram = 128
confreg = 0x2102
idlepc = 0x60671cd4
exec_area = 64
slot0 = PA-C7200-IO-FE
slot1 = PA-FE-TX
f0/0 =
NIO_gen_eth:\Device\NPF_{33C26F3F-3F38-4C0F-AB1B-B31AB3531C2C}
f1/0 =
NIO_gen_eth:\Device\NPF_{33C26F3F-3F38-4C0F-AB1B-B31AB3531C2C}

Вам также может понравиться