2
I'm trying to understand some basic concepts of networking. I have following home LAN:
- Is it right (like above) to have 2 NIC's each one having 2 different gateways on one station? There PC2 have 2 NICs - the first's one gateway is 192.168.0.1 the second's 192.168.1.1?
Initially (just after system startup) the ip table is like that:
192.168.0.0 255.255.255.0 On-link 192.168.0.11 276 192.168.0.11 255.255.255.255 On-link 192.168.0.11 276 192.168.0.255 255.255.255.255 On-link 192.168.0.11 276
and when i run netcat:
nc -zv -s 192.168.0.11 192.168.0.11 80
to test if port 80 is open it works - the port 80 is indeed open. But when i remove the 192.168.0.11 route i got "TIMEOUT" on nc test. Shouldn't it pick 192.168.0.0 route and work? Moreover when i add the route manually:
route add 192.168.0.11 mask 255.255.255.255 0.0.0.0
it still doesn't work!I can't change the metric to desired value. When i run for eg.
route change 192.168.0.11 mask 255.255.255.255 192.168.0.11 metric 500
the result metric is't 500 but 520! (no matter if auto-metric is enabled or not)?- Is there any connection between -s flag (local source address) in netcat and routing table's Interface column?
You removed the interface route. It’s part of how Windows networking works. Note the “On-link” part where the gateway would normally be. – Daniel B – 2016-05-22T17:37:34.970
@Daniel B What do You mean "interface route"? – Mulligan – 2016-05-23T09:09:37.553
It’s a route that tells Windows that a specific target is reachable directly on the local network, ie. without a gateway. As such, it is “on-link”. – Daniel B – 2016-05-23T16:22:21.643
@Daniel B ok i but even if i removed 192.168.0.11 there is still 192.168.0.0 route so why it's not beeing picked? – Mulligan – 2016-05-25T19:42:57.963
It's (probably) a special route that is required for "loopback" connections. – Daniel B – 2016-05-25T20:43:41.703