one computer two ip address

Marius Gedminas marius at pov.lt
Tue Oct 28 15:01:47 UTC 2008


On Mon, Oct 27, 2008 at 05:49:21PM -0400, CLIFFORD ILKAY wrote:
> Donny George wrote:
> > hello
> > 
> > as a part of maintaining a computer both on a intra network(10th net)
> > and also a bigger lan network can we assign the same pc two different
> > ips. if so how is it possible
> > 
> > will the etc/network/interfaces file play any role in this transition
> 
> Hi,
> 
> You can bind multiple IP addresses to one physical interface by adding
> them to /etc/network/interfaces. For example:
> 
> auto eth0
>         iface eth0 inet static
>         address 192.168.0.10
>         netmask 255.255.255.0
>         gateway 192.168.0.1
> auto eth0:1
>         iface eth0:1 inet static
>         address 192.168.0.11
>         netmask 255.255.255.0
>         gateway 192.168.0.1
> auto eth0:2
>         iface eth0:1 inet static
>         address 192.168.0.12
>         netmask 255.255.255.0
>         gateway 192.168.0.1

I have to admit that I never understood the point of the alias
interfaces.  I always did

auto eth0
        iface eth0 inet static
        address 192.168.0.10
        netmask 255.255.255.0
        gateway 192.168.0.1
        up ip addr add 192.168.0.11/24 dev eth0
        up ip addr add 192.168.0.12/24 dev eth0

and it worked fine.

Marius Gedminas
-- 
WARN_(accel)("msg null; should hang here to be win compatible\n");
        -- WINE source code
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20081028/18aadd0b/attachment.pgp>


More information about the ubuntu-users mailing list