Friday, December 11, 2009

router

A router is a device that sends packets from one network to another network. The routing table typically contains the address of all known networks and routing information about that network such as:
  • Interface
  • Routing Path
  • Next Hop
  • Route Metric (Cost, # hops)
  • Route Timeout

Routers build and maintain their routing database by periodically sharing information with other routers. The exact format of these exchanges is based on the routing protocol. The routing protocol determines:
  • The information contained in the routing table
  • How messages are routed from one network to another
  • How topology changes (i.e. updates to the routing table) are communicated between routers

Regardless of the method used, changes in routing information take some time to be propagated to all routers on the network. The term convergence is used to describe the condition when all routers have the same (or correct) routing information.

Message Routing process:
  • The sender uses its own IP for the source Network layer address, and the IP of the final receiving device as the destination Network layer address.

  • The sender creates a frame by adding its own MAC address as the source Physical layer address. For the destination Physical layer address, it uses the MAC address of the default gateway router.

  • The next hop router reads the destination MAC address in the frame. Because the frame is addressed to that router, it processes the frame.

  • The router strips off the frame header and examines the packet destination address. It uses a routing protocol to identify the next hop router in the path.
    The router repackages the packet into a new frame. It uses its own MAC address as the source Physical address, the MAC address of the next hop router for the destination Physical address.

  • The last router in the path receives the frame and because the destination device is on a directly connected network, the router creates a frame using its own MAC address as the source address, and the MAC address of the destination device as the destination physical address.

  • The destination device receives the frame. Inside the packet it finds the destination address matching its own IP address, with the source IP address being that of the original sending device.

Be aware of the following:
  • On an Ethernet network, the Data Link layer address is the MAC address. On an IP network, the Network layer address is the IP address.

  • Both Data Link physical addresses and Network logical addresses are used to send packets between hosts.

  • The Data Link address identifies the physical interface. The Network address contains both a logical network address and a logical device address.

  • IP (Network layer) addresses are contained in the IP header; MAC (Data Link) addresses are contained in the Ethernet frame header.

  • Both the source and destination Network and Data Link addresses are typically contained in the packet.

  • Data Link addresses in the packet change as the packet is delivered from hop to hop. At any point in the process, the Data Link destination address indicates the physical address of the next hop on the route. The Data Link source address is the physical address of the device sending the frame.

  • Network addresses remain constant as the packet is delivered from hop to hop. The Network addresses indicate the logical address of the original sending device and the address of the final destination device.

  • A router uses the logical network address specified at the Network layer to forward messages to the appropriate network segment.

No comments:

Post a Comment