The ip nat inside command allows to do source nat.
The ip nat outside command allows to do destination nat.
Execution
R1#show runinterface FastEthernet0/0 description to_R2-fa0/0 ip address 192.168.0.1 255.255.255.0 ! ip route 0.0.0.0 0.0.0.0 192.168.0.2 R2#show runinterface FastEthernet0/0 description to_R1-fa0/0 ip address 192.168.0.2 255.255.255.0 ! interface FastEthernet0/1 description to_R3-fa0/1 ip address 192.168.1.2 255.255.255.0 ! ip route 0.0.0.0 0.0.0.0 192.168.1.3 R3#show runinterface FastEthernet0/1 description to_R2-fa0/1 ip address 192.168.1.3 255.255.255.0 ! ip route 0.0.0.0 0.0.0.0 192.168.1.2 R1#ping 8.8.8.8..... Success rate is 0 percent (0/5) R2(config)#int fa0/0R2(config-if)#ip nat insideR2(config)#int fa0/1R2(config-if)#ip nat outsideR2(config)#ip nat inside source static 192.168.0.1 192.168.1.2R2(config)#ip nat outside source static 192.168.1.3 8.8.8.8R1#ping 8.8.8.8!!!!! Success rate is 100 percent (5/5)
No comments:
Post a Comment