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

How to advertise NATed IP to peer via BGP

shahzadliaqat
Level 1
Level 1

Hi everyone

May be my problem is very small for most of u people but iam badly stuck with it. any kind of help will really be appreciated

I have my private IP which i cant advertise to MPLS cloud as my remote sites also have same private IP so i NATed it into some other IP and now i want to advertise it to cloud via BGP but it is not advertising it. My router only advertises directly connected IPs or those IPs being learned from IGP but not my virtual NATed IP. here is my important part of code

.........................................

interface FastEthernet0/0

ip address 10.1.1.22 255.255.255.252

ip nat outside

interface FastEthernet0/1

ip address 192.168.8.0 255.255.255.0

ip nat inside

router bgp 65021

bgp router-id 10.1.1.22

bgp log-neighbor-changes

neighbor 10.1.1.21 remote-as 64517

address-family ipv4

redistribute static

neighbor 10.1.1.21 activate

no auto-summary

no synchronization

network 192.168.171.0 mask 255.255.255.0

exit-address-family

ip nat inside source static network 192.168.8.0 192.168.171.0 /24

...........................................

If i write 192.168.8.0 instead of 192.168.171.0 while configuring network for bgp, it advertises it but i don't want 8.0 subnet to be advertised. I want 171.0 subnet advertisement.

Any suggestions??

i would be really thankful for any kind of help

regards

shahzad

3 Replies 3

Jon Marshall
Hall of Fame
Hall of Fame

Shahzad

Add this to you router config

ip route 192.168.171.0 255.255.255.0 Null0

For a EBGP peer to advertise a route it must be in the IGP routing table. You don't have that but you are redistributing static so if you add the above static route it will be advertised out.

Jon

Jon

Thank you so much. It has straight away advertised it after i add your mentioned static route. I have been struggling with it since yesterday but u just solved the problem in one click. thanks for your help

regards

shahzad

Shahzad

No problem, glad to have helped.

Jon

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:

Review Cisco Networking products for a $25 gift card