Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want access to two networks:

  • a PPPoE network: for external computers (www, etc.)
    • IP(dhcp), DNS, default route
  • a LAN for access to other local computers (local file sharing)
    • IP(dhcp), no DNS, only LAN route

Both networks are setup through the same Ethernet connection.

One way of accessing both networks at the same time is to connect to PPPoE from network-manager, and add the LAN info by hand:

  • add an IP on eth0
  • add a route for traffic to that network

I can configure two distinct connections in NetworkManager, but because both are on the same physical (Ethernet) network, selecting one of them makes the other one disconnect => can't have both of them at the same time.

Is there a way to have both of the active simultaneously?

share|improve this question
up vote 1 down vote accepted

I found a solution that seems to work with an ethernet port managed by NM.
I'm no expert and am new to NM and Ubuntu -so be advised.

Using Ubuntu 12.04 Added a script: /etc/NetworkManager/dispatcher.d/wjw-alias-eth1
(an edited version of installed file: /etc/NetworkManager/dispatcher.d/01ifupdown).

NM docs say scripts in dispatcher.d are run in alphabetic sort order, so name your added file so it runs last.

In my case eth1 is behind a router which assigns an IP# via 'static' DHCP.
I need a 2nd IP# on the same LAN segment so I can run two DLNA servers at the same time. (Mythtv and Serviio in my case.) It seems DLNA servers must each bind to a different IP#. I wanted to keep NM managing eth1 to keep using its built in goodies

my added script:

#!/bin/sh -e
# Script for nm to add an alias eth1:0 and multicast routing on eth1 up---wjw

if [ -z "$1" ]; then
    echo "$0: called with no interface" 1>&2
    exit 1;
if [ "$1" != "$eth1" ]; then
        exit 0;

# Run the right scripts
case "$2" in
        ifconfig eth1:0  netmask broadcast
        route add -net netmask dev eth1:0
        # Do nothing more
        exit 0
        echo "$0: called with unknown action \`$2'" 1>&2
        exit 1
share|improve this answer

You can create an alias. Both of which are on the same subnet. You can then assign your services accordingly.

ifconfig eth0:0
ifconfig eth0:1
share|improve this answer
Yep, that works, but I was looking for a complete network-manager based solution, with no cli involved. But I guess if I automate the creation of the alias on start up, no cli will be needed afterwards. – Lucian Adrian Grijincu Oct 10 '10 at 23:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.