cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
352
Views
0
Helpful
2
Replies

Nat based on destination

srikanth ath
Enthusiast
Enthusiast

Hi

Im missing something in below config.. can you please help me out.

          10.10.10.4/30                      10.10.10.0/30

R3--------------------------------R1--------------------- ------------R2

                                   Lo1: 172.16.15.0/24

The above is my network setup.. I have two interface on R1 connected to R2 and R3, these two are enabled with nat outside and loopback interface is with nat inside.

so here i want to nat based on the destination

if Lo1 tries to reach 10.10.10.4/30 should go via int fa 0/1 connected to R3.

Lo1 tries to reach 10.10.10.0/30 should go via int fa 0/0 connected to R2.

Route-map will do but how should i give the nat statement.... below is my config. pls help me.

!

interface Loopback0

ip address 172.16.15.1 255.255.255.0

ip nat inside

ip virtual-reassembly

!

interface FastEthernet0/0

ip address 10.10.10.1 255.255.255.252

ip nat outside

ip virtual-reassembly

duplex auto

speed auto

!

interface FastEthernet0/1

ip address 10.10.10.5 255.255.255.252

ip nat outside

ip virtual-reassembly

duplex auto

speed auto

!

ip classless

!

!

no ip http server

no ip http secure-server

ip nat inside source route-map nat-route interface FastEthernet0/1 overload-------------------Here iam getting confused....

!

access-list 100 permit ip 172.16.15.0 0.0.0.255 10.10.10.0 0.0.0.3 log

access-list 101 permit ip 172.16.15.0 0.0.0.255 10.10.10.4 0.0.0.3 log

!

route-map nat-route permit 1

match ip address 100

set interface FastEthernet0/0

!

route-map nat-route permit 2

match ip address 101

set interface FastEthernet0/1

Regards,

Srikanth

2 Replies 2

srikanth ath
Enthusiast
Enthusiast

.....could

SOmeone help me on this?

Hello,

Yes, i could change the config. and it worked for me.

Felt like, It might be usefull for someone. so below is the changes i made.

Earlier i assumed only one route-map can be  added for Nat.

so here i have done with using PBR in  NAT. which worked.

ip nat inside source route-map nat-route interface FastEthernet0/0 overload

ip nat inside source route-map nat-route-2 interface FastEthernet0/1 overload

route-map nat-route permit 1

match ip address 100

set interface FastEthernet0/0

!

route-map nat-route-2 permit 1

match ip address 101

set interface FastEthernet0/0

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers