Once you create an internetwork by connecting your WANs and LANs to a router, you'll need to configure logical network addresses, such as IP addresses, to all hosts on the internetwork so that they can communicate across that internetwork.
The Term routing is used for taking a packet from one device and sending it through the network to another device on a different network. Routers don't really care about hosts-they only care about networs and the best path to each network. The logical network address of the destination host is used to get packets to a network through a routed network, and then the hardware address of the host is used to deliver the packet from a router to the correct destination host.
If the network has no routers, then it should be apparent that you are not routing. Routers route traffic to all the networks in your internetwork. To be able to route packets, a router must know, at a minimum, the followings:
- Destination Address
- Neighbor routers from which it can learn about remote networks
- Possible routes to all remote networks
- The best route to each remote network
- How to main and verify routing information
The router learns about remote networks from neighbor routers or from an administrator. The router then builds a routing table (a map of the internetwork) that describes how to find the remote networks. If a network is directly connected, then the router already knows how to get it.
If a network isn't directly connected to the router, the router must use one of two ways to learn how to get to the remote network: Static Routing, meaning that someone must hand-type all network locations into the routing table, or something called Dynamic routing.
In dynamic routing, a protocol on one router communicates with the same protocol running on neighbor routers. The routers then update each other about all the networks they know about and place this information into the routing table. If a change occurs in the network, the dynamic routing protocols automatically inform all routers about the event. If static routing is used, the administrator is reponsible for updating all changes by hand into all routers. Typically, in a large network, a combination of both dynamic and static routing is used.
Before we jump into the IP routing process, let's take a look at a simple example that demonstrates how a router used the routing table to route packets out of an interface. We'll be going into a more tetailed study of the process in the next section.
Figure shows a simple two-router network. Lab_A has one serial interface and three LAN interfaces.
Looking at Figure, can you see hich interface Lab_A will use to forward an IP datagram to a host with an IP address of 10.10.10.10?
By using the command show ip route, we can see the routing table (map of the internetwork) that Lab_A uses to make forwarding decisions:
The C in the routing table output means that the network listed are "Directly connected," and until we add a routing protocol--something like RIP, EIGRP, etc.--to the routers in our internetwork (or use static routes), we'll have only directly connected networks in our routing table.
So let's get back to the original question: By looking at the figure and the output of the routing table, can you tell what IP will do with a received packet that has a destination IP address of 10.10.10.10? The router will packet-switch the packet to interface FastEthernet 0/0, and this interface will frame the packet and then send it out on the network segment.
Because we can, let's do another example: Based on the output of the next routing table, which interface will a packet with a destination address of 10.10.10.14 be forwarded from?
First, you can see that the network is subnetted and each interface has a different mask. And I have to tell you--you just can't answer this question if you can't subnet! 10.10.10.14 would be a host in the network 10.10.10.8/29 subnet connected to the FastEthernet0/1 interface.



No comments:
Post a Comment