[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Multiple IP addresses on eth0 - which is "canonical"?



Hello,

I have the same problem on an new machine I'm putting together.
When the machine does something (like sending out email) it shows that the
mail mail came from the IP address associated with eth0:1 not eth0. How
can I get this machine to use the IP address that is with eth0?

Thanks,

Ken

My interface file looks like:

------------------------------------------------------------------------
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
        address 206.129.50.15
        netmask 255.255.255.0
        network 206.129.50.0
        broadcast 206.129.50.255
        gateway 206.129.50.1
        # dns-* options are implemented by the resolvconf package, if
installed
        dns-nameservers 206.129.48.22 209.102.124.11 209.102.124.10
        dns-search pcez.com

auto eth0:1
iface eth0:1 inet static
        address 206.129.50.201
        netmask 255.255.255.0
        network 206.129.50.0

auto eth0:2
iface eth0:2 inet static
        address 206.129.50.202
        netmask 255.255.255.0
        network 206.129.50.0

auto eth0:3
iface eth0:3 inet static
        address 206.129.50.203
        netmask 255.255.255.0
        network 206.129.50.0

ETC....

------------------------------------------------------------------------

ifconfig looks like:

eth0      Link encap:Ethernet  HWaddr 00:14:2A:B9:92:3A
          inet addr:206.129.50.15  Bcast:206.129.50.255
          Mask:255.255.255.0
          inet6 addr: fe80::214:2aff:feb9:923a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6365 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1771 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:489954 (478.4 KiB)  TX bytes:163634 (159.7 KiB)
          Interrupt:169 Base address:0xe800

eth0:1    Link encap:Ethernet  HWaddr 00:14:2A:B9:92:3A
          inet addr:206.129.50.201  Bcast:206.129.50.255
          Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:169 Base address:0xe800

eth0:2    Link encap:Ethernet  HWaddr 00:14:2A:B9:92:3A
          inet addr:206.129.50.202  Bcast:206.129.50.255
          Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:169 Base address:0xe800

eth0:3    Link encap:Ethernet  HWaddr 00:14:2A:B9:92:3A
          inet addr:206.129.50.203  Bcast:206.129.50.255
          Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:169 Base address:0xe800

ETC ....





On Fri, 2 Feb 2007, Andrew Sackville-West wrote:

> On Fri, Feb 02, 2007 at 05:18:46PM -0500, George Adams wrote:
> > Hello.  I have the following setup in /etc/network/interfaces to bind two
> > IP addresses (let's say 11.22.33.44 and 11.22.33.45) onto my one NIC:
> > ---------------------------------------------------
> > auto lo
> > iface lo inet loopback
> >
> > auto eth0
> > iface eth0 inet static
> >        address 11.22.33.44
> >        netmask 255.255.255.0
> >        network 11.22.33.0
> >        broadcast 11.22.33.255
> >        gateway 11.22.33.1
> >
> > auto eth0:0
> > iface eth0 inet static
> >        address 11.22.33.43
> >        netmask 255.255.255.0
> >        network 11.22.33.0
> >        broadcast 11.22.33.255
> >        gateway 11.22.33.1
> > ---------------------------------------------------
>
> I may not be remembering correctly, but, I thought eth0:0 and eth0
> refer to the same thing. so you have set eth0 to 11.22.33.44 and then
> using eth0:0 reset it to 11.22.33.43. I believe you need to use eth0
> and eth0:1 to get seperate addresses on the same interface.
>
>
> A
>



Reply to: