Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

How can I get an SRX220 to respond to multiple ip addresses on same subnet, but with different gateways.

e.g.,

Subnet: 1.1.1.40/30 (.41 gateway, .42 actual ip) Subnet: 1.1.1.44/30 (.45 gateway, .46 actual ip)

both drops go into a proper switch and out to the srx.

verified all connections work independently.

been at it 10 hours - tried ARP, adding ip to ge-0, what am I missing?

share|improve this question
    
Those addresses aren't on the same subnet at all, as you've identified. This shouldn't matter, though. Could you show us how your interfaces and routes are configured, and define respond? –  Falcon Momot May 26 '13 at 6:20

1 Answer 1

up vote 1 down vote accepted

You want something along the line of

set interface <interface name> unit 0 family inet address 1.1.1.42/30

set interface <interface name> unit 1 family inet address 1.1.1.46/30

set routing-options static route 0.0.0.0/0 next-hop 1.1.1.41

set routing-options static route 0.0.0.0/0 next-hop 1.1.1.45

This probably isn't what you're actually trying to do though - This'll end up with you doing equal cost load balancing between the two static routes, which will end up with asymmetric routing (and your policy thus dropping return traffic). Worse, if you're using NAT, your traffic will appear as if it's coming from two separate places.

If what you're looking to do is only use one route, and fail over to the other in the event of issues, you want something along the lines of

set interface <interface name> unit 0 family inet address 1.1.1.42/30

set interface <interface name> unit 1 family inet address 1.1.1.46/30

set routing-options static route 0.0.0.0/0 next-hop 1.1.1.41

set routing-options static route 0.0.0.0/0 qualified-next-hop preference 25 1.1.1.45 
share|improve this answer
    
Totally right - the issue was that I was binding the IP to a zone, not an interface in the NAT. I changed that - Presto! –  user175308 May 26 '13 at 20:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.