create account

STATIC NAT WITH ROUTE-MAP by hashem-s

View this thread on: hive.blogpeakd.comecency.com
· @hashem-s · (edited)
$0.55
STATIC NAT WITH ROUTE-MAP
You are familiar with NAT technology. NAT help you to change IP address field in layer 3 header.
In almost documents you have read that static NAT makes one to one mapping between inside local IP address and inside global IP address. So what happened if you want to statically NAT an inside local IP address to two or more deferent inside global IP addresses.
For an instant example pay attention to following scenario:![11.jpg](https://steemitimages.com/DQmYBSbAD4nzdRE51S95BpxNoZCqAEQ9WFspJB9GVaSHMaz/11.jpg)

We have a server that could serve to two deferent part of customers in a single TCP port. Customers connect to this server via to deferent WAN infrastructures. So we have to translate this serverโ€™s IP address to two deferent IP addresses. And we have to use just one router as gateway for two deferent WANs. Now how we can implement this scenario?
In these situations we have a tricky method for NAT using route-map with NAT. In this method you can make conditionally mapping between an inside local IP address and two inside global IP addresses.
Here is the configuration of interfaces:
!
interface FastEthernet0/0
 description <<WAN-1>>
 ip address 172.16.1.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 description <<WAN-2>>
 ip address 10.1.1.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 description <<INSIDE-IF>>
 ip address 192.168.1.1 255.255.255.0
 duplex auto
 speed auto
!
Now we define to deferent ACL separating traffic goes to WAN1 and WAN2:
!
ip access-list extended TO-WAN-1
 permit ip host 192.168.1.110 172.16.1.0 0.0.0.255
 permit ip 172.16.1.0 0.0.0.255 host 192.168.1.110
!
ip access-list extended TO-WAN-2
 permit ip host 192.168.1.110 10.1.1.0 0.0.0.255
 permit ip 10.1.1.0 0.0.0.255 host 192.168.1.110
!
As you can see you should define traffic in both IN and OUT directions.
Now you should use these ACLs in Route Maps:
!
route-map TO-WAN-2 permit 10
 match ip address TO-WAN-2
!
route-map TO-WAN-1 permit 10
 match ip address TO-WAN-1
!
OK everything is ready for magic commands:
!
ip nat inside source static 192.168.1.110 10.1.1.2 route-map TO-WAN-2
ip nat inside source static 192.168.1.110 172.16.1.2 route-map TO-WAN-1
!
That is all. There is no big magic. Ha! 
And the last step is defining inside and outside interfaces for NAT:
!
interface FastEthernet0/0
  ip nat outside
!
interface FastEthernet0/1
  ip nat outside
!
interface FastEthernet1/0
  ip nat inside
!
I have used this solution in some scenario and it work perfectly in cisco 1941 and 2911 IOS 15.1.
๐Ÿ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorhashem-s
permlinkstatic-nat-with-route-map
categorynetwork
json_metadata{"tags":["network","nat","security","trick"],"image":["https://steemitimages.com/DQmYBSbAD4nzdRE51S95BpxNoZCqAEQ9WFspJB9GVaSHMaz/11.jpg"],"app":"steemit/0.1","format":"markdown"}
created2017-07-11 04:38:42
last_update2017-07-11 12:01:54
depth0
children4
last_payout2017-07-18 04:38:42
cashout_time1969-12-31 23:59:59
total_payout_value0.523 HBD
curator_payout_value0.023 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,555
author_reputation12,388,266,150
root_title"STATIC NAT WITH ROUTE-MAP"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id8,065,731
net_rshares154,967,479,808
author_curate_reward""
vote details (32)
@irancrypto ·
looking forward to see more posts about Cisco devices
๐Ÿ‘  
properties (23)
authorirancrypto
permlinkre-hashem-s-static-nat-with-route-map-20170711t133549174z
categorynetwork
json_metadata{"tags":["network"],"app":"steemit/0.1"}
created2017-07-11 13:35:51
last_update2017-07-11 13:35:51
depth1
children0
last_payout2017-07-18 13:35:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length53
author_reputation328,733,982,197
root_title"STATIC NAT WITH ROUTE-MAP"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id8,107,287
net_rshares0
author_curate_reward""
vote details (1)
@slempase ·
Nice post..i hope You can post again about Cisco Network..I Like You post
properties (22)
authorslempase
permlinkre-hashem-s-2017716t133744733z
categorynetwork
json_metadata{"tags":"network","app":"esteem/1.4.6","format":"markdown+html","community":"esteem"}
created2017-07-16 06:37:54
last_update2017-07-16 06:37:54
depth1
children1
last_payout2017-07-23 06:37:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length73
author_reputation25,398,557,824,156
root_title"STATIC NAT WITH ROUTE-MAP"
beneficiaries
0.
accountesteemapp
weight500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id8,643,466
net_rshares0
@hashem-s ·
It is your kindness. i try to post network trick like this. if you have any question pleas inform me about that. i will answer to these question in my next posts.
properties (22)
authorhashem-s
permlinkre-slempase-re-hashem-s-2017716t133744733z-20170716t070523768z
categorynetwork
json_metadata{"tags":["network"],"app":"steemit/0.1"}
created2017-07-16 07:05:24
last_update2017-07-16 07:05:24
depth2
children0
last_payout2017-07-23 07:05:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length162
author_reputation12,388,266,150
root_title"STATIC NAT WITH ROUTE-MAP"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id8,644,924
net_rshares0
@zwal ·
Follow me
๐Ÿ‘  
properties (23)
authorzwal
permlinkre-hashem-s-2017712t17156909z
categorynetwork
json_metadata{"tags":"network","app":"esteem/1.4.6","format":"markdown+html","community":"esteem"}
created2017-07-12 10:45:09
last_update2017-07-12 10:45:09
depth1
children0
last_payout2017-07-19 10:45:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length9
author_reputation210,983,534,207
root_title"STATIC NAT WITH ROUTE-MAP"
beneficiaries
0.
accountesteemapp
weight500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id8,210,310
net_rshares0
author_curate_reward""
vote details (1)