I have two pc running on Windows. They are connected with direct Ethernet cable. PC1 has two interfaces. One is connected to the LAN with static ip: mask: and gateway: and the second interface is used to connect directly to PC2 with ip: mask: and no gateway. PC2 has one interface for direct connecting to PC1 with ip: mask: and gateway: These two PC can see each other with no problem. But I want to access the LAN resources from PC2 without using Bridge on PC1. I have already enabled IP Packet Forwarding in PC1. What specific "route add" command should I use?


PC1 already knows how to get to the LAN, and PC2 already knows how to get to PC1. You can't add a route anywhere to improve on this situation and make PC1 route traffic from PC2 to the LAN.

What you need to do is enable Internet Connection Sharing on PC1's interface. When prompted, select the interface as the "home" network. This will configure PC1 so that it routes traffic between the two interfaces.

| improve this answer | |
  • But I don't want PC2 to get ip from LAN dhcp. – Mohammad Jul 9 '17 at 11:16
  • Please see updated Answer – I say Reinstate Monica Jul 9 '17 at 12:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.