belvdr
No longer interested in living
- Joined
- Aug 2, 2013
- Messages
- 2,567
Just a dozen? Lightweight....It's on hold at the moment; I've got a dozen other things that have popped up at work right now. I'll get back on it as soon as I can.
Just a dozen? Lightweight....It's on hold at the moment; I've got a dozen other things that have popped up at work right now. I'll get back on it as soon as I can.
Just a dozen? Lightweight....![]()
With radio
<snip>
Ethernet adapter Ethernet 2: <--- OFFICE NETWORK
IPv4 Address. . . . . . . . . . . : 192.168.128.23
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.128.1 <--- OFFICE ROUTER
<snip>
Ethernet adapter Ethernet 5: <--- RADIO NETWORK
IPv4 Address. . . . . . . . . . . : 192.168.128.2
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.128.1 <--- RADIO'S ACTUAL IP ADDRESS
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.128.1 192.168.128.2 55 <-- RADIO NETWORK
0.0.0.0 0.0.0.0 192.168.128.1 192.168.128.133 45 <-- OFFICE NETWORK
<snip>
192.168.128.0 255.255.255.0 On-link 192.168.128.2 311
192.168.128.0 255.255.255.0 On-link 192.168.128.133 301
The default gateways don't come into play for connectivity within a subnet. Even if the default gateways were different or one adapter didn't have a default gateway, you wouldn't be able to see one of the networks, because the subnets are identical. There are routes for the network too (on-link in your example), and that route metric would dictate which one can be seen. Here's a Linux route table, using "ip route":Just found this thread searching for a way to change the IP segment used by an APX 8K I'm trying to program at work, and am unable to do so whilst connected to the office LAN. After reading through the entire thread, I can tell you without hesitation that belvdr is spot on - this is totally an IP network conflict. For those interested in understanding why, here's my quick(ish) explanation:
First, the "whittled down" (to only info relevant to this issue) excerpt of the network info from post #10 - pay close attention to the stuff colored in bold:
Note that the default gateway is the same for both networks/adapters, and that the first three dotted decimal numbers in the IP address (proper term is "octets") are the same for both the office and radio networks. Because of this, we now have two adapters (routes) we can use to reach the same 192.168.128.0/24 address space. Furthermore, since both have the same default gateway, the operating system has no reason to suspect that both aren't going to the same place, so it uses the lowest "cost" route to get there. Before anyone who already knows this stuff busts my chops - yes, I know the subnet mask plays a part, but I'm trying to keep this simple and it's a basic class C, so I'm not going into that. If you want more info about what a subnet mask is and what it does, Google is your friend. Anyway, so how do we know which "route" Windows is using? We check the routing table, of course. The command needed is route print, and here's the partial output from my system. Note that cost ("Metric") is higher for the radio network/route compared to that of the office network.
$ ip route
default via 192.168.128.1 dev enp0s31f6 proto dhcp src 192.168.128.10 metric 100
192.168.128.0/24 dev enp0s31f6 proto kernel scope link src 192.168.128.10 metric 100
You're correct, but that's not what's happening. The problem is that, in this scenario, the radio has the SAME IP ADDRESS as the office network's router. Because of this, the default routes DO come into play as the OS then has to choose the adapter with the lowest cost to reach the Default Gateway. From Windows' perspective, there are two adapters installed both with a route to the Default Gateway, so one of them is seen as redundant and therefore not used.The default gateways don't come into play for connectivity within a subnet. Even if the default gateways were different or one adapter didn't have a default gateway, you wouldn't be able to see one of the networks, because the subnets are identical. There are routes for the network too (on-link in your example), and that route metric would dictate which one can be seen. Here's a Linux route table, using "ip route":Code:$ ip route default via 192.168.128.1 dev enp0s31f6 proto dhcp src 192.168.128.10 metric 100 192.168.128.0/24 dev enp0s31f6 proto kernel scope link src 192.168.128.10 metric 100
The metrics for the subnet routes (i.e. On-Link) are the only ones that matter in this case. Default gateways only come into play when a packet needs to be sent to a host on a different subnet. That's not happening here. The PC has two interfaces that have overlapping subnets. Since it's trying to contact a host on that subnet, the default gateways aren't used.You're correct, but that's not what's happening. The problem is that, in this scenario, the radio has the SAME IP ADDRESS as the office network's router. Because of this, the default routes DO come into play as the OS then has to choose the adapter with the lowest cost to reach the Default Gateway. From Windows' perspective, there are two adapters installed both with a route to the Default Gateway, so one of them is seen as redundant and therefore not used.
srg
The metrics for the subnet routes (i.e. On-Link) are the only ones that matter in this case. Default gateways only come into play when a packet needs to be sent to a host on a different subnet. That's not happening here. The PC has two interfaces that have overlapping subnets. Since it's trying to contact a host on that subnet, the default gateways aren't used.
If the metric for the ethernet adapter is lower (meaning higher priority), any packet destined for any host on that subnet will go out the Ethernet adapter. Since the programming software is trying to send a packet to a device on the 192.168.128.0/24 subnet, it is sent out the ethernet adapter, not the USB. This is why disconnecting the LAN suddenly makes the radio appear. It's not that it's the default gateway; it's because the On-Link route for the higher priority adapter was removed.
The OS always makes a choice, based on the routing tables. It just happens that in many cases, there's only one adapter per subnet.
This can be easily proven by adding a static host route for the radio pointing to the USB interface. Of course, this will also break any chance of routing out of the subnet, since the default gateway on the ethernet network will no longer be available (in the OP's case).
It can also be proven if the ethernet default gateway were to be something other than the IP of the radio. You'd see the radio still can't be seen when the ethernet cable is plugged in.
EDIT: I should also add that if you were to capture a network trace, you'd see the arp who-has go out the ethernet interface when it queries the IP that shares the gateway and the radio. Even if the radio were not conflicting with the default gateway, you'd see the arp request for the radio going out the ethernet adapter still, due to the routes.
I see what you're saying now, in that packets from the radio software are going to the router (i.e. default gateway of the ethernet network) and the software will never find the radio there. I am saying it didn't matter what the IP of the radio was because it would never communicate given both networks are identical, whether it sit at the default gateway or not.You're telling me that default gateways don't come into play since the traffic is not leaving the broadcast domain, and I'm telling you that the default gateways do come into play because both default gateways have the same IP...but only one of them is the radio. Fwiw, I'm not disagreeing that the traffic isn't being routed there because it needs to leave the network, nevertheless it IS going to the default gateway's IP address because the DG and the radio SHARE THE SAME IP ADDRESS. I understand your point and how things normally work, but that's completely irrelevant in this case.
Since it seems I'm not getting through to you, and so far you've not convinced me that my logic is flawed, so let's just agree that programming an APX radio via USB whilst connected to a separate 192.168.128 network, OR programming a MOTOTRBO radio via USB whilst connected to a separate 192.168.10 network, will almost certainly be problematic...and leave it at that.
srg