Layer 2 refers to the OSI reference model.
The OSI (Open System Interconnect) reference model specifies 7 layers:
1. Physical: lowest layer. Deals with physical characteristics such as representation of the data pattern on the wire, etc.
2. Data link: deals with the representation of frames on the wire, in contrast with the physical layer that deals with bits and bytes. Also specifies how data is moved with a single network (single LAN - single subnet in IP terms). DLPI belongs to this layer as do most networking drivers.
3. Network layer: deals with routing of packets between networks (between subnets in IP terms). IP belongs to this layer.
4. Transport layer: deals with connection and connectionless modes of transport (TCP and UDP).
5. Session layer. Deals with management of sessions. No direct TCP/IP equivalent.
6. Presentation layer: deals with encryption of data, and network/host independent data representation formats.
7. Application layer: FTP, telnet, etc.
This description is admittedly brief but you should be able to find a lot of detail on the Internet.
A layer 2 switch (also called bridge) deals with passing frames from one part of a single LAN to another. There is no routing functionality.
Re. managed v. unmanaged: I'm not sure. My guess is a managed switch is one that has management capability, i.e., you can login to the switch and change configuration. An unmanaged switch does not have any configuration capability.
An example of an unmanaged layer 2 switch by this definition would be the hp ProCurve J4097B.
Hope this helps.
Thanks.
Ajit
HP Gigabit Ethernet