i have one more question. how to make a connection using lan between two pc? they use a same ip address?

Recommended Answers

All 8 Replies

You can't have two PCs on the same LAN with the same IP address. What kind of connection are you trying to make?

1 )conect both with lan wire
2) open tcp /ip in lan addapter seeting

ip address for pc 1
192.168.1.1
255.255.255.0
192.168.1.2

ip address for pc 2
192.168.1.2
255.255.255.0
192.168.1.1

use same numbers

its ready now

@urtrivedi - I am assuming that because you are using private IP addreses that

  1. both PCs are on the same LAN
  2. both PCs are behind a router

In that case, the address of the gateway (I'm also assuming the third address in each group is the gateway) should be the address of the router. Many routers reserve 192.168.1.1 for themselves. In that case the addresses should be more like

PC1          192.168.1.2
SUBNET MASK  255.255.255.0
GATEWAY      192.168.1.1 (router)

PC2          192.168.1.3
SUBNET MASK  255.255.255.0
GATEWAY      192.168.1.1 (router)

im trying to make a chat messenger between two pc. you say hi, and the other pc receive it and reply it back to you. but i dont know what connection they have to make a connection. i studied, i googled, but i dont understand enough. i hope someone can clear me out about this. thankyou very much :)

Messagner is another issue. and networking is different.
What I suggested is to connect 2 pc directly to each other only with simple lan cable.
Now you have to write your messager program.

Then you have to run messanger in both pc and send/receive messages.

i already do the messenger. but the other pc cannot receive the msg that i send because i think i made a wrong connection.

there are several things to consider.

Are you using one cable or going through a switch?
If it's one cable a regular ethernet cable won't work, it has to be a crossover. On the other hand a switch will handle the crossover so 2 ethernet cables will work.

Is your firewall(s) configure to allow the connection?

Also what is assigning your IP addresses? Are they configured properly in the software on each machine?

There may be other things I can't think of right now but this should be a good start.

If you can't ping the other IP address, you'll never get it to work...

  1. Turn off any firewalls on both computers
  2. Assign/Configure their IP addresses (DHCP, Static, Static DHCP, or Automatic Private IP Addressing)
  3. Ping each computer from the other, using the IP's you posted above - on computer #1 (with IPA = 192.168.1.1) your command would be ping 192.168.1.2; on computer #2 the command would be ping 192.168.1.1

If ping doesn't get a reply, then your "network" is not working.

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.