Re: [Hampshire] Help with managing printserver unit?

Top Page
Author: Andy Smith
Date:  
To: hampshire
Subject: Re: [Hampshire] Help with managing printserver unit?

Reply to this message
gpg: failed to create temporary file '/var/lib/lurker/.#lk0x584ca100.hantslug.org.uk.25009': Permission denied
gpg: keyblock resource '/var/lib/lurker/pubring.gpg': Permission denied
gpg: Signature made Wed Jan 30 12:03:52 2008 GMT
gpg: using DSA key 2099B64CBF15490B
gpg: Can't check signature: No public key
Hi Alan,

On Wed, Jan 30, 2008 at 11:19:54AM +0000, alan c wrote:
> In the office network, which has a router, one switch and several PCs
> from the switch, is the router the only device which (probably?) knows
> the IP addresses of all the PCs?


It depends what you mean by "know".. in TCP/IP devices usually talk
to each other by IP address, so they need to know that already (they
may turn a name into an IP using DNS or hosts files etc.). But at
the layer below that the network is using ARP to match MAC addresses
with IP addresses.

Whenever a device wants to talk to another by IP, if it doesn't
already have the MAC address in its ARP table then it will broadcast
for it. In this way it could be said that every device on the
network knows the ARP<->MAC mappings for any addresses it has been
communicating with.

> How does a switch know that one of its connections is from a router,
> and the other connections are from PCs, which it presumably has to know?


Typically it doesn't. Why would it have to?

The switch as a layer 2 device (below TCP/IP) knows which MAC
addresses exist on which ports. When one device on an Ethernet
network wants to talk to another, it constructs a frame with the
destination MAC address in it. The switch reads this MAC and sends
the frame out of the correct switch port. It does not need to know
what type of device the MAC address actually refers to.

You may be thinking that it is the switch which determines whether
traffic stays inside a LAN or goes out of an uplink to a router, but
this is not so. The routing table in a device's IP stack is the
means by which the device knows which network interface to send the
packet out of, but its destination MAC will either be the real
target (if it's destined for an IP on the same network) or else it
will be the MAC of the correct gateway device (e.g., your router
that is your default gateway). Generally then, the switch's only
role is to direct the frame to the correct switch port based on the
destination MAC.

Cheers,
Andy

--
http://bitfolk.com/ -- No-nonsense VPS hosting
Encrypted mail welcome - keyid 0x604DE5DB

My words are my own and do not represent Jacqui Caren.