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?
You can create an alias. Both of which are on the same subnet. You can then assign your services accordingly.
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: