Router1:
R1#sho run
Building configuration…
Current configuration : 637 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!
!
interface FastEthernet0/0
ip address 172.16.1.1 255.255.255.0
ip nat outside
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.0.1 255.255.255.0
ip nat inside
duplex auto
speed auto
!
interface Vlan1
no ip address
shutdown
!
ip classless
ip route 0.0.0.0 0.0.0.0 172.16.1.2
/* 配回指路由,使得数据能够回传。未配置情况下,则终端ping R1时,数据到达R1因没有回转路径被丢弃,故PC0/1不能与R1通讯。*/
ip route 192.168.10.0 255.255.255.0 192.168.0.2
ip route 192.168.20.0 255.255.255.0 192.168.0.2
!
!
line con 0
line vty 0 4
login
!
!