Results 1 to 2 of 2

Thread: Adding more IP addresses in Ubuntu

  1. #1
    GlowAlex is offline Master Glow Jedi
    Join Date
    Sep 2007
    Posts
    188

    Default Adding more IP addresses in Ubuntu

    Open /etc/network/interfaces

    Example of the file is below:

    Code:
    auto lo
    iface lo inet loopback
    
    auto eth0
    iface eth0 inet static
            address 207.210.118.56
            netmask 255.255.255.224
            broadcast 207.210.118.63
            network 207.210.118.32
            gateway 207.210.118.33
    Add a new line

    Code:
    auto eth0:1
    below
    Code:
    auto eth0
    and new interface description

    Code:
    iface eth0:1 inet static
            address 207.210.118.58
            netmask 255.255.255.224
            broadcast 207.210.118.63
            network 207.210.118.32
            gateway 207.210.118.33
    Make sure that the mask and gateway is correct.

    The resulting file would look like this:

    Code:
    auto lo
    iface lo inet loopback
    
    auto eth0
    auto eth0:1
    iface eth0 inet static
            address 207.210.118.56
            netmask 255.255.255.224
            broadcast 207.210.118.63
            network 207.210.118.32
            gateway 207.210.118.33
    iface eth0:1 inet static
            address 207.210.118.58
            netmask 255.255.255.224
            broadcast 207.210.118.63
            network 207.210.118.32
            gateway 207.210.118.33
    When this done execute

    /etc/init.d/networking restart

  2. #2
    jacobwallace is offline Junior Web Sage
    Join Date
    Oct 2021
    Posts
    14

    Default

    Edit the /etc/network/interfaces file and enter the relevant IP data to permanently add a secondary IP address to an Ubuntu machine. Check the IP address that was just added: # eth0 ifconfig Encaption of the link: Ethernet HWaddr 08:00:27:98:b7:36 inet addr:192.168.56.150 Bcast:192.168.56.150 HWaddr 08:00:27:98:b7:36 inet addr:192.168.56.150

Similar Threads

  1. Adding an avatar?
    By Caiaphas in forum General Support
    Replies: 4
    Last Post: 03-13-2011, 04:06 AM
  2. Cleo - drive adding
    By GlowAlex in forum Outages and Scheduled Maintenance
    Replies: 1
    Last Post: 08-16-2009, 05:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14