Saturday, May 17, 2014

Windows IP Configuration and nothing else

I recently had the need to clean up a friends computer that had been completely trashed by every form of bad computer use habits you can think of.  It had ad popup software, multiple virus scanners stepping on each other, more browser toolbars than I could count, along with logs of other pointless software.

Uninstalling the extra software wasn't all that difficult, just took a little patience.  However, some of the software corrupted the network adapters so badly that they were unable to actually connect to anything even though they claimed to be connect.

running ipconfig would only return "Windows IP Configuration" and nothing else, no data was being returned.  ipconfig /all would still not return any adapter information, but it did say:
IP Routing Enabling : No
WINS Proxy Enabled : No

I thought that was the problem, until I looked on one of my other computers and realised the settings were the same.

Poring over the internet gave me lots of solutions to try.  From an elevated command prompt I ran:
netsh winsock reset catalog
netsh int ip reset reset.log
netsh int ipv4 reset reset.log
netsh int ipv6 reset reset.log
Some combination of those had fixed 90% of issues people on the internet had.  However, they had no affect on my issue.  I also tried playing around with some registry settings that some of the more desperate people had claimed worked for some of their issues.  These two settings required a machine reboot after and were supposed to enable the ip routing and wins proxy.  The ip routing one worked, but the other kept getting reset after a reboot.  However, neither fixed my core issue of an active network connection that could pass data.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Netbt\Parameters\
set EnableProxy to 1
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\Tcpip\Parameters\
set IPEnableRouter to 1

I finally found an odd sequence that worked for me from this discussion thread:
1. disabled the network adapter
2. open up the network adapter and unchecked all network items/bindings in the adapter
3. ran repair on the adapter (it will ask for admin permissions which I gave it, it will re-enable the adapter and claim it did other repairs)
After doing that simple, yet odd, sequence my network connection was fully restored.

Monday, May 12, 2014

Network testing with iperf

I have had a couple of occasions now to use the iperf utility in network testing and have come to love it enough that I decided it warranted a post.  While there are more powerful tools such as wireshark, this one is nice because it is so lightweight.

The first time I used it was to test the bandwidth capabilities of my switches.  I discovered that my standard computers were unable to generate enough data fast enough to put a load on a gigabit switch.  By starting up a server to consume the data I was able to start up multiple clients feeding it to get me pretty close to the limit.
# starts the server in listening mode
(server): iperf -s
#runes the client for 1200 seconds which is 1 hr to the servers ip
(client): iperf.exe -c 192.168.xxx.xxx -t 1200

The second time I needed this handy utility was when troubleshooting a voip phone network.  I was not getting any dropped packets from the ping tests I had done, so I turned to this utility to see if perhaps UDP packets were having issues.

-c is client ip, -b is bandwidth size to be tested which adjusts how large of packets are being sent., -t is the number of seconds to run the test for.
(client): iperf -c 192.168.xxx.xxx -b .5mb -t 180
-s initiates the instance as a listening server, -u specifies it will be a UDP test, -i specifies the reporting interval in seconds.
(server): iperf -s -u -i 1