Monday, March 2, 2009
Address Resolution Protocol & Reverse Address Resolution Protocol
Address Resolution Protocol (ARP) is a protocol for mapping an Internet Protocol address (IP address) to a physical machine address that is recognized in the local network. For example, in IP Version 4, the most common level of IP in use today, an address is 32 bits long. In an Ethernet local area network, however, addresses for attached devices are 48 bits long. (The physical machine address is also known as a Media Access Control or MAC address.) A table, usually called the ARP cache, is used to maintain a correlation between each MAC address and its corresponding IP address. ARP provides the protocol rules for making this correlation and providing address conversion in both directions.
How ARP Works?
When an incoming packet destined for a host machine on a particular local area network arrives at a gateway, the gateway asks the ARP program to find a physical host or MAC address that matches the IP address. The ARP program looks in the ARP cache and, if it finds the address, provides it so that the packet can be converted to the right packet length and format and sent to the machine. If no entry is found for the IP address, ARP broadcasts a request packet in a special format to all the machines on the LAN to see if one machine knows that it has that IP address associated with it. A machine that recognizes the IP address as its own returns a reply so indicating. ARP updates the ARP cache for future reference and then sends the packet to the MAC address that replied.
Reverse Address Resolution Protocol
Reverse Address Resolution Protocol (RARP) is a protocol by which a physical machine in a local area network can request to learn its IP address from a gateway server's Address Resolution Protocol (ARP) table or cache. A network administrator creates a table in a local area network's gateway router that maps the physical machine (or Media Access Control - MAC address) addresses to corresponding Internet Protocol addresses. When a new machine is set up, its RARP client program requests from the RARP server on the router to be sent its IP address. Assuming that an entry has been set up in the router table, the RARP server will return the IP address to the machine which can store it for future use. RARP is available for Ethernet, Fiber Distributed-Data Interface, and Token Ring LANs.
Collision domain and broadcast domain
Collision domain is an Ethernet term used to describe a network collection of devices in which one particular device sends a packet on a network segment, forcing other network device on that same segment to pay attention to it.
Broadcast domain
On a broadcast domain, a set of all devices on a network segment hear all broadcasts sent on that segment.
Sunday, March 1, 2009
Hub, Switch, Bridge & Router
A network hub or repeater hub is a device for connecting multiple twisted pair or fiber optic Ethernet devices together and thus making them act as a single network segment. Hubs work at the physical layer (layer 1) of the OSI model. The device is thus a form of multiport repeater. Repeater hubs also participate in collision detection, forwarding a jam signal to all ports if it detects a collision.
Switch
Switches are really just multiple port bridges with more intelligence. A switch is to make a LAN work better, to optimize its performance and providing more bandwidth for the LAN’s users. Switches use in a network are to reduce collisions within broadcast domains and to increase the number of collision domains in the network. Doing this provides more bandwidth for users. Switches only “switch” frames from one port to another within the switched network.
Bridge
Bridges and switches basically do the same thing such break up collision domains on a LAN. Now, we cannot buy a physical bridge these days, only LAN switches, but they use bridging technologies. A bridge works at the data-link level of a network.
Router
A router is a networking device whose software and hardware are usually tailored to the tasks of routing and forwarding information. For example, on the Internet, information is directed to various paths by routers. Routers connect two or more logical subnets, which do not necessarily map one-to-one to the physical interfaces of the router. The term "layer 3 switches" often is used interchangeably with router. Router will not only break up broadcast domains for every LAN interface, it will break up collision domains as well.
Difference between hub, switch, bridge, router
Hubs create one collision domain and one broadcast domain. Bridges break up collision domains but create one large broadcast domain. They use hardware addresses to filter the network. Switches are really just multiple port bridges with more intelligence. They break up collision domains but create one large broadcast domain by default. Switches use hardware addresses to filter the network. Routers break up broadcast domains (and collision domains) and use logical addressing to filter the network.