Follow this step by step static NAT configure
Configure ip address on PC and Server as given in figure
Now configure R1 exactly given here
Router>enable Router#configure terminal Router(config)#hostname R1 R1(config)#interface fastethernet 0/0 R1(config-if)#ip address 10.0.0.1 255.0.0.0 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#interface serial 0/0/0 R1(config-if)#ip address 20.0.0.2 255.0.0.0 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#ip route 30.0.0.0 255.0.0.0 20.0.0.1 R1(config)#ip nat inside source static 10.0.0.2 50.0.0.1 R1(config)#interface fastEthernet 0/0 R1(config-if)#ip nat inside R1(config-if)#exit R1(config)#interface serial 0/0/0 R1(config-if)#ip nat outside R1(config-if)#exit R1(config)#
Now configure R0 exactly given here
Router>enable Router#configure terminal Router(config)#hostname R0 R0(config)#interface fastethernet 0/0 R0(config-if)#ip address 30.0.0.1 255.0.0.0 R0(config-if)#no shutdown R0(config-if)#exit R0(config)#interface serial 0/0/0 R0(config-if)#ip address 20.0.0.1 255.0.0.0 R0(config-if)#clock rate 64000 R0(config-if)#bandwidth 64 R0(config-if)#no shutdown R0(config-if)#exit R0(config)#ip route 50.0.0.0 255.0.0.0 20.0.0.2 R0(config)#As you have seen in configuration there is not direct route for 10.0.0.2. So PC from network of 30.0.0.0 will never know about it. They will access 50.0.0.1 as the web server IP. To test it double click on any computer and ping from 50.0.0.1 and you will get replay.
Packet Tracer PC Command Line 1.0 PC>ping 50.0.0.1 Pinging 50.0.0.1 with 32 bytes of data: Reply from 50.0.0.1: bytes=32 time=141ms TTL=126 Reply from 50.0.0.1: bytes=32 time=80ms TTL=126 Reply from 50.0.0.1: bytes=32 time=109ms TTL=126 Reply from 50.0.0.1: bytes=32 time=125ms TTL=126 Ping statistics for 50.0.0.1: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 80ms, Maximum = 141ms, Average = 113ms
Now ping from 10.0.0.2 and you will get destination host unreachable error.
PC>ping 10.0.0.2 Pinging 10.0.0.2 with 32 bytes of data: Reply from 30.0.0.1: Destination host unreachable. Reply from 30.0.0.1: Destination host unreachable. Reply from 30.0.0.1: Destination host unreachable. Reply from 30.0.0.1: Destination host unreachable. Ping statistics for 10.0.0.2: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss)
No comments:
Post a Comment