Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a simple question which involves understanding of the purpose of a router.

I've got a small business which consists of several PCs and a router which are all connected to the same 24-port swtich. Occasionally, all PCs on my LAN get disconnected; they can't reach each other or any servers. Power cycling the switch usually fixes.

What I was wondering is whether this problem could be caused by the router which is also our DHCP server. If PC-A pings or connects to Server-A, does router have anything to do with this connection? I assumed since PC-A and Server-A are on the same physical network and same switch, the packets get routed by the switch, but not the router. Is this correct? Can I assume in this case that the fault lies either within cabling, switch or the computers?

share|improve this question

4 Answers 4

up vote 2 down vote accepted

You are correct that the switch is not "routing the packets". "Packet" is a term generally used to refer to layer 3 of the OSI 7 layer network model. The switch will presumably "switch" traffic at layer 2, using MAC addresses. The router should only come into the equation for traffic leaving your local network, i.e., out towards the Internet. Routing at layer 3 is between logical networks (typically IP networks) but at layer 2, the local network, we are simply switching.

If a reboot of the switch fixes your problem then you are likely having a layer 1 (physical layer) or layer 2 (data link layer) problem.

I would change some cables, change the switch, move devices around in wall ports and switch ports, and run some packets captures to try and narrow down the source of the issue.

share|improve this answer

You are correct in your assumptions. There is a slim chance that cables or computers are to blame, but even if that is the case, you probably need to get a decent switch.

share|improve this answer
    
The funny thing is that only some PCs can't connect to Server-A while the rest can establish new connection fine. Someone told me that the router could cause this, but I thought that the switch routes the packets within the same network rather than the router... –  Ciguli Aug 9 '12 at 14:41
    
You can try disconnecting the router next time it happens if you want to make sure. –  dusan.bajic Aug 9 '12 at 15:07

I'm assuming your setup is like this:

                                |------Server  
__________   ________     ______|
|Internet|---|Router|----|Switch|  
__________   ________     ______|
                                |-----------Clients

A router routes packets to different IP subnets. It's a layer 3 device.

If you have everything on the same layer 2 Ethernet switch, then there's no routing necessary, which means that the traffic will never reach the router. The only time traffic will hit the router is if it needs to be routed, i.e. leave your L2 switch.

share|improve this answer
    
It's exactly like that. So I guess I can leave the router out of the equation then... –  Ciguli Aug 9 '12 at 14:46

There's one (admittedly rare) way in which the router could be the fault...when a network node needs to reach another local node, there's a process called ARP (Address Resolution Protocol) where the Ethernet (or MAC) address is determined from the IP address. This is done via a broadcast - the requesting node sends a broadcast asking "who owns this IP?" The server with that IP then responds - with its source MAC address in the response - and the client then sends the packet to that MAC address.

It's possible that the router, or another node on your network, is responding to ARP requests for IPs that it doesn't own. You can detect this by running "arp" at the command line, which will show you these cached entries. If you can't reach a server and you see an ARP entry for its IP on the client, check that machine's settings and make sure the MAC address you see is correct for that host.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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