IP is the protocol that works at Internet layer. It forwards the packets based on the network address (IP address) in the packets and the routing tables.
The four layers of DoD model from Top to Bottom are:
1. Process Layer: Responsible for implementation of user-level applications such as mail delivery, file transfer, and remote login.
2. Host-to-Host Layer: Responsible for flow control,and re transmission of lost packets. TCP, and UDP protocols work at this layer.
3. Internet Layer: Responsible for routing data across a network of networks. Routed protocols such as IP work at this layer. Routing protocols are also associated with this layer.
4. Network Access Layer: Responsible for the delivery of data segments over a given particular hardware media. Different protocols such as CSMA/CD work at this layer.
More Information :
Repeaters work at Physical layer (Layer 1),
Simple Switches work at layer 2 of OSI model, which is Data Link Layer. A switch looks at the destination MAC address before forwarding the frame.
Routers work at Network Layer (Layer 3) of OSI Reference Model.
Application layer is responsible for ensuring the availability of intended communication partner. This layer is also responsible for synchronizing sending and receiving applications.
Presentation Layer is responsible for negotiating data transfer syntax.
Session layer is responsible for co-ordinating communication between systems
Transport layer is responsible for multiplexing upper-layer applications. It is also responsible for establishment and tear down of virtual circuits.
ARP (Address Resolution Protocol): IP works at network layer. IP address is a logical address. If a packet is to be delivered to a destination machine, its physical address (MAC address) needs to be known. ARP is a protocol, which enables a machine to obtain its MAC address from a known IP address.
RARP (Reverse Address Resolution Protocol): RARP is used to obtain IP address from a known MAC address.
BooTP (Bootstrap Protocol): When a diskless workstation is powered on, it broadcasts a BootP request on the network. A BooTP server responds with its IP address, Default gateway, etc.