cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2519
Views
0
Helpful
4
Replies

How to force packets to be sent using source IP of secondary address

So I'm having issues with mail being rejected due to mx records and traffic being sent out the interface using the main IP. The main IP is .91 and it needs to be sent out as the secondary IP which is .90(dns mx record). I know I could just change the mx record to the main IP, but I would rather not.

Is there any way to force a router to use a secondary IP (WAN) to send certain traffic, say if it is sourced from a specific address on the LAN?

4 Replies 4

John Blakley
VIP Alumni
VIP Alumni

Cisco routers will always send out as the primary address, and afaik there's no way to force it to use a secondary address as the source. Is there anything stopping you from switching the two addresses and make .90 the primary and .91 the secondary?

*** edit ***

I should clarify my answer. You can nat the traffic from your server as whatever address you want. Traffic sent directly from the router will use the primary address. You can nat your mail server out as the secondary address if needed.


HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***

if You have pool of ip address assigned from your ISP.

like your want IP subnet was /248

then u can use other ip from that pool it will work.

Jawad

Jawad

So basically all I really need to do is create a static NAT from my internal mail server to the external IP I want to use as what would become the Source IP for that traffic (.90 in my case)? I'll give that a shot and let you know. Seems pretty simple now that I think of it.

I have a static nat for the email server as follows: ip nat inside source static tcp 172.19.10.12 25 1.1.1.9 25 extendable and the outside interface interface GigabitEthernet0/0 description to Internet ip address 1.1.1.6 255.255.255.248 ip flow ingress ip nat outside ip virtual-reassembly in max-reassemblies 32 But sending mail still comes from 1.1.1.6. Must I have 1.1.1.9 configured as a secondary ip it to work?
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