XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Assign second ipadres to network card

    Scheduled Pinned Locked Moved Management
    4 Posts 3 Posters 335 Views 3 Watching
    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.
    • R Offline
      rtjdamen
      last edited by

      Hi,

      My XO does have 2 network cards assigned, i would like to add a second ip to the second network card. An ip alias. I can’t find the way to do this. I do not want to add another network card to it. Anyone who can help me with this?

      Cheers Robin

      fohdeeshaF 1 Reply Last reply Reply Quote 0
      • olivierlambertO Online
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Hi,

        Are you using XOA or XO from the sources?

        R 1 Reply Last reply Reply Quote 0
        • R Offline
          rtjdamen @olivierlambert
          last edited by

          i do use the XOA.

          1 Reply Last reply Reply Quote 0
          • fohdeeshaF Offline
            fohdeesha Vates 🪐 Pro Support Team @rtjdamen
            last edited by fohdeesha

            @rtjdamen Copying my reply to your official support ticket (any reason for duplicating support tickets on the forum as well?):

            given XOA is built on standard debian, you can assign multiple IPs to the same interface quite easily by just duplicating another "iface eth1 inet static" line. Also keep in mind XOA does not add extra interfaces under the main /etc/network/interfaces file, but in files under the /etc/network/interfaces.d/ directory. So in your case given it was eth1 you wanted a second IP on, you can add your required second IP in this file like so:

            [09:43 12] xoa:~$ cat /etc/network/interfaces.d/eth1
            allow-hotplug eth1
            iface eth1 inet static
             address 192.168.1.80
             netmask 255.255.255.0
            
            #second IP
            iface eth1 inet static
             address 172.16.100.5
             netmask 255.255.255.0
            
            1 Reply Last reply Reply Quote 3
            • First post
              Last post