1

I am using DSL(PPPOE) connection in ubuntu. It has two part (I am not sure), when I just connect the cable, system automatically get an IP address started with 172.x.x.x(DHCP). When I connect using username/password (PPPOE) I get another IP started with 10.x.x.x and can access internet but can't access some local IP (in my LAN), which are some FTP, media server provided by my ISP. I complained about that to my ISP but they reply

Windows is working

It's true, Windows 7 is working fine with this settings. I can access internet and local server at the same time. Also I use a WIFI router (TP-link TL-WR340G/TL-WR340GD) which result the same problem. So when I connect cable directly to system and use Windows 7 than everything is fine. Otherwise problem. Similar problem discussed here.

Edit

Before connect to pppoe. Connect with eth0

route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         172.100.0.1     0.0.0.0         UG    0      0        0 eth0
172.100.0.0     0.0.0.0         255.255.0.0     U     1      0        0 eth0

ifconfig

eth0      Link encap:Ethernet  HWaddr 74:d0:2b:d5:b3:6c  
          inet addr:172.100.5.242  Bcast:172.100.255.255  Mask:255.255.0.0
          inet6 addr: fe80::76d0:2bff:fed5:b36c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:38 errors:0 dropped:0 overruns:0 frame:0
          TX packets:97 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4975 (4.9 KB)  TX bytes:13653 (13.6 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1627 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1627 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:126107 (126.1 KB)  TX bytes:126107 (126.1 KB)

After connect to pppoe. eth0 disconnect automatically. A new interface named ppp0 is listed now.

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.12.44.91     0.0.0.0         UG    0      0        0 ppp0
10.12.44.91     0.0.0.0         255.255.255.255 UH    0      0        0 ppp0

ifconfig after connect

eth0      Link encap:Ethernet  HWaddr 74:d0:2b:d5:b3:6c  
          inet6 addr: fe80::76d0:2bff:fed5:b36c/64 Scope:Link
          inet6 addr: 2002:ac64:154:c:76d0:2bff:fed5:b36c/64 Scope:Global
          inet6 addr: fec0::c:76d0:2bff:fed5:b36c/64 Scope:Site
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:26582 errors:0 dropped:18 overruns:0 frame:0
          TX packets:2340 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2542063 (2.5 MB)  TX bytes:244938 (244.9 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:4118 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4118 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:336759 (336.7 KB)  TX bytes:336759 (336.7 KB)

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:10.12.44.95  P-t-P:10.12.44.91  Mask:255.255.255.255
          inet6 addr: fe80::a536:c7ae:e079:d88d/10 Scope:Link
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:689 errors:0 dropped:0 overruns:0 frame:0
          TX packets:744 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:385746 (385.7 KB)  TX bytes:75296 (75.2 KB)

I used network manager to create network(DSL connection) enter image description here

Connection type is dual access/russia pppoe

6
  • 3
    This is a routing issue and is really just a simple setting that you can configure. Before I can provide an answer, please post the output of route -n before and after connecting to PPPoE. Also include how you exactly set up the connection (network manager, manual command line, etc.) including all exact configuration.
    – gertvdijk
    Oct 16, 2013 at 21:08
  • Well, gertvdijk is of course right, the output of route -n would be helpful and we do not have a whole lot of information here. Now it is 5 days later, would you really consider posting the output? Oct 21, 2013 at 11:09
  • I am really very sorry for late response. I have update my question.
    – shantanu
    Oct 22, 2013 at 15:20
  • @shantanu It doesn't look like you have set a static IP for eth0 as mentioned in my answer below.
    – kingmilo
    Oct 22, 2013 at 15:26
  • I did. But when i connect to pppoe then eth0 loss it's ip address
    – shantanu
    Oct 22, 2013 at 15:54

2 Answers 2

2
+100

Set a static IP on your Ethernet Connection (LAN Adapter), without a Gateway and without DNS, make sure to put it in the same range/subnet as your LAN ie. 172.x.x.x

Connect your LAN cable and confirm you can reach your FTP etc. Everything should work except you should not be able to access the Internet at this time.

Now connect via PPPOE and confirm you can access the Internet, then confirm you still have access to your LAN.

If you continue to have issues then post the output of route -n as mentioned above.

The reason it's not currently working is because Ubuntu is getting assigned 2 Gateways and doesn't know which one to use for what, ie. the routing is incorrect. The solution above configures Ubuntu on the LAN but without a Gateway as it is not necessary as well as on PPPOE for internet access (using your ISP's gateway).

3
  • I did what you asked. But when i connect ppoe (dsl) eth0 disconnect. And i loss IP for eth0 interface. Please check route -n and ifconfig information. In your configuration both output are identical.
    – shantanu
    Oct 22, 2013 at 15:31
  • Can you paste output of route -n and ifconfig with only eth0 connected please.
    – kingmilo
    Oct 23, 2013 at 11:58
  • Please review the question. Question has been updated.
    – shantanu
    Oct 23, 2013 at 22:18
0

Can't you connect your TP-Link router to the DSL modem and initialise the PPPOE connection from there? or even better, a lot of DSL modems provided by ISPs can actually switch their mode of operation and become independet routers doing the PPPOE connection for you. Look up your modem on internet forums, see if it comes with an IP address to some web interface where you can make settings.

Using your embedded hardware for initialising the PPPOE connection has some advantages:

  • All your devices can connect to the internet, including Laptops of your guests, etc.
  • You have only one gateway and routing gets a lot less complicated
  • services from your PC are no longer exposed to the internet
  • you can upgrade, change, etc. your PC without having to bother about PPPOE credentials

Well and of cource you retain the connection to your LAN.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .