They check the number of hops a packet passes to reach the the destination. The router then uses the route with least number of Hops.
the distance vector metric
RIP (Routing Information Protocol) uses hop count as the metric. It measures the distance to a destination network based on the number of routers (hops) that a packet has to traverse to reach the destination.
The first router in the path to the destination network. The next hop router is the first (or next) router in the path to the destination network. Each router looks at the destination network in the packet, then consults the routing table to identify the next hop router to the destination network. The hop count identifies the numbers of routers in the path to the destination network. A default gateway router is a router that is used for packets used to external networks. Most routers do not have a default gateway setting, but instead use a default route setting which identifies the next hop router for all unknown networks.
It depends on the routing protocol in use, for example RIP uses the hop-count to determine the best route where less hops is better, OSPF uses cost, EIGRP uses a composite metric (BW + Delay + Reliability + Load) etc.
Routers don't use MAC addresses for routing. They use IP address.
sharing network information between routers
In a datagram network, the destination addresses are unique. They cannot be duplicated in the routing table.
The routers in the network are operating with consistent routing knowledge.
routers use routing protocols to exchange routing information. check out the link below for lots of information on routing protocols.
routers work at layer 3 (network) which usually means TCP/IP. Routing decisions are made based on a packets DESTINATION IP address.
Routing refers to the process of moving packets of information across a network. Static and dynamic routing are the two types of routing algorithms used for this transfer of information.The term routing encapsulates two tasks. These tasks are deciding the paths for data transferred and sending the packets on these paths. The routing is a process that is a function carried out at layer 3 of the OSI reference model. The routing algorithm decides the output line to transfer the incoming packets. The routing algorithms are based on the routing protocol that uses metrics to assess whether a particular path is the optimal path available for transfer of the data packets. The metrics used for evaluating the paths are bandwidth, delay and reliability. The routing algorithms use these protocols to determine an optimal path from the source to the destination. The routing tables maintain all the information related to routing. There are various routing algorithms and depending on these routing algorithms, the information stored in the routing table varies. Every router has its own routing table and it fills this table with the required information to calculate the optimal path between the source router and the destination router. To understand the basic points of static vs dynamic routing, let us get to know what are routing tables.Routing tableA routing table is a document stored in the router or a network computer. The routing table is stored in the form of a database or is simply a file stored in the router. The data entered in the routing table is referred to when the best possible path to transfer information across two computers in a network is to be determined. The two classifications, viz., static and dynamic routing, are based on the way in which the routing tables are updated every time they are used. The routers in which the data is stored and updated manually are called static routers. On the other hand, the routers in which the information is changed dynamically, by the router itself, are referred to as dynamic routers. Let us compare the two types of routing algorithms based on the static and dynamic routing algorithm used, in the static vs. dynamic routing section given below.Static Vs. Dynamic RoutingStatic routing manually sets up the optimal paths between the source and the destination computers. On the other hand, the dynamic routing uses dynamic protocols to update the routing table and to find the optimal path between the source and the destination computers.The routers that use the static routing algorithm do not have any controlling mechanism if any faults in the routing paths. These routers do not sense the faulty computers encountered while finding the path between two computers or routers in a network. The dynamic routing algorithms are used in the dynamic routers and these routers can sense a faulty router in the network. Also, the dynamic router eliminates the faulty router and finds out another possible optimal path from the source to the destination. If any router is down or faulty due to certain reasons, this fault is circulated in the entire network. Due to this quality of the dynamic routers, they are also called adaptive routers.The static routing is suitable for very small networks and they cannot be used in large networks. As against this, dynamic routing is used for larger networks. The manual routing has no specific routing algorithm. The dynamic routers are based on various routing algorithms like OSPF (Open Shortest Path First), IGRP (Interior Gateway Routing Protocol) and RIP (Routing Information Protocol).The static routing is the simplest way of routing the data packets from a source to a destination in a network. The dynamic routing uses complex algorithms for routing the data packets.The static routing has the advantage that it requires minimal memory. Dynamic router, however, have quite a few memory overheads, depending on the routing algorithms used.The network administrator finds out the optimal path and makes the changes in the routing table in the case of static routing. In the dynamic routing algorithm, the algorithm and the protocol is responsible for routing the packets and making the changes accordingly in the routing table.Nowadays, the static routing is seldom used. With the technological advancements, the dynamic routing is used to route the packets in the network, efficiently. Thus, the above algorithm explains routing, routing tables and static vs dynamic routing.
link-state routing protocol