0
I have an Internet connection via a router (AT&T U-Verse) with a static IP address.
In most cases, it works... but I experienced something rather strange yesterday.
I have a local network. All the traffic from all the other computers goes through my main computer which has a strong firewall. (The firewall was not the culprit, do not jump to conclusion here. The problem resolved itself and I did not change the firewall at all since.)
So... my network looks something like this:
+------------+ +------------+ +------------+ +------------+
| | | | | | | |
| LAN |<-->| Main PC |<-->| Router |<-->| Internet |
| | | | | | | |
+------------+ +------------+ +------------+ +------------+
192.168.2.45 192.168.2.1 [eth1]
192.168.1.1 192.168.1.254 [eth0:0]
x.x.x.120 162.220.130.126 [eth0]
So my main computer has a static IP address and it uses gateway 162.226.130.126 to access the Internet. I'm not 100% sure where the gateway is specified, but from what I recall, I put it in the router for the system to work.
Now... sometime yesterday, my Main PC lost its Internet access completely. Up to here... well... I would say, it happens all the time, so nothing too strange. I could not connect to anything, get IP addresses from names, etc. All looked like it was down.
However, the LAN computer next to my main PC, which uses the Main PC connection to the Internet, was working just fine. Not only that, it would continue to process playing back movies from Youtube.com, I could go to any website like Google, etc. as long as I was on the LAN computer.
To me that makes absolutely no sense. The Main PC forwards the LAN computer packages to the Internet... So how could it just continue to work when the Main PC stops working??? (i.e. from the outside, the IP address is the same, so if I had been firewalled by my ISP, then nothing should work.)
I tried a traceroute
from both computers and got the following.
Tracing from the LAN computer gets me out, it seems to jump over the gateway though:
traceroute 45.55.5.185
traceroute to 45.55.5.185 (45.55.5.185), 30 hops max, 60 byte packets
1 halk (192.168.2.1) 0.368 ms 0.374 ms 0.367 ms
2 192.168.1.254 (192.168.1.254) 0.813 ms 1.045 ms 1.048 ms
3 162-201-40-3.lightspeed.frokca.sbcglobal.net (162.201.40.3) 20.271 ms 21.638 ms 23.065 ms
4 75.29.64.148 (75.29.64.148) 28.758 ms 28.999 ms 29.520 ms
5 12.83.77.141 (12.83.77.141) 27.213 ms 12.83.77.149 (12.83.77.149) 30.960 ms 12.83.77.141 (12.83.77.141) 31.212 ms
6 12.122.149.133 (12.122.149.133) 36.060 ms 35.725 ms 35.960 ms
7 192.205.32.222 (192.205.32.222) 36.200 ms 24.034 ms 24.786 ms
8 digitalocean-ic-302451-sjo-b21.c.telia.net (62.115.34.18) 28.043 ms digitalocean-ic-306499-sjo-b21.c.telia.net (62.115.45.22) 29.201 ms digitalocean-ic-302451-sjo-b21.c.telia.net (62.115.34.18) 30.409 ms
9 * * *
Tracing from the Main PC, I only get one entry, the gateway:
traceroute 45.55.5.185
traceroute to 45.55.5.185 (45.55.5.185), 30 hops max, 60 byte packets
1 x.x.x.126 0.556 ms 0.742 ms 1.029 ms
2 * * *
I just went to bed and in the morning everything was back to normal, and now the traceroute
on the Main PC works as on the LAN computer and reaches the DigitalOcean computer as expected.
So my question is not so much "What did happen?" because that may be difficult to answer, but rather "How is it possible that the same tunnel work for one computer and not the other?"
Reset your router. Use Dynamic (DHCP) from your router's settings. Then just plug in your "Main PC" that you run Ethernet cable to and perform the "ipconfig /all" command to get the information; what I mentioned above. Your wireless computer's should work after that too. It's when you start using static IP's and not set it up correctly is when things get blocked. – ejbytes – 2016-11-18T04:00:29.900
I'm under Linux. I am not questioning whether the route will fluctuate a bit here and there, but why would my connection not work from my my Main Computer opposed to a LAN computer (which is also running Linux,) because from the LAN computer I could go and see all the Internet... whereas the other one I was cut off. – Alexis Wilke – 2016-11-18T05:14:31.287
Looks like you might have your IP's a bit mixed? I see you set your router to 192.168.1.254. I did similar to my network. I assume by what you've stated, are static IP's? That's okay, but your main computer in your dia. should not be 192.168.1.1, that's reserved. Make your main comp to be other than 1. And your LAN comp also has an incorrect IP it seems @ 192.168.2.45. The 45 is okay, but change the 2 to a 1 so it looks like 192.168.1.45. I'm not a network engineer, but I've always set my gateways to match the IP. The
ipconfig /all
equivalent to Linux is$ ifconfig -a
– ejbytes – 2016-11-18T08:11:11.053@ejbytes strictly speaking, 192.168.1.1 is not reserved. It is just common to use as an address for routing. Imagine a closed private network represented by the net block 192.168.1.0/24 with no outside communication. Would it be a problem to assign 192.168.1.1 to any of the hosts? Absolutely not. – diametralpitch – 2016-11-18T20:27:31.457
@diametralpitch While you can, it's not good practice. You can also J-Walk, but I don't recommend it. – ejbytes – 2016-11-18T23:00:00.727
@ejbytes had you qualified your instruction in the previous comment with "it's not good practice", I would not have bothered to comment. You just said it was reserved, and told the OP to change it. Now while I have already mentioned this practice is common, I would not have used such a strong word such as 'reserved', and I offered an example as to why. – diametralpitch – 2016-12-01T05:02:35.727
@ejbytes also, there is a flaw in your reasoning because you are attempting to use an analogy in which an actual rule is being broken. In my example, using 192.168.1.1 violates no such rule. – diametralpitch – 2016-12-01T05:03:28.437
@diametralpitch No flaw. I think you need to let it be. You aren't proving anything at all except that you like to belabor a point to death, beyond any reasonable length and you aren't contributing to anything productive. Good practice is equivalent to standard, which is just as good as law and rule. If you don't agree with that then you need to do some reading. Good day and I hope this quashes any fight you have left in you because I'm not here to have emotional discussions. Good day sir. – ejbytes – 2016-12-02T00:56:01.450
@ejbytes sure, we can just agree to disagree on this one. My intention was to improve the advice given to the OP and anyone else reading this, and also to share my reasoning with you. – diametralpitch – 2016-12-03T02:03:36.193