R6

interface fastethernet 0/0

ip addr 10.0.0.1 255.255.255.0

no shut

interface Serial0/0

ip addr 200.0.0.5 255.255.255.252

no shutdown

ip route 0.0.0.0 0.0.0.0 200.0.0.6




R6 l2tp


config t

username user1 password 0(加密级别)user1(有几个帐号登陆写几个)

username user2 password 0(加密级别)user2

username user3 password 0(加密级别)user3


vpdn enable(虚拟私人vpn网络)

vpdn-group myl2tp(自定义分组 名:myl2tp)

accecpt-dianlin(允许接入)

protocol l2tp (使用L2tp协议)

virtual-template 1(调用虚拟模板)

exit

no L2tp tunnel authentication

exit


interface virtual-template1

ip unnnumbered fa0/0(确定无编号IP地址)

encapsulation ppp(ppp封装)

peer default ip add pool ip-pool(分配地址池 定义地址池的名字)

ppp authentication chap

no shutdown

exit

ip local pool ip-pool 11.0.0.201 11.0.0.210(指出地址池的范围)

end

show ip interface breif




R6正式配置

en

config t

no ip domain-lookup

ip classless

ip subnet-zero

hostname R6


interface serial 1/2

ip addr 173.16.1.1 255.255.255.252

no shut


ip fa2/0

ip addr 11.0.0.101 255.0.0.0

no shut 

exit


router ospf 100(进程号)

network 173.16.1.0 0.0.0.3 area 0

network 11.0.0.0 0.255.255.255 area 0(区号)

end

show ip route


R7


en

config t

no ip domain-lookup

ip classless

ip subnet-zero

hostname R6


interface serial 1/2

ip addr 173.16.1.2 255.255.255.252

no shut


ip fa2/0

ip addr 12.0.0.101 255.0.0.0

no shut 

exit


router ospf 100(进程号)

network 173.16.1.0 0.0.0.3 area 0

network 12.0.0.0 0.255.255.255 area 0(区号)

end

show ip route


tracert 11.0.0.102