1) Application Layer: Some of the functions at this layer and the associated protocols/services
file transfer – ftp, nfs
email – smtp
name management – dns
network mgmt – snmp
remote login – rlogin, telnet
Presentation Layer: This layer presents a uniform data format by handling differences in formats of application layer
Session Layer : Creates, maintains and terminates connections
Transport Layer: controls the reliability of a given link through sequencing(flow control), segmentation/desegmentation, and error control. Note that TCP and UDP operate at this layer
Network Layer: Performs network routing functions. Note that Routers act in this layers
Datalink Layer: It is subdivided to two. The Logical Link Layer (LLC) multiplexes protocols and optionally provides error and flow control. The Media Access Control (MAC) layer determines who is allowed to access the media at a given time (using protocols like CSMA/CD). Ethernet is an example of datalink layer protocol. Devices like Switches and bridges act in this layer.
Physical Layer: At this layer, data is viewed only as sequence of bits (no higher level view in terms of frames or packet). Hub is an example of a device that acts in this layer
Need for Layering
The communication between two computer systems is layered. This is similar to layering in operating systems. Layering is important because it allows changes in one part to be made possible without affecting others. In short, it reduces the tight coupling.
The OSI model defines 7 layers ( http://en.wikipedia.org/wiki/OSI_model )
namely Application,Presentation,Session,Transport, Network,Data link, Physical
As a example , consider the problem of requesting a web-page using a browser. The application layer uses the HTTP protocol to send request. The presentation layer translates the request in terms of networking functions – (things like encrption/decryption takes place here). The session layer maintains and terminates the link between two computers.Transport layer [implemented as tcp or udp] takes care of segmenting and sequencing, error checking and correction. network (adds source and destination ip address) Routing takes place in Network layer. Datalink layer adds source MAC and destination MAC addresses and hands over to physical layer which actually transports the data (in form of electrical/optical signals).
Devices like hub acts in the physical layer, bridges/switches in the datalink layer, router in the network layer. In bridges, the routing table is maintained by software whereas in switches , the table is maintained in hardware. For more details about hubs, switches, bridges and routers
IP address vs MAC address
MAC addresses are 6 byte addresses. They are associated with the hardware (typically the Network interface card). IP addresses are assigned by the network administrator for logically grouping the hosts that communicate. ARP(address resolution protocol) resolves logical address-> mac address