viernes, 14 de marzo de 2008

CCNA6-2

The IP Routing Process 337
FIGURE 6 . 4 IP routing example 1
The critical information you need to glean from this figure is exactly how IP routing will
occur in this example. Okay—we’ll cheat a bit. I’ll give you the answer, but then you should
go back over the figure and see if you can answer example 2 without looking at my answers.
1. The destination address of a frame, from HostA, will be the MAC address of the F0/0
interface of the RouterA router.
2. The destination address of a packet will be the IP address of the network interface card
(NIC) of the HTTP server.
3. The destination port number in the segment header will have a value of 80.
That example was a pretty simple one, and it was also very to the point. One thing to
remember is that if multiple hosts are communicating to the server using HTTP, they must all
use a different source port number. That is how the server keeps the data separated at the
Transport layer.
Let’s mix it up a little and add another internetworking device into the network and then see
if you can find the answers. Figure 6.5 shows a network with only one router but two switches.
FIGURE 6 . 5 IP routing example 2
Fa0/0 Fa0/0
S0/0
RouterA RouterB
HostA HTTP Server
S0/0
Fa0/0
RouterA
HostA
Fa0/1
HTTPS Server
338 Chapter 6  IP Routing
What you want to understand about the IP routing process here is what happens when
HostA sends data to the HTTPS server:
1. The destination address of a frame, from HostA, will be the MAC address of the F0/0
interface of the RouterA router.
2. The destination address of a packet will be the IP address of the network interface card
(NIC) of the HTTPS server.
3. The destination port number in the segment header will have a value of 443.
Notice that the switches weren’t used as either a default gateway or another destination.
That’s because switches have nothing to do with routing. I wonder how many of you chose the
switch as the default gateway (destination) MAC address for HostA? If you did, don’t feel
bad—just take another look with that fact in mind. It’s very important to remember that the
destination MAC address will always be the router’s interface—if your packets are destined
for outside the LAN, as they were in these last two examples.
Before we move into some of the more advanced aspects of IP routing, let’s discuss ICMP
in more detail, as well as how ICMP is used in an internetwork. Take a look at the network
shown in Figure 6.6. Ask yourself what will happen if the LAN interface of Lab_C goes down.
FIGURE 6 . 6 ICMP error example
Lab_C will use ICMP to inform Host A that Host B can’t be reached, and it will do this by
sending an ICMP destination unreachable message. Lots of people think that the Lab_A router
would be sending this message, but they would be wrong because the router that sends the
message is the one with that interface that’s down is located.
Let’s look at another problem: Look at the output of a corporate router’s routing table:
Corp#sh ip route
[output cut]
R 192.168.215.0 [120/2] via 192.168.20.2, 00:00:23, Serial0/0
R 192.168.115.0 [120/1] via 192.168.20.2, 00:00:23, Serial0/0
R 192.168.30.0 [120/1] via 192.168.20.2, 00:00:23, Serial0/0
C 192.168.20.0 is directly connected, Serial0/0
C 192.168.214.0 is directly connected, FastEthernet0/0
What do we see here? If I were to tell you that the corporate router received an IP packet
with a source IP address of 192.168.214.20 and a destination address of 192.168.22.3, what
do you think the Corp router will do with this packet?
Lab_A Lab_B
Host A
E0 E0
Lab_C
Host B
icmp E0
The IP Routing Process 339
If you said, “The packet came in on the FastEthernet 0/0 interface, but since the routing
table doesn’t show a route to network 192.168.22.0 (or a default route), the router will
discard the packet and send an ICMP destination unreachable message back out interface
FastEthernet 0/0,” you’re a genius! The reason it does this is because that’s the source LAN
where the packet originated from.
Now, let’s check out another figure and talk about the frames and packets in detail. Really,
we’re not exactly chatting about anything new; I’m just making sure that you totally, completely,
fully understand basic IP routing. That’s because this book, and the exam objectives
it’s geared toward, are all about IP routing, which means you need to be all over this stuff!
We’ll use Figure 6.7 for the next few questions.
FIGURE 6 . 7 Basic IP routing using MAC and IP addresses
Referring to Figure 6.7, here’s a list of all the questions you need the answers to emblazoned
in your brain:
1. In order to begin communicating with the Sales server, Host 4 sends out an ARP request.
How will the devices exhibited in the topology respond to this request?
2. Host 4 has received an ARP reply. Host 4 will now build a packet, then place this packet
in the frame. What information will be placed in the header of the packet that leaves
Host 4 if Host 4 is going to communicate to the Sales server?
3. At last, the Lab_A router has received the packet and will send it out Fa0/0 onto the
LAN toward the server. What will the frame have in the header as the source and destination
addresses?
4. Host 4 is displaying two web documents from the Sales server in two browser windows
at the same time. How did the data find its way to the correct browser windows?
I probably should write the following in a teensy font and put them upside down in another
part of the book so it would be really hard for you to cheat and peek, but since it’s actually
you who’s going to lose out if you peek, here are your answers:
1. In order to begin communicating with the server, Host 4 sends out an ARP request. How
will the devices exhibited in the topology respond to this request? Since MAC addresses
must stay on the local network, the Lab_B router will respond with the MAC address of
1 2 3 4
S0/0
S0/0
Fa0/0 Fa0/0
Lab_A Lab_B
Sales
server
340 Chapter 6  IP Routing
the Fa0/0 interface and Host 4 will send all frames to the MAC address of the Lab_B
Fa0/0 interface when sending packets to the Sales server.
2. Host 4 has received an ARP reply. Host 4 will now build a packet, then place this packet
in the frame. What information will be placed in the header of the packet that leaves
Host 4 if Host 4 is going to communicate to the Sales server? Since we’re now talking
about packets, not frames, the source address will be the IP address of Host 4 and the destination
address will be the IP address of the Sales server.
3. Finally, the Lab_A router has received the packet and will send it out Fa0/0 onto the LAN
toward the server. What will the frame have in the header as the source and destination
addresses? The source MAC address will be the Lab_A router’s Fa0/0 interface, and the
destination MAC address will be the Sales server’s MAC address. (All MAC addresses
must be local on the LAN.)
4. Host 4 is displaying two web documents from the Sales server in two different browser
windows at the same time. How did the data find its way to the correct browser windows?
TCP port numbers are used to direct the data to the correct application window.
Great! But we’re not quite done yet. I’ve got a few more questions for you before you actually
get to configure routing in a real network. Ready? Figure 6.8 shows a basic network, and
Host 4 needs to get email. Which address will be placed in the destination address field of the
frame when it leaves Host 4?
FIGURE 6 . 8 Testing basic routing knowledge
The answer is that Host 4 will use the destination MAC address of the Fa0/0 interface of
the Lab_B router—which I’m so sure you knew, right? Look at Figure 6.8 again: Host 4 needs
to communicate to Host 1. Which OSI layer 3 source address will be placed in the packet
header when it reaches Host 1?
Hopefully you know this: At layer 3, the source IP address will be Host 4 and the destination
address in the packet will be the IP address of Host 1. Of course, the destination MAC
address from Host 4 will always be the Fa0/0 address of the Lab_B router, right? And since
we have more than one router, we’ll need a routing protocol that communicates between both
of them so that traffic can be forwarded in the right direction to reach the network in which
Host 1 is attached.
1 2 3 4
S0/0
S0/0
Fa0/0 Fa0/0
Lab_A Lab_B
Email
server
The IP Routing Process 341
Okay—one more question and you’re on your way to being an IP routing genius! Again,
using Figure 6.8., Host 4 is transferring a file to the email server connected to the Lab_A
router. What would be the layer 2 destination address leaving Host 4? Yes, I’ve asked this
question more than once. But not this one: What will be the source MAC address when the
frame is received at the email server?
Hopefully, you answered that the layer 2 destination address leaving Host 4 will be the
MAC address of the Fa0/0 interface of the Lab_B router and that the source layer 2 address
that the email server will receive will be the Fa0/0 interface of the Lab_A router.
If you did, you’re all set to get the skinny on how IP routing is handled in a larger network.
Configuring IP Routing
It’s time to get serious and configure a real network! Figure 6.9 shows five routers: Corp,
Remote1, Remote2, Remote3, and the 871W (which is a wireless router). Remember that, by
default, these routers only know about networks that are directly connected to them. You also
want to keep in mind that the 1242 shown in the figure is an access point—not a wireless
router like the 871W. Think of the access point as more of a hub than a router.
FIGURE 6 . 9 Configuring IP routing
Remote1 Remote2 Remote3
871W
F0/0
(DCE)
1242AP
BVI1
10.1.1.0
F0/1
Corp
S0/0/0
S0/0/1 S0/1/0 S0/2/0
HostA HostB HostC HostD
(DCE)
(DCE)
(DCE)
VLAN1
10.1.6.0
10.1.7.0
10.1.8.0
10.1.9.0
10.1.10.0
10.1.11.0
F0/1 D0/3/0 F0/0 F0/0 F0/1
10.1.2.0
10.1.3.0
10.1.4.0
10.1.5.0
S0/0/0 s0/0/1 S0/2/0 S0/0/1
10.1.12.0
WHA
WHB
WHC
342 Chapter 6  IP Routing
As you might guess, I’ve got quite a nice collection of routers for us to play with. The Corp
router is a 2811 with a Wireless Controller module; something you’ll get to see in Chapter 12.
Remote routers 1 and 3 are 1841 ISR routers, and Remote2 is a 2801 with a wireless WIC card
and a switch module. I’m simply going to call the group of remote routers R1, R2, and R3.
(You can still perform most of the commands I use in this book with older routers, but you
need at least a new 800 or 1800 series to run the SDM.)
The first step for this project is to correctly configure each router with an IP address on each
interface. Table 6.1 shows the IP address scheme I’m going to use to configure the network.
After we go over how the network is configured, I’ll cover how to configure IP routing. Each
network in the following table has a 24-bit subnet mask (255.255.255.0), which makes the
interesting (subnet) octet the third one.
TABLE 6 . 1 Network Addressing for the IP Network
Router Network Address Interface Address
CORP
Corp 10.1.1.0 F0/1 10.1.1.1
Corp 10.1.2.0 S0/0/0 10.1.2.1
Corp 10.1.3.0 S0/0/1(DCE) 10.1.3.1
Corp 10.1.4.0 s0/1/0 10.1.4.1
Corp 10.1.5.0 s0/2/0 10.1.5.1
R1
R1 10.1.2.0 S0/0/0 (DCE) 10.1.2.2
R1 10.1.3.0 S0/0/1 10.1.3.2
R1 10.1.6.0 F0/0 10.1.6.1
R1 10.1.7.0 F0/1 10.1.7.1
R2
R2 10.1.4.0 S0/2/0 (DCE) 10.1.4.2
R2 10.1.8.0 D0/3/0 10.1.8.1
R2 10.1.9.0 F0/0 10.1.9.1

No hay comentarios: