• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

IP Alias on "localhost interface" vs "carp interface"

Scheduled Pinned Locked Moved HA/CARP/VIPs
2 Posts 2 Posters 2.2k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J
    jason0
    last edited by May 28, 2014, 6:18 AM

    Hi,

    I have two questions regarding vip aliases, and I will give you a scenario:

    I have two firewalls both running pfsense 2.1.3, configured as a primary and secondary CARP pair.

    We have a /28 network for our wan ip addresses.  Three are dedicated to my upstream provider's implementation of VRRP.  Another three are dedicated to my implementation of carp.  Both CARP and the upstream VRRP work very well together, thanks to a number answers you guys helped me with earlier.

    The remaining 8 ip addresses are assigned as ip aliases and are tied to internal hosts using 1:1 nat.  I ran into the difficulty where the ip aliases did not propagate via pfsync: I solved it by assigning them to "localhost" and this leads me to my question:

    1. what is the difference between binding the alias to the 'localhost' interface versus the wan carp interface?  Why would I choose one or the other?

    2. what type of problem is resolved by being able to bind a wan ip alias to a different interface?  For instance, I COULD create an ip alias with an additional wan ip, and bind it to my LAN port: but what does that get me?

    Is the word "localhost" possibly a misnomer?  Is it more a generic word use like "any of the interfaces listed"?

    Thank you for your time!

    โ€“jason

    1 Reply Last reply Reply Quote 0
    • J
      jimp Rebel Alliance Developer Netgate
      last edited by May 28, 2014, 12:57 PM

      @jason0:

      1. what is the difference between binding the alias to the 'localhost' interface versus the wan carp interface?  Why would I choose one or the other?

      IP Alias on localhost is for binding services on IPs inside a routed subnet โ€“ that is, a subnet routed entirely to your firewall (cluster).

      The differences are:

      • IP Aliases on an interface would be an IP conflict if they existed on two separate firewalls at once, which is why CARP VIPs are required. These do not sync as it would create an IP conflict.
      • IP Aliases using an interface of an existing CARP VIP (in the same subnet as the CARP VIP) are OK, and they do sync, because only one of the nodes can use them at a time
      • IP Aliases on localhost are only useful for binding services on the firewall to an IP address inside a routed subnet, and should not be used if the IP addresses are in your WAN or any other interface subnet.

      @jason0:

      1. what type of problem is resolved by being able to bind a wan ip alias to a different interface?  For instance, I COULD create an ip alias with an additional wan ip, and bind it to my LAN port: but what does that get me?

      Nothing useful in that example. You do not want to assign IP addresses from the same subnet to multiple interfaces.

      @jason0:

      Is the word "localhost" possibly a misnomer?  Is it more a generic word use like "any of the interfaces listed"?

      No, it means exactly what it says. The IP Aliases are placed on the localhost interface (lo0).

      If the IP addresses you're using are all inside the WAN subnet, then using CARP VIPs or Alias-on-CARP VIPs is best. In a clustered environment you cannot use Alias-on-WAN or Proxy ARP type VIPs on WAN as it will create an IP conflict. If the additional IP addresses are in a separate subnet routed to you, then you do not need any VIPs for 1:1 NAT to function.

      If the IP addresses you have are truly in the WAN subnet and they still work when you bind the IPs to localhost, then it's a fluke, the upstream router probably has a cached ARP entry that is pointing them to the primary firewall or CARP VIP MAC. I wouldn't expect that to keep working indefinitely.

      Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

      Need help fast? Netgate Global Support!

      Do not Chat/PM for help!

      1 Reply Last reply Reply Quote 0
      2 out of 2
      • First post
        2/2
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
        This community forum collects and processes your personal information.
        consent.not_received