# 2 computers cannot ping each other using switch



## Acronymm (Mar 30, 2014)

Hello,

I need some networking help here. Currently I have 2 x windows XP PC, both connected via a dlink ethernet switch. I've set up the IP address but however when I tried to ping from 1 computer to another, it keeps showing "Request time out". 

I've read certain websites saying that to do so, it is recommended to use a router instead of a switch. Is that true?

Hope someone will help me out here!

Thanks


----------



## GentleArrow (Aug 10, 2015)

It is incorrect you need a router vs a switch in your situation.
What ip addresses did you assign?
Have you configure the software firewalls to trust the other pc via name or ip address?


----------



## Acronymm (Mar 30, 2014)

Means a router is recommended instead? There is no way that I can use a switch at all?

I've set it at 192.1.1.1 and 192.1.1.2 & disabled the firewalls for both pc.


----------



## alpenadiver (Jul 31, 2007)

You will need a router if you are trying to connect the computers to the internet, if you are just connecting the computers in a peer to peer network then a switch will work.

What do the lights on the switch look like, and what is the model of the switch.

Make sure that you are using Straight through ethernet cables, and not crossover cables. Post a IP Config of the computer, open a commmand prompt, type *ipconfig /all* post the output here.


----------



## Acronymm (Mar 30, 2014)

I'm trying to connect both the computers directly to each other via a switch only. I've tried using another ethernet cable to connect it from it's CPU network port to port directly and I'm able to ping each other so I supposed the network card is working fine. 

Once I've plugged it to the switch, both the CPU and the switches lighted up with a green light at the port. Model of the switch is D-Link DES 1024D. 
I'll post the IP config up as soon as I get it up. 

Thank you for your reply again!


----------



## alpenadiver (Jul 31, 2007)

If you are able to ping from computer to computer without the switch, then you have a crossover cable. You will need to use 2 Ethernet cables of the same type, I prefer to use Straight thru Ethernet when using switches.


----------



## xiro911 (Jul 14, 2010)

check the ip, firewall, cable also check the switch if it is OK ")


----------



## Acronymm (Mar 30, 2014)

alpenadiver said:


> You will need a router if you are trying to connect the computers to the internet, if you are just connecting the computers in a peer to peer network then a switch will work.
> 
> What do the lights on the switch look like, and what is the model of the switch.
> 
> Make sure that you are using Straight through ethernet cables, and not crossover cables. Post a IP Config of the computer, open a commmand prompt, type *ipconfig /all* post the output here.


Anyway, here are two of the IPconfigs for both the comps. I'm using a straight through when i connect it via the switch so I don't think that is the issue.


----------



## Stancestans (Apr 26, 2009)

> Auto-Sensing 10/100 Ports
> The DES-1024D use auto-sensing 10/100 Mbps ports, allowing a small workgroup to flexibly connect to 10 or 100 Mbps devices to create an integrated network. Each port automatically adjusts for straight-through or crossover cables to make the right link.
> 
> *Source:* DES-1024D 24-Port Fast Ethernet Unmanaged Desktop Switch | D-Link UK


According to your switch's product page (see quote above), you should be okay whether using crossover or straight-through cables, assuming the switch is indeed working as it should. You may have a malfunctioning switch because you've set static IP addresses on both private NICs and can ping each host when connecting directly through crossover, but the same static configuration doesn't work when connecting through the switch.



> Once I've plugged it to the switch, both the CPU and the switches lighted up with a green light at the port


How many switches are you using, or was that a typo? When you connect the private NIC on any of the two computers to the switch, only the green led on the network adapters light up?


----------



## Sivtec00 (Aug 22, 2015)

I had this problem once. I would turn off all of the default Windows Firewalls and see if you can do it then.


----------



## MitchConner (May 8, 2015)

Check the arp table on both workstations from a command prompt:

arp -a

You should see each IP to MAC binding for your respective PC's.


----------



## Acronymm (Mar 30, 2014)

@Stancestans Mmm is there another way that I can test if my switch is working fine? Sorry it was a typo, I'm only using one switch. The LEDs lighted up on both ends, the one at the network port, and at the switch end. 

@Sivtec00 Tried this method but it didn't work.

@MitchConner Ran the arp -a. How will that info help? I need to set the IPv4 IP add to what i see according to the command prompt?


----------



## Stancestans (Apr 26, 2009)

Acronymm said:


> @Stancestans Mmm is there another way that I can test if my switch is working fine? Sorry it was a typo, I'm only using one switch. The LEDs lighted up on both ends, the one at the network port, and at the switch end.


I'm asking about the LEDs on the network adapters connected to the switch. There's two of them, green (rx) and amber/orange/red (tx). Both should light up when connected to the switch or directly to each other (using crossover). If the green LED is the only one that lights up, then the link is not proper most probably because of bad cabling or defective switch (port). Have you tried different ports on the switch?

You could test the switch by connecting a router (with DHCP enabled) to it and then setting the network adapters to automatically acquire addresses from the router. If both computers communicate with the router via the switch (log into the router from either computer), then the switch is working as it should. Of course you'll need a router for this. Can't think of any other test for the switch that doesn't involve a router.


----------



## Acronymm (Mar 30, 2014)

Stancestans said:


> I'm asking about the LEDs on the network adapters connected to the switch. There's two of them, green (rx) and amber/orange/red (tx). Both should light up when connected to the switch or directly to each other (using crossover). If the green LED is the only one that lights up, then the link is not proper most probably because of bad cabling or defective switch (port). Have you tried different ports on the switch?
> 
> You could test the switch by connecting a router (with DHCP enabled) to it and then setting the network adapters to automatically acquire addresses from the router. If both computers communicate with the router via the switch (log into the router from either computer), then the switch is working as it should. Of course you'll need a router for this. Can't think of any other test for the switch that doesn't involve a router.


Ahhh right. Only the green one was lighted up when I connect it to the switch, tried multi ports on the switch too but still the same result. 

I try the it with the router then update you again! Thanks for your help so far.


----------



## MitchConner (May 8, 2015)

Because they communicate using mac addresses, and if you can't see the mac address of the other PC then you aren't going to be able to ping it.


----------



## Acronymm (Mar 30, 2014)

I tried using another switch, both the LEDs are lighted up, indicating that i could tx and rx, but I still couldn't ping to each other.


----------



## Stancestans (Apr 26, 2009)

Acronymm said:


> I tried using another switch, both the LEDs are lighted up, indicating that i could tx and rx, but I still couldn't ping to each other.


Let's see the output of *arp -a*

Open *CMD* and run

*arp -a >0 & notepad 0
*
Copy and paste in your next reply; the contents of the notepad window that opens.


----------



## Acronymm (Mar 30, 2014)

(PC 1) 
Interface: 192.168.1.163 --- 0x2
Internet Address Physical Address Type
192.168.1.1 10-0d-7f-7b-77-a4 dynamic 

(PC 2)
No ARP Entries Found


----------



## MitchConner (May 8, 2015)

Are your PC's in the same VLAN?

You can also try adding a static arp entry on each machine from a command prompt:

arp -s x.x.x.x xx-xx-xx-xx-xx


----------



## Acronymm (Mar 30, 2014)

My current configuration is shown below.


----------



## MitchConner (May 8, 2015)

That diagram doesn't show whether your PC's are in the same vlan. Did you try adding the static arp entry?


----------

