Problem with Routing (?)

Questions about networking.
In the Original Post please also include the output of inxi -FNzxx
nmambre
Posts: 26
Joined: 01 May 2016 05:54

Problem with Routing (?)

Postby nmambre » 25 May 2016 16:43

Hi all,

I have a weird problem with eth0 connection. In summary: I can ping and connect to devices on my network but can't get to the Internet. The weirdest part is that I'm using VirtualBox with WinXP (bridged to eth0) to post this question.

Output of inxi -FNzxx:

Code: Select all

System:    Host: solydx Kernel: 4.5.0-2-amd64 x86_64 (64 bit gcc: 5.3.1)
           Desktop: Xfce 4.12.3 (Gtk 2.24.28) dm: lightdm Distro: SolydXK 9 testing
Machine:   System: LENOVO product: 20388 v: Lenovo B50-45 Chassis: type: 10 v: Lenovo B50-45
           Mobo: LENOVO model: Lenovo B50-45 v: 31900053WIN Bios: LENOVO v: A1CN24WW(V1.12) date: 10/17/2014
CPU:       Dual core AMD E1-6010 APU with AMD Radeon R2 Graphics (-MCP-) cache: 2048 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm) bmips: 5390
           clock speeds: min/max: 1000/1350 MHz 1: 1200 MHz 2: 1350 MHz
Graphics:  Card: Advanced Micro Devices [AMD/ATI] Mullins [Radeon R2 Graphics] bus-ID: 00:01.0 chip-ID: 1002:9853
           Display Server: X.Org 1.18.3 drivers: ati,radeon (unloaded: fbdev,vesa) Resolution: 1366x768@60.00hz
           GLX Renderer: Gallium 0.4 on AMD MULLINS (DRM 2.43.0, LLVM 3.8.0)
           GLX Version: 3.0 Mesa 11.2.2 Direct Rendering: Yes
Audio:     Card-1 Advanced Micro Devices [AMD] FCH Azalia Controller
           driver: snd_hda_intel bus-ID: 00:14.2 chip-ID: 1022:780d
           Card-2 Advanced Micro Devices [AMD/ATI] Kabini HDMI/DP Audio
           driver: snd_hda_intel bus-ID: 00:01.1 chip-ID: 1002:9840
           Sound: Advanced Linux Sound Architecture v: k4.5.0-2-amd64
Network:   Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169 v: 2.3LK-NAPI port: 2000 bus-ID: 06:00.0 chip-ID: 10ec:8168
           IF: eth0 state: up speed: 100 Mbps duplex: full mac: <filter>
           Card-2: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter
           driver: ath9k bus-ID: 07:00.0 chip-ID: 168c:0036
           IF: wlan0 state: down mac: <filter>
Drives:    HDD Total Size: 320.1GB (43.4% used)
           ID-1: /dev/sdc model: WDC_WD3200LPCX size: 320.1GB serial: WD-WX41A15LYUPF
Partition: ID-1: / size: 25G used: 12G (49%) fs: ext4 dev: /dev/sdc5
           ID-2: /home size: 9.9G used: 2.2G (23%) fs: ext4 dev: /dev/sdc6
           ID-3: swap-1 size: 3.89GB used: 0.00GB (0%) fs: swap dev: /dev/sdc7
Sensors:   System Temperatures: cpu: 56.5C mobo: N/A gpu: 56.0
           Fan Speeds (in rpm): cpu: 0
Info:      Processes: 184 Uptime: 1:05 Memory: 1819.1/3412.4MB
           Init: systemd v: 229 runlevel: 5 default: 2 Gcc sys: 5.3.1 alt: 4.8/4.9
           Client: Shell (bash 4.3.421 running in tilda) inxi: 2.2.28 

Code: Select all

/etc/network/interfaces
# 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
# Uncomment lines below if you do not want to use a network manager
#auto eth0
#allow-hotplug eth0
#iface eth0 inet dhcp
I had a similar problem before on Lubuntu. Going through the steps again of the troubleshooting guide:

Code: Select all

ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether f0:76:1c:6b:c1:6b brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether d0:53:49:50:f1:97 brd ff:ff:ff:ff:ff:ff

Code: Select all

sudo mii-tool eth0
eth0: negotiated 100baseTx-FD flow-control, link ok

Code: Select all

ip addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether f0:76:1c:6b:c1:6b brd ff:ff:ff:ff:ff:ff
    inet 169.254.1.142/16 brd 169.254.255.255 scope link dynamic eth0
       valid_lft 24960sec preferred_lft 24960sec
    inet6 fe80::30d5:b063:988b:6c3e/64 scope link 
       valid_lft forever preferred_lft forever

Code: Select all

ip route
default via 169.254.1.1 dev eth0 
default via 169.254.1.1 dev eth0  proto static  metric 100 
169.254.0.0/16 dev eth0  proto kernel  scope link  src 169.254.1.142  metric 100 

Code: Select all

ping -c3 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.

--- 8.8.8.8 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2015ms
Trying a traceroute on 8.8.8.8 only give 30 lines with "* * *"

I use my laptop in various environments, and would like to know what would be the easiest way to switch between them.
1 In the office with only eth0 and dhcp, I need to access devices on 169.254.1.xxx and also Internet
2 Sometimes I need wifi, so setup like above, but also enabling wlan0 (gets IP in 192.xxx.xxx.xxx range) so that I can sync with my cellphone. In this case it doesn't really matter where Internet comes from (eth0 or wlan0)
3 Out of the office, when connecting to devices via direct Ethernet cable, I put static IP on eth0 and need wlan0 (DHCP) for Internet. I use Network Configuration to tell eth0 to "Use this connection only for resources on its network" (Routes option in IP4vSettings tab)

Anything I may have messed up? Right now I need Scenario 1 to work, but don't know for sure what to check or change. Attached also screenshot for Network Configuration, which I think should work for Scenario 1.
Attachments
Screenshot_2016-05-25_12-00-08 Network.png

User avatar
grizzler
Posts: 2044
Joined: 04 Mar 2013 15:45
Location: The Hague, NL

Re: Problem with Routing (?)

Postby grizzler » 26 May 2016 10:47

As far as I'm aware, IP addresses in the 169.254.0.0/16 range don't connect to the internet: https://en.wikipedia.org/wiki/Link-local_address

I've actually never seen them in real use anywhere. If that's a local network that's supposed to support internet access, are you sure your office's IT people know what they're doing?
Frank

SolydX EE 64 - tracking Debian Testing

nmambre
Posts: 26
Joined: 01 May 2016 05:54

Re: Problem with Routing (?)

Postby nmambre » 26 May 2016 23:26

I sure hope they do...

In the past I haven't had problem with that. At the office there is a router and some firewall (AFAIK), and internally we always had IP's in the 169.254.0.0/16 range and been able to access Internet.

Right now at home I have an IP in 192.168.0.0/16 range (private network, assigned by wifi router) even though my public address is different, checking with whatsmyip.org Could something similar be happening in the office?

User avatar
grizzler
Posts: 2044
Joined: 04 Mar 2013 15:45
Location: The Hague, NL

Re: Problem with Routing (?)

Postby grizzler » 27 May 2016 05:35

That's common network address translation: https://en.wikipedia.org/wiki/Network_a ... ranslation

I would expect that to work on any properly configured LAN. And that's the point, really.
Frank

SolydX EE 64 - tracking Debian Testing

nmambre
Posts: 26
Joined: 01 May 2016 05:54

Re: Problem with Routing (?)

Postby nmambre » 27 May 2016 14:40

This is the output of tracert in Win10:

Code: Select all

tracert 8.8.8.8

Tracing route to google-public-dns-a.google.com [8.8.8.8]
over a maximum of 30 hops:

  1     1 ms     1 ms     1 ms  internet-server.1.254.169.in-addr.arpa [169.254.1.1]
  2     *      137 ms   151 ms  mad-01-lo64.bras.cantv.net [190.73.0.1]
  3   158 ms   123 ms   121 ms  172.26.1.33
  4     *        *        *     Request timed out.
  5     *      232 ms   254 ms  10.82.1.105
  6   125 ms    99 ms   102 ms  10.82.1.5
  7   218 ms     *      540 ms  200.16.71.177
  8     *        *        *     Request timed out.
  9   274 ms   242 ms   209 ms  209.85.142.145
 10   447 ms     *      167 ms  209.85.242.161
 11   285 ms   275 ms   325 ms  google-public-dns-a.google.com [8.8.8.8]

Trace complete.
The servers are in Windows (IT is using only MS products, AFAIK), and I'm the only one using Linux here, so I guess I'll be on my own.

User avatar
grizzler
Posts: 2044
Joined: 04 Mar 2013 15:45
Location: The Hague, NL

Re: Problem with Routing (?)

Postby grizzler » 27 May 2016 15:32

There's some very curious routing going on there, through no less than three hosts using private IP addresses (the ones starting with 172 and 10), after the packets have entered the internet. Never mind that, though. I think the main problem is that - while the Microsoft set up obviously considers this a valid route - Linux networking apparently doesn't get past the fact there doesn't seem to be a gateway address, because the system has been set up to use DHCP to get that address, however, there is no DHCP server (hence the link-local addresses).

It looks like the local network uses 169.254.1.1 as gateway address, so you need to find some way to set that up. My own setup, while fully manual, is very different from this. I can try to run some tests on another (old) machine I have here (if I can get it to work after having been switched off for more than two years). I'll try to do that later this evening.
Frank

SolydX EE 64 - tracking Debian Testing

User avatar
grizzler
Posts: 2044
Joined: 04 Mar 2013 15:45
Location: The Hague, NL

Re: Problem with Routing (?)

Postby grizzler » 27 May 2016 19:50

To be honest, I don't think this is going to work. If there really is a DCHP server in that network which is giving out IP addresses in the link-local range, that server is simply malconfigured. Apparently, Windows doesn't give a damn and still allows external connections. However, Linux "knows" this should not be possible with an address in that range and doesn't bother to look for a gateway. At least that's what this looks like (anyone knowing better, feel free to comment).

The only way around this may be to assign a fixed address in that range, using the netmask 255.255.0.0 and gateway 169.254.1.1. If the address in your original posting (169.254.1.142) is always the one that's assigned, you could try that. Or start the machine in its current configuration, use ip addr to check what address has been assigned and then use that in the NetworkManager's manual configuration. This probably sounds like an awful hack and that's exactly what it is. I'm far from sure it will work.

Bottom line: no network that expects to support internet access should have a DHCP server that supplies addresses in the link-local range. That simply isn't what they're for.
Frank

SolydX EE 64 - tracking Debian Testing

nmambre
Posts: 26
Joined: 01 May 2016 05:54

Re: Problem with Routing (?)

Postby nmambre » 28 May 2016 09:36

grizzler wrote:
The only way around this may be to assign a fixed address in that range, using the netmask 255.255.0.0 and gateway 169.254.1.1. If the address in your original posting (169.254.1.142) is always the one that's assigned, you could try that. Or start the machine in its current configuration, use ip addr to check what address has been assigned and then use that in the NetworkManager's manual configuration. This probably sounds like an awful hack and that's exactly what it is. I'm far from sure it will work.
You may be onto something... I've used a static IP like you describe for a long time in the past because I was using my laptop as test simulator (slave/server) for some devices (PLC's masters/clients) on the network. I'll check during the week when back to office.

nmambre
Posts: 26
Joined: 01 May 2016 05:54

Re: Problem with Routing (?)

Postby nmambre » 30 May 2016 14:52

Using fixed IP didn't work to get Internet. I went back to using wlan0 for Internet and eth0 for the local network like this post

I'll ask the IT guy about this and see why he is using this range of IP's.


Return to “Networking”

Who is online

Users browsing this forum: No registered users and 1 guest