以下是ISP配置
ISP#show run
Building configuration...
Current configuration : 578 bytes
!
version 12.3
no service password-encryption
!
hostname ISP
!
!
!
!
!
ip ssh version 1
!
!
interface FastEthernet0/0
 ip address 209.165.201.1 255.255.255.240
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 209.165.201.17 255.255.255.240
 duplex auto
 speed auto
!
interface Serial0/0/0
 ip address 209.165.200.226 255.255.255.224
 clock rate 64000
!
interface Serial0/0/1
 no ip address
 shutdown
!
interface Vlan1
 no ip address
 shutdown
!
ip classless
ip route 209.165.202.128 255.255.255.224 Serial0/0/0
!
!
!
!
!
line con 0
line vty 0 4
 login
!
!
end

ISP#
 
路由器R1配置:
R1#show run
Building configuration...
Current configuration : 1298 bytes
!
version 12.3
no service password-encryption
!
hostname R1
!
!
enable secret 5 $1$mERr$9cTjUIEqNGurQiFU.ZeCi1
!
!
!
!
username R2 password 0 cisco123
!
ip ssh version 1
!
!
interface FastEthernet0/0
 ip address 192.168.10.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 192.168.11.1 255.255.255.0
 duplex auto
 speed auto
!
interface Serial0/0/0
 ip address 10.1.1.1 255.255.255.252
 encapsulation ppp
 ppp authentication chap
 clock rate 64000
!
interface Serial0/0/1
 no ip address
 shutdown
!
interface Vlan1
 no ip address
 shutdown
!
router ospf 1
 log-adjacency-changes
 passive-interface FastEthernet0/0
 passive-interface FastEthernet0/1
 network 10.1.1.0 0.0.0.3 area 0
 network 192.168.10.0 0.0.0.255 area 0
 network 192.168.11.0 0.0.0.255 area 0
!
ip classless
!
!
!
ip dhcp excluded-address 192.168.10.1 192.168.10.9
ip dhcp excluded-address 192.168.11.1 192.168.11.9
!
ip dhcp pool R1LAN1
 network 192.168.10.0 255.255.255.0
 default-router 192.168.10.1
 dns-server 192.168.20.254
ip dhcp pool R1LAN2
 network 192.168.11.0 255.255.255.0
 default-router 192.168.11.1
 dns-server 192.168.20.254
!
banner login ^CAUTHORIZED ACCESS ONLY!^C
banner motd ^CAUTHORIZED ACCESS ONLY!^C
line con 0
 password cisco
 login
line vty 0 4
 password cisco
 login
!
!
end

R1#
 
路由器R2配置:
R2#show run
Building configuration...
Current configuration : 1625 bytes
!
version 12.3
no service password-encryption
!
hostname R2
!
!
enable secret 5 $1$mERr$9cTjUIEqNGurQiFU.ZeCi1
!
!
!
!
username R1 password 0 cisco123
username R3 password 0 cisco123
!
ip ssh version 1
!
!
interface FastEthernet0/0
 ip address 192.168.20.1 255.255.255.0
 ip nat inside
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Serial0/0/0
 ip address 10.1.1.2 255.255.255.252
 encapsulation ppp
 ppp authentication chap
 ip nat inside
!
interface Serial0/0/1
 ip address 10.2.2.1 255.255.255.252
 encapsulation ppp
 ppp authentication chap
 ip nat inside
 clock rate 64000
!
interface Serial0/1/0
 ip address 209.165.200.225 255.255.255.224
 ip nat outside
!
interface Serial0/1/1
 no ip address
 shutdown
!
interface Vlan1
 no ip address
 shutdown
!
router ospf 1
 log-adjacency-changes
 passive-interface FastEthernet0/0
 passive-interface Serial0/1/0
 network 10.1.1.0 0.0.0.3 area 0
 network 10.2.2.0 0.0.0.3 area 0
 network 192.168.20.0 0.0.0.255 area 0
 default-information originate
!
ip nat pool R2POOL 209.165.202.128 209.165.202.130 netmask 255.255.255.252
ip nat inside source list R2NAT pool R2POOL overload
ip nat inside source static 192.168.20.254 209.165.202.131
ip classless
ip route 0.0.0.0 0.0.0.0 Serial0/1/0
!
!
ip access-list standard R2NAT
 permit 192.168.10.0 0.0.0.255
 permit 192.168.20.0 0.0.0.255
 permit 192.168.30.0 0.0.0.255
 permit 192.168.11.0 0.0.0.255
!
!
!
banner login ^CAUTHORIZED ACCESS ONLY!^C
banner motd ^CAUTHORIZED ACCESS ONLY!^C
line con 0
 password cisco
 login
line vty 0 4
 password cisco
 login
!
!
end

R2#
 
路由器R3配置:
R3#show run
Building configuration...
Current configuration : 979 bytes
!
version 12.3
no service password-encryption
!
hostname R3
!
!
enable secret 5 $1$mERr$9cTjUIEqNGurQiFU.ZeCi1
!
!
!
!
username R2 password 0 cisco123
!
ip ssh version 1
!
!
interface FastEthernet0/0
 ip address 192.168.30.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
!
interface Serial0/0/0
 no ip address
 shutdown
!
interface Serial0/0/1
 ip address 10.2.2.2 255.255.255.252
 encapsulation ppp
 ppp authentication chap
!
interface Vlan1
 no ip address
 shutdown
!
router ospf 1
 log-adjacency-changes
 passive-interface FastEthernet0/0
 network 10.2.2.0 0.0.0.3 area 0
 network 192.168.30.0 0.0.0.255 area 0
!
ip classless
!
!
!
ip dhcp excluded-address 192.168.30.1 192.168.30.9
!
ip dhcp pool R3LAN
 network 192.168.30.0 255.255.255.0
 default-router 192.168.30.1
 dns-server 192.168.20.254
!
banner motd ^CAUTHORIZED ACCESS ONLY!^C
line con 0
 password cisco
 login
line vty 0 4
 password cisco
 login
!
!
end

R3#