cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Community Helping Community

3003
Views
5
Helpful
2
Replies
Beginner

NAT over BGP

HI

I am trying to NAT an internal address of 192.168.219.249 to 10.59.5.59. I need to advertise the NATted address of 10.59.5.59 over the BGP cloud but for some reason I can't get BGP to advertise this - Any help would be appreciated

I have tried static nat and dynamic nat but neither appear to work

config so far :

interface GigabitEthernet0/0
bandwidth 25000
ip address 10.249.11.156 255.255.255.252
ip nat outside
ip virtual-reassembly
duplex full
speed 100
end

!

interface GigabitEthernet0/2
ip address 192.168.218.188 255.255.255.128 secondary
ip address 10.245.139.252 255.255.255.0 secondary
ip address 192.168.176.2 255.255.255.240
ip nat inside
ip virtual-reassembly
duplex full
speed 100
end
!

ip nat inside source static 192.168.218.249 10.59.5.59

!

router bgp 65149
no synchronization
bgp log-neighbor-changes
timers bgp 10 30
redistribute static
neighbor 10.249.11.155 remote-as 2859
neighbor 10.249.11.155 description bt_mpls_pe_router
neighbor 10.249.11.155 ebgp-multihop 2
neighbor 10.249.11.155 update-source GigabitEthernet0/0
neighbor 10.249.11.155 soft-reconfiguration inbound
neighbor 10.249.11.155 prefix-list IN-FILTER in
neighbor 10.249.11.155 prefix-list OUT-FILTER out
no auto-summary
!

ip prefix-list OUT-FILTER seq 10 permit 10.59.5.0/24

1 ACCEPTED SOLUTION

Accepted Solutions
Advisor

Re: NAT over BGP

Hi,

To advertise a route into BGP you must either have the network command or redistribute.

the network command can advertise what is already in the rib and your natted address is not in the rib so it can't work this way.

If you want to redistribute then it must be known via another protocol: connected, static , or other.

You are redistributing static but have you got a static route to this ip address so if  do ip route 10.59.5.59 255.255.255.255 null0

you should be seeing your ip in the output of sh ip bgp with a /32

Then if you change your outbound prefix-list it should appear in the sh ip bgp nei 10.249.11.155 adv output

Regards.

Alain.

Don't forget to rate helpful posts.

View solution in original post

2 REPLIES 2
Advisor

Re: NAT over BGP

Hi,

To advertise a route into BGP you must either have the network command or redistribute.

the network command can advertise what is already in the rib and your natted address is not in the rib so it can't work this way.

If you want to redistribute then it must be known via another protocol: connected, static , or other.

You are redistributing static but have you got a static route to this ip address so if  do ip route 10.59.5.59 255.255.255.255 null0

you should be seeing your ip in the output of sh ip bgp with a /32

Then if you change your outbound prefix-list it should appear in the sh ip bgp nei 10.249.11.155 adv output

Regards.

Alain.

Don't forget to rate helpful posts.

View solution in original post

Highlighted
Beginner

Re: NAT over BGP

hi Alain

many thanks for your help with this - it worked straight away as soon as I implemented your config.

kind regards

Keith

CreatePlease to create content
Content for Community-Ad