• No se han encontrado resultados

CAPÍTULO 2: FUNDAMENTO TEÓRICO

2.1. El vino y su producción

2.1.1. Componentes químicos del vino

OSI Network Layer Functions

On the CCNA exam, the two key functions for any Layer 3 protocol are routing and addressing. These two functions are intertwined and are best understood by considering both at the same time.

Network layer (Layer 3) addressing will be covered in enough depth to describe IP, IPX, and AppleTalk addresses. Also, now that data link and network layer addresses have been covered in this chapter, this section undertakes a comparison of the two as well.

Routing

Routing can be thought of as a three-step process, as seen in Figure 3-17. Thinking about routing in these three separate steps helps make some of the details more obvious. However, most people will not think of routing as a three-step process when going about their normal jobs—this is just a tool to make a few points more clearly.

Figure 3-17 Three Steps of Routing

As illustrated in Figure 3-17, the three steps of routing include the following: Step 1 Sending the data from the source computer to some nearby router Step 2 Delivering the data from the router near the source to a router near

the destination

Step 3 Delivering the data from the router near the destination to the end destination computer

Step 1: Sending Data to a Nearby Router

The creator of the data, who is also the sender of the data, decides to send data to a device in another group. A mechanism must be in place so that the sender knows of some router on a common data link with the sender to ensure that data can be sent to that router. The sender sends a data link frame across the medium to the nearby router; this frame includes the packet in the

Bunches of Routers R1 R2 Fred Barney Step 2 Step 1 Step 3

104 Chapter 3: OSI Reference Model & Layered Communication

data portion of the frame. That frame uses data link (Layer 2) addressing in the data link header to ensure that the nearby router receives the frame.

Step 2: Routing Data Across the Network

The routing table for that particular network layer protocol type is nothing more than a list of network layer address groupings. As shown in Table 3-10 later in this section, these groupings vary based on the network layer protocol type. The router compares the destination network layer address in the packet to the entries in the routing table in memory, and a match is made. This matching entry in the routing table tells this router where to forward the packet next. Any intervening routers repeat the same process. The destination network layer (Layer 3) address in the packet identifies the group in which the destination resides. The routing table is searched for a matching entry, which tells this router where to forward the packet next. Eventually, the packet is delivered to the router connected to the network or subnet of the destination host, as previously shown in Figure 3-17.

Step 3: Delivering Data to the End Destination

When the packet arrives at a router sharing a data link with the true destination, the router and the destination of the packet are in the same L3 grouping. That final router can forward the data directly to the destination. As usual, a new data link header and trailer are created before a frame (which contains the packet that made the trip across the entire network) can be sent on to the media. This matches the final step (Step 3), as previously shown in Figure 3-17.

A Comment About Data Links

Because the routers build new data link headers and trailers, and because the new headers contain data link addresses, the routers must have some way to decide what data link addresses to use. An example of how the router determines which data link address to use is the IP Address Resolution Protocol (ARP) protocol. ARP is used to dynamically learn the data link address of some IP host.

An example specific to TCP/IP will be useful to solidify the concepts behind routing. Imagine that PC1 is sending packets to PC2. (If you do not understand the basics of IP addressing already, you may want to bookmark this page and refer to it after you have reviewed Chapter 5, which covers IP addressing.) Figure 3-18 provides an example network so that you can review the routing process.

OSI Network Layer Functions 105

Figure 3-18 Routing Logic and Encapsulation—PC1 Sending to PC2

The logic behind the earlier three-step routing process is described in the following steps. Steps A and B that follow describe the first of the three routing steps in this example. Steps C, D, E, F, and G correspond to Step 2. Finally, Step H corresponds to routing Step 3.

Step A PC1 needs to know its nearby router. PC1 first knows of R1’s IP address by having either a default router or a default gateway configured. The default router defined on some host is the router to which that host forwards packets that are destined for subnets other than the directly attached subnet. Alternatively, PC1 can learn of R1’s IP address using Dynamic Host Configuration

FR PC1 PC2 R1 R2 R3 10.0.0.0 10.1.1.1 168.1.1.1 168.10.0.0 168.11.0.0 168.1.0.0 My route to that group is out Serial Link.

Send directly to Barney. My route to that group is out Frame Relay. Destination is in another group; send

to nearby router.

Eth. IP Packet

HDLC IP Packet

FR IP Packet

TR IP Packet ch03.fm Page 105 Monday, March 20, 2000 4:58 PM

106 Chapter 3: OSI Reference Model & Layered Communication

Protocol (DHCP). Because DHCP is not mentioned for the CCNA exam, you can assume that a default router of 10.1.1.100 is configured on PC1 and that it is R1’s Ethernet IP address. Step B PC1 needs to know R1’s Ethernet MAC address before PC1 can

finish building the Ethernet header (see Figure 3-18). In the case of TCP/IP, the ARP process is used to dynamically learn R1’s MAC address. (See Chapter 5 for a discussion of ARP.) When R1’s MAC address is known, PC1 completes the Ethernet header with the destination MAC address being R1’s MAC address. Step C At Step 2 of the routing process, the router has many items to

consider. First, the incoming frame (Ethernet interface) is processed only if the Ethernet FCS is passed and the router’s MAC address is in the destination address field. Then, the appropriate protocol type field is examined so that R1 knows what type of packet is in the data portion of the frame. At this point, R1 discards the Ethernet header and trailer.

Step D The next part of Step 2 involves finding an entry in the routing table for network 168.1.0.0, the network of which PC2 is a member. In this case, the route in R1 references 168.1.0.0 and lists R1’s serial interface as the interface by which to forward the packet.

Step E To complete Step 2, R2 builds an HDLC header and trailer to place around the IP packet. Because HDLC data link uses the same address field every time, no process like ARP is needed to allow R1 to build the HDLC header.

Step F Routing Step 2 is repeated by R2 when it receives the HDLC frame. The HDLC FCS is checked; the type field is examined to learn that the packet inside the frame is an IP packet, and then the HDLC header and trailer are discarded. The IP routing table in R2 is examined for network 168.1.0.0, and a match is made. The entry directs R2 to forward the packet to its Frame Relay serial interface. The routing entry also identifies the next router’s IP address—namely R3’s IP address on the other end of the Frame Relay VC.

Step G Before R2 can complete its Step 2 of this end-to-end routing algorithm, R2 must build a Frame Relay header and trailer. Before it can complete the task, the correct DLCI for the VC to R3 must be decided. In most cases today, the dynamic Inverse ARP process will have associated R3’s IP address with the DLCI R2 uses to ch03.fm Page 106 Monday, March 20, 2000 4:58 PM

OSI Network Layer Functions 107

send frames to R3. (See Chapter 8 for more details on Inverse ARP and Frame Relay mapping.) With that mapping information, R2 can complete the Frame Relay header and send the frame to R3. Step H Step 3 of the original algorithm is performed by R3. Like R1 and

R2 before it, R3 checks the FCS in the data link trailer, looks at the type field to decide whether the packet inside the frame is an IP packet, and then discards the Frame Relay header and trailer. The routing table entry for 168.1.0.0 shows that the outgoing interface is R3’s Token Ring interface. However, there is no next router IP address because there is no need to forward the packet to another router. R3 simply needs to build a Token Ring header and trailer and forward the frame that contains the original packet to PC2. Before R3 can finish building the Token Ring header, an IP ARP must be used to find PC2’s MAC address (assuming that R3 doesn’t already have that information in its IP ARP cache).