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

BGP and NAT on the same router

nabhishek
Level 1
Level 1

          Hi

I have a BGP session with the ISP and am receiving the entire routing feed. I also need to turn on NAT on the same router. As soon as I apply "ip nat outside" on the WAN interface and NAT an IP statically with the WAN interface (same as BGP peering IP) the BGP goes down.

I understand that this because the in the IOS order of operation NAT comes before BGP. Can someone help me find a solution where I can do BGP and NAT on the same router?

Regards

Abhi

1 Accepted Solution

Accepted Solutions

Hi Jon

I actually need to NAT a pool of private IPs to a pool of public IPs. But for testing, as of now I tried the NATing a single private IP with the WAN IP.

ip nat inside source static tcp 192.168.1.5 gigabitethernet 0/1

I need to know conceptually if the problem is NAT on the same interface/IP as the BGP peering WAN interface/IP and would it get resolved if I use a pool of IPs which are different from the WAN IP.

Yes, that is the problem. You are saying with your NAT statement anything going to the gi0/1 IP address should be natted to 192.168.1.5 and that would cover the BGP port as well.

Like i say you could be more specific with your NAT statements with ports.

However if you have a spare number of public IPs then yes it would make more sense to use these rather than the WAN IP.

Note, if you are simply using the WAN IP to PAT internal IPs then you could probably use it and still form the BGP neighborship but your statement "ip nat inside source ..." is not PAT it is a one-to-one mapping which covers all ports.

Jon

View solution in original post

3 Replies 3

Jon Marshall
Hall of Fame
Hall of Fame

Can you post the NAT statement you are using. For example -

ip nat inside source static 192.168.5.1

would cause this problem. But if you could use ports in the NAT statement ie.

ip nat inside source static tcp 192.168.5.1 80 80

that might solve your issue.

Jon

Can you post the NAT statement you are using. For example -

ip nat inside source static 192.168.5.1

would cause this problem. But if you could use ports in the NAT statement ie.

ip nat inside source static tcp 192.168.5.1 80 80

that might solve your issue.

Jon

Hi Jon

I actually need to NAT a pool of private IPs to a pool of public IPs. But for testing, as of now I tried the NATing a single private IP with the WAN IP.

ip nat inside source static tcp 192.168.1.5 gigabitethernet 0/1

I need to know conceptually if the problem is NAT on the same interface/IP as the BGP peering WAN interface/IP and would it get resolved if I use a pool of IPs which are different from the WAN IP.

Hi Jon

I actually need to NAT a pool of private IPs to a pool of public IPs. But for testing, as of now I tried the NATing a single private IP with the WAN IP.

ip nat inside source static tcp 192.168.1.5 gigabitethernet 0/1

I need to know conceptually if the problem is NAT on the same interface/IP as the BGP peering WAN interface/IP and would it get resolved if I use a pool of IPs which are different from the WAN IP.

Yes, that is the problem. You are saying with your NAT statement anything going to the gi0/1 IP address should be natted to 192.168.1.5 and that would cover the BGP port as well.

Like i say you could be more specific with your NAT statements with ports.

However if you have a spare number of public IPs then yes it would make more sense to use these rather than the WAN IP.

Note, if you are simply using the WAN IP to PAT internal IPs then you could probably use it and still form the BGP neighborship but your statement "ip nat inside source ..." is not PAT it is a one-to-one mapping which covers all ports.

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