Hi,
As far as I know the USB IP address of the BBB is 192.168.7.2.
If the USB is connected you can always SSH into the BBB using this address.
However, the BBB does not set a default route for the USB interface, so will not reach the internet via USB. Nor as far as I can see, does it set a DNS server by default when using USB only.
For USB internet access you will need to configure internet connection sharing on your windows computer to forward traffic, or if connected via linux, you will need to enable ipv4 forwarding and set up some iptable rules.
This is what Robert has explained.
The first set of magic commands releases the USB IP address (192.168.7.2 by default), and then uses dhcp to set a new address, this should also set a default route and dns server, depending on your local dhcp server. This requires Windows ICS to be setup correctly to work and probably any AV and firewall software that you are using.
You will also need to be connected via the serial console to do this. If you try from an SSH connection, you will loose connection after the flush command.
If you put both commands on the same line separated by a semicolon, it would still kick you off, but should work as expected. You can then ssh back in to whatever IP address the BBB acquired by dhcp.
I would have thought you could just leave the IP address as the default (192.168.7.2) and set the gateway as 192.168.7.1 and configure a DNS server which is how it is done when connecting via Linux. However I don’t use Window and I don’t know how well ICS works. I know people have problems with it.
The second set of commands is to configure a Linux computer to forward traffic from the USB connection and setup some simple IPtable rules.
By far the easiest way to connect a BBB to the internet is to just use an ethernet cable.
Even when using ethernet, you can still ssh into the BBB using a USB cable, the default address should be 192.168.7.2