78
votes
Accepted
Why are subnet-masks relevant for the individual computer on the network?
Your original assumptions are not entirely correct. What you call a "router" is two devices in one – a two-port router internally connected to a multiple-port Ethernet switch. (Here's an example ...
73
votes
On Windows, how to determine route for IP destination?
In Powershell:
Find-NetRoute -RemoteIPAddress "10.0.0.34" | Select-Object ifIndex,InterfaceAlias,DestinationPrefix,NextHop,RouteMetric -Last 1
ifIndex : 10
InterfaceAlias : ...
72
votes
Accepted
How smart is my network?
Routers aren't necessary unless your traffic needs to move to a different subnet. When a computer wants to send some IP traffic to a different machine on its subnet, it needs the recipient's MAC ...
69
votes
Accepted
I have a domain, static IP address and many devices I'd like to access outside my house. How do I route them?
You can have one public facing server running nginx reverse proxy that redirects traffic based on subdomain to the correct server.
nginx configuration on your "main" server:
server {
server_name ...
54
votes
Accepted
Why can I ping 10.0.0.0/8 addresses from a 192.168.1.0/24 subnet?
I thought 10.0.0.0/8 were all reserved addresses and that any sort of traffic going to those addresses was dropped.
No. It's true that it's a special range, but it's reserved for exactly the same ...
35
votes
Accepted
My global IP address is 192.168.1.xxx?
I am using Ubuntu and found out that my global IP address is…
It's not global. Do not pay much attention to scope global; that field within 'ip addr' never had any significance to IPv4 entries (and ...
32
votes
How can I make the Windows VPN route selective traffic (by destination network)?
Use Add-VpnConnectionRoute cmdlet in Windows 8+.
Add-VpnConnectionRoute -ConnectionName 'My VPN Connection' -DestinationPrefix 192.168.123.0/24
31
votes
Why are subnet-masks relevant for the individual computer on the network?
How does a computer know if a destination address is in the same subnet on in another?
Checking the local adddress and the subnet mask.
Let's check a couple examples:
If my computer has the IP 192....
31
votes
Can someone explain a tracert to my own public IP?
I would expect my router to go reach my public IP immediately as it is my actual IP that my router uses. does NAT fit into this somewhere?
This looks very much like CGNAT (as in "carrier-grade ...
28
votes
How smart is my network?
If 2 computers are connected to the same vlan on a switch and share the same subnet mask - the switch should deliver the packet without hitting your firewall or router.
You can verify this by running ...
25
votes
Route the traffic over specific interface for a process in linux
I have sooo struggled with this so here's a COMPLETE solution. It's tested on Ubuntu 15 to 19.10. You can especially use it with OpenVPN to route certain apps outside the VPN tunnel interface.
The ...
25
votes
Accepted
Does the traffic go through my company network when I browse when connected through SSL-VPN
1) You may visit any site that shows you the (public) IP address your request comes from, a common example being http://checkip.dyndns.org/
Edit from 2020: Some more information can be obtained by ...
25
votes
Accepted
Github.com resolves but times out
I was having this problem too, also for several days, and with the same ipaddress as you! Just fixed it this morning.
The way I fixed it was looking in my /etc/hosts and seeing that ip listed for ...
23
votes
Accepted
What's the meaning of link#4 in mac's route table?
The expression link#x, where x is some digit, is used to indicate that the corresponding address is a link-level address, .i.e, an address that operates only on the network the host is physically ...
21
votes
Why can I ping 10.0.0.0/8 addresses from a 192.168.1.0/24 subnet?
These are three most likely possibilities:
Your ISP assigns its clients the 10.0.0.0/8 addresses. Your home router isn't advanced enough (nor needs to be) to limit routing private blocks upwards.
You ...
20
votes
Accepted
Route only specific traffic through VPN
What you are asking for does not exist. This is why you are dissatisfied with the answers you found (some of them, possibly, being mine): all of them have suggested workarounds, not a genuine solution,...
19
votes
How smart is my network?
Almost certainly, the communication path would be A ↔︎ switch ↔︎ B, not going through the firewall and router. Assuming that workstations A and B have IP addresses with the same network and netmask, ...
18
votes
Linux: routing based on domain names
Routing based on destination domain is not impossible, and, with the right tools, not all that hard.
I'll present a few methods that require little or no special client side configuration. These all ...
17
votes
On Windows, how to determine route for IP destination?
The pathping command is similar to tracert but includes the outgoing interface.
Using cygwin, this command gives the outgoing IP/interface for a particular destination (specified by $HOST):
pathping ...
16
votes
Accepted
SSH :connect to host localhost port 22: Connection refused
Your netstat output shows that there's no process listening to port 22, and that would explain why you get a Connection refused when trying to SSH.
Your status info about the sshd daemon shows ...
14
votes
Adding route automatically after a successful VPN connection in Windows 10
On Win 10, Powershell has a cmdlet available that adds routes on VPN connection and removes them again when the VPN is disconnected: Add-VpnConnectionRoute. It works without having to specify the ...
14
votes
Accepted
Is it normal for an ISP to have the same IP twice in a route?
If this happens once or rarely
All IP packets have a time-to-live (TTL) field. This field is decremented by one by every router that forwards a packet. If a router decrements the TTL to 0, it drops ...
13
votes
What's the meaning of link#4 in mac's route table?
Regarding your second question Is there a way to know which interface link#4 designates?, one could use the netstat command with the -i switch (state of interfaces). [Note: I prefer netstat not to ...
13
votes
Accepted
Correct way to provide a direct network link between 2 devices as well as connecting both to a switch
What is the correct way to configure the PC and Server, so that the loop doesn't cause networking issues? Meaning, traffic to/from other devices can only go via the switch as normal and neither device ...
12
votes
How can I make the Windows VPN route selective traffic (by destination network)?
A 'short' guide for noobs like me, who don't know much about networks. Not much new here, but a summary of all good options described in previous answers and in other related threads. Whole procedure ...
12
votes
Accepted
Specify a network interface with curl
As correctly pointed out by Matt Clark, ETIMEDOUT means you could not reach the specified site, for whichever reason.
But let me also point out you misinterpret the meaning of the --interface option....
12
votes
Interpreting the 'metric' column in routing table
According to the man page, metric indicates the 'distance' to the target.
I expected the metric to be a single hop to my router. However, it's 9! Why is this so number high?
The metric field has ...
12
votes
Accepted
Subnet or Not with 20 mask?
Yes. If the subnet mask is smaller than 255.255.252.0 (CIDR /22) all devices with IP addresses 192.168.1.x and 192.168.2.x belong to the same subnet and don't need a router to communicate with each ...
11
votes
OpenVPN: Only route a specific IP addresses through VPN?
In response to the comments asking for an easy linux / networkmanager friendly solution to customizing what gets routed over OpenVPN, here is a GUI friendly way to set it up. This answer is, as far as ...
11
votes
Why are subnet-masks relevant for the individual computer on the network?
Something non-obvious about IP is that every IP device is itself a router.
This can be seen on a normal PC with the command "route print". You are connected to two networks: your local Ethernet or ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
routing × 2750networking × 1773
linux × 540
vpn × 537
router × 429
openvpn × 282
iptables × 226
ip × 219
windows × 193
wireless-networking × 188
windows-7 × 106
nat × 102
subnet × 101
dns × 98
ubuntu × 90
macos × 88
gateway × 77
ipv6 × 71
lan × 66
port-forwarding × 65
ping × 65
internet × 63
firewall × 63
windows-10 × 57
ssh × 57