Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
CCNA Exploration 5.docx
Скачиваний:
18
Добавлен:
24.11.2018
Размер:
141.3 Кб
Скачать

5.3.4 A Route - The Path to a Network Page 1:

A route for packets for remote destinations is added using the default gateway address as the next hop. Although it is not usually done, a host can also have routes manually added through configurations.

Like end devices, routers also add routes for the connected networks to their routing table. When a router interface is configured with an IP address and subnet mask, the interface becomes part of that network. The routing table now includes that network as a directly connected network. All other routes, however, must be configured or acquired via a routing protocol. To forward a packet the router must know where to send it. This information is available as routes in a routing table.

The routing table stores information about connected and remote networks. Connected networks are directly attached to one of the router interfaces. These interfaces are the gateways for the hosts on different local networks. Remote networks are networks that are not directly connected to the router. Routes to these networks can be manually configured on the router by the network administrator or learned automatically using dynamic routing protocols.

Routes in a routing table have three main features:

  • Destination network

  • Next-hop

  • Metric

The router matches the destination address in the packet header with the destination network of a route in the routing table and forwards the packet to the next-hop router specified by that route. If there are two or more possible routes to the same destination, the metric is used to decide which route appears on the routing table.

As shown in the figure, the routing table in a Cisco router can be examined with the show ip route command.

Note: The routing process and the role of metrics are the subject of a later course and will be covered in detail there.

As you know, packets cannot be forwarded by the router without a route. If a route representing the destination network is not on the routing table, the packet will be dropped (that is, not forwarded). The matching route could be either a connected route or a route to a remote network. The router may also use a default route to forward the packet. The default route is used when the destination network is not represented by any other route in the routing table.

5.3.4 - A Route - The Path to a Network The diagram depicts confirmation of the gateway and route using the Cisco I O S show i p route command.  Network Topology:  Same as 5.3.3 diagram 3.  The following is the partial routing table output of the show i p route command for local router R1:  10.0.0.0/24 is subnetted, 2 subnets  R 10.1.1.0 [120/1] via 192.168.2.2, 00:00:08, FastEthernet0/0  R 10.1.2.0 [120/1] via 192.168.2.2, 00:00:08, FastEthernet0/0  C 192.168.2.0/24 is directly connected, FastEthernet0/0  The next hop for networks 10.1.1.0/24 and 10.1.2.0/24 from local router R2 is 192.168.2.2. 

Page 2:

Host Routing Table

A host creates the routes used to forward the packets it originates. These routes are derived from the connected network and the configuration of the default gateway.

Hosts automatically add all connected networks to the routes. These routes for the local networks allow packets to be delivered to hosts that are connected to these networks.

Hosts also require a local routing table to ensure that Network layer packets are directed to the correct destination network. Unlike the routing table in a router, which contains both local and remote routes, the local table of the host typically contains its direct connection or connections to the network and its own default route to the gateway. Configuring the default gateway address on the host creates the local default route.

As shown in the figure, the routing table of a computer host can be examined at the command line by issuing the netstat -r, route, or route PRINT commands.

In some circumstances, you may want to indicate more specific routes from a host. You can use the following options for the route command to modify the routing table contents:

route ADD  route DELETE  route CHANGE

Links:

RFC 823 http://www.ietf.org/rfc/rfc0823.txt

5.3.4 - A Route - The Path to a Network The diagram depicts a routing table on end device PC1 after the netstat -r command is issued.  Network Topology:  Host PC1 with IP address 192.168.1.2 is connected to switch S1, which is connected to the router R1 default gateway 192.168.1.254.  Output from the netstat -r command:  Interface List  0x2 ...00 0f fe 26 f7 7b ... Gigabit Ethernet - Packet Scheduler Miniport  Active Routes:  Network Destination: 0.0.0.0  Netmask: 0.0.0.0  Gateway: 192.168.1.254  Interface: 192.168.1.2  Metric: 20  Network Destination: 192.168.1.0  Netmask: 255.255.255.0  Gateway: 192.168.1.2  Interface: 192.168.1.2  Metric: 20  Default Gateway: 192.168.1.254  Output omitted.  Note that the output shows a route to its own local network (192.168.1.0) and a default route (0.0.0.0) to the router gateway for all other networks. 

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]