Results 1 to 3 of 3

Thread: How to set up two different ip blocks on one server?

  1. #1
    Join Date
    Feb 2014
    Beans
    1

    How to set up two different ip blocks on one server?

    I have two different ip blocks, each with a different gateway. I'm not sure how to set up the interfaces on my server to be able to use the ips from both. Any advice?

  2. #2
    Join Date
    Nov 2008
    Location
    Storybrooke
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: How to set up two different ip blocks on one server?

    Try something like
    Code:
    auto eth0
    iface eth0 inet static
    address 192.168.0.222
    netmask 255.255.255.0
    network 192.168.0.0
    gateway 192.168.0.1
    
    auto eth0:0
    iface eth0:0 inet static
    address 172.16.0.222
    netmask 255.255.0.0
    gateway 172.16.0.1
    Ubuntu Forums Moderation Staff
    Don't waste your energy trying to change opinions ... Do your thing, and don't care if they like it.

  3. #3
    Join Date
    Jan 2008
    Location
    Bay Area, CA/Kanagawa, JP
    Beans
    248
    Distro
    Xubuntu 13.10 Saucy Salamander

    Re: How to set up two different ip blocks on one server?

    Do you only have 1 NIC on the server or are the different gateways on different physically different routers/devices which would connect to different NICs on the server? if the former, the above will work, if the latter, just change eth0:0 to eth1 maybe.

Bookmarks

Posting Permissions

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