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

    How to rename interface

    Problems Installing or Upgrading pfSense Software
    3
    8
    8.3k
    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.
    • V
      Vadimi4
      last edited by

      Hi everyone!

      We have two identical machines with pfSense installed. This is done for a failover - if one machine for some reason will not work, we could power-up another one and reconnect all links from one to another in few minutes.

      But I've got a problem - in despite of having identical hardware, first machine and second machine have assigned different interface names for NIC's.
      For example 1'st machine has em0 to NIC1 and em1 to NIC2. Second machine assigned em0 to NIC2 and em1 to NIC1. So now I can't use one configuration for both machines - every time i have to reconfigure interfaces in pfSense GUI.

      So, how can I rename interfaces in pfSense to make one config usable for both machines?

      Thanks.

      1 Reply Last reply Reply Quote 0
      • marcellocM
        marcelloc
        last edited by

        Backup config on firewall2, edit it, swap interfaces em0 <-> em1.

        Then restore changed config and swap cables.

        I suggest you reading about carp and change your config to a full redundand and syncronized setup.
        You may need a switch with vlans to stop cable switching.

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • V
          Vadimi4
          last edited by

          2 marcelloc: ok, thanks for idea with CARP! I'l look on it.

          But my question was how to rename interface in system, not in config.
          I tried "ifconfig em0 name em2" - that's work, but untill rebooting only…

          1 Reply Last reply Reply Quote 0
          • V
            Vadimi4
            last edited by

            Yeah! I'v got it!

            In the end of /etc/rc I've added:

            ifconfig em0 name em2 #to release em0 name
            ifconfig em1 name em0 #to change em1 to em0
            ifconfig em2 name em1 #to change ex-em0 to em1

            exit 0

            Renaming is done on every reboot…

            1 Reply Last reply Reply Quote 0
            • V
              Vadimi4
              last edited by

              Everything good, but it isn't help… Ifconfig shows new names of interfaces, but in real they are still assigned to NIC incorrect...

              1 Reply Last reply Reply Quote 0
              • jimpJ
                jimp Rebel Alliance Developer Netgate
                last edited by

                Renaming like that is a very bad idea. Just swap the cables on the secondary and use the config like you want.

                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
                • V
                  Vadimi4
                  last edited by

                  Renaming like that is a very bad idea. Just swap the cables on the secondary and use the config like you want.

                  If there will be no possibilities to change names, it would be the only way to use it.

                  But I still have a hope :)  Maybe I can try to reinstall pfSense in some way, to make correct NIC's naming?

                  1 Reply Last reply Reply Quote 0
                  • jimpJ
                    jimp Rebel Alliance Developer Netgate
                    last edited by

                    Why wouldn't changing the cables around "fix" the problem?

                    unplug cable from em0
                    unplug cable from em1, put it in em0
                    plug other cable into em1

                    problem solved, now both boxes match what they're using em0 and em1 for.

                    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
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.