0
votes

I am using the Linux driver g_ether to communicate Ethernet over USB for an embedded Linux device. The package dnsmasq is running on the embedded device and is configured to provide DHCP service to whatever PC is connected to the board via USB.

This works just fine and I can ping the Linux board from Windows ( 7 and XP ) cmd.exe. I can also ping Windows 7 after configuring the firewall as administrator:

netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow

The difference between Windows 7 and Windows XP is that when I connect the USB Cable under XP I still have my regular Local Area Connection and Internet available and active. Under Windows 7, when I connect the USB device, I lose the Local Area Connection and Internet but gain the Ethernet over USB connection with the Linux Board. As soon as I unplug the USB cable from Win 7 I regain my Local Area Connection and Internet.

What gives? I'd like to keep my Local Area Connection and Internet active while also being able to interact with my Ethernet over USB connection at the same time. I'm not sure if this is a firewall issue or something else. This is definitely a Windows 7 nuance that I'd like to understand and hopefully resolve.

1

1 Answers

1
votes

The resolution to this problem was to turn off dnsmasq service as a router. There should be no dhcp-option=3 in the dnsmasq configuration file. With that service turned off, it is possible to maintain the Ethernet over USB connection and Local Area Network ( with internet ) at the same time. The USB -> Ethernet, also works without the LAN connection as expected.

Additionally, you could leave the router behavior in the dnsmasq config file but then set the connection priority to make the LAN 1 and USB RNDIS Connection 9999. Right click on the adapter and choose Advanced options for the IPV4 behavior of that adapter.