Which information is used by routers to forward a data packet toward its destination?

1. Which information is used by routers to forward a datapacket toward its destination?source IP addressdestination IP addresssource data-link addressdestination data-link address

2. A computer has to send a packet to a destination host in thesame LAN. How will the packet be sent?

Get answer to your question and much more

3. A router receives a packet from the Gigabit 0/0 interface anddetermines that the packet needs to be forwarded out theGigabit 0/1 interface. What will the router do next?

Get answer to your question and much more

4. Which IPv4 address can a host use to ping the loopbackinterface?5. A computer can access devices on the same network but

Get answer to your question and much more

cannot access devices on other networks. What is the probablecause of this problem?The cable is not connected properly to the NIC.The computer has an invalid IP address.The computer has an incorrect subnet mask.The computer has an invalid default gateway address.

6. Which statement describes a feature of the IP protocol?

Get answer to your question and much more

7. Why is NAT not needed in IPv6?

Routers forward packets based on routing tables and forwarding information base (FIB) tables. Each router maintains at least one routing table and one FIB table. Routers select routes based on routing tables and forward packets based on FIB tables.

Routing Table

Each router maintains a local core routing table (namely, an IP routing table), and each routing protocol maintains its own routing table.

  • Local core routing table

    A router uses the local core routing table to store preferred routes. The router then sends the preferred routes to the FIB table to guide packet forwarding. The router selects routes according to the priorities of protocols and costs stored in the routing table.

    A router that supports Layer 3 Virtual Private Network (L3VPN) maintains a local core routing table for each VPN instance.

  • Protocol routing table

    A protocol routing table stores routing information discovered by the protocol.

    A routing protocol can import and advertise routes that are discovered by other routing protocols. For example, if a router running the Open Shortest Path First (OSPF) protocol needs to use OSPF to advertise direct routes, static routes, or Intermediate System-Intermediate System (IS-IS) routes, the router must import the routes into the OSPF routing table.

Routing Table Contents

You can run the display ip routing-table command on a router to view basic information about the routing table of the router. The command output is as follows:

<HUAWEI> display ip routing-table Proto: Protocol Pre: Preference Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole route ------------------------------------------------------------------------------ Routing Table: _public_ Destinations : 14 Routes : 14 Destination/Mask Proto Pre Cost Flags NextHop Interface 0.0.0.0/0 Static 60 0 RD 10.137.216.1 Vlanif20 10.10.10.0/24 Direct 0 0 D 10.10.10.10 Vlanif20 10.10.10.10/32 Direct 0 0 D 127.0.0.1 InLoopBack0 10.10.10.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0 10.10.11.0/24 Direct 0 0 D 10.10.11.1 LoopBack0 10.10.11.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 10.10.11.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0 10.137.216.0/23 Direct 0 0 D 10.137.217.208 Vlanif20 10.137.217.208/32 Direct 0 0 D 127.0.0.1 InLoopBack0 10.137.217.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0 255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

A routing table contains the following key data for each IP packet:

  • Destination: identifies the destination IP address or destination network address of an IP packet.

  • Mask: supplements the destination address to specially identify the address of the network segment where the destination host or router resides.

    The network segment address of a destination host or router is obtained through the "AND" operation on the destination address and network mask. For example, if the destination address is 10.1.1.1 and the mask is 255.255.255.0, the address of the network segment where the host or router resides is 10.1.1.0.

    The network mask is composed of several consecutive 1s. These 1s can be expressed in either the dotted decimal notation or the number of consecutive 1s in the mask. For example, the network mask can be expressed either as 255.255.255.0 or 24.

  • Proto: indicates the protocol through which routes are learned.

  • Pre: indicates the routing protocol preference of a route. There may multiple routes to the same destination, which have different next hops and outbound interfaces. These routes may be discovered by different routing protocols or manually configured. A router selects the route with the highest preference (the smallest value) as the optimal route. For the routing protocol preference, see Routing Protocol Preference.

  • Cost: indicates the route cost. When multiple routes to the same destination have the same preference, the route with the lowest cost is selected as the optimal route.

    The Preference value is used to compare the preferences of different routing protocols, while the Cost value is used to compare the preferences of different routes of the same routing protocol.

  • NextHop: indicates the IP address of the next device that an IP packet passes through.

  • Interface: indicates the outbound interface through which an IP packet is forwarded.

In Figure 1-1, the routing table of RouterA shows that it connects to three networks, so it has three IP addresses and three outbound interfaces.

Automatic Restoration After the Number of Routes Exceeds the Upper Limit

A local core routing table stores routes of different routing protocols. If the number of routes in the local core routing table reaches the upper limit, no more route can be added to the table. The local core routing table has the following route limitations:

  • System route limit: specifies the maximum number of routes supported by the system.
  • System route prefix limit: specifies the range of prefixes for all the routes supported by the system.
  • Multicast IGP route limit: specifies the maximum number of multicast IGP routes.
  • Multi-topology route limit: specifies the maximum number of multi-topology routes.
  • Private network route limit: specifies the maximum number of private network routes supported by the system.
  • VPN route limit: specifies the maximum number of VPN routes supported by the system.
  • VPN route prefix limit: specifies the range of prefixes for all the VPN routes supported by the system.

If a protocol fails to add routes to the local core routing table due to a specific route limitation, the system records the failure with the protocol name and routing table ID.

After routes of protocols are deleted from the local core routing table, and the number of routes falls below the upper limit, the system prompts all the protocols that failed to add routes to the local core routing table to re-add the routes to the local core routing table. This process restores most of the routes in the local core routing table. The size of released table space determines whether all routes in the local core routing table can be restored.

Matching with FIB Table

After selecting an optimal route from the routing table, a router sends it to the FIB table. When receives a packet, the router compares it against the FIB table to find the optimal route to forward the packet.

Each entry in the FIB table contains the physical or logical interface through which a packet is sent to a network segment or host to reach the next router. An entry can also indicate whether the packet can be sent to a destination host in a directly connected network.

The router performs the "AND" operation on the destination address in the packet and the network mask of each entry in the FIB table. The router then compares the result of the "AND" operation with the entries in the FIB table to find a match and chooses the optimal route to forward packets according to the longest match rule.

For example, assume that a router has the following routing table:

Routing Tables:Destination/Mask Proto Pre Cost Flags NextHop Interface 0.0.0.0/0 Static 60 0 D 192.168.0.2 GigabitEthernet1/0/0 10.8.0.0/16 Static 60 3 D 192.168.0.2 GigabitEthernet1/0/0 10.9.0.0/16 Static 60 50 D 172.16.0.2 GigabitEthernet3/0/0 10.9.1.0/24 Static 60 4 D 192.168.0.2 GigabitEthernet2/0/0 10.20.0.0/16 Direct 0 0 D 172.16.0.1 GigabitEthernet4/0/0

After receiving a packet carrying the destination address 10.9.1.2, the router searches the following FIB table:

FIB Table: Total number of Routes : 5Destination/Mask Nexthop Flag TimeStamp Interface TunnelID0.0.0.0/0 192.168.0.2 SU t[37] GigabitEthernet1/0/0 0x010.8.0.0/16 192.168.0.2 DU t[37] GigabitEthernet1/0/0 0x010.9.0.0/16 172.16.0.2 DU t[9992] GigabitEthernet3/0/0 0x010.9.1.0/24 192.168.0.2 DU t[9992] GigabitEthernet2/0/0 0x010.20.0.0/16 172.16.0.1 U t[9992] GigabitEthernet4/0/0 0x0

The router performs the "AND" operation on the destination address 10.9.1.2 and the masks 0, 16, and 24 to obtain the network segment addresses: 0.0.0.0/0, 10.9.0.0/16, and 10.9.1.0/24. The three addresses match three entries in the FIB table. The router chooses the entry 10.9.1.0/24 according to the longest match rule, and forwards the packet through GigabitEthernet2/0/0.

How does a router know the destination of each data packet?

When a router receives a packet, the router checks its routing table to determine if the destination address is for a system on one of it's attached networks or if the message must be forwarded through another router. It then sends the message to the next system in the path to the destination.

Which device is used to forward data packets?

A router is a networking device that forwards data packets between computer networks. Routers perform the traffic directing functions on the Internet.

How does a packet get to its destination?

The originating host (usually called the client) sends a SYN (synchronize) packet to the destination host (usually called the server). The SYN packet tells the server what port the client wants to connect to and the initial packet sequence number of the client. The server sends a SYN/ACK packet back to the client.

Which portion of the network layer address does a router use to forward packets?

A router forwards a packet based on the packet's IP (layer 3) address. A link-layer switch forwards a packet based on the packet's MAC (layer 2) address.

Toplist

Neuester Beitrag

Stichworte