can any clearly explain
how to connect two computers with lan and internet sharing enabled

Dani AI

Generated

Short practical answer that builds on ’s question and the replies from and .

Two reliable options

  • Easiest and most robust: plug both PCs into the same router or an unmanaged switch. Each machine gets its own LAN address and Internet access — no ICS required and no single point of failure. (support.microsoft.com)
  • ICS (Internet Connection Sharing) on a Windows host: make one PC the “gateway” (it needs the Internet-facing adapter plus the adapter to the other PC), enable sharing on the Internet-connected adapter, and the host will run a tiny DHCP/NAT service for the client. Windows will usually put the shared (private) interface on 192.168.137.1 and hand out 192.168.137.x addresses, so the client should use DHCP. (learn.microsoft.com)

Quick Windows checklist (host + client)

  1. On the host open Network Connections (run ncpa.cpl).
  2. Right-click the Internet adapter → Properties → Sharing tab → check “Allow other network users to connect through this computer’s Internet connection” and select the local adapter. Clients left set to DHCP will get addresses automatically. (learn.microsoft.com)

Basic diagnostics (run on client/host)

ipconfig /all
ping 192.168.137.1
ping 8.8.8.8

If the client has a 169.254.x.x address it didn’t get a DHCP lease — check cabling, NIC state and that the host’s ICS service is running. (learn.microsoft.com)

Hardware/cabling and common pitfalls

  • You don’t normally need a crossover cable on modern NICs — auto-MDIX is standard so a regular patch cable will work. Older gear may still require crossover. (cisco.com)
  • Beware of IP-range conflicts: if the upstream network already uses 192.168.137.x you’ll get trouble — either use the router/switch approach or change the ICS scope via registry only if you understand the risks. Also check host firewall/ICS service if sharing fails. (learn.microsoft.com)

This complements ’s ICS concept and ’s “pick one machine as server” tip by showing the practical steps, the safer router/switch alternative, and quick troubleshooting commands.

Recommended Answers

All 2 Replies

When you say "internet sharing" if you mean Windows ICS (Internet Connection Sharing), you basically have two computers, one that has two network interface cards. One card (NIC1) connected to the LAN and the other (NIC2) to be connected to the other computer. In this configuration, on your main computer, you enable Internet Connection Sharing. The cable you use between both computers is a cross-over cable. Computer 2 then configured for networking using its NIC has no special configuration. It receives an IP address and the rest of its TCP/IP config from Computer 1. For you to be able to access the internet from Computer 2, Computer 1 must be powered on and ICS services must be running.

Alternatively, rather than setting up this configuration, why not have a hub or a switch connected to your Internet router, and just plug in computer 1 and computer 2 into the switch ports so that each computer has its own connection to the local area network. ICS would not be required in this case and each computer operates independently.

get the two computers connected through p2p. Chose among the two machines you will want to use as a server for internet. Install a modem on it, Then allow it to share internet with the other machinę.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.