blabberer wrote:congratulations welcome to the club
as they say it is never late for old dogs to learn new tricks
Arf!! Arf!!
Took a couple of days off. Wore myself out with the number of hour (weeks???) of futility encountered trying to establish a connection.
The Net connection was far from easy to solve. The host was indicating no debuggee present but I had a good Net connection between computers over which I could transfer files in either direction. On my system, my laptop is the host and connects to the router via wifi, running W7 SP1. The Target machine is a desktop running a dual booted system of W7 and W10. They are connected via a LAN CAT5 cable using RJ-45 connectors. Currently, I am using W10 as the debuggee (target).
When windbg was put into kernel debugging mode on the host, I could not get a connection.
Ran ipconfig /all on each machine and noted the IP4 address, marked 'preferred' on each Ethernet adapter section. I could not ping either of them from either machine. The command is ping -4 <address>, where <address> is the 192.168.xxx.xxx address noted for IP4 in the ipconfig listing of the machine you wish to ping. The -4 tells ping to look for an IP4 network connection.
Used 'arp -a' command to list networks available and their MAC address. The MAC address will identify the physical device connected, if you can find the MAC address. Some physical units have it marked on a label on the device. Could not see the IP4 address of either machine when arping from one to the other, even though I could transfer files fine under windows explorer under the Network folder.
Turns out that on my W10 network end the IP4 connection had reverted to the default connection, which gets it's IP address from the DHCP server. So, I went into Networks and Sharing under the 'change adapter settings' on each machine. On the host, it's ok to allow the IP4 connection to get it's IP address from the DHCP server since the server is at the router.
The router address on mine is 192.168.0.1 and that is also the default gateway. On the target, however, it can't use that default address if it is connecting to the Net over the the host wireless connection as on mine.
It's a two hat job. You have to put on your wireless hat when dealing with the wifi connection to the router, then onward to the Internet provider. When you deal with the network (LAN) you have to change hats and put on your LAN hat. On my host, there is a 'bridge' connection under 'change adapter settings' and it bridges the LAN connection from the target computer to the wifi on the host. Using that bridge, I get an Internet wifi connection on my target machine.
OK. I don't need a wifi connection on the target, I just need a LAN connection between host and target and over a certain port, which I chose as 55555. Microsoft recommends 50000 or so, but my addresses looked busy around there as revealed by my firewall activity manager. To establish the LAN connection I need the target to have it's own unique network address. If I let it set itself up to get addresses from the DHCP server, it will often use an address in the 169.xxx.xxx.xxx range which comes from outside.
It appears at one time that I had selected an address in range of my default gateway at 192.168.0.1 In ipconfig it was listed as 192.168.0.1XX. So I went into Network and Sharing/change adapter settings/Local Area Connection x, where x is the number of the LAN connection in use.
BTW...two other excellent network troubleshooting commands for a command window are 'netstat', which lists all IPs on a machine and the ports used by each, and 'route'. The latter is a complex command to use but you can use it to rebuild your entire network on a machine if it ever gets corrupted.
On the target, I right-clicked on the connection under 'change adapter settings', and found the IP4 entry in the lower table. I highlighted the IP4 connection and selected 'properties'. The IP4 connection was configured to 'obtain an IP address automatically', and that was the problem.
I clicked the radio button below to select 'Use the following IP address'. Then I entered my old 'static' IP4 address from ipconfig /all. If it is listed as a 169.xxx.xxx.xxx IP address it won't do, it has to start with 192.168.xxx.xxx. The 169.xxx.xxx.xxx IP address comes from a DHCP server via the router. DCHP addresses are dynamic, they change all the time. You want a static address which is fixed for the target machine and it will be configured as 192.168.xxx.xxx.
You can pretty well select any IP address between 192.168.0.1 to 192.168.0.255 as long as it does not conflict with the default gateway IP or other LAN IPs in that range. Some routers don't use 192.168.0.1 as a default gateway, so it's necessary to find out what a particular router is using. Sometimes it's written on a label on the router, or in the manual.
Anyway, I entered 192.168.0.xxx from my ipconfig /all listing and Windows complained it was for an old device and may cause a conflict. I knew that device was no longer there so I told it to accept that address. The moment it did, I was able to ping the IP4 address listed on either machine from either machine. And running arp -a on either machine listed those addresses as now being part of the network.
After that, windbg was happy. I might add that when setting up the 'Use this IP address' in the IP4 properties, that the config window shows an entry for 'subnet mask' and 'default gateway'. The subnet mask is configured by the system the moment you hit 'Enter' for the chosen static IP address. It will be something like 255.255.255.0. For the default gateway I chose the base IP address for my router, which is 192.168.0.1
Below that, in another window, are the DNS entries. You can leave that stock but I use 8.8.8.8 and 8.8.4.4, which I think is the Google DNS server. A DNS server changes an address like
www.google.com to an numerical IP address like xxx.xxx.xxx.xxx.
Below the NS window is an Advanced button. It opens in a Window with three tabs, one of them marked 'WINS'. At the bottom of the WINS window are setting for Netbios. They advise you to use the middle one for static IPs, 'Enable Netbios over TCP/IP. I use that one.
BTW...Microsoft advises not to leave a machine in debug mode. I have no choice. With W10 in debug mode as target, it takes forever to load. I have heard that is normal with kernel debugging. I had to go into a cmd window and set bcdedit /debug off to get W10 back to a normal boot speed.