Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems
Post a reply

Help needed - 2 NIC's required?

Sep 01 06 6:52 pm

Hi. I have a single ethernet line coming to my PC directly from the wall in my apartment. It's a DSL connection and I'm not sure what kind of hardware it connects to. I have a static DNS entry and I'm served a DHCP IP address with a lease for a fixed time on it.

I have now connected a D-Link 8-port Switch, so the ethernet serving my IP address is going into the switch, and another cable from the switch goes into my PC. My PC sees the connection same as if directly connected, no problems. I am able to connect another computer (6 free ports left) into the switch. But I still have only one ethernet card in my PC, so if I change my IP address to a local, private network (192., etc.) and make the other PC something consecutive, then I don't think I will be getting my DHCP IP address for my internet connection. If I set the 2nd PC for DHCP, it does receive a different IP address, but it will not see any internet connection, as I'm only allowed 1 IP address served into my apartment (that is what I pay for, and they see the machine ID that is using it).

Can anyone tell me please, what sort of setup would I need to make Wingate work for me? Its very important, thanks!

Christian

Sep 01 06 8:48 pm

Hi

If your IP address doesn't change very often, you can make it work with a single NIC in your main PC, otherwise it would be easier to get a second NIC.

If you want to go with the first NIC, you need to

a) assign an IP address to your laptop not in the same range as you are allocated by DHCP
b) manually add a persistent route on your main PC so it can know that the route to the subnet of the laptop is out its local adapter.
c) manually add a persistent route to the laptop so it can know that the route to your PC is out its local adapter
d) set the default gateway on the laptop to the IP address of your PC. The OS probably won't let you do this until the subnet route is created. You can set it in the adapter properties, or do it with a manual route command.
e) run WinGate. Disable DHCP in WinGate, or you may cause problems for the rest of the apartment building.

So, say you get assigned an IP of 192.168.1.x to your PC. Then maybe you would choose an IP like 172.16.0.1 for your laptop. From the command line on the PC you would type

route add -p 172.16.0.0 MASK 255.255.255.0 192.168.1.x

(so the gateway address for this route is the adapter address - this tell the system it's a local route).

On the laptop type

route add -p 192.168.1.0 MASK 255.255.255.0 172.16.0.1
(the subnet route)

route add -p 0.0.0.0 MASK 0.0.0.0 192.168.1.x
(default route)

Whenever the IP assigned to your PC changes, this will break.

Option 2: another NIC

If you get another NIC for the PC, then you would plug the hub into that, and the laptop into that, assign it an IP, then enable DHCP only on that adpater in WinGate. This then doesn't break when you get assigned another IP.

Ethernet cards are very cheap - it would probably be well worth it.

Adrien
Post a reply