cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
438
Views
0
Helpful
3
Replies

NAT or routing problem

Moudar
VIP Alumni
VIP Alumni

Hi,

I got this topology here:

lock.png

I got my Windows PC with IP 192.168.10.128 and i have configured it with a static route:

Persistent Routes:
  Network Address          Netmask  Gateway Address  Metric
    100.100.100.1  255.255.255.255   192.168.10.130       1
    100.100.100.2  255.255.255.255   192.168.10.130       1

If i ping 100.100.100.1 it works fine but if i ping 100.100.100.2 it does not.

Here is how the NAT configuration looks like on the router:

interface GigabitEthernet0/0
 ip address 100.100.100.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly in
 duplex auto
 speed auto
 media-type rj45
!
interface GigabitEthernet0/1
 ip address 192.168.10.130 255.255.255.0
 ip nat outside
 ip virtual-reassembly in
 duplex auto
 speed auto
 media-type rj45

ip nat inside source list 1 interface GigabitEthernet0/1 overload
ip nat inside source list 2 interface GigabitEthernet0/1 overload
ip route 0.0.0.0 0.0.0.0 192.168.10.1
ip ssh version 2
!
!
!
access-list 1 permit 100.100.100.0 0.0.0.255
access-list 2 permit 192.168.10.0 0.0.0.255

If i ping 100.100.100.2 from the router it works fine!

So the question is why I cannot ping 100.100.100.2 from my PC?

Any ideas!

 

3 Replies 3

ammahend
VIP Alumni
VIP Alumni

try this config for NAT

Router(config)# interface GigabitEthernet0/1
Router(config-if)# ip address 192.168.10.130 255.255.255.0
Router(config-if)# ip nat inside
Router(config-if)# no shutdown

Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip address 100.100.100.1 255.255.255.0
Router(config-if)# ip nat outside
Router(config-if)# no shutdown

! Create an access list to match the inside network
Router(config)# access-list 1 permit 192.168.10.0 0.0.0.255

! Enable NAT overload (PAT) to translate private IPs to the public IP
Router(config)# ip nat inside source list 1 interface GigabitEthernet0/0 overload

-hope this helps-

Hello
make sure that host you are trying to ping has a default-gateway 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

M02@rt37
VIP
VIP

Hello @Moudar 

Do adjustements;

M02rt37_0-1733901307275.png

vIOS interface Gi0/1 => ip nat inside and interface Gi0/0 => ip nat outside

Next 

 

ip nat inside source list 1 interface GigabitEthernet0/0 overload

 

 

Delete these two commands:

ip nat inside source list 2 interface GigabitEthernet0/1 overload and ip route 0.0.0.0 0.0.0.0 192.168.10.1:

no ip nat inside source list 2 interface GigabitEthernet0/1 overload

no ip route 0.0.0.0 0.0.0.0 192.168.10.1

After that vPC should ping 10.100.100.2

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.