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

    Prevent interface from coming up on boot

    Scheduled Pinned Locked Moved General pfSense Questions
    16 Posts 3 Posters 2.5k 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.
    • P
      preid
      last edited by

      Hi guys,

      I'm hoping someone can tell me the easiest (and most likely the correct) way to prevent an interface from automatically coming up during boot.

      I could go hacking through all the PHP, but that doesn't seem like the right approach somehow.

      The reason I need to do this is because I have a CARP setup using a bridged WAN/LAN interface. If I don't disable the bridge on my secondary, it creates a network loop with the primary's bridge and the network becomes very unhappy.

      I have managed to get the bridge interface to go up and down when CARP switches over with a couple of simple lines in the devd.conf file, but getting the bridge interface to not automatically come and explode the network if the secondary gets rebooted has proven to be less than obvious to me so far.

      Any ideas?

      1 Reply Last reply Reply Quote 0
      • H
        heper
        last edited by

        disable the interface?

        1 Reply Last reply Reply Quote 0
        • P
          preid
          last edited by

          @heper:

          disable the interface?

          I thought of that, but when a failover happens, the secondary takes control, ups the bridge interface via my little devd.conf change, but doesn't enable it. That results in no traffic flow, since the bridge is still disabled.

          If I add an extra command to enable the bridge, then reboot the secondary while it's in control, the master takes control of traffic as it should, the secondary finishes it's reboot with it's bridge still enabled, a BAM - network loop and network down.

          What I need is the bridge enabled, but down by default on boot - so it seems, anyway.

          1 Reply Last reply Reply Quote 0
          • DerelictD
            Derelict LAYER 8 Netgate
            last edited by

            What about spanning tree to prevent the loop?

            Chattanooga, Tennessee, USA
            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
            Do Not Chat For Help! NO_WAN_EGRESS(TM)

            1 Reply Last reply Reply Quote 0
            • P
              preid
              last edited by

              @Derelict:

              What about spanning tree to prevent the loop?

              I considered that, too, but worried about spanning tree's resolution speed, which would impact failover speed. Plus, I have to consider the ISP's router - it's not going to like a loop while spanning tree does it's thing. Spanning tree is more of a "just in case someone does something silly" type of protection, not a production solution to me, too.

              If there's a way to simply not bring the interface up on boot and avoid the fireworks, that seems cleanest. I could hack the PHP code that executes during boot, but that seems messy, and it won't persist between upgrades of pfSense. Maybe it's the only option, though.

              1 Reply Last reply Reply Quote 0
              • DerelictD
                Derelict LAYER 8 Netgate
                last edited by

                Do you have a diagram detailing your setup?

                Chattanooga, Tennessee, USA
                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                Do Not Chat For Help! NO_WAN_EGRESS(TM)

                1 Reply Last reply Reply Quote 0
                • P
                  preid
                  last edited by

                  @Derelict:

                  Do you have a diagram detailing your setup?

                  I haven't drawn a diagram yet, but it's a super simple set up.

                  I have 2 pfSense virtual machines running on ESXi 6 in a CARP cluster. There are 4 interfaces on each pfSense box: WAN (assigned a routable WAN IP), LAN (no IP), Bridge (no IP, includes LAN and WAN), and CARP (private IPs for heartbeat and synchronization). There is a VIP for the WAN, as well, of course.

                  The WAN's are connected to one virtual switch, the LAN's are connected to another virtual switch, and the CARP interfaces are connected to yet another virtual switch. Right now, only the WAN switch is connected to a physical interface on the host - the other two switches just allow the VMs to talk to each other internally on the host - they have no way to reach the outside physical world.

                  Everything works great, as long as I either keep the bridge down on one of the pfSense VMs, or (as I have been doing during testing) I disconnect the LAN interfaces of one or both of the pfSense VMs from the virtual switch in vCenter to prevent the loop from occurring.

                  I can do up a diagram, if it'll help.

                  1 Reply Last reply Reply Quote 0
                  • DerelictD
                    Derelict LAYER 8 Netgate
                    last edited by

                    It always helps.

                    What version of pfSense?

                    Chattanooga, Tennessee, USA
                    A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                    DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                    Do Not Chat For Help! NO_WAN_EGRESS(TM)

                    1 Reply Last reply Reply Quote 0
                    • P
                      preid
                      last edited by

                      @Derelict:

                      It always helps.

                      What version of pfSense?

                      It's pfSense 2.2.2 x64 that I'm using.

                      I'll try to get a diagram going here.

                      1 Reply Last reply Reply Quote 0
                      • P
                        preid
                        last edited by

                        Here we go.

                        ![pfSense Cluster Diagram.png](/public/imported_attachments/1/pfSense Cluster Diagram.png)
                        ![pfSense Cluster Diagram.png_thumb](/public/imported_attachments/1/pfSense Cluster Diagram.png_thumb)

                        1 Reply Last reply Reply Quote 0
                        • DerelictD
                          Derelict LAYER 8 Netgate
                          last edited by

                          Is vswitch3 CARP or pfsync?  I don't get what a CARP interface is.

                          What are the interface addresses and CARP addresses?

                          Chattanooga, Tennessee, USA
                          A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                          DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                          Do Not Chat For Help! NO_WAN_EGRESS(TM)

                          1 Reply Last reply Reply Quote 0
                          • P
                            preid
                            last edited by

                            @Derelict:

                            Is vswitch3 CARP or pfsync?  I don't get what a CARP interface is.

                            What are the interface addresses and CARP addresses?

                            It's pfSync. I called it CARP because it's for that service. pfSync might have been more descriptive. It's the dedicated synchronization interface.

                            The WAN address is 97.75.215.242 and .243, and .241 as the VIP. The CARP interfaces are 192.168.254.1 and .2. The LAN and Bridge0 interfaces don't have IP's assigned to them, since it's a bridge.

                            1 Reply Last reply Reply Quote 0
                            • DerelictD
                              Derelict LAYER 8 Netgate
                              last edited by

                              I'm trying to figure out what your overall goal is.  Do you want to put hosts on LAN with public IPs in the WAN subnet and use a transparent proxy or something on the pfSense cluster?

                              With the bridges, the hosts on LAN will only need to talk to the CARP VIP to talk to pfSense or something behind it on another interface.  Any communication with the outside world will be to whatever the ISP IP address is and the CARP on pfSense is meaningless.

                              Chattanooga, Tennessee, USA
                              A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                              DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                              Do Not Chat For Help! NO_WAN_EGRESS(TM)

                              1 Reply Last reply Reply Quote 0
                              • P
                                preid
                                last edited by

                                @Derelict:

                                I'm trying to figure out what your overall goal is.  Do you want to put hosts on LAN with public IPs in the WAN subnet and use a transparent proxy or something on the pfSense cluster?

                                With the bridges, the hosts on LAN will only need to talk to the CARP VIP to talk to pfSense or something behind it on another interface.  Any communication with the outside world will be to whatever the ISP IP address is and the CARP on pfSense is meaningless.

                                The goal is to have a clustered filtering bridge. It's in a data center, with hosts behind it using WAN IPs, and some of those hosts run their own NAT routers (most of them are VMWare hosts, with several virtual servers behind them, all fed by their own virtual router that is NATing). As far as the host servers are concerned, they have a direct routable from the ISP - but in fact they are being protected by the filtering bridge (plus I can VLAN them off from each other, as well).

                                Right now, I have a SonicWALL PRO 4100 there doing the job, which is in L2 bridge mode, so it's essentially doing the same job as the pfSense cluster will - a filtering bridge. The problem is, the SonicWALL PRO 4100 is old, has a fairly significant state table limitation (thus is freezes up if it gets attacked), and it's not redundant (it could be, with a second appliance, but why spend the money? The 4100 is ancient now). Since I have a VMWare cluster in the rack, it makes sense to leverage that to provide a highly-available firewall solution. I'll keep the pfSense instances on separate VMWare cluster hosts, so there'll always been one alive if a host goes down.

                                The CARP VIP is essentially just for a single management IP target (though I can log into either with their normal IP, too). The pfSense instances will never act as a gateway for anything. It just pushes traffic through and filters. Internal hosts use the ISP's gateway as their gateway. I have 2 IP blocks from my ISP, as well, so some hosts will use one gateway and others will use the other gateway, depending on which IP block I assign them to. Since pfSense will be a bridge, it doesn't much care what IPs show up - it just passes them through, even if they're not on pfSense's native 97.75.215.x subnet - which saves me having to deal with routing and multi-IP blocks. If I add another block later, no changes to pfSense are needed - just start using the new IPs on the LAN side and off we go.

                                1 Reply Last reply Reply Quote 0
                                • DerelictD
                                  Derelict LAYER 8 Netgate
                                  last edited by

                                  You might need to https://portal.pfsense.org/support-subscription.php  They'll know.

                                  I still think you should consider spanning tree.  Once the topology is established, in my experience RSTP converges in fractions of seconds and is a viable HA solution at layer 2, given multiple L2 paths to the same destination.

                                  I am admittedly out of my lane and am going to merge right.

                                  Chattanooga, Tennessee, USA
                                  A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                                  DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                                  Do Not Chat For Help! NO_WAN_EGRESS(TM)

                                  1 Reply Last reply Reply Quote 0
                                  • P
                                    preid
                                    last edited by

                                    @Derelict:

                                    You might need to https://portal.pfsense.org/support-subscription.php  They'll know.

                                    I still think you should consider spanning tree.  Once the topology is established, in my experience RSTP converges in fractions of seconds and is a viable HA solution at layer 2, given multiple L2 paths to the same destination.

                                    I am admittedly out of my lane and am going to merge right.

                                    You may be right. What I'm trying to do is a little out of the norm.

                                    I'll give spanning tree a look and see how it impacts fail over speed. Maybe it'll be acceptable. I don't feel like it's the most elegant solution, but it may do the job.

                                    In the meantime, if I can figure out how to down the bridge on boot up, that would be the ideal solution. Maybe someone else might chime in with a solution.

                                    I appreciate you spending so much time trying to help. It's very appreciated! Thank you.

                                    1 Reply Last reply Reply Quote 0
                                    • First post
                                      Last post
                                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.