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

How to rename interface

Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
8 Posts 3 Posters 8.3k 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.
  • V
    Vadimi4
    last edited by Oct 13, 2011, 11:01 AM

    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
    • M
      marcelloc
      last edited by Oct 13, 2011, 12:01 PM

      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 Oct 13, 2011, 12:18 PM

        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 Oct 13, 2011, 12:28 PM

          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 Oct 13, 2011, 3:49 PM

            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
            • J
              jimp Rebel Alliance Developer Netgate
              last edited by Oct 13, 2011, 5:23 PM

              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 Oct 14, 2011, 4:06 PM

                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
                • J
                  jimp Rebel Alliance Developer Netgate
                  last edited by Oct 14, 2011, 4:11 PM

                  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
                  8 out of 8
                  • First post
                    8/8
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                    This community forum collects and processes your personal information.
                    consent.not_received