在R1通过动态NAT实现企业内网192.160.1.0/24转换为公网地址12.1.1.3-12.1.1.6,访问192.160.2.1
网络拓扑如图:
R1:fa 0/0 12.1.1.1/29, fa 1/0 192.160.1.254/24
PC1:192.160.1.1/24,PC2:192.160.1.2/24
R2:fa 0/0 12.1.1.2/29,fa 1/0 192.160.2.254/24
PC3:192.160.2.1/24
R1>enable
configure terminal
interface fa 0/0
no shutdown
ip address 12.1.1.1 255.255.255.248
interface fa 1/0
no shutdown
ip address 192.160.1.254 255.255.255.0
ip route 0.0.0.0 0.0.0.0 fa 0/0把所有对外出口甩给fa 0/0端口(静态路由)
R2>enable
configure terminal
interface fa 0/0
no shutdown
ip address 12.1.1.2 255.255.255.248