Jump to content

Why won't this work?

Go to solution Solved by wako7654,

 

If I manually set the DNS to 8.8.8.8 on wlan0, the windows desktop accesses the Ubuntu shares via router 1 (at 20mbps) rather than router 2 (at 125mbps), and both windows machines cannot connect via router 2 even if it is the only available connection (i.e. I disconnect them from router 1). If I then disconnect the Ubuntu machine from router 1 and/or remove the manual DNS entry, they cannot access the shares at all until I reboot the Ubuntu box - at which point I'm back to where I was before I entered the 8.8.8.8 DNS manually.

 

ah.. are you using samba to file share on your ubuntu? If so, you should properly define the interface you want to share on samba(eth0) and remov wlan0 from the interface and restart your linux box. If not, then i suggest you install and use samba.

Okay, so I get my internet connection from a router in a separate room which I don't know the admin password for. This is labelled Router 1 on the diagram. I also have an Ubuntu file server which I need to be able to access over a fairly large area at decent speeds, and which also requires internet from Router 1.

To this end I set up another network (Router 2) which I set up on the server to only be used for local transfers, and bridged (labelled in purple) with the connection to Router 1 on my main Windows machine. This had the desired effect of causing both machines to get internet wirelessly (labelled in red) from Router 1 but transfer local files via gigabit ethernet (labelled in blue) and Router 2. The problem has arisen now that I want to connect my laptop wirelessly to Router 2 in order to access the Ubuntu Server. Despite both machines being connected to the same network, Windows complains that the target destination is "not set up to allow connections on the port", when I know for a fact that it is set to allow all connections as per the default Ubuntu settings.

What am I doing wrong? (besides the network bridge, which I know is not meant to be used for that, I just couldn't find a "local traffic only" option like Ubuntu has).

Diagram since the forum won't let me upload it: http://imgur.com/xl0OvjL
 

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/
Share on other sites

Link to post
Share on other sites

Sorry you wired it up wrong that's why it does not work...

 

Router 2 needs to be connected to router 1 via a cable..

 

At the moment you have 2 separate networks one with internet and one without...

Lian Li PC-V359WRX Micro-ATX Case | Intel 5960X Extreme 3.00GHz | ASRock Fatal1ty X99M KILLER | Crucial 32 GB 2666 DDR4 | Thermaltake NiC C5 | EVGA Supernova 1200W P2 | 2x 240GB OCZ Radeon R7 | 2x 256 GB Samsung 840 Series Pro | 2 X 120GB Samsung 840 EVO | 6x NF-F12’s | Place Holder GPU R9 290X |

Links Current 5960X Old FX9590

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/#findComment-883426
Share on other sites

Link to post
Share on other sites

Sorry you wired it up wrong that's why it does not work...

 

Router 2 needs to be connected to router 1 via a cable..

 

At the moment you have 2 separate networks one with internet and one without...

That's what I want. As I said, I cannot get to router 1 ergo all connections must be wireless to it. If I could get to the other router it would be a simple case of setting up an access point but that's not the scenario here.The 2 networks don't need to be 1, I just need Windows to use 1 for local and 1 for internet and bridging them was the only thing which achieved this (it defaults to the fastest available connection, but if they aren't bridged then it tries to get internet from the LAN and seemingly ignores the wireless connection with internet).

I've disabled DHCP on Router 2 now (as if it were an access point), and that seems to have given me some limited success in that it works intermittently (presumably until it has an IP conflict).

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/#findComment-884748
Share on other sites

Link to post
Share on other sites

Did you bridge the NICs on the Ubuntu box? If not do you have 2 IPs on it?

What service are you trying to access on the server from the laptop? Do things like ping and tracepath go through?

 

Also I'm assuming you're using just the switch ports of router 2.

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/#findComment-885218
Share on other sites

Link to post
Share on other sites

No, I couldn't work out how to bridge the NICs on the Ubuntu box so I set the ethernet NIC to local traffic only. I've now managed to get the laptop connecting just fine to Router 2 (with DHCP enabled) and perfectly able to access the Ubuntu box, but somehow this means that the Ubuntu box is unable to access the internet (whether or not the laptop is connected) despite having a wireless connection to Router 1 (and its LAN connection to Router 2 being set to local-only).

Would bridging the connections on the Ubuntu box now fix this? Why is it trying to send internet traffic over the local-only connection (firefox goes straight to the router 2 interface instead of connecting via router 1)?

To answer your other questions, yes I am just using the switch ports of router 2, and I do have 2 IPs on the Ubuntu box (192.168.1.37 to router 1 and 192.168.0.3 to router 2). The problem now seems to be that the Ubuntu box defaults to the LAN connection even for internet traffic.

EDIT: If I disable the LAN connection on the Ubuntu box, I have internet again. If I then go to Google and then re-enable the LAN connection I can continue to search things but I cannot load any of the results. The search goes through but if I click any of the resulting links it sends me straight to the Router 2 interface again. Similarly, Transmission torrents still work okay even though I can't load pages through Firefox...

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/#findComment-886121
Share on other sites

Link to post
Share on other sites

No, I couldn't work out how to bridge the NICs on the Ubuntu box so I set the ethernet NIC to local traffic only. I've now managed to get the laptop connecting just fine to Router 2 (with DHCP enabled) and perfectly able to access the Ubuntu box, but somehow this means that the Ubuntu box is unable to access the internet (whether or not the laptop is connected) despite having a wireless connection to Router 1 (and its LAN connection to Router 2 being set to local-only).

Would bridging the connections on the Ubuntu box now fix this? Why is it trying to send internet traffic over the local-only connection (firefox goes straight to the router 2 interface instead of connecting via router 1)?

To answer your other questions, yes I am just using the switch ports of router 2, and I do have 2 IPs on the Ubuntu box (192.168.1.37 to router 1 and 192.168.0.3 to router 2). The problem now seems to be that the Ubuntu box defaults to the LAN connection even for internet traffic.

EDIT: If I disable the LAN connection on the Ubuntu box, I have internet again. If I then go to Google and then re-enable the LAN connection I can continue to search things but I cannot load any of the results. The search goes through but if I click any of the resulting links it sends me straight to the Router 2 interface again. Similarly, Transmission torrents still work okay even though I can't load pages through Firefox...

 

 

All you have to do is set up your routing tables correctly on the ubuntu box, 

 

Do:

 

sudo ip r add default via 192.168.1.1 dev eth0 <-- make sure you select the correct eth0 device, the one with 192.168.1.X address, check by using ifconfig

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/#findComment-886551
Share on other sites

Link to post
Share on other sites

All you have to do is set up your routing tables correctly on the ubuntu box, 

 

Do:

 

sudo ip r add default via 192.168.1.1 dev eth0 <-- make sure you select the correct eth0 device, the one with 192.168.1.X address, check by using ifconfig

 

"No such process" apparently. Surely I want to set wlan0 to default rather than eth0, since all I want eth0 to be used for is local transfers?

EDIT: Tried it with wlan0 and it said "file exists", with the problem persisting.

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/#findComment-886748
Share on other sites

Link to post
Share on other sites

"No such process" apparently. Surely I want to set wlan0 to default rather than eth0, since all I want eth0 to be used for is local transfers?

EDIT: Tried it with wlan0 and it said "file exists", with the problem persisting.

 

 

Edit: type $ip route and show me the output of the command, ill try and troubleshoot for you

 

type $ifconfig as well, and post the results here

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/#findComment-886767
Share on other sites

Link to post
Share on other sites

"No such process" apparently. Surely I want to set wlan0 to default rather than eth0, since all I want eth0 to be used for is local transfers?

EDIT: Tried it with wlan0 and it said "file exists", with the problem persisting.

 

Or install teamviewer on your linux box, and contact me via private message

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/#findComment-886794
Share on other sites

Link to post
Share on other sites

Edit: type $ip route and show me the output of the command, ill try and troubleshoot for you

 

type $ifconfig as well, and post the results here

Thanks :)

http://i.imgur.com/q6sqELB.png

 

Or install teamviewer on your linux box, and contact me via private message

I already have Teamviewer installed on the Linux box, although I've had no success in accessing it remotely. I used to use it to interface with it and have it running headless but I've plugged in a set of peripherals now to try and fix this lol.

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/#findComment-886867
Share on other sites

Link to post
Share on other sites

Thanks :)

http://i.imgur.com/q6sqELB.png

 

I already have Teamviewer installed on the Linux box, although I've had no success in accessing it remotely. I used to use it to interface with it and have it running headless but I've plugged in a set of peripherals now to try and fix this lol.

 

Check the DNS server address in your network information on your Wireless network

 

or do

 

nslookup www.google.com

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/#findComment-886916
Share on other sites

Link to post
Share on other sites

Make sure you enable your local area connection at the same time while troubleshooting this. Double check your routes when both are connected, 

use the command sudo ip r add default via 192.168.1.1 dev wlan0 if somehow your default gateway changes to 192.168.0.1 when you enable LAN.

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/#findComment-886963
Share on other sites

Link to post
Share on other sites

What I'm not understanding now is if the connection is bridged on the Windows box which subnet is it getting?

 

I would suggest trying something like this as one possible solution:

Bridge the NICs on Ubuntu. Remove the bridge on Windows (and do not use the wifi). Disable DHCP on R2. The DHCP on R1 should fix the gateways and such on each box if you reload or give it time.

 

This should flatten the network to one subnet and have all traffic go through the bridge on Ubuntu for both storage access and anything going to R1. I'm assuming the server is always on so I think it makes sense to do the bridging there rather than on the desktop.

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/#findComment-887138
Share on other sites

Link to post
Share on other sites

Check the DNS server address in your network information on your Wireless network

 

or do

 

nslookup www.google.com

 

"Server: 127.0.0.1

Address: 127/0.0.1#53

Non-authoritative answer:

Name: www.google.com

Address: 192.168.0.1"

 

Make sure you enable your local area connection at the same time while troubleshooting this. Double check your routes when both are connected, 

use the command sudo ip r add default via 192.168.1.1 dev wlan0 if somehow your default gateway changes to 192.168.0.1 when you enable LAN.

I have been keeping both connects enabled, I only disabled it briefly to upload that screenshot and I re-enabled the LAN after that. RTNETLINK continues to answer with "file exists" without solving the problem if I type that into terminal.

 

What I'm not understanding now is if the connection is bridged on the Windows box which subnet is it getting?

 

I would suggest trying something like this as one possible solution:

Bridge the NICs on Ubuntu. Remove the bridge on Windows (and do not use the wifi). Disable DHCP on R2. The DHCP on R1 should fix the gateways and such on each box if you reload or give it time.

 

This should flatten the network to one subnet and have all traffic go through the bridge on Ubuntu for both storage access and anything going to R1. I'm assuming the server is always on so I think it makes sense to do the bridging there rather than on the desktop.

Yeah I wanted to try bridging the NICs on Ubuntu, but I couldn't work out how. Posted to here about how to do it and the suggestion was to use the GUI to set eth0 to use only local resources - which solved my immediate problem at the time but now seems inexplicably broken. I can even link back to that thread - https://linustechtips.com/main/topic/60891-how-to-bridge-connections-in-ubuntu/?hl=%2Bubuntu+%2Bbridge.

Both NICs on the Ubuntu box are saying they get a subnet mask of 255.255.255.0.

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/#findComment-887347
Share on other sites

Link to post
Share on other sites

I suggest editing the conf file. I don't really know the GUI options.

 

Here is a guide.

https://help.ubuntu.com/community/NetworkConnectionBridge

Top most code block should work with some adjustments:

auto loiface lo inet loopbackiface eth0 inet manualiface wlan0 inet manualauto br0iface br0 inet dhcpbridge_ports eth0 wlan0

Restart the service

sudo /etc/init.d/networking restart

br0 will be your interface that gets a single IP. You should stop DHCP on R2 before you do this.

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/#findComment-887854
Share on other sites

Link to post
Share on other sites

I've now reconfigured the network on Windows and disabled the network bridge. I have manually assigned an IP address to both the Ubuntu box and the Windows box (and reserved them on Router 2), with subnets of 255.255.255.0 and no default gateways since this only needs to be a local network (though if it had internet that wouldn't be a major issue). This has the desired effect on the Windows box (i.e. connected to both networks, local traffic goes at gigabit but internet goes over the wireless) but the Ubuntu box remains stubborn. Even with the eth0 set to only use local resources, and with a manually set and reserved IP address and omitted default gateway, Firefox still insists on trying to get internet access over LAN rather than wlan0.

 

 

I suggest editing the conf file. I don't really know the GUI options.

 

Here is a guide.

https://help.ubuntu.com/community/NetworkConnectionBridge

Top most code block should work with some adjustments:

auto loiface lo inet loopbackiface eth0 inet manualiface wlan0 inet manualauto br0iface br0 inet dhcpbridge_ports eth0 wlan0

Restart the service

sudo /etc/init.d/networking restart

br0 will be your interface that gets a single IP. You should stop DHCP on R2 before you do this.

 

DHCP is still enabled on both routers atm because I still want other devices (i.e. the laptop) to be able to access router 2 and thereby the Ubuntu box's shared folders without IP conflicts. Thanks for the guide though - I might try bridging the connections (and disabling DHCP on router 2 so router 1 does the IP addresses) tomorrow. For now it works well enough since I have internet connection for downloads and all other devices can access the server via router 2. The only limitation is I have to disable eth0 in order to set downloads going, then re-enable it to allow local access again, which is far from optimal.

Another observation - even with eth0 disabled, I cannot connect to the Ubuntu box with Teamviewer. Internet works just fine, just not remote access via Teamviewer. I even tried enabling LAN control but that's a no-go either.

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/#findComment-888109
Share on other sites

Link to post
Share on other sites

"Server: 127.0.0.1

Address: 127/0.0.1#53

Non-authoritative answer:

Name: www.google.com

Address: 192.168.0.1"

 

I have been keeping both connects enabled, I only disabled it briefly to upload that screenshot and I re-enabled the LAN after that. RTNETLINK continues to answer with "file exists" without solving the problem if I type that into terminal.

 

Yeah I wanted to try bridging the NICs on Ubuntu, but I couldn't work out how. Posted to here about how to do it and the suggestion was to use the GUI to set eth0 to use only local resources - which solved my immediate problem at the time but now seems inexplicably broken. I can even link back to that thread - https://linustechtips.com/main/topic/60891-how-to-bridge-connections-in-ubuntu/?hl=%2Bubuntu+%2Bbridge.

Both NICs on the Ubuntu box are saying they get a subnet mask of 255.255.255.0.

 

 

There's your problem right there, the DNS server is 192.168.0.1 even though you are connected to the 192.168.1.1, Manually set the DNS to google (8.8.8.8) on your network manager to prevent the issue, It should sort it out.

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/#findComment-888866
Share on other sites

Link to post
Share on other sites

There's your problem right there, the DNS server is 192.168.0.1 even though you are connected to the 192.168.1.1, Manually set the DNS to google (8.8.8.8) on your network manager to prevent the issue, It should sort it out.

That gives me internet but causes local traffic to attempt over wireless and router 1 - which is too slow to accomplish what I need it to. Thanks though, seems obvious now you mention it. Problem is that if I do that it breaks the eth0 connection and I have to remove the manual DNS entry and reboot to get it to use eth0 again.

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/#findComment-889867
Share on other sites

Link to post
Share on other sites

That gives me internet but causes local traffic to attempt over wireless and router 1 - which is too slow to accomplish what I need it to. Thanks though, seems obvious now you mention it. Problem now is that I can't get proper access to my shares on the windows box (I only get 20mbps to router 1).

 

You are accessing from where? the laptop?

 

Kinda confused, which one is fixed or not, put teamviewer on the machine you are trying to troubleshoot and ill help you out. 

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/#findComment-889885
Share on other sites

Link to post
Share on other sites

You are accessing from where? the laptop?

 

Kinda confused, which one is fixed or not, put teamviewer on the machine you are trying to troubleshoot and ill help you out. 

If I manually set the DNS to 8.8.8.8 on wlan0, the windows desktop accesses the Ubuntu shares via router 1 (at 20mbps) rather than router 2 (at 1000mbps), and both windows machines cannot connect via router 2 even if it is the only available connection (i.e. I disconnect them from router 1). If I then disconnect the Ubuntu machine from router 1 and/or remove the manual DNS entry, they cannot access the shares at all until I reboot the Ubuntu box - at which point I'm back to where I was before I entered the 8.8.8.8 DNS manually.

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/#findComment-890070
Share on other sites

Link to post
Share on other sites

 

If I manually set the DNS to 8.8.8.8 on wlan0, the windows desktop accesses the Ubuntu shares via router 1 (at 20mbps) rather than router 2 (at 125mbps), and both windows machines cannot connect via router 2 even if it is the only available connection (i.e. I disconnect them from router 1). If I then disconnect the Ubuntu machine from router 1 and/or remove the manual DNS entry, they cannot access the shares at all until I reboot the Ubuntu box - at which point I'm back to where I was before I entered the 8.8.8.8 DNS manually.

 

ah.. are you using samba to file share on your ubuntu? If so, you should properly define the interface you want to share on samba(eth0) and remov wlan0 from the interface and restart your linux box. If not, then i suggest you install and use samba.

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/#findComment-890099
Share on other sites

Link to post
Share on other sites

 

 

 

ah.. are you using samba to file share on your ubuntu? If so, you should properly define the interface you want to share on samba(eth0) and remov wlan0 from the interface and restart your linux box. If not, then i suggest you install and use samba.

 

I definitely tried Samba when I was setting this up (on just the 1 network) back around Easter, couldn't remember if I went with it in the end so I typed "samba" into the terminal and apparently it's not installed anymore. I'll install it now and see if I can fix it that way :)

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/#findComment-890175
Share on other sites

Link to post
Share on other sites

I definitely tried Samba when I was setting this up, couldn't remember if I went with it in the end so I typed "samba" into the terminal and apparently it's not installed anymore. I'll install it now and see if I can fix it that way :)

 

Great :) turn on guest account sharing to save you the hassle of username and passwords, you use it locally anyway. 

Link to comment
https://linustechtips.com/topic/64569-why-wont-this-work/#findComment-890196
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×