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
/* 配回指路由,使得數(shù)據(jù)能夠回傳。未配置情況下,則終端ping R1時(shí),數(shù)據(jù)到達(dá)R1因沒(méi)有回轉(zhuǎn)路徑被丟棄,故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
!
!