Network+ Ch. 7, Routing

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Configuring NAT on home routers is a no-brainer as these boxes invariably have NAT turned on automatically. Figure 7-18 shows the screen on my home router for NAT. Note the radio buttons that say Gateway and Router. By default, the router is set to Gateway, which is Linksys-speak for

"NAT is turned on."

The most important trick to reading a routing table is to remember that a zero (0) means

"anything."

The CompTIA Network+ exam will challenge you on some basic router problems. All of these questions should be straightforward for you as long as you do the following (3):

-Consider other issues first because routers don't fail very often. -Keep in mind what your router is supposed to do. -Know how to use a few basic tools that can help you check the router.

What are two big advantages to using OSPF over RIP? (Select two.) OSPF is a modern protocol that does not have legacy problems. OSPF chooses routes based on link speed, not hop count. OSPF runs on all routers, big and small. OSPF sends only routing table changes, reducing network traffic.

B and D. OSPF bases routes on speed and sends only route changes to minimize traffic.

Routers must use the same type of connection for all routes, such as Ethernet to Ethernet or ATM to ATM. True False

B. False; a router can interconnect different Layer 2 technologies.

What is the name of the cable that you use to connect to the console port on Cisco routers? Router console cable Yost cable That funny blue Cisco cable Null modem cable

B. You use Yost cable, which was invented to standardize the serial console interface, to connect to the console port on Cisco routers.

Protocol: BGP IGP or BGP?

BGP

Routers can use one of two distance vector routing protocols: RIPv1 or RIPv2. Plus there's an option to use a path vector routing protocol,

BGP

The current version of BGP is

BGP-4

There is no single rule to set the metric value in a routing table. The various types of dynamic protocols use different criteria. Here are the most common criteria for determining a metric. Description: Some connections handle more data than others. An old dial-up connection theoretically tops out at 64 Kbps. A cable modem easily handles many millions of bits per second.

Bandwidth

BGP stands for

Border Gateway Protocol

OSPF offers a number of improvements over RIP.

When you first launch OSPF-capable routers, they send out Hello packets, looking for other OSPF routers (see Figure 7-31). After two adjacent routers form a neighborship through the Hello packets, they exchange information about routers and networks through link state advertisement (LSA) packets. LSAs are sourced by each router and are flooded from router to router through each OSPF area.

The true beauty and amazing power of TCP/IP lies in one word:

Routing

Protocol: OSPF Notes

Fast, popular, uses Area IDs (Area 0/backbone)

__ and __ are ancient technologies that you won't see in the real world. You'll see them on the CompTIA Network+ exam, though, so I'll discuss them in historical context in this book.

Frame Relay; ATM

Configuring NAT on home routers is a no-brainer as these boxes invariably have NAT turned on automatically. Figure 7-18 shows the screen on my home router for NAT. Note the radio buttons that say Gateway and Router. By default, the router is set to

Gateway, which is Linksys-speak for "NAT is turned on." If I wanted to turn off NAT, I would set the radio button to Router.

A router, by definition, must have at least two connections. When you set up a router, you must configure every port on the router properly to talk to its connected network IDs, and you must make sure the routing table sends packets to where you want them to go. As a demonstration, Figure 7-41 uses an incredibly common setup: a single gateway router used in a home or small office that's connected to an ISP. Step 2: Set up the LAN: Step 3: Establish Routes:

Most routers are pretty smart and use the information you provided for the two interfaces to build a routing table automatically. If you need to add more routes, every router provides some method to add routes. The following shows the command entered on a Cisco router to add a route to one of its Ethernet interfaces. The term "gig0/0" is how Cisco describes Ethernet NICs in its device software. It is short for GigabitEthernet, which you may remember as being the common name (when you add a space) for 1000BaseT. ip route 192.168.100.0 255.255.255.0 gig0/0 192.168.1.10

mtr stands for

My traceroute

__ is very similar to traceroute, but it's dynamic, continually updating the route that you've selected (Figure 7-45). You won't find __ in Windows; __ is a Linux tool. Instead, Windows users can use pathping. This utility will ping each node on the route just like __, but instead of showing the results of each ping in real time, the pathping utility computes the performance over a set time and then shows you the summary after it has finished.

My traceroute (mtr)

Static NAT (SNAT) maps a single routable (that is, not private) IP address to a single machine, enabling you to access that machine from outside the network. The __ keeps track of the IP address or addresses and applies them permanently on a one-to-one basis with computers on the network.

NAT

Exam tip: NAT replaces the source IP address of a computer with the source IP address from the outside router interface on outgoing packets. NAT is performed by

NAT-capable routers.

NMS stands for

Network Management Software

The idea of a "Web-server-in-a-router" works well for single routers, but as a network grows into lots of routers, administrators need more advanced tools that describe, visualize, and configure their entire network. These tools, known as __, know how to talk to your routers, switches, and even your computers to give you an overall view of your network.

Network Management Software (NMS)

The idea of a "Web-server-in-a-router" works well for single routers, but as a network grows into lots of routers, administrators need more advanced tools that describe, visualize, and configure their entire network. These tools, known as

Network Management Software (NMS), know how to talk to your routers, switches, and even your computers to give you an overall view of your network. In most cases, NMS manifests as a Web site where administrators may inspect the status of the network and make adjustments as needed.

A router is any piece of hardware or software that forwards packets based on their destination IP address. Routers work, therefore, at the__ layer of the OSI model and at the __ layer of the TCP/IP model.

Network, Internet

IS-IS is extremely similar to

OSPF

IS-IS was developed at roughly the same time as

OSPF

Most large enterprises use __ on their internal networks.

OSPF

Odds are good that if you are using dynamic routing protocols, you're using

OSPF

There are only two link state dynamic routing protocols:

OSPF and IS-IS

OSPF offers a number of improvements over RIP. When you first launch OSPF-capable routers, they send out Hello packets, looking for other OSPF routers (see Figure 7-31). After two adjacent routers form a neighborship through the Hello packets, they exchange information about routers and networks through link state advertisement (LSA) packets. LSAs are sourced by each router and are flooded from router to router through each

OSPF area.

Open Shortest Path First (OSPF) is the most commonly used IGP in the world. Most large enterprises use OSPF on their internal networks. Even an AS, while still using BGP on its edge routers, will use OSPF internally because

OSPF was designed from the ground up to work within a single AS. OSPF converges dramatically faster and is much more efficient than RIP. Odds are good that if you are using dynamic routing protocols, you're using OSPF.

Protocol: RIPv1 Notes

Old; only used variable subnets within an AS

A router, by definition, must have at least two connections. When you set up a router, you must configure every port on the router properly to talk to its connected network IDs, and you must make sure the routing table sends packets to where you want them to go. As a demonstration, Figure 7-41 uses an incredibly common setup: a single gateway router used in a home or small office that's connected to an ISP. Step 2: Set up the LAN: Step 3: Establish Routes: Step 4 (optional): Configure a Dynamic Protocol: Step 5: Document and Back Up

Once you've configured your routes, take some time to document what you've done. A good router works for years without interaction, so by that time in the future when it goes down, odds are good you will have forgotten why you added the routes. Last, take some time to back up the configuration. If a router goes down, it will most likely forget everything and you'll need to set it up all over again. Every router has some method to back up the configuration, however, so you can restore it later.

OSPF stands for

Open Shortest Path First (OSPF)

__ is the most commonly used IGP in the world.

Open Shortest Path First (OSPF)

Protocol: BGP Type

Path vector

When you are first setting up a new router, you should never plug it into an existing network. True False

A. True; never plug a new router into an existing network

When you first unwrap a new Cisco router, you plug the rollover cable into the console port on the router (Figure 7-33) and a serial port on a PC. If you don't have a serial port, then buy a USB-to-serial adapter. Once you've made this connection, you need to use a terminal emulation program to talk to the router. The two most popular programs are PuTTY (www.chiark.greenend.org.uk/~sgtatham/putty) and HyperTerminal (www.hilgraeve.com/hyperterminal). Using these programs requires that you to know a little about serial ports, but these basic settings should get you connected: 9600 baud 8 data bits 1 stop bit No parity Every terminal emulator has some way for you to configure these settings. Figure 7-34shows these settings using PuTTY. Now it's time to connect. Most Cisco products run Cisco IOS, Cisco's proprietary operating system. If you want to configure Cisco routers, you must learn IOS. Learning IOS in detail is a massive job and outside the scope of this book. No worries, because Cisco provides a series of certifications to support those who wish to become "Cisco People." Although the CompTIA Network+ exam won't challenge you in terms of IOS, it's important to get a taste of how this amazing operating system works.Cisco IOS, Cisco's proprietary operating system. If you want to configure Cisco routers, you must learn IOS. Learning IOS in detail is a massive job and outside the scope of this book. No worries, because Cisco provides a series of certifications to support those who wish to become "Cisco People." Although the CompTIA Network+ exam won't challenge you in terms of IOS, it's important to get a taste of how this amazing operating system works. This is the IOS user mode prompt—you can't do too much here. To get to the fun, you need to enter privileged EXEC mode. Type __

"enable", press ENTER, and the prompt changes to Router#

Once you've made this connection, you need to use a terminal emulation program to talk to the router. The two most popular programs are PuTTY (www.chiark.greenend.org.uk/~sgtatham/putty) and HyperTerminal (www.hilgraeve.com/hyperterminal). Using these programs requires that you to know a little about serial ports, but these basic settings should get you connected: (4):

-9600 baud -8 data bits -1 stop bit -No parity Every terminal emulator has some way for you to configure these settings. Figure 7-34shows these settings using PuTTY.

TCP/IP port numbers range from

1 to 65,535

Why would anyone use anything else? Well, OSPF had one problem that wasn't repaired until fairly recently: support for something called IPv6 (see Chapter 12 for details on IPv6). Not to preempt Chapter 12, but IPv6 is a new addressing system for IP that dumps the old 32-bit address, replacing it with a __-bit address.

128

The granddaddy of all distance vector routing protocols is the Routing Information Protocol (RIP). The first version of RIP—called RIPv1—dates from the 1980s, although its predecessors go back all the way to the beginnings of the Internet in the 1960s. RIP (either version) has a maximum hop count of

15, so your router will not talk to another router more than 15 routers away. This plagues RIP because a routing table request can literally loop all the way around back to the initial router.

Exam tip: The CompTIA Network+ objectives list MTU as a switching or routing metric, and it definitely falls into the former category. The maximum transmission unit (MTU)determines the largest frame a particular technology can handle. Ethernet uses __-byte frames. Other technologies use smaller or larger frames.

1500

The granddaddy of all distance vector routing protocols is the Routing Information Protocol (RIP). The first version of RIP—called RIPv1—dates from the

1980s, although its predecessors go back all the way to the beginnings of the Internet in the 1960s. RIP (either version) has a maximum hop count of 15, so your router will not talk to another router more than 15 routers away. This plagues RIP because a routing table request can literally loop all the way around back to the initial router.

RIPv2, adopted in __, is the current version of RIP.

1994

OSPF Version __ is used for IPv4 networks, and OSPF Version __ includes updates to support IPv6.

2; 3

Assume you have four routers connected as shown in Figure 7-22. All of the routers have routes set up between each other with the metrics shown. You add two new networks, one that connects to Router A and the other to Router D. For simplicity, call them Network ID X and Network ID Y. A computer on one network wants to send packets to a computer on the other network, but the routers in between Routers A and D don't yet know the two new network IDs. That's when distance vector routing protocols work their magic.Because all of the routers use a distance vector routing protocol, the problem gets solved quickly.:At a certain defined time interval (usually 30 seconds or less), the routers begin sending each other their routing tables (the routers each send their entire routing table, but for simplicity just concentrate on the two network IDs in question). On the first iteration, Router A sends its route to Network ID X to Routers B and C. Router D sends its route to Network ID Y to Router C (Figure 7-23).This is great—Routers B and C now know how to get to Network ID X, and Router C can get to Network ID Y. There's still no complete path, however, between Network ID X and Network ID Y. That's going to take another interval. After another set amount of time, the routers again send their now updated routing tables to each other, as shown in Figure 7-24. Router A knows a path now to Network ID Y, and Router D knows a path to Network ID X. As a side effect, Router B and Router C have two routes to Network ID X. Router B can get to Network ID X through Router A and through Router C. Similarly, Router C can get to Network ID X through Router A and through Router B. What to do? In cases where the router discovers multiple routes to the same network ID, the distance vector routing protocol deletes all but the route with the lowest total cost. On the next iteration, Routers A and D get updated information about the lower total-cost hops to connect to Network IDs X and Y (Figure 7-26). Just as Routers B and C only kept the routes with the lowest costs, Routers A and D keep only the lowest-cost routes to the networks. Now Routers A and D have a lower-cost route to Network IDs X and Y. They've removed the higher-cost routes and begin sending data. At this point, if routers were human they'd realize that each router has all the information about the network and stop sending each other routing tables. Routers using distance vector routing protocols, however, aren't that smart. The routers continue to send their complete routing tables to each other, but because the information is the same, the routing tables don't change. At this point, the routers are in convergence (also called steady state), meaning the updating of the routing tables for all the routers has completed. Assuming nothing changes in terms of connections, the routing tables will not change. In this example, it takes __(#) iterations to reach convergence.

3

RIPv1 sent out an update every

30 seconds

What came out of the reorganization eventually was a multitiered structure. At the top of the structure sits many Autonomous Systems. An Autonomous System (AS) is one or more networks that are governed by a single dynamic routing protocol within that AS. Figure 7-29illustrates the decentralized structure of the Internet. Autonomous Systems do not deliver data between each other using IP addresses, but rather use a special globally unique Autonomous System Number (ASN) assigned by IANA. Originally a 16-bit number, the current ASNs are __ bits

32 bits, displayed as two 16-bit numbers separated by a dot. So, 1.33457 would be a typical ASN. Just as you would assign an IP address to a router, you would configure the router to use or be the ASN assigned by IANA. See Figure 7-30.

There is no single rule to set the metric value in a routing table. The various types of dynamic protocols use different criteria. Here are the most common criteria for determining a metric. Hop count: The hop count is a fundamental metric value for the number of routers a packet will pass through on the way to its destination network. For example, if router A needs to go through three intermediate routers to reach a network connected to router C, the hop count is

4. The hop occurs when the packet is handed off to each subsequent router. (I'll go a lot more into hops and hop count in "Distance Vector and Path Vector," next.)

What is a router? A piece of hardware that forwards packets based on IP address A device that separates your computers from the Internet A piece of hardware that distributes a single Internet connection to multiple computers A synonym for a firewall

A. A router is a piece of hardware that forwards packets based on IP address.

1, unless that route suddenly stopped working.

A metric is a relative value that defines the "cost" of using this route. The power of routing is that a packet can take more than one route to get to the same place. If a route were to suddenly cut off, then you would have an alternative. Figure 7-10 shows a networked router with two routes to the same place. The router has a route to Network B with a metric of 1 using Route 1, and a second route to Network B using Route 2 with a metric of 10. Lowest routes always win. In this case, the router will always use the route with the metric of

Distance vector routing protocols such as RIP rely on what metric to determine the best route? Hop count. Link speed. Ping time. Routes are chosen at random.

A. Distance vector routing protocols use hop count to determine the best route.

Protocol: IS-IS Notes

Alternative to OSPF

What is Area 0 called in OSPF?

Area 0 is called the backbone area.

AS stands for

Autonomous System

ASN stands for

Autonomous System Number

What came out of the reorganization eventually was a multitiered structure. At the top of the structure sits many Autonomous Systems. An Autonomous System (AS) is one or more networks that are governed by a single dynamic routing protocol within that AS. Figure 7-29illustrates the decentralized structure of the Internet. Autonomous Systems do not deliver data between each other using IP addresses, but rather use a special globally unique

Autonomous System Number (ASN) assigned by IANA. Originally a 16-bit number, the current ASNs are 32 bits, displayed as two 16-bit numbers separated by a dot. So, 1.33457 would be a typical ASN. Just as you would assign an IP address to a router, you would configure the router to use or be the ASN assigned by IANA. See Figure 7-30.

__s communicate with each other using a protocol, called generically an Exterior Gateway Protocol (EGP).

Autonomous Systems

The CompTIA Network+ exam objectives list BGP as a hybrid routing protocol, but it's more technically a path vector routing protocol. BGP doesn't have the same type of routing table as you've seen so far. BGP routers advertise information passed to them from different

Autonomous Systems' edge routers—that's what the AS-to-AS routers are called. BGP forwards these advertisements that include the ASN and other very non-IP items.

Given the following routing table: Destination LAN IP Subnet Mask Gateway Interface 10.11.12.0 255.255.255.0 0.0.0.0 LAN 64.165.5.0 255.255.255.0 0.0.0.0 WAN 0.0.0.0 0.0.0.0 64.165.5.1 WAN where would a packet with the address 64.165.5.34 be sent? To the default gateway on interface WAN. To the 10.11.12.0/24 network on interface LAN. To the 64.165.5.0/24 network on interface WAN. Nowhere; the routing table does not have a route for that address.

C. It would be sent to the 64.165.5.0/24 network on interface WAN.

The traceroute utility is useful for? Configuring routers remotely Showing the physical location of the route between you and the destination Discovering information about the routers between you and the destination address Fixing the computer's local routing table

C. The traceroute utility is useful for discovering information about the routers between you and the destination address.

Every operating system comes with traceroute, but the actual command varies among them. In Windows, the command is tracert and looks like this (I'm running a traceroute to the router connected to my router—a short trip):

C:\>tracert 96.165.24.1

When you take a new router out of the box, it's not good for very much. You need to somehow plug into that shiny new router and start telling it what you want to do. There are a number of different methods, but one of the oldest (yet still very common) methods is to use a special serial connection. This type of connection is almost completely unique to __-brand routers,

Cisco

Who came out with the Interior Gateway Routing Protocol (IGRP), which was quickly replaced with EIGRP?

Cisco

Cisco's proprietary operating system

Cisco IOS

When you first unwrap a new Cisco router, you plug the rollover cable into the console port on the router (Figure 7-33) and a serial port on a PC. If you don't have a serial port, then buy a USB-to-serial adapter. Once you've made this connection, you need to use a terminal emulation program to talk to the router. The two most popular programs are PuTTY (www.chiark.greenend.org.uk/~sgtatham/putty) and HyperTerminal (www.hilgraeve.com/hyperterminal). Using these programs requires that you to know a little about serial ports, but these basic settings should get you connected: 9600 baud 8 data bits 1 stop bit No parity Every terminal emulator has some way for you to configure these settings. Figure 7-34shows these settings using PuTTY. Now it's time to connect. Most Cisco products run

Cisco IOS, Cisco's proprietary operating system. If you want to configure Cisco routers, you must learn IOS. Learning IOS in detail is a massive job and outside the scope of this book. No worries, because Cisco provides a series of certifications to support those who wish to become "Cisco People." Although the CompTIA Network+ exam won't challenge you in terms of IOS, it's important to get a taste of how this amazing operating system works.

Protocol: EIGRP Notes

Cisco Proprietary

There is exactly one protocol that doesn't really fit into either the distance vector or link state camp:

Cisco's proprietary Enhanced Interior Gateway Routing Protocol (EIGRP). Back in the days when RIP was dominant, there was a huge outcry for an improved RIP, but OSPF wasn't yet out. Cisco, being the dominant router company in the world (a crown it still wears to this day), came out with the Interior Gateway Routing Protocol (IGRP), which was quickly replaced with EIGRP.

__ routers enable you to do a lot more with NAT.

Commercial

Earlier in the chapter, you learned that routing tables contain a factor called a metric. A metric is a relative value that routers use when they have more than one route to get to another network. Unlike the gateway routers in our homes, a more serious router will often have multiple connections to get to a particular network. This is the beauty of routers combined with dynamic protocols:

If a router suddenly loses a connection, it has alternative routes to the same network. It's the role of the metric setting for the router to decide which route to use.

What is Area 0 called in OSPF? Local Area Primary Zone Trunk Backbone

D. Area 0 is called the backbone area.

What technology allows you to share a single public IP address with many computers? Static Address Translation Natural Address Translation Computed Public Address Translation Port Address Translation

D. Port Address Translation, commonly known as PAT, enables you to share a single public IP address with many computers.

There is no single rule to set the metric value in a routing table. The various types of dynamic protocols use different criteria. Here are the most common criteria for determining a metric. Description: Some routing protocols use cost as a metric for the desirability of that particular route. A route through a low-bandwidth connection, for example, would have a higher cost value than a route through a high-bandwidth connection. A network administrator can also manually add cost to routes to change the route selection.

Cost

Routers enable you to connect different types of network technologies. You now know that routers strip off all of the Layer 2 data from the incoming packets, but thus far you've only seen routers that connect to different Ethernet networks—and that's just fine with routers. But routers can connect to almost anything that stores IP packets. Not to take away from some very exciting upcoming chapters, but Ethernet is not the only networking technology out there. Once you want to start making long-distance connections, Ethernet disappears, and technologies with names like __ take over.

Data-Over-Cable Service Interface Specification (DOCSIS) (for cable modems), Frame Relay, and Asynchronous Transfer Mode (ATM)

There is no single rule to set the metric value in a routing table. The various types of dynamic protocols use different criteria. Here are the most common criteria for determining a metric. Description: :Say you have a race car that has a top speed of 200 miles per hour, but it takes 25 minutes to start the car. If you press the gas pedal, it takes 15 seconds to start accelerating. If the engine runs for more than 20 minutes, the car won't go faster than 50 miles per hour. These issues prevent the car from doing what it should be able to do: go 200 miles per hour. __ is like that. Hundreds of issues occur that slow down network connections between routers. These issues are known collectively as latency. A great example is a satellite connection. The distance between the satellite and the antenna causes a __ that has nothing to do with the speed of the connection.

Delay

Protocol: RIPv1 Type

Distance vector

Protocol: RIPv2: Type

Distance vector

__ routing protocols were the first to appear in the TCP/IP routing world.

Distance vector

EIGRP stands for

Enhanced Interior Gateway Routing Protocol (EIGRP)

EGP stands for

Exterior Gateway Protocol (EGP)

Protocol: EIGRP Type

Hybrid

What came out of the reorganization eventually was a multitiered structure. At the top of the structure sits many Autonomous Systems. An Autonomous System (AS) is one or more networks that are governed by a single dynamic routing protocol within that AS. Figure 7-29illustrates the decentralized structure of the Internet. Autonomous Systems do not deliver data between each other using IP addresses, but rather use a special globally unique Autonomous System Number (ASN) assigned by

IANA

Open Shortest Path First (OSPF) is the most commonly used __ in the world.

IGP

Protocol: EIGRP IGP or BGP?

IGP

Protocol: IS-IS IGP or BGP?

IGP

Protocol: OSPF IGP or BGP?

IGP

Protocol: RIPv1 IGP or BGP?

IGP

Protocol: RIPv2: IGP or BGP?

IGP

Let me repeat this to make sure you understand the difference between EGP and IGP. Neither EGP nor IGP is a dynamic routing protocol; rather these are terms used by the large Internet service providers to separate their interconnected routers using ASNs from other interconnected networks that are not part of this special group of companies. The easy way to keep these terms separate is to appreciate that although many protocols are used withinAutonomous Systems, such as RIP, the Internet has settled on one protocol for communication between each AS: the Border Gateway Protocol (BGP). BGP is the glue of the Internet, connecting all of the Autonomous Systems. Other dynamic routing protocols such as RIP are, by definition,

IGP. The current version of BGP is BGP-4.

If you want to configure Cisco routers, you must learn

IOS

Based on what you've read up to this point, it would seem that routes in your routing tables come from two sources: either they are manually entered or they are detected at setup by the router. In either case, a route seems to be a static beast, just sitting there and never changing. And based on what you've seen so far, that is absolutely true. Routers have static routes. But most routers also have the capability to update their routes dynamically, with dynamic routing protocols (both

IPv4 and IPv6)

__ is the de facto standard for ISPs.

IS-IS

IGP stands for

Interior Gateway Protocols (IGPs)

Autonomous Systems communicate with each other using a protocol, called generically an Exterior Gateway Protocol (EGP). The network or networks within an AS communicate with protocols as well; these are called generically

Interior Gateway Protocols (IGPs).

IGRP stands for

Interior Gateway Routing Protocol

IS-IS stands for

Intermediate System to Intermediate System

If you want to use a link state dynamic routing protocol and you don't want to use OSPF, your only other option is

Intermediate System to Intermediate System (IS-IS). IS-IS is extremely similar to OSPF. It uses the concept of areas and send-only updates to routing tables. IS-IS was developed at roughly the same time as OSPF and had the one major advantage of working with IPv6 from the start. IS-IS is the de facto standard for ISPs. Make sure you know that IS-IS is a link state dynamic routing protocol, and if you ever see two routers using it, call me as I've never seen IS-IS in action.

Let me repeat this to make sure you understand the difference between EGP and IGP. Neither EGP nor IGP is a dynamic routing protocol; rather these are terms used by the large Internet service providers to separate their interconnected routers using ASNs from other interconnected networks that are not part of this special group of companies. The easy way to keep these terms separate is to appreciate that although many protocols are used withinAutonomous Systems, such as __, the Internet has settled on one protocol for communication between each AS: the Border Gateway Protocol (BGP). BGP is the glue of the Internet, connecting all of the Autonomous Systems. Other dynamic routing protocols such as RIP are, by definition, IGP. The current version of BGP is BGP-4.

RIP

Protocol: IS-IS Type

Link state

Protocol: OSPF Type

Link state

My traceroute (mtr) is very similar to traceroute, but it's dynamic, continually updating the route that you've selected (Figure 7-45). You won't find mtr in Windows; mtr is a __ tool

Linux

Dynamic NAT is also called

Pooled NAT

Once you've made this connection, you need to use a terminal emulation program to talk to the router. The two most popular programs are

PuTTY (www.chiark.greenend.org.uk/~sgtatham/putty) and HyperTerminal (www.hilgraeve.com/hyperterminal). Using these programs requires that you to know a little about serial ports, but these basic settings should get you connected: -9600 baud -8 data bits -1 stop bit -No parity

Most routers still support RIPv2, but RIP's many problems, especially the time to convergence for large WANs, makes it obsolete for all but small, private WANs that consist of a few routers. The growth of the Internet demanded a far more robust dynamic routing protocol. That doesn't mean RIP rests in peace! RIP is both easy to use and simple for manufacturers to implement in their routers, so most routers, even home routers, have the ability to use RIP (Figure 7-28). If your network consists of only two, three, or four routers,

RIP's easy configuration often makes it worth putting up with slower convergence.

Routers can use one of two distance vector routing protocols:

RIPv1 or RIPv2.

__, adopted in 1994, is the current version of RIP.

RIPv2

Configuring NAT on home routers is a no-brainer as these boxes invariably have NAT turned on automatically. Figure 7-18 shows the screen on my home router for NAT. Note the radio buttons that say Gateway and Router. By default, the router is set to Gateway, which is Linksys-speak for "NAT is turned on." If I wanted to turn off NAT, I would set the radio button to

Router.

Assume you have four routers connected as shown in Figure 7-22. All of the routers have routes set up between each other with the metrics shown. You add two new networks, one that connects to Router A and the other to Router D. For simplicity, call them Network ID X and Network ID Y. A computer on one network wants to send packets to a computer on the other network, but the routers in between Routers A and D don't yet know the two new network IDs. That's when distance vector routing protocols work their magic.Because all of the routers use a distance vector routing protocol, the problem gets solved quickly.:At a certain defined time interval (usually 30 seconds or less), the routers begin sending each other their routing tables (the routers each send their entire routing table, but for simplicity just concentrate on the two network IDs in question). On the first iteration, Router A sends its route to Network ID X to Routers B and C. Router D sends its route to Network ID Y to Router C (Figure 7-23).This is great—Routers B and C now know how to get to Network ID X, and Router C can get to Network ID Y. There's still no complete path, however, between Network ID X and Network ID Y. That's going to take another interval. After another set amount of time, the routers again send their now updated routing tables to each other, as shown in Figure 7-24. Router A knows a path now to Network ID Y, and Router D knows a path to Network ID X. As a side effect, Router B and Router C have two routes to Network ID X. Router B can get to Network ID X through Router A and through Router C. Similarly, Router C can get to Network ID X through Router A and through Router B. What to do? In cases where the router discovers multiple routes to the same network ID, the distance vector routing protocol deletes all but the route with the lowest total cost. On the next iteration,

Routers A and D get updated information about the lower total-cost hops to connect to Network IDs X and Y (Figure 7-26). Just as Routers B and C only kept the routes with the lowest costs, Routers A and D keep only the lowest-cost routes to the networks. Now Routers A and D have a lower-cost route to Network IDs X and Y. They've removed the higher-cost routes and begin sending data.

There is no single rule to set the metric value in a routing table. The various types of dynamic protocols use different criteria. Here are the most common criteria for determining a metric. Delay:

Say you have a race car that has a top speed of 200 miles per hour, but it takes 25 minutes to start the car. If you press the gas pedal, it takes 15 seconds to start accelerating. If the engine runs for more than 20 minutes, the car won't go faster than 50 miles per hour. These issues prevent the car from doing what it should be able to do: go 200 miles per hour. Delay is like that. Hundreds of issues occur that slow down network connections between routers. These issues are known collectively as latency. A great example is a satellite connection. The distance between the satellite and the antenna causes a delay that has nothing to do with the speed of the connection.

A router, by definition, must have at least two connections. When you set up a router, you must configure every port on the router properly to talk to its connected network IDs, and you must make sure the routing table sends packets to where you want them to go. As a demonstration, Figure 7-41 uses an incredibly common setup: a single gateway router used in a home or small office that's connected to an ISP. Step 1:

Set up the WAN side: To start, you need to know the network IDs for each side of your router. The WAN side invariably connects to an ISP, so you need to know what the ISP wants you to do. If you bought a static IP address, type it in now. However—brace yourself for a crazy fact—most home Internet connections use DHCP! That's right, DHCP isn't just for your PC. You can set up your router's WAN connection to use it too. DHCP is by far the most common connection to use for home routers. Access your router and locate the WAN connection setup. Figure 7-42 shows the setup for my home router set to DHCP.

There is no single rule to set the metric value in a routing table. The various types of dynamic protocols use different criteria. Here are the most common criteria for determining a metric. Bandwidth:

Some connections handle more data than others. An old dial-up connection theoretically tops out at 64 Kbps. A cable modem easily handles many millions of bits per second.

There is no single rule to set the metric value in a routing table. The various types of dynamic protocols use different criteria. Here are the most common criteria for determining a metric. Cost:

Some routing protocols use cost as a metric for the desirability of that particular route. A route through a low-bandwidth connection, for example, would have a higher cost value than a route through a high-bandwidth connection. A network administrator can also manually add cost to routes to change the route selection.

__ maps a single routable (that is, not private) IP address to a single machine, enabling you to access that machine from outside the network. The NAT keeps track of the IP address or addresses and applies them permanently on a one-to-one basis with computers on the network.

Static NAT (SNAT)

Basic Router Configuration Steps (5):

Step 1: Set up the WAN Side. Step 2: Set up the LAN. Step 3: Establish Routes. Step 4 (Optional): Configure a Dynamic Protocol. Step 5: Document and Back up

Protocol: RIPv2: Notes

Supports VLSM and discontiguous subnets

There is no single rule to set the metric value in a routing table. The various types of dynamic protocols use different criteria. Here are the most common criteria for determining a metric. Hop count

The hop count is a fundamental metric value for the number of routers a packet will pass through on the way to its destination network. For example, if router A needs to go through three intermediate routers to reach a network connected to router C, the hop count is 4. The hop occurs when the packet is handed off to each subsequent router. (I'll go a lot more into hops and hop count in "Distance Vector and Path Vector," next.)

Wow, there sure are many routing protocols out there. It's too bad they can't talk to each other ... or can they?

The routers cannot use different routing protocols to communicate with each other, but many routers can speak multiple routing protocols simultaneously. When a router takes routes it has learned by one method, say RIP or a statically set route, and announces those routes over another protocol such as OSPF, this is called route redistribution. This feature can come in handy when you have a mix of equipment and protocols in your network, such as occurs when you switch vendors or merge with another organization.

A router, by definition, must have at least two connections. When you set up a router, you must configure every port on the router properly to talk to its connected network IDs, and you must make sure the routing table sends packets to where you want them to go. As a demonstration, Figure 7-41 uses an incredibly common setup: a single gateway router used in a home or small office that's connected to an ISP. Step 2: Set up the LAN: Step 3: Establish Routes: Step 4 (optional): Configure a Dynamic Protocol:

The rules for using any dynamic routing protocol are fairly straightforward. First, dynamic routing protocols are tied to individual NICs, not the entire router. Second, when you connect two routers together, make sure those two NICs are configured to use the same dynamic routing protocol. Third, unless you're in charge of two or more routers, you're probably not going to use any dynamic routing protocol. The amazing part of a dynamic routing protocol is how easy it is to set up. In most cases you just figure out how to turn it on and that's about it. It just starts working.

A router, by definition, must have at least two connections. When you set up a router, you must configure every port on the router properly to talk to its connected network IDs, and you must make sure the routing table sends packets to where you want them to go. As a demonstration, Figure 7-41 uses an incredibly common setup: a single gateway router used in a home or small office that's connected to an ISP. Step 1: Set up the WAN side:

To start, you need to know the network IDs for each side of your router. The WAN side invariably connects to an ISP, so you need to know what the ISP wants you to do. If you bought a static IP address, type it in now. However—brace yourself for a crazy fact—most home Internet connections use DHCP! That's right, DHCP isn't just for your PC. You can set up your router's WAN connection to use it too. DHCP is by far the most common connection to use for home routers. Access your router and locate the WAN connection setup. Figure 7-42 shows the setup for my home router set to DHCP.But what if I called my ISP and bought a single static IP address? This is rarely done anymore, but virtually every ISP will gladly sell you one (although you will pay three to four times as much for the connection). If you use a static IP, your ISP will tell you what to enter, usually in the form of an e-mail message like the following:In such a case, I would need to change the router setting to Static IP (Figure 7-43). Note how changing the drop-down menu to Static IP enables me to enter the information needed.

Protocol: RIPv1 Type, IGP or BGP? and Notes

Type: Distance vector. IGP. Notes: Old; only used variable subnets within an AS

Protocol: RIPv2 Type, IGP or BGP? and Notes

Type: Distance vector. IGP. Notes: Supports VLSM and discontiguous subnets

Protocol: EIGRP Type, IGP or BGP? and Notes

Type: Hybrid. IGP. Cisco proprietary

Protocol: IS-iS Type, IGP or BGP? and Notes

Type: Link state. IGP. Alternative to OSPF

Protocol: OSPF Type, IGP or BGP? and Notes

Type: Link state. IGP. Notes: Fast, popular, use Area IDs (Area 0/backbone)

Protocol: BGP Type, IGP or BGP? and Notes

Type: Path vector. BGP. Notes: Used on the Internet, connects Autonomous Systems

Other connection methods: Be aware that most routers have even more ways to connect. Many home routers come with

USB ports and configuration software. More powerful routers may enable you to connect using the ancient Telnet protocol or its newer and safer equivalent Secure Shell (SSH). These are terminal emulation protocols that look exactly like the terminal emulators seen earlier in this chapter but use the network instead of a serial cable to connect (see Chapter 8for details on these protocols).

A router, by definition, must have at least two connections. When you set up a router, you must configure every port on the router properly to talk to its connected network IDs, and you must make sure the routing table sends packets to where you want them to go. As a demonstration, Figure 7-41 uses an incredibly common setup: a single gateway router used in a home or small office that's connected to an ISP. Step 2: Set up the LAN:

Unlike the WAN side, you usually have total control on the LAN side of the router. You need to choose a network ID, almost always some arbitrarily chosen private range unless you do not want to use NAT. This is why so many home networks have network IDs of 192.168.1/24, 192.168.0/24, and so forth. Once you decide on your LAN-side network ID, you need to assign the correct IP information to the LAN-side NIC. Figure 7-44 shows the configuration for a LAN NIC on my home router.

RIPv2, adopted in 1994, is the current version of RIP. It works the same way as RIPv1, but fixes many of the problems. (2):

VLSM has been added, and authentication is built into the protocol.

Most routers come with a built-in __ interface that enables you to do everything you need on your router and is much easier to use than Cisco's command-line IOS.

Web

My traceroute (mtr) is very similar to traceroute, but it's dynamic, continually updating the route that you've selected (Figure 7-45). You won't find mtr in

Windows; mtr is a Linux tool. Instead, Windows users can use pathping. This utility will ping each node on the route just like mtr, but instead of showing the results of each ping in real time, the pathping utility computes the performance over a set time and then shows you the summary after it has finished.

Distance-vector protocols: ...At this point, if routers were human they'd realize that each router has all the information about the network and stop sending each other routing tables. Routers using distance vector routing protocols, however, aren't that smart. The routers continue to send their complete routing tables to each other, but because the information is the same, the routing tables don't change. At this point, the routers are in convergence (also called steady state), meaning the updating of the routing tables for all the routers has completed. Assuming nothing changes in terms of connections, the routing tables will not change. In this example, it takes 3 iterations to reach convergence. So what happens if the route between Routers B and C breaks? The routers have deleted the higher-cost routes, only keeping the lower-cost route that goes between Routers B and C. Does this mean Router A can no longer connect to Network ID Y and Router D can no longer connect to Network ID X?

Yikes! Yes, it does. At least for a while. Routers that use distance vector routing protocols continue to send to each other their entire routing table at regular intervals. After a few iterations, Routers A and D will once again know how to reach each other, although they will connect through the once-rejected slower connection.

EXAM TIP: A switch that works at more than one layer of the OSI model is called a multilayer switch (MLS). An MLS that handles routing is often called

a Layer 3 switch because it handles IP traffic.

The idea of a "Web-server-in-a-router" works well for single routers, but as a network grows into lots of routers, administrators need more advanced tools that describe, visualize, and configure their entire network. These tools, known as Network Management Software (NMS), know how to talk to your routers, switches, and even your computers to give you an overall view of your network. In most cases, NMS manifests as

a Web site where administrators may inspect the status of the network and make adjustments as needed.

Note: Much initial router configuration harkens back to the methods used in the early days of networking when massive mainframe computers were the computing platform available. Researchers used dumb terminals—machines that were little more than a keyboard, monitor, and network connection—to connect to the mainframe and interact. You connect to and configure many modern routers using software that enables your PC to pretend to be

a dumb terminal. These programs are called terminal emulators; the screen you type into is called a console.

Autonomous Systems communicate with each other using a protocol, called generically an Exterior Gateway Protocol (EGP). The network or networks within an AS communicate with protocols as well; these are called generically Interior Gateway Protocols (IGPs). Let me repeat this to make sure you understand the difference between EGP and IGP. Neither EGP nor IGP is

a dynamic routing protocol; rather these are terms used by the large Internet service providers to separate their interconnected routers using ASNs from other interconnected networks that are not part of this special group of companies. The easy way to keep these terms separate is to appreciate that although many protocols are used withinAutonomous Systems, such as RIP, the Internet has settled on one protocol for communication between each AS: the Border Gateway Protocol (BGP). BGP is the glue of the Internet, connecting all of the Autonomous Systems. Other dynamic routing protocols such as RIP are, by definition, IGP. The current version of BGP is BGP-4.

BGP is an amazing and powerful dynamic routing protocol, but unless you're working deep in the router room of an AS, odds are good you'll never see it in action. Those who need to connect a few routers together usually turn to

a family of dynamic routing protocols that work very differently from distance vector routing protocols.

The limitations of RIP motivated the demand for

a faster protocol that took up less bandwidth on a WAN. The basic idea was to come up with a dynamic routing protocol that was more efficient than routers that simply sent out their entire routing table at regular intervals. Why not instead simply announce and forward individual route changes as they appeared? That is the basic idea of a link state dynamic routing protocol. There are only two link state dynamic routing protocols: OSPF and IS-IS.

Never plug a new router into an existing network! There's no telling what that router might start doing. Does it have DHCP? You might now have a rogue DHCP server. Are there routes on that router that match up to your network addresses? Then you see packets disappearing into the great bit bucket in the sky. Always fully configure your router before you place it online. Most router people use __ to connect to the new router

a laptop and a crossover cable

Distance vector routing protocols calculate the total cost to get to a particular network ID and compare that cost to the total cost of all the other routes to get to that same network ID. The router then chooses the route with the lowest cost. For this to work, routers using a distance vector routing protocol transfer their entire routing table to other routers in the WAN. Each distance vector routing protocol has

a maximum number of hops that a router will send its routing table to keep traffic down.

EXAM TIP: A switch that works at more than one layer of the OSI model is called

a multilayer switch (MLS). An MLS that handles routing is often called a Layer 3 switch because it handles IP traffic.

The explosive growth of the Internet in the 1980s required a fundamental reorganization in the structure of the Internet itself, and one big part of this reorganization was the call to make the "big" routers use a standardized dynamic routing protocol. Implementing this was much harder than you might think because the entities that govern how the Internet works do so in a highly decentralized fashion. Even the organized groups, such as the Internet Society (ISOC), the Internet Assigned Numbers Authority (IANA), and the Internet Engineering Task Force (IETF), are made up of many individuals, companies, and government organizations from across the globe. This decentralization made the reorganization process take time and many meetings. What came out of the reorganization eventually was

a multitiered structure. At the top of the structure sits many Autonomous Systems. An Autonomous System (AS) is one or more networks that are governed by a single dynamic routing protocol within that AS. Figure 7-29illustrates the decentralized structure of the Internet.

OSPF offers a number of improvements over RIP. When you first launch OSPF-capable routers, they send out Hello packets, looking for other OSPF routers (see Figure 7-31). After two adjacent routers form

a neighborship through the Hello packets, they exchange information about routers and networks through link state advertisement (LSA) packets. LSAs are sourced by each router and are flooded from router to router through each OSPF area.

PAT takes care of all of the problems facing

a network exposed to the Internet.`

Autonomous Systems communicate with each other using

a protocol, called generically an Exterior Gateway Protocol (EGP). The network or networks within an AS communicate with protocols as well; these are called generically Interior Gateway Protocols (IGPs).

Distance vector routing protocols work fine in a scenario such as the previous one that has only four routers. Even if you lose a router, a few minutes later the network returns to convergence. But imagine if you had tens of thousands of routers (the Internet). Convergence could take a very long time indeed. As a result,

a pure distance vector routing protocol works fine for a network with a few (less than ten) routers, but it isn't good for large networks.

Routing begins as packets come into the router for handling (Figure 7-5). The router immediately strips off any of the Layer 2 information and drops the resulting IP packet into

a queue (Figure 7-6). The important point to make here is that the router doesn't care where the packet originated. Everything is dropped into the same queue based on the time it arrived.

Earlier in the chapter, you learned that routing tables contain a factor called a metric. A metric is

a relative value that routers use when they have more than one route to get to another network. Unlike the gateway routers in our homes, a more serious router will often have multiple connections to get to a particular network. This is the beauty of routers combined with dynamic protocols. If a router suddenly loses a connection, it has alternative routes to the same network. It's the role of the metric setting for the router to decide which route to use.

Most techs today get their first exposure to routers with the ubiquitous home routers that enable PCs to connect to a cable or fiber modem (Figure 7-2). The typical home router, however, serves multiple functions, often combining

a router, a switch, and other features like a firewall (for protecting your network from intruders), a DHCP server, and much more into a single box.

The granddaddy of all distance vector routing protocols is the Routing Information Protocol (RIP). The first version of RIP—called RIPv1—dates from the 1980s, although its predecessors go back all the way to the beginnings of the Internet in the 1960s. RIP (either version) has a maximum hop count of 15, so your router will not talk to another router more than 15 routers away. This plagues RIP because

a routing table request can literally loop all the way around back to the initial router.

There is no single rule to set the metric value in a routing table. The various types of dynamic protocols use different criteria. Here are the most common criteria for determining a metric. Delay:Say you have a race car that has a top speed of 200 miles per hour, but it takes 25 minutes to start the car. If you press the gas pedal, it takes 15 seconds to start accelerating. If the engine runs for more than 20 minutes, the car won't go faster than 50 miles per hour. These issues prevent the car from doing what it should be able to do: go 200 miles per hour. Delay is like that. Hundreds of issues occur that slow down network connections between routers. These issues are known collectively as latency. A great example is

a satellite connection. The distance between the satellite and the antenna causes a delay that has nothing to do with the speed of the connection.

You can use port forwarding to hide

a service hosted inside your network by changing the default port number for that service. To hide an internal Web server, for example, you could change the request port number to something other than port 80, the default for HTTP traffic. The router in Figure 7-16, for example, is configured to forward all port 8080 packets to the internal Web server at port 80. To access that internal Web site from outside your local network, you would have to change the URL in the Web browser by specifying the port request number. Figure 7-17 shows a browser that has :8080 appended to the URL, which tells the browser to make the HTTP request to port 8080 rather than port 80.

Most industry (that is, not home) routers enable you to add interfaces. You,,,

buy the router and then snap in different types of interfaces depending on your needs. Note the Cisco router in Figure 7-12. Like most Cisco routers, it comes with removable modules. If you're connecting Ethernet to a DOCSIS (cable modem) network, you buy an Ethernet module and a DOCSIS module.

Routing begins as packets come into the router for handling (Figure 7-5). The router immediately strips off any of the Layer 2 information and drops the resulting IP packet into a queue (Figure 7-6). The important point to make here is that the router doesn't care where the packet originated. Everything is dropped into the same queue based on the time it arrived. The router inspects each packet's destination IP address and then sends the IP packet out the correct port. To perform this inspection, every router comes with a routing table that tells the router exactly where to send the packets. This table is the key to understanding and controlling the process of forwarding packets to their proper destination. Figure 7-7 shows a very simple routing table for a typical home router. Each row in this routing table defines

a single route. Each column identifies one of two specific criteria. Some columns define which packets are for the route and other columns define which port to send them out. (We'll break these down shortly.)

The explosive growth of the Internet in the 1980s required a fundamental reorganization in the structure of the Internet itself, and one big part of this reorganization was the call to make the "big" routers use a standardized dynamic routing protocol. Implementing this was much harder than you might think because the entities that govern how the Internet works do so in a highly decentralized fashion. Even the organized groups, such as the Internet Society (ISOC), the Internet Assigned Numbers Authority (IANA), and the Internet Engineering Task Force (IETF), are made up of many individuals, companies, and government organizations from across the globe. This decentralization made the reorganization process take time and many meetings. What came out of the reorganization eventually was a multitiered structure. At the top of the structure sits many Autonomous Systems. An Autonomous System (AS) is one or more networks that are governed by a single dynamic routing protocol within that AS. Figure 7-29illustrates the decentralized structure of the Internet. Autonomous Systems do not deliver data between each other using IP addresses, but rather use

a special globally unique Autonomous System Number (ASN) assigned by IANA. Originally a 16-bit number, the current ASNs are 32 bits, displayed as two 16-bit numbers separated by a dot. So, 1.33457 would be a typical ASN. Just as you would assign an IP address to a router, you would configure the router to use or be the ASN assigned by IANA. See Figure 7-30.

The most important trick to reading a routing table is to remember that __ means "anything."

a zero (0)

There is exactly one protocol that doesn't really fit into either the distance vector or link state camp: Cisco's proprietary Enhanced Interior Gateway Routing Protocol (EIGRP). Back in the days when RIP was dominant, there was a huge outcry for an improved RIP, but OSPF wasn't yet out. Cisco, being the dominant router company in the world (a crown it still wears to this day), came out with the Interior Gateway Routing Protocol (IGRP), which was quickly replaced with EIGRP. EIGRP has aspects of both distance vector and link state protocols, placing it uniquely into its own "hybrid" category. Cisco calls EIGRP an

advanced distance vector protocol.

Autonomous Systems communicate with each other using a protocol, called generically

an Exterior Gateway Protocol (EGP).

The limitations of RIP motivated the demand for a faster protocol that took up less bandwidth on a WAN. The basic idea was to come up with a dynamic routing protocol that was more efficient than routers that simply sent out their entire routing table at regular intervals. Why not instead simply

announce and forward individual route changes as they appeared? That is the basic idea of a link state dynamic routing protocol. There are only two link state dynamic routing protocols: OSPF and IS-IS.

IS-IS is extremely similar to OSPF. It uses the concept of __ and __.

areas; send-only updates to routing tables

OSPF isn't popular by accident. It scales to large networks quite well and is supported by all but the most basic routers. By the way, did I forget to mention that OSPF also supports __ and that the shortest-path-first method, by definition, prevents loops?

authentication

RIPv1 sent out an update every 30 seconds. This also turned into a big problem because every router on the network would send its routing table at the same time, causing huge network overloads. As if these issues weren't bad enough, RIPv1 didn't know how to use variable-length subnet masking (VLSM), where networks connected through the router use different subnet masks. Plus RIPv1 routers had no

authentication, leaving them open to hackers sending false routing table information. RIP needed an update.

A metric is a relative value that defines the "cost" of using this route. The power of routing is that a packet can take more than one route to get to the same place. If a route were to suddenly cut off, then you would have an alternative. Figure 7-10 shows a networked router with two routes to the same place. The router has a route to Network B with a metric of 1 using Route 1, and a second route to Network B using Route 2 with a metric of 10. Lowest routes always win. In this case, the router will always use the route with the metric of 1, unless that route suddenly stopped working. In that case, the router would

automatically switch to the route with the 10 metric (Figure 7-11). This is the cornerstone of how the Internet works! The entire Internet is nothing more than a whole bunch of big, powerful routers connected to lots of other big, powerful routers. Connections go up and down all the time, and routers (with multiple routes) constantly talk to each other, detecting when a connection goes down and automatically switching to alternate routes.

OSPF's metric is cost, which is a function of bandwidth. All possible ways to get to a destination network are computed based on cost, which is proportional

bandwidth, which is in turn proportional to the interface type (Gigabit Ethernet, 10-Gigabit Ethernet, and so on). The routers choose the lowest total cost route to a destination network.

OSPF's metric is cost, which is a function of

bandwidth. All possible ways to get to a destination network are computed based on cost, which is proportional to bandwidth, which is in turn proportional to the interface type (Gigabit Ethernet, 10-Gigabit Ethernet, and so on). The routers choose the lowest total cost route to a destination network.

Most industry (that is, not home) routers enable you to add interfaces. You buy the router and then snap in different types of interfaces depending on your needs. Note the Cisco router in Figure 7-12. Like most Cisco routers, it comes with removable modules. If you're connecting Ethernet to a DOCSIS (cable modem) network, you

buy an Ethernet module and a DOCSIS module.

You can use port forwarding to hide a service hosted inside your network by changing the default port number for that service. To hide an internal Web server, for example, you could change the request port number to something other than port 80, the default for HTTP traffic. The router in Figure 7-16, for example, is configured to forward all port 8080 packets to the internal Web server at port 80. To access that internal Web site from outside your local network, you would have to

change the URL in the Web browser by specifying the port request number. Figure 7-17 shows a browser that has :8080 appended to the URL, which tells the browser to make the HTTP request to port 8080 rather than port 80.

You can use port forwarding to hide a service hosted inside your network by

changing the default port number for that service. To hide an internal Web server, for example, you could change the request port number to something other than port 80, the default for HTTP traffic. The router in Figure 7-16, for example, is configured to forward all port 8080 packets to the internal Web server at port 80. To access that internal Web site from outside your local network, you would have to change the URL in the Web browser by specifying the port request number. Figure 7-17 shows a browser that has :8080 appended to the URL, which tells the browser to make the HTTP request to port 8080 rather than port 80.

Routing begins as packets come into the router for handling (Figure 7-5). The router immediately strips off any of the Layer 2 information and drops the resulting IP packet into a queue (Figure 7-6). The important point to make here is that the router doesn't care where the packet originated. Everything is dropped into the same queue based on the time it arrived. The router inspects each packet's destination IP address and then sends the IP packet out the correct port. To perform this inspection, every router

comes with a routing table that tells the router exactly where to send the packets. This table is the key to understanding and controlling the process of forwarding packets to their proper destination. Figure 7-7 shows a very simple routing table for a typical home router. Each row in this routing table defines a single route. Each column identifies one of two specific criteria. Some columns define which packets are for the route and other columns define which port to send them out. (We'll break these down shortly.)

A routing table looks like a table, so there's an assumption that the router will start at the top of the table and march down until it finds the correct route. That's not accurate. The router...

compares the destination IP address on a packet to every route listed in the routing table and only then sends the packet out. If a packet works for more than one route, the router will use the better route (we'll discuss this more in a moment).

What came out of the reorganization eventually was a multitiered structure. At the top of the structure sits many Autonomous Systems. An Autonomous System (AS) is one or more networks that are governed by a single dynamic routing protocol within that AS. Figure 7-29illustrates the decentralized structure of the Internet. Autonomous Systems do not deliver data between each other using IP addresses, but rather use a special globally unique Autonomous System Number (ASN) assigned by IANA. Originally a 16-bit number, the current ASNs are 32 bits, displayed as two 16-bit numbers separated by a dot. So, 1.33457 would be a typical ASN. Just as you would assign an IP address to a router, you would

configure the router to use or be the ASN assigned by IANA. See Figure 7-30.

The complex part of installation comes with the specialized equipment and steps to connect to the router and configure it for your network needs. This section, therefore, focuses on the many methods and procedures used to access and configure a router. The single biggest item to keep in mind here is that although there are many different methods for connecting, hundreds of interfaces, and probably millions of different configurations for different routers, the functions are still the same. Whether you're using an inexpensive home router or a hyper-powerful Internet backbone router, you are always working to do one main job:

connect different networks.

When you first unwrap a new Cisco router, you plug the rollover cable into the __ port on the router (Figure 7-33) and a __ port on a PC.

console; serial. If you don't have a serial port, then buy a USB-to-serial adapter.

Assume you have four routers connected as shown in Figure 7-22. All of the routers have routes set up between each other with the metrics shown. You add two new networks, one that connects to Router A and the other to Router D. For simplicity, call them Network ID X and Network ID Y. A computer on one network wants to send packets to a computer on the other network, but the routers in between Routers A and D don't yet know the two new network IDs. That's when distance vector routing protocols work their magic.Because all of the routers use a distance vector routing protocol, the problem gets solved quickly.:At a certain defined time interval (usually 30 seconds or less), the routers begin sending each other their routing tables (the routers each send their entire routing table, but for simplicity just concentrate on the two network IDs in question). On the first iteration, Router A sends its route to Network ID X to Routers B and C. Router D sends its route to Network ID Y to Router C (Figure 7-23).This is great—Routers B and C now know how to get to Network ID X, and Router C can get to Network ID Y. There's still no complete path, however, between Network ID X and Network ID Y. That's going to take another interval. After another set amount of time, the routers again send their now updated routing tables to each other, as shown in Figure 7-24. Router A knows a path now to Network ID Y, and Router D knows a path to Network ID X. As a side effect, Router B and Router C have two routes to Network ID X. Router B can get to Network ID X through Router A and through Router C. Similarly, Router C can get to Network ID X through Router A and through Router B. What to do? In cases where the router discovers multiple routes to the same network ID, the distance vector routing protocol deletes all but the route with the lowest total cost. On the next iteration, Routers A and D get updated information about the lower total-cost hops to connect to Network IDs X and Y (Figure 7-26). Just as Routers B and C only kept the routes with the lowest costs, Routers A and D keep only the lowest-cost routes to the networks. Now Routers A and D have a lower-cost route to Network IDs X and Y. They've removed the higher-cost routes and begin sending data. At this point, if routers were human they'd realize that each router has all the information about the network and stop sending each other routing tables. Routers using distance vector routing protocols, however, aren't that smart. The routers...

continue to send their complete routing tables to each other, but because the information is the same, the routing tables don't change.

Based on what you've read up to this point, it would seem that routes in your routing tables come from two sources: either they are manually entered or they are detected at setup by the router. In either case, a route seems to be a static beast, just sitting there and never changing. And based on what you've seen so far, that is absolutely true. Routers have static routes. But most routers also have the capability to update their routes dynamically, with

dynamic routing protocols (both IPv4 and IPv6).

Based on what you've read up to this point, it would seem that routes in your routing tables come from two sources: either they are manually entered or they are detected at setup by the router. In either case, a route seems to be a static beast, just sitting there and never changing. And based on what you've seen so far, that is absolutely true. Routers have static routes. But most routers also have the capability to update their routes...

dynamically, with dynamic routing protocols (both IPv4 and IPv6).

Assume you have four routers connected as shown in Figure 7-22. All of the routers have routes set up between each other with the metrics shown. You add two new networks, one that connects to Router A and the other to Router D. For simplicity, call them Network ID X and Network ID Y. A computer on one network wants to send packets to a computer on the other network, but the routers in between Routers A and D don't yet know the two new network IDs. That's when distance vector routing protocols work their magic.Because all of the routers use a distance vector routing protocol, the problem gets solved quickly.:At a certain defined time interval (usually 30 seconds or less), the routers begin sending each other their routing tables (the routers each send their entire routing table, but for simplicity just concentrate on the two network IDs in question). On the first iteration, Router A sends its route to Network ID X to Routers B and C. Router D sends its route to Network ID Y to Router C (Figure 7-23).This is great—Routers B and C now know how to get to Network ID X, and Router C can get to Network ID Y. There's still no complete path, however, between Network ID X and Network ID Y. That's going to take another interval. After another set amount of time, the routers again send their now updated routing tables to each other, as shown in Figure 7-24. Router A knows a path now to Network ID Y, and Router D knows a path to Network ID X. As a side effect, Router B and Router C have two routes to Network ID X. Router B can get to Network ID X through Router A and through Router C. Similarly, Router C can get to Network ID X through Router A and through Router B. What to do? In cases where the router discovers multiple routes to the same network ID, the distance vector routing protocol deletes all but the route with the lowest total cost. On the next iteration, Routers A and D get updated information about the lower total-cost hops to connect to Network IDs X and Y (Figure 7-26). Just as Routers B and C only kept the routes with the lowest costs, Routers A and D keep only the lowest-cost routes to the networks. Now Routers A and D have a lower-cost route to Network IDs X and Y. They've removed the higher-cost routes and begin sending data. At this point, if routers were human they'd realize that each router has all the information about the network and stop sending each other routing tables. Routers using distance vector routing protocols, however, aren't that smart. The routers continue to send their complete routing tables to each other, but because the information is the same, the routing tables don't change. At this point, the routers are in

convergence (also called steady state), meaning the updating of the routing tables for all the routers has completed. Assuming nothing changes in terms of connections, the routing tables will not change. In this example, it takes three iterations to reach convergence.

Exam Tip: OSPF __ and __ almost immediately, making it the routing protocol of choice in most large enterprise networks.

corrects link failures and creates convergence

OSPF's metric is

cost, which is a function of bandwidth. All possible ways to get to a destination network are computed based on cost, which is proportional to bandwidth, which is in turn proportional to the interface type (Gigabit Ethernet, 10-Gigabit Ethernet, and so on). The routers choose the lowest total cost route to a destination network.

Earlier in the chapter, you learned that routing tables contain a factor called a metric. A metric is a relative value that routers use when they have more than one route to get to another network. Unlike the gateway routers in our homes, a more serious router will often have multiple connections to get to a particular network. This is the beauty of routers combined with dynamic protocols. If a router suddenly loses a connection, it has alternative routes to the same network. It's the role of the metric setting for the router to

decide which route to use.

Assume you have four routers connected as shown in Figure 7-22. All of the routers have routes set up between each other with the metrics shown. You add two new networks, one that connects to Router A and the other to Router D. For simplicity, call them Network ID X and Network ID Y. A computer on one network wants to send packets to a computer on the other network, but the routers in between Routers A and D don't yet know the two new network IDs. That's when distance vector routing protocols work their magic.Because all of the routers use a distance vector routing protocol, the problem gets solved quickly.:At a certain defined time interval (usually 30 seconds or less), the routers begin sending each other their routing tables (the routers each send their entire routing table, but for simplicity just concentrate on the two network IDs in question). On the first iteration, Router A sends its route to Network ID X to Routers B and C. Router D sends its route to Network ID Y to Router C (Figure 7-23).This is great—Routers B and C now know how to get to Network ID X, and Router C can get to Network ID Y. There's still no complete path, however, between Network ID X and Network ID Y. That's going to take another interval. After another set amount of time, the routers again send their now updated routing tables to each other, as shown in Figure 7-24. Router A knows a path now to Network ID Y, and Router D knows a path to Network ID X. As a side effect, Router B and Router C have two routes to Network ID X. Router B can get to Network ID X through Router A and through Router C. Similarly, Router C can get to Network ID X through Router A and through Router B. What to do? In cases where the router discovers multiple routes to the same network ID, the distance vector routing protocol...

deletes all but the route with the lowest total cost

With port forwarding, you can

designate a specific local address for various network services. Computers outside the network can request a service using the public IP address of the router and the port number of the desired service. The port-forwarding router would examine the packet, look at the list of services mapped to local addresses, and then send that packet along to the proper recipient.

The CompTIA Network+ objectives list EIGRP as a __ protocol, right along with RIP.

distance vector

There is exactly one protocol that doesn't really fit into either the distance vector or link state camp: Cisco's proprietary Enhanced Interior Gateway Routing Protocol (EIGRP). Back in the days when RIP was dominant, there was a huge outcry for an improved RIP, but OSPF wasn't yet out. Cisco, being the dominant router company in the world (a crown it still wears to this day), came out with the Interior Gateway Routing Protocol (IGRP), which was quickly replaced with EIGRP. EIGRP has aspects of both

distance vector and link state protocols, placing it uniquely into its own "hybrid" category. Cisco calls EIGRP an advanced distance vector protocol.

Routing protocols have been around for a long time, and, like any technology, there have been a number of different choices and variants over those years. CompTIA Network+ competencies break these many types of routing protocols into three distinct groups:

distance vector, link state, and hybrid.

DNAT stands for

dynamic NAT

With __ many computers can share a pool of routable IP addresses that number fewer than the computers. The NAT might have 10 routable IP addresses, for example, to serve 40 computers on the LAN. LAN traffic uses the internal, private IP addresses. When a computer requests information beyond the network, the NAT doles out a routable IP address from its pool for that communication. Dynamic NAT is also called pooled NAT. This works well enough—unless you're the unlucky 11th person to try to access the Internet from behind the company NAT—but has the obvious limitation of still needing many true, expensive, routable IP addresses.

dynamic NAT (DNAT),

BGP is an amazing and powerful __ protocol,

dynamic routing

Without __, the complex, self-healing Internet we all enjoy today couldn't exist.

dynamic routing

Routing begins as packets come into the router for handling (Figure 7-5). The router immediately strips off any of the Layer 2 information and drops the resulting IP packet into a queue (Figure 7-6). The important point to make here is that the router doesn't care where the packet originated. Everything is dropped into the same queue based on the time it arrived. The router inspects...

each packet's destination IP address and then sends the IP packet out the correct port. To perform this inspection, every router comes with a routing table that tells the router exactly where to send the packets. This table is the key to understanding and controlling the process of forwarding packets to their proper destination. Figure 7-7 shows a very simple routing table for a typical home router. Each row in this routing table defines a single route. Each column identifies one of two specific criteria. Some columns define which packets are for the route and other columns define which port to send them out. (We'll break these down shortly.)

OSPF offers a number of improvements over RIP. When you first launch OSPF-capable routers, they send out Hello packets, looking for other OSPF routers (see Figure 7-31). After two adjacent routers form a neighborship through the Hello packets, they exchange information about routers and networks through link state advertisement (LSA) packets. LSAs are sourced by

each router and are flooded from router to router through each OSPF area.

A hop is defined as

each time a packet goes through a router. Let's talk about hops for a moment. Figure 7-21 shows a series of routers. If you're on a computer in Network ID X and you ping a computer in Network ID Y, you go one hop. If you ping a computer in Network ID Z, you go two hops.

What the AS-to-AS routers are called

edge routers

Most router people use a laptop and a crossover cable to connect to the new router. To get to the Web interface, first set a static address for your computer that will place your PC on the same network ID as the router. If, for example, the router is set to 192.168.1.1/24 from the factory, set your computer's IP address to 192.168.1.2/24. Then connect to the router (some routers tell you exactly where to connect, so read the documentation first), and check the link lights to verify you're properly connected. Open up your Web browser and type in the IP address, as shown in Figure 7-37. Assuming you've done everything correctly, you almost always need to

enter a default user name and password, as shown in Figure 7-38. The default user name and password come with the router's documentation. If you don't have that information, plenty of Web sites list this data. Do a Web search on "default user name password" to find one. Once you've accessed the Web interface, you're on your own to poke around to find the settings you need. There's no standard interface—even between different versions of the same router make and model. When you encounter a new interface, take some time and inspect every tab and menu to learn about the router's capabilities. You'll almost always find some really cool features!

I'll let you in on a little secret. Routers aren't the only devices that use routing tables. In fact,

every node (computer, printer, TCP/IP-capable soda dispenser, whatever) on the network also has a routing table.

Basic router configuration: A router, by definition, must have at least two connections. When you set up a router, you must configure

every port on the router properly to talk to its connected network IDs, and you must make sure the routing table sends packets to where you want them to go. As a demonstration, Figure 7-41 uses an incredibly common setup: a single gateway router used in a home or small office that's connected to an ISP.

RIPv1 sent out an update every 30 seconds. This also turned into a big problem because

every router on the network would send its routing table at the same time, causing huge network overloads.

Routing begins as packets come into the router for handling (Figure 7-5). The router immediately strips off any of the Layer 2 information and drops the resulting IP packet into a queue (Figure 7-6). The important point to make here is that the router doesn't care where the packet originated. Everything is dropped into the same queue based on the time it arrived. The router inspects each packet's destination IP address and then sends the IP packet out the correct port. To perform this inspection, every router comes with a routing table that tells the router

exactly where to send the packets. This table is the key to understanding and controlling the process of forwarding packets to their proper destination. Figure 7-7 shows a very simple routing table for a typical home router. Each row in this routing table defines a single route. Each column identifies one of two specific criteria. Some columns define which packets are for the route and other columns define which port to send them out. (We'll break these down shortly.)

Never plug a new router into an existing network! There's no telling what that router might start doing. Does it have DHCP? You might now have a rogue DHCP server. Are there routes on that router that match up to your network addresses? Then you see packets disappearing into the great bit bucket in the sky. Always fully configure your router before you place it online. Most router people use a laptop and a crossover cable to connect to the new router. To get to the Web interface

first set a static address for your computer that will place your PC on the same network ID as the router. If, for example, the router is set to 192.168.1.1/24 from the factory, set your computer's IP address to 192.168.1.2/24. Then connect to the router (some routers tell you exactly where to connect, so read the documentation first), and check the link lights to verify you're properly connected. Open up your Web browser and type in the IP address, as shown in Figure 7-37.

RIPv2, adopted in 1994, is the current version of RIP. It works the same way as RIPv1, but

fixes many of the problems. VLSM has been added, and authentication is built into the protocol.

The CompTIA Network+ exam objectives list BGP as a

hybrid routing protocol, but it's more technically a path vector routing protocol. BGP doesn't have the same type of routing table as you've seen so far. BGP routers advertise information passed to them from different Autonomous Systems' edge routers—that's what the AS-to-AS routers are called. BGP forwards these advertisements that include the ASN and other very non-IP items.

enable, press ENTER, and the prompt changes to Router# This is the IOS user mode prompt—you can't do too much here. To get to the fun, you need to enter privileged EXEC mode. Type enable, press ENTER, and the prompt changes to Router# Note A new Cisco router often won't have a password, but all good admins know to add one. From here, IOS gets very complex. For example, the commands to set the IP address for one of the router's ports look like this: Router# configure terminal Router(config)# interface GigabitEthernet 0/0 Router(config-if)# ip address 192.168.4.10 255.255.255.0 Router(config-if)# ^Z Router# copy run start Cisco has long appreciated that initial setup is a bit of a challenge, so a brand-new router will show you the following prompt: Would you like to enter the initial configuration dialog? [yes/no]? Simply

follow the prompts, and the most basic setup is handled for you. You will run into Cisco equipment as a network tech, and you will need to know how to use the console from time to time. For the most part, though, you'll access a router—especially one that's already configured—through Web access or network management software.

A router is any piece of hardware or software that

forwards packets based on their destination IP address.

Exam tip: The CompTIA Network+ objectives list MTU as a switching or routing metric, and it definitely falls into the former category. The maximum transmission unit (MTU)determines the largest frame a particular technology can handle. Ethernet uses 1500-byte frames. Other technologies use smaller or larger frames.If an IP packet is too big for a particular technology, that packet is broken into pieces to fit into the network protocol in what is called

fragmentation. Fragmentation is bad because it slows down the movement of IP packets. By setting the optimal MTU size before IP packets are sent, you avoid or at least reduce fragmentation.

Never plug a new router into an existing network! There's no telling what that router might start doing. Does it have DHCP? You might now have a rogue DHCP server. Are there routes on that router that match up to your network addresses? Then you see packets disappearing into the great bit bucket in the sky. Always

fully configure your router before you place it online.

Understanding the different ways routers work is one thing. Actually walking up to a router and making it work is a different animal altogether. This section examines practical router installation. Physical installation isn't very complicated. With a home router, you

give it power and then plug in connections. With a business-class router, you insert it into a rack, give it power, and plug in connections.

The idea of a "Web-server-in-a-router" works well for single routers, but as a network grows into lots of routers, administrators need more advanced tools that describe, visualize, and configure their entire network. These tools, known as Network Management Software (NMS), know how to talk to your routers, switches, and even your computers to give you an overall view of your network. In most cases, NMS manifests as a Web site where administrators may inspect the status of the network and make adjustments as needed. I divide NMS into two camps: proprietary tools made by the folks who make managed devices (OEM) and third-party tools. OEM tools are generally very powerful and easy to use, but only work on that OEM's devices. Figure 7-39 shows an example of Cisco Network Assistant, one of Cisco's NMS applications. Others include the Cisco Configuration Professional and Cisco Prime Infrastructure, an enterprise-level tool. A number of third-party NMS tools are out there as well; you can even find some pretty good freeware NMS options. These tools are invariably

harder to configure and must constantly be updated to try to work with as many devices as possible. They usually lack the amount of detail you see with OEM NMS and lack interactive graphical user interfaces. For example, various Cisco products enable you to change the IP address of a port, whereas third-party tools will only let you see the current IP settings for that port.

Most routers come with a built-in Web interface that enables you to do everything you need on your router and is much easier to use than Cisco's command-line IOS. For a Web interface to work, however, the router must

have a built-in IP address from the factory, or you have to enable the Web interface after you've given the router an IP address. Bottom line? If you want to use a Web interface, you have to know the router's IP address. If a router has a default IP address, you will find it in the documentation, as shown in Figure 7-36.

Routers enable you to connect different types of network technologies. You now know that routers strip off all of the Layer 2 data from the incoming packets, but thus far you've only seen routers that connect to different Ethernet networks—and that's just fine with routers. But routers can connect to almost anything that stores IP packets. Not to take away from some very exciting upcoming chapters, but Ethernet is not the only networking technology out there. Once you want to start making long-distance connections, Ethernet disappears, and technologies with names like Data-Over-Cable Service Interface Specification (DOCSIS) (for cable modems), Frame Relay, and Asynchronous Transfer Mode (ATM) take over. These technologies are not Ethernet, and they all work very differently than Ethernet. The only common feature of these technologies is

hey all carry IP packets inside their Layer 2 encapsulations.

Configuring NAT on __ is a no-brainer as these boxes invariably have NAT turned on automatically. Figure 7-18 shows the screen on my home router for NAT. Note the radio buttons that say Gateway and Router. By default, the router is set to Gateway, which is Linksys-speak for "NAT is turned on." If I wanted to turn off NAT, I would set the radio button to

home routers

There is no single rule to set the metric value in a routing table. The various types of dynamic protocols use different criteria. Here are the most common criteria for determining a metric: Description: The __ is a fundamental metric value for the number of routers a packet will pass through on the way to its destination network. For example, if router A needs to go through three intermediate routers to reach a network connected to router C, the hop count is 4. The hop occurs when the packet is handed off to each subsequent router

hop count

The CompTIA Network+ objectives list BGP as a __ protocol. Read the question carefully and if BGP is your only answer as hybrid, take it.

hybrid routing

Most routers come with a built-in Web interface that enables you to do everything you need on your router and is much easier to use than Cisco's command-line IOS. For a Web interface to work, however, the router must have a built-in IP address from the factory, or you have to enable the Web interface after you've given the router an IP address. Bottom line? If you want to use a Web interface, you have to know the router's IP address. If a router has a default IP address, you will find it

in the documentation

Routing begins as packets come into the router for handling (Figure 7-5). The router immediately strips off any of the Layer 2 information and drops the resulting IP packet into a queue (Figure 7-6). The important point to make here is that the router doesn't care where the packet originated. Everything is dropped into the same queue based on the time it arrived. The router ...

inspects each packet's destination IP address and then sends the IP packet out the correct port. To perform this inspection, every router comes with a routing table that tells the router exactly where to send the packets. This table is the key to understanding and controlling the process of forwarding packets to their proper destination. Figure 7-7 shows a very simple routing table for a typical home router. Each row in this routing table defines a single route. Each column identifies one of two specific criteria. Some columns define which packets are for the route and other columns define which port to send them out. (We'll break these down shortly.)

Most industry (that is, not home) routers enable you to add

interfaces

Never plug a new router

into an existing network! There's no telling what that router might start doing. Does it have DHCP? You might now have a rogue DHCP server. Are there routes on that router that match up to your network addresses? Then you see packets disappearing into the great bit bucket in the sky. Always fully configure your router before you place it online.

Note: There are two places where you'll find routers that do not have default routes:

isolated (as in not on the Internet) internetworks, where every router knows about every single network, and the monstrous "Tier One" backbone, where you'll find the routers that make the main connections of the Internet.

The obvious drawback to relying exclusively on PAT for network address translation is that

it only works for outgoing communication, not incoming communication. For traffic originating outside the network to access an internal machine, such as a Web server hosted inside your network, you need to use other technologies.

Exam tip: The CompTIA Network+ objectives list MTU as a switching or routing metric, and it definitely falls into the former category. The maximum transmission unit (MTU)determines the largest frame a particular technology can handle. Ethernet uses 1500-byte frames. Other technologies use smaller or larger frames.If an IP packet is too big for a particular technology, that packet is broken into pieces to fit into the network protocol in what is called fragmentation. Fragmentation is bad because

it slows down the movement of IP packets. By setting the optimal MTU size before IP packets are sent, you avoid or at least reduce fragmentation.

My traceroute (mtr) is very similar to traceroute, but

it's dynamic, continually updating the route that you've selected (Figure 7-45). You won't find mtr in Windows; mtr is a Linux tool. Instead, Windows users can use pathping. This utility will ping each node on the route just like mtr, but instead of showing the results of each ping in real time, the pathping utility computes the performance over a set time and then shows you the summary after it has finished.

There is no single rule to set the metric value in a routing table. The various types of dynamic protocols use different criteria. Here are the most common criteria for determining a metric. Delay:Say you have a race car that has a top speed of 200 miles per hour, but it takes 25 minutes to start the car. If you press the gas pedal, it takes 15 seconds to start accelerating. If the engine runs for more than 20 minutes, the car won't go faster than 50 miles per hour. These issues prevent the car from doing what it should be able to do: go 200 miles per hour. Delay is like that. Hundreds of issues occur that slow down network connections between routers. These issues are known collectively as

latency. A great example is a satellite connection. The distance between the satellite and the antenna causes a delay that has nothing to do with the speed of the connection.

The limitations of RIP motivated the demand for a faster protocol that took up less bandwidth on a WAN. The basic idea was to come up with a dynamic routing protocol that was more efficient than routers that simply sent out their entire routing table at regular intervals. Why not instead simply announce and forward individual route changes as they appeared? That is the basic idea of a __dynamic routing protocol.

link state

LSA stands for

link state advertisement

OSPF offers a number of improvements over RIP. When you first launch OSPF-capable routers, they send out Hello packets, looking for other OSPF routers (see Figure 7-31). After two adjacent routers form a neighborship through the Hello packets, they exchange information about routers and networks through

link state advertisement (LSA) packets. LSAs are sourced by each router and are flooded from router to router through each OSPF area.

Make sure you know that IS-IS is a__ protocol, and if you ever see two routers using it, call me as I've never seen IS-IS in action.

link state dynamic routing

OSPF isn't popular by accident. It scales to large networks quite well and is supported by all but the most basic routers. By the way, did I forget to mention that OSPF also supports authentication and that the shortest-path-first method, by definition, prevents __?

loops

The explosive growth of the Internet in the 1980s required a fundamental reorganization in the structure of the Internet itself, and one big part of this reorganization was the call to

make the "big" routers use a standardized dynamic routing protocol. Implementing this was much harder than you might think because the entities that govern how the Internet works do so in a highly decentralized fashion. Even the organized groups, such as the Internet Society (ISOC), the Internet Assigned Numbers Authority (IANA), and the Internet Engineering Task Force (IETF), are made up of many individuals, companies, and government organizations from across the globe. This decentralization made the reorganization process take time and many meetings.

At this time, I need to make an important point: switches as well as routers often have some form of configuration interface. Granted, you have nothing to configure on a basic switch, but in later chapters, you'll discover a number of network features that you'll want to configure more advanced switches to use. Both routers and these advanced switches are called

managed devices. In this section, I use the term router, but it's important for you to appreciate that all routers and many better switches are all managed devices. The techniques shown here work for both!

With dynamic NAT (DNAT),

many computers can share a pool of routable IP addresses that number fewer than the computers. The NAT might have 10 routable IP addresses, for example, to serve 40 computers on the LAN. LAN traffic uses the internal, private IP addresses. When a computer requests information beyond the network, the NAT doles out a routable IP address from its pool for that communication. Dynamic NAT is also called pooled NAT. This works well enough—unless you're the unlucky 11th person to try to access the Internet from behind the company NAT—but has the obvious limitation of still needing many true, expensive, routable IP addresses.

Static NAT (SNAT)...

maps a single routable (that is, not private) IP address to a single machine, enabling you to access that machine from outside the network. The NAT keeps track of the IP address or addresses and applies them permanently on a one-to-one basis with computers on the network.

MTU stands for

maximum transmission unit

Earlier in the chapter, you learned that routing tables contain a factor called a metric. A metric is a relative value that routers use when they have more than one route to get to another network. Unlike the gateway routers in our homes, a more serious router will often have multiple connections to get to a particular network. This is the beauty of routers combined with dynamic protocols. If a router suddenly loses a connection, it has alternative routes to the same network. It's the role of the __ setting for the router to decide which route to use.

metric

The macOS/UNIX/Linux command is traceroute and looks like this:

michaelm@ubuntu:~$ traceroute 96.165.24.1

OSPF's metric is cost, which is a function of bandwidth. All possible ways to get to a destination network are computed based on cost, which is proportional to bandwidth, which is in turn proportional to the interface type (Gigabit Ethernet, 10-Gigabit Ethernet, and so on). The routers choose the lowest total cost route to a destination network. In other words, a packet could go through more routers (hops) to get to a destination when OSPF is used instead of RIP. However,

more hops doesn't necessarily mean slower. If a packet goes through three hops where the routers are connected by fiber, for example, as opposed to a slow 56-Kbps link, the packet would get to its destination quicker. We make these decisions everyday as humans, too. I'd rather drive more miles on the highway to get somewhere quicker, than fewer miles on local streets where the speed limit is much lower. (Red lights and stop signs introduce driving latency as well!)

Most routers still support RIPv2, but RIP's many problems, especially the time to convergence for large WANs, makes it obsolete for all but small, private WANs that consist of a few routers. The growth of the Internet demanded a far more robust dynamic routing protocol. That doesn't mean RIP rests in peace! RIP is both easy to use and simple for manufacturers to implement in their routers, so

most routers, even home routers, have the ability to use RIP (Figure 7-28). If your network consists of only two, three, or four routers, RIP's easy configuration often makes it worth putting up with slower convergence.

Note: Every modern operating system gives you tools to view a computer's routing table. Most techs use the command line or terminal window interface—often called simply terminal—because it's fast. To see your routing table in Linux or in macOS, for example, type this command at a terminal:

netstat -r. The netstat -r command works in Windows too, plus you can use route printas an alternative.

Routers enable you to connect different types of

network technologies

Let me repeat this to make sure you understand the difference between EGP and IGP. Neither EGP nor IGP is a dynamic routing protocol; rather these are terms used by the large Internet service providers to separate their interconnected routers using ASNs from other interconnected networks that are not part of this special group of companies. The easy way to keep these terms separate is to appreciate that although many protocols are used withinAutonomous Systems, such as RIP, the Internet has settled on one protocol for communication between each AS: the Border Gateway Protocol (BGP). BGP is the glue of the Internet, connecting all

of the Autonomous Systems. Other dynamic routing protocols such as RIP are, by definition, IGP. The current version of BGP is BGP-4.

Routing begins as packets come into the router for handling (Figure 7-5). The router immediately strips off any of the Layer 2 information and drops the resulting IP packet into a queue (Figure 7-6). The important point to make here is that the router doesn't care where the packet originated. Everything is dropped into the same queue based on the time it arrived. The router inspects each packet's destination IP address and then sends the IP packet out the correct port. To perform this inspection, every router comes with a routing table that tells the router exactly where to send the packets. This table is the key to understanding and controlling the process of forwarding packets to their proper destination. Figure 7-7 shows a very simple routing table for a typical home router. Each row in this routing table defines a single route. Each column identifies

one of two specific criteria. Some columns define which packets are for the route and other columns define which port to send them out. (We'll break these down shortly.)

Distance vector routing protocols were the first to appear in the TCP/IP routing world. The cornerstone of all distance vector routing protocols is

some form of total cost. The simplest total cost sums the hops (the hop count) between a router and a network, so if you had a router one hop away from a network, the cost for that route would be 1; if it were two hops away, the cost would be 2.

Any router problem starts with

someone not connecting to someone else.

Let me repeat this to make sure you understand the difference between EGP and IGP. Neither EGP nor IGP is a dynamic routing protocol; rather these are terms used by the large Internet service providers to separate their interconnected routers using ASNs from other interconnected networks that are not part of this special group of companies. The easy way to keep these terms separate is to appreciate that although many protocols are used withinAutonomous Systems, such as RIP, the Internet has settled on

one protocol for communication between each AS: the Border Gateway Protocol (BGP). BGP is the glue of the Internet, connecting all of the Autonomous Systems. Other dynamic routing protocols such as RIP are, by definition, IGP. The current version of BGP is BGP-4.

Figure 7-3 shows the electronic diagram for a two-port Cisco router, whereas Figure 7-4 shows the diagram for a home router. Note that both boxes connect two networks. The big difference is that

one side of the Linksys home router connects directly to a built-in switch. That's convenient! You don't have to buy a separate switch to connect multiple computers to the home router.

OSPF offers a number of improvements over RIP. When you first launch OSPF-capable routers, they send out Hello packets, looking for

other OSPF routers (see Figure 7-31). After two adjacent routers form a neighborship through the Hello packets, they exchange information about routers and networks through link state advertisement (LSA) packets. LSAs are sourced by each router and are flooded from router to router through each OSPF area.

Let me repeat this to make sure you understand the difference between EGP and IGP. Neither EGP nor IGP is a dynamic routing protocol; rather these are terms used by the large Internet service providers to separate their interconnected routers using ASNs from

other interconnected networks that are not part of this special group of companies. The easy way to keep these terms separate is to appreciate that although many protocols are used withinAutonomous Systems, such as RIP, the Internet has settled on one protocol for communication between each AS: the Border Gateway Protocol (BGP). BGP is the glue of the Internet, connecting all of the Autonomous Systems. Other dynamic routing protocols such as RIP are, by definition, IGP. The current version of BGP is BGP-4.

The obvious drawback to relying exclusively on PAT for network address translation is that it only works for outgoing communication, not incoming communication. For traffic originating outside the network to access an internal machine, such as a Web server hosted inside your network, you need to use

other technologies

All routers—big and small, plain or bundled with a switch—examine...

packets and then send the packets to the proper destination. Let's look at that process in more detail now.

The CompTIA Network+ exam objectives list BGP as a hybrid routing protocol, but it's more technically a

path vector routing protocol. BGP doesn't have the same type of routing table as you've seen so far. BGP routers advertise information passed to them from different Autonomous Systems' edge routers—that's what the AS-to-AS routers are called. BGP forwards these advertisements that include the ASN and other very non-IP items.

My traceroute (mtr) is very similar to traceroute, but it's dynamic, continually updating the route that you've selected (Figure 7-45). You won't find mtr in Windows; mtr is a Linux tool. Instead, Windows users can use

pathping. This utility will ping each node on the route just like mtr, but instead of showing the results of each ping in real time, the pathping utility computes the performance over a set time and then shows you the summary after it has finished.

When you first unwrap a new Cisco router, you

plug the rollover cable into the console port on the router (Figure 7-33) and a serial port on a PC. If you don't have a serial port, then buy a USB-to-serial adapter.

You can use __ to hide a service hosted inside your network by changing the default port number for that service. To hide an internal Web server, for example, you could change the request port number to something other than port 80, the default for HTTP traffic. The router in Figure 7-16, for example, is configured to forward all port 8080 packets to the internal Web server at port 80. To access that internal Web site from outside your local network, you would have to change the URL in the Web browser by specifying the port request number. Figure 7-17 shows a browser that has :8080 appended to the URL, which tells the browser to make the HTTP request to port 8080 rather than port 80.

port forwarding

With __ you can designate a specific local address for various network services. Computers outside the network can request a service using the public IP address of the router and the port number of the desired service. The port-forwarding router would examine the packet, look at the list of services mapped to local addresses, and then send that packet along to the proper recipient.

port forwarding,

Port Address Translation: Most internal networks today don't have one machine, of course. Instead, they use a block of private IP addresses for the hosts inside the network. They connect to the Internet through one or more public IP addresses. The most common form of NAT that handles this one-to-many connection—called Port Address Translation (PAT)—uses

port numbers to map traffic from specific machines in the network. Let's use a simple example to make the process clear. John has a network at his office that uses the private IP addressing space of 192.168.1.0/24. All the computers in the private network connect to the Internet through a single router using PAT with the global IP address of 208.190.121.12/24. See Figure 7-14.

The idea of a "Web-server-in-a-router" works well for single routers, but as a network grows into lots of routers, administrators need more advanced tools that describe, visualize, and configure their entire network. These tools, known as Network Management Software (NMS), know how to talk to your routers, switches, and even your computers to give you an overall view of your network. In most cases, NMS manifests as a Web site where administrators may inspect the status of the network and make adjustments as needed. I divide NMS into two camps:

proprietary tools made by the folks who make managed devices (OEM) and third-party tools. OEM tools are generally very powerful and easy to use, but only work on that OEM's devices. Figure 7-39 shows an example of Cisco Network Assistant, one of Cisco's NMS applications. Others include the Cisco Configuration Professional and Cisco Prime Infrastructure, an enterprise-level tool. A number of third-party NMS tools are out there as well; you can even find some pretty good freeware NMS options. These tools are invariably harder to configure and must constantly be updated to try to work with as many devices as possible.

PAT: When an internal machine initiates a session with an external machine, such as a Web browser accessing a Web site, the source and destination IP addresses and port numbers for the TCP segment or UDP datagram are recorded in the NAT table, and the private IP address is swapped for the public IP address on each packet. Plus, the port number used by the internal computer for the session is also translated into a unique port number and the router records this as well. See Figure 7-15.When the receiving system sends the packet back, it

reverses the IP addresses and ports. The router compares the incoming destination port and source IP address to the entry in the NAT translation table to determine which IP address to put back on the packet. It then sends the packet to the correct computer on the network.

BGP implements and supports__, a way to simplify routing tables into manageable levels. Rather than trying to keep track of every other router on the Internet, the backbone routers track the location of routers that connect to subsets of locations.

route aggregation

Wow, there sure are many routing protocols out there. It's too bad they can't talk to each other ... or can they? The routers cannot use different routing protocols to communicate with each other, but many routers can speak multiple routing protocols simultaneously. When a router takes routes it has learned by one method, say RIP or a statically set route, and announces those routes over another protocol such as OSPF, this is called

route redistribution. This feature can come in handy when you have a mix of equipment and protocols in your network, such as occurs when you switch vendors or merge with another organization.

Also keep in mind that routers, especially gateway routers, often have a large number of other features that have nothing to do with

routiing

Different dynamic routing protocols use one or more of these __s to calculate their own __

routing metric

OSPF isn't popular by accident. It __ quite well and is supported by all but the most basic routers.

scales to large networks

OSPF offers a number of improvements over RIP. When you first launch OSPF-capable routers, they

send out Hello packets, looking for other OSPF routers (see Figure 7-31). After two adjacent routers form a neighborship through the Hello packets, they exchange information about routers and networks through link state advertisement (LSA) packets. LSAs are sourced by each router and are flooded from router to router through each OSPF area.

Routing begins as packets come into the router for handling (Figure 7-5). The router immediately strips off any of the Layer 2 information and drops the resulting IP packet into a queue (Figure 7-6). The important point to make here is that the router doesn't care where the packet originated. Everything is dropped into the same queue based on the time it arrived. The router inspects each packet's destination IP address and then

sends the IP packet out the correct port. To perform this inspection, every router comes with a routing table that tells the router exactly where to send the packets. This table is the key to understanding and controlling the process of forwarding packets to their proper destination. Figure 7-7 shows a very simple routing table for a typical home router. Each row in this routing table defines a single route. Each column identifies one of two specific criteria. Some columns define which packets are for the route and other columns define which port to send them out. (We'll break these down shortly.)

The limitations of RIP motivated the demand for a faster protocol that took up less bandwidth on a WAN. The basic idea was to come up with a dynamic routing protocol that was more efficient than routers that simply

sent out their entire routing table at regular intervals. Why not instead simply announce and forward individual route changes as they appeared? That is the basic idea of a link state dynamic routing protocol. There are only two link state dynamic routing protocols: OSPF and IS-IS.

Let me repeat this to make sure you understand the difference between EGP and IGP. Neither EGP nor IGP is a dynamic routing protocol; rather these are terms used by the large Internet service providers to

separate their interconnected routers using ASNs from other interconnected networks that are not part of this special group of companies. The easy way to keep these terms separate is to appreciate that although many protocols are used withinAutonomous Systems, such as RIP, the Internet has settled on one protocol for communication between each AS: the Border Gateway Protocol (BGP). BGP is the glue of the Internet, connecting all of the Autonomous Systems. Other dynamic routing protocols such as RIP are, by definition, IGP. The current version of BGP is BGP-4.

Distance vector routing protocols were the first to appear in the TCP/IP routing world. The cornerstone of all distance vector routing protocols is some form of total cost. The simplest total cost sums the hops (the hop count) between a router and a network, so if you had a router one hop away from a network, the cost for that route would be 1; if it were two hops away, the cost would be 2. All network connections are not equal. A router might have two one-hop routes to a network—one using a fast connection and the other using a slow connection. Administrators...

set the metric of the routes in the routing table to reflect the speed. The slow single-hop route, for example, might be given the metric of 10 rather than the default of 1 to reflect the fact that it's slow. The total cost for this one-hop route is 10, even though it's only one hop. Don't assume a one-hop route always has a cost of 1.

BGP implements and supports route aggregation, a way to

simplify routing tables into manageable levels. Rather than trying to keep track of every other router on the Internet, the backbone routers track the location of routers that connect to subsets of locations.

Most routers still support RIPv2, but RIP's many problems, especially the time to convergence for large WANs, makes it obsolete for all but

small, private WANs that consist of a few routers.

Exam tip: The CompTIA Network+ objectives list MTU as a switching or routing metric, and it definitely falls into the former category. The maximum transmission unit (MTU)determines the largest frame a particular technology can handle. Ethernet uses 1500-byte frames. Other technologies use __ frames.

smaller or larger

Based on what you've read up to this point, it would seem that routes in your routing tables come from two sources: either they are manually entered or they are detected at setup by the router. In either case, a route seems to be a static beast, just sitting there and never changing. And based on what you've seen so far, that is absolutely true. Routers have

static routes. But most routers also have the capability to update their routes dynamically, with dynamic routing protocols (both IPv4 and IPv6).

With dynamic NAT (DNAT), many computers can share a pool of routable IP addresses that number fewer than the computers. The NAT might have 10 routable IP addresses, for example, to serve 40 computers on the LAN. LAN traffic uses the internal, private IP addresses. When a computer requests information beyond the network, the NAT doles out a routable IP address from its pool for that communication. Dynamic NAT is also called pooled NAT. This works well enough—unless you're the unlucky 11th person to try to access the Internet from behind the company NAT—but has the obvious limitation of

still needing many true, expensive, routable IP addresses.

OSPF offers a number of improvements over RIP. When you first launch OSPF-capable routers, they send out Hello packets, looking for other OSPF routers (see Figure 7-31). After two adjacent routers form a neighborship through the Hello packets, they exchange information about routers and networks through link state advertisement (LSA) packets. LSAs are sourced by each router and are flooded from router to router through each OSPF area.Once all the routers communicate, they individually decide their own optimal routes, and convergence happens almost immediately. If a route goes down, OSPF routers quickly recompute a new route with

stored LSAs

Routing begins as packets come into the router for handling (Figure 7-5). The router immediately __ and drops the resulting IP packet into a queue (Figure 7-6). The important point to make here is that the router doesn't care where the packet originated. Everything is dropped into the same queue based on the time it arrived.

strips off any of the Layer 2 information

Routing begins as packets come into the router for handling (Figure 7-5). The router immediately

strips off any of the Layer 2 information and drops the resulting IP packet into a queue (Figure 7-6). The important point to make here is that the router doesn't care where the packet originated. Everything is dropped into the same queue based on the time it arrived.

Distance vector routing protocols were the first to appear in the TCP/IP routing world. The cornerstone of all distance vector routing protocols is some form of total cost. The simplest total cost ...

sums the hops (the hop count) between a router and a network, so if you had a router one hop away from a network, the cost for that route would be 1; if it were two hops away, the cost would be 2.

OSPF isn't popular by accident. It scales to large networks quite well and is supported by all but the most basic routers. By the way, did I forget to mention that OSPF also supports authentication and that the shortest-path-first method, by definition, prevents loops? Why would anyone use anything else? Well, OSPF had one problem that wasn't repaired until fairly recently:

support for something called IPv6 (see Chapter 12 for details on IPv6). Not to preempt Chapter 12, but IPv6 is a new addressing system for IP that dumps the old 32-bit address, replacing it with a 128-bit address. IPv6 is quickly gaining popularity and will one day replace 32-bit IP addressing. Just for the record, I've been predicting the end of 32-bit IP addressing for so long I'm now afraid to predict anymore when it's going to happen—but it will eventually.

Exam tip: The CompTIA Network+ objectives list MTU as a switching or routing metric, and it definitely falls into the former category. The maximum transmission unit (MTU)determines the largest frame a particular technology can handle. Ethernet uses 1500-byte frames. Other technologies use smaller or larger frames.If an IP packet is too big for a particular technology,

that packet is broken into pieces to fit into the network protocol in what is called fragmentation. Fragmentation is bad because it slows down the movement of IP packets. By setting the optimal MTU size before IP packets are sent, you avoid or at least reduce fragmentation.

The granddaddy of all distance vector routing protocols is the Routing Information Protocol (RIP). The first version of RIP—called RIPv1—dates from

the 1980s, although its predecessors go back all the way to the beginnings of the Internet in the 1960s

The CompTIA Network+ exam objectives list BGP as a hybrid routing protocol, but it's more technically a path vector routing protocol. BGP doesn't have the same type of routing table as you've seen so far. BGP routers advertise information passed to them from different Autonomous Systems' edge routers—that's what the AS-to-AS routers are called. BGP forwards these advertisements that include

the ASN and other very non-IP items.

Let me repeat this to make sure you understand the difference between EGP and IGP. Neither EGP nor IGP is a dynamic routing protocol; rather these are terms used by the large Internet service providers to separate their interconnected routers using ASNs from other interconnected networks that are not part of this special group of companies. The easy way to keep these terms separate is to appreciate that although many protocols are used withinAutonomous Systems, such as RIP, the Internet has settled on one protocol for communication between each AS:

the Border Gateway Protocol (BGP). BGP is the glue of the Internet, connecting all of the Autonomous Systems. Other dynamic routing protocols such as RIP are, by definition, IGP. The current version of BGP is BGP-4.

Most router people use a laptop and a crossover cable to connect to the new router. To get to the Web interface, first set a static address for your computer that will place your PC on the same network ID as the router. If, for example, the router is set to 192.168.1.1/24 from the factory, set your computer's IP address to 192.168.1.2/24. Then connect to the router (some routers tell you exactly where to connect, so read the documentation first), and check the link lights to verify you're properly connected. Open up your Web browser and type in

the IP address, as shown in Figure 7-37. Note: Many routers are also DHCP servers, making the initial connection much easier. Check the documentation to see if you can just plug in without setting an IP address on your PC.

There is exactly one protocol that doesn't really fit into either the distance vector or link state camp: Cisco's proprietary Enhanced Interior Gateway Routing Protocol (EIGRP). Back in the days when RIP was dominant, there was a huge outcry for an improved RIP, but OSPF wasn't yet out. Cisco, being the dominant router company in the world (a crown it still wears to this day), came out with

the Interior Gateway Routing Protocol (IGRP), which was quickly replaced with EIGRP.

Let me repeat this to make sure you understand the difference between EGP and IGP. Neither EGP nor IGP is a dynamic routing protocol; rather these are terms used by the large Internet service providers to separate their interconnected routers using ASNs from other interconnected networks that are not part of this special group of companies. The easy way to keep these terms separate is to appreciate that although many protocols are used withinAutonomous Systems, such as RIP, the Internet has settled on one protocol for communication between each AS: the Border Gateway Protocol (BGP). BGP is the glue of

the Internet, connecting all of the Autonomous Systems. Other dynamic routing protocols such as RIP are, by definition, IGP. The current version of BGP is BGP-4.

The granddaddy of all distance vector routing protocols is

the Routing Information Protocol (RIP).

PAT: This mapping of internal IP address and port number to a translated IP address and port number enables perfect tracking of packets out and in. PAT can handle many internal computers with a single public IP address because

the TCP/IP port number space is big, as you'll recall from previous chapters, with values ranging from 1 to 65535. Some of those port numbers are used for common protocols, but many tens of thousands are available for PAT to work its magic.

Many regions of the world have depleted their available IPv4 addresses already and the end for everywhere else is in sight. Although you can still get an IP address from an Internet service provider (ISP),

the days of easy availability are over. Routers running some form of Network Address Translation (NAT) hide the IP addresses of computers on the LAN but still enable those computers to communicate with the broader Internet. NAT extended the useful life of IPv4 addressing on the Internet for many years. NAT is extremely common and heavily in use, so learning how it works is important. Note that many routers offer NAT as a feature in addition to the core capability of routing. NAT is not routing, but a separate technology. With that said, you are ready to dive into how NAT works to protect computers connected by router technology and conserve IP addresses as well.

The explosive growth of the Internet in the 1980s required a fundamental reorganization in the structure of the Internet itself, and one big part of this reorganization was the call to make the "big" routers use a standardized dynamic routing protocol. Implementing this was much harder than you might think because

the entities that govern how the Internet works do so in a highly decentralized fashion. Even the organized groups, such as the Internet Society (ISOC), the Internet Assigned Numbers Authority (IANA), and the Internet Engineering Task Force (IETF), are made up of many individuals, companies, and government organizations from across the globe. This decentralization made the reorganization process take time and many meetings.

OSPF's metric is cost, which is a function of bandwidth. All possible ways to get to a destination network are computed based on cost, which is proportional to bandwidth, which is in turn proportional to

the interface type (Gigabit Ethernet, 10-Gigabit Ethernet, and so on). The routers choose the lowest total cost route to a destination network.

Autonomous Systems communicate with each other using a protocol, called generically an Exterior Gateway Protocol (EGP). The network or networks within an AS communicate with protocols as well; these are called generically Interior Gateway Protocols (IGPs). Let me repeat this to make sure you understand the difference between EGP and IGP. Neither EGP nor IGP is a dynamic routing protocol; rather these are terms used by

the large Internet service providers to separate their interconnected routers using ASNs from other interconnected networks that are not part of this special group of companies. The easy way to keep these terms separate is to appreciate that although many protocols are used withinAutonomous Systems, such as RIP, the Internet has settled on one protocol for communication between each AS: the Border Gateway Protocol (BGP). BGP is the glue of the Internet, connecting all of the Autonomous Systems. Other dynamic routing protocols such as RIP are, by definition, IGP. The current version of BGP is BGP-4.

Note: If a routing table has two or more valid routes for a particular IP address destination, it always chooses the route with

the lowest metric

OSPF's metric is cost, which is a function of bandwidth. All possible ways to get to a destination network are computed based on cost, which is proportional to bandwidth, which is in turn proportional to the interface type (Gigabit Ethernet, 10-Gigabit Ethernet, and so on). The routers choose

the lowest total cost route to a destination network.

There is no single rule to set the metric value in a routing table. The various types of dynamic protocols use different criteria. Here are the most common criteria for determining a metric. Hop count: The hop count is a fundamental metric value for the number of routers a packet will pass through on the way to its destination network. For example, if router A needs to go through three intermediate routers to reach a network connected to router C, the hop count is 4. The hop occurs when

the packet is handed off to each subsequent router. (I'll go a lot more into hops and hop count in "Distance Vector and Path Vector," next.)

The traceroute tool, as its name implies, records

the route between any two hosts on a network. On the surface, traceroute is something like ping in that it sends a single packet to another host, but as it progresses, it returns information about every router between them.

Routing begins as packets come into the router for handling (Figure 7-5). The router immediately strips off any of the Layer 2 information and drops the resulting IP packet into a queue (Figure 7-6). The important point to make here is that

the router doesn't care where the packet originated. Everything is dropped into the same queue based on the time it arrived.

BGP implements and supports route aggregation, a way to simplify routing tables into manageable levels. Rather than trying to keep track of every other router on the Internet, the backbone routers track the location of routers that connect to subsets of locations. Route aggregation is complicated, but an analogy should make its function clear. A computer in Prague in the Czech Republic sends a packet intended to go to a computer in Chicago, Illinois. When the packet hits one of the BGP routers,

the router doesn't have to know the precise location of the recipient. It knows the router for the United States and sends the packet there. The U.S. router knows the Illinois router, which knows the Chicago router, and so on.

Exam tip: NAT replaces the source IP address of a computer with

the source IP address from the outside router interface on outgoing packets. NAT is performed by NAT-capable routers.

Port Address Translation: Most internal networks today don't have one machine, of course. Instead, they use a block of private IP addresses for the hosts inside the network. They connect to the Internet through one or more public IP addresses. The most common form of NAT that handles this one-to-many connection—called Port Address Translation (PAT)—uses port numbers to map traffic from specific machines in the network. Let's use a simple example to make the process clear. John has a network at his office that uses the private IP addressing space of 192.168.1.0/24. All the computers in the private network connect to the Internet through a single router using PAT with the global IP address of 208.190.121.12/24. See Figure 7-14.When an internal machine initiates a session with an external machine, such as a Web browser accessing a Web site,

the source and destination IP addresses and port numbers for the TCP segment or UDP datagram are recorded in the NAT table, and the private IP address is swapped for the public IP address on each packet. Plus, the port number used by the internal computer for the session is also translated into a unique port number and the router records this as well. See Figure 7-15.

Understanding the different ways routers work is one thing. Actually walking up to a router and making it work is a different animal altogether. This section examines practical router installation. Physical installation isn't very complicated. With a home router, you give it power and then plug in connections. With a business-class router, you insert it into a rack, give it power, and plug in connections. The complex part of installation comes with

the specialized equipment and steps to connect to the router and configure it for your network needs. This section, therefore, focuses on the many methods and procedures used to access and configure a router.

Be aware that routers have some serious but rare potential problems. One place to watch is your routing table. For the most part, today's routers automatically generate directly connected routes, and dynamic routing takes care of itself, leaving one type of route as a possible suspect:

the static routes. This is the place to look when packets aren't getting to the places you expect them to go. Look at the following sample static route:

Routing begins as packets come into the router for handling (Figure 7-5). The router immediately strips off any of the Layer 2 information and drops the resulting IP packet into a queue (Figure 7-6). The important point to make here is that the router doesn't care where the packet originated. Everything is dropped into the same queue based on

the time it arrived.

Most routers still support RIPv2, but RIP's many problems, especially __, makes it obsolete for all but small, private WANs that consist of a few routers.

the time to convergence for large WANs

Distance vector routing protocols calculate

the total cost to get to a particular network ID and compare that cost to the total cost of all the other routes to get to that same network ID. The router then chooses the route with the lowest cost. For this to work, routers using a distance vector routing protocol transfer their entire routing table to other routers in the WAN. Each distance vector routing protocol has a maximum number of hops that a router will send its routing table to keep traffic down.

Configuring NAT on home routers is a no-brainer as

these boxes invariably have NAT turned on automatically. Figure 7-18 shows the screen on my home router for NAT. Note the radio buttons that say Gateway and Router.

Routers are, for the most part, automatic. They require very little in terms of maintenance once their initial configuration is complete because

they can talk to each other to determine the best way to send IP packets.

OSPF offers a number of improvements over RIP. When you first launch OSPF-capable routers, they send out Hello packets, looking for other OSPF routers (see Figure 7-31). After two adjacent routers form a neighborship through the Hello packets,

they exchange information about routers and networks through link state advertisement (LSA) packets. LSAs are sourced by each router and are flooded from router to router through each OSPF area.

OSPF offers a number of improvements over RIP. When you first launch OSPF-capable routers, they send out Hello packets, looking for other OSPF routers (see Figure 7-31). After two adjacent routers form a neighborship through the Hello packets, they exchange information about routers and networks through link state advertisement (LSA) packets. LSAs are sourced by each router and are flooded from router to router through each OSPF area.Once all the routers communicate,

they individually decide their own optimal routes, and convergence happens almost immediately. If a route goes down, OSPF routers quickly recompute a new route with stored LSAs.

The default route is very important because

this tells the router exactly what to do with every incoming packet unless another line in the routing table gives another route. Excellent!

When you take a new router out of the box, it's not good for very much. You need to somehow plug into that shiny new router and start telling it what you want to do. There are a number of different methods, but one of the oldest (yet still very common) methods is

to use a special serial connection. This type of connection is almost completely unique to Cisco-brand routers, but Cisco's massive market share makes understanding this type of connection a requirement for anyone who wants to know how to configure routers. Figure 7-32 shows the classic Cisco console cable, more commonly called a rollover or Yost cable.

BGP implements and supports route aggregation, a way to simplify routing tables into manageable levels. Rather than trying to keep track of every other router on the Internet, the backbone routers

track the location of routers that connect to subsets of locations.

Distance vector routing protocols calculate the total cost to get to a particular network ID and compare that cost to the total cost of all the other routes to get to that same network ID. The router then chooses the route with the lowest cost. For this to work, routers using a distance vector routing protocol to...

transfer their entire routing table to other routers in the WAN. Each distance vector routing protocol has a maximum number of hops that a router will send its routing table to keep traffic down.

What came out of the reorganization eventually was a multitiered structure. At the top of the structure sits many Autonomous Systems. An Autonomous System (AS) is one or more networks that are governed by a single dynamic routing protocol within that AS. Figure 7-29illustrates the decentralized structure of the Internet. Autonomous Systems do not deliver data between each other using IP addresses, but rather use a special globally unique Autonomous System Number (ASN) assigned by IANA. Originally a 16-bit number, the current ASNs are 32 bits, displayed as

two 16-bit numbers separated by a dot. So, 1.33457 would be a typical ASN. Just as you would assign an IP address to a router, you would configure the router to use or be the ASN assigned by IANA. See Figure 7-30.

Routing begins as packets come into the router for handling (Figure 7-5). The router immediately strips off any of the Layer 2 information and drops the resulting IP packet into a queue (Figure 7-6). The important point to make here is that the router doesn't care where the packet originated. Everything is dropped into the same queue based on the time it arrived. The router inspects each packet's destination IP address and then sends the IP packet out the correct port. To perform this inspection, every router comes with a routing table that tells the router exactly where to send the packets. This table is the key to

understanding and controlling the process of forwarding packets to their proper destination. Figure 7-7 shows a very simple routing table for a typical home router. Each row in this routing table defines a single route. Each column identifies one of two specific criteria. Some columns define which packets are for the route and other columns define which port to send them out. (We'll break these down shortly.)

A routing table looks like a table, so there's an assumption that the router will start at the top of the table and march down until it finds the correct route. That's not accurate. The router compares the destination IP address on a packet to every route listed in the routing table and only then sends the packet out. If a packet works for more than one route, the router will

use the better route (we'll discuss this more in a moment).

Other connection methods: Be aware that most routers have even more ways to connect. Many home routers come with USB ports and configuration software. More powerful routers may enable you to connect using the ancient Telnet protocol or its newer and safer equivalent Secure Shell (SSH). These are terminal emulation protocols that look exactly like the terminal emulators seen earlier in this chapter but

use the network instead of a serial cable to connect (see Chapter 8for details on these protocols).

RIPv1 sent out an update every 30 seconds. This also turned into a big problem because every router on the network would send its routing table at the same time, causing huge network overloads. As if these issues weren't bad enough, RIPv1 didn't know how to

use variable-length subnet masking (VLSM), where networks connected through the router use different subnet masks. Plus RIPv1 routers had no authentication, leaving them open to hackers sending false routing table information. RIP needed an update.

Protocol: BGP Notes

used on the Internet, connects Autonomous Systems

VLSM stands for

variable-length subnet masking (VLSM)

BGP also knows how to handle a number of situations unique to the Internet. If a router advertises a new route that isn't reliable, most BGP routers will ignore it. BGP also supports policies for limiting

which and how other routers may access an ISP.

BGP also knows how to handle a number of situations unique to the Internet. If a router advertises a new route that isn't reliable, most BGP routers...

will ignore it. BGP also supports policies for limiting which and how other routers may access an ISP.

BGP is an amazing and powerful dynamic routing protocol, but unless you're __, odds are good you'll never see it in action. Those who need to connect a few routers together usually turn to a family of dynamic routing protocols that work very differently from distance vector routing protocols.

working deep in the router room of an AS

IS-IS was developed at roughly the same time as OSPF and had the one major advantage of

working with IPv6 from the start

Note: Most browsers require you to __, when using a nondefault port number.

write out the full URL, including HTTP://

Here's the situation. You have a LAN with five computers that need access to the Internet. With classic TCP/IP and routing, several things have to happen. First, you need to get a block of legitimate, unique, expensive IP addresses from an ISP. You could call up an ISP and purchase a network ID, say 1.2.3.136/29. Second,

you assign an IP address to each computer and to the LAN connection on the router. Third, you assign the IP address for the ISP's router to the WAN connection on the local router, such as 1.2.4.1. After everything is configured, the network looks like Figure 7-13. All of the clients on the network have the same default gateway (1.2.3.137). This router, called a gateway router (or simply a gateway), acts as the default gateway for a number of client computers. This style of network mirrors how computers in LANs throughout the world connected to the Internet for the first 20+ years, but the major problem of a finite number of IP addresses worsened as more and more computers connected.

Here's the situation. You have a LAN with five computers that need access to the Internet. With classic TCP/IP and routing, several things have to happen. First, you need to get a block of legitimate, unique, expensive IP addresses from an ISP. You could call up an ISP and purchase a network ID, say 1.2.3.136/29. Second, you assign an IP address to each computer and to the LAN connection on the router. Third,

you assign the IP address for the ISP's router to the WAN connection on the local router, such as 1.2.4.1. After everything is configured, the network looks like Figure 7-13. All of the clients on the network have the same default gateway (1.2.3.137). This router, called a gateway router (or simply a gateway), acts as the default gateway for a number of client computers. This style of network mirrors how computers in LANs throughout the world connected to the Internet for the first 20+ years, but the major problem of a finite number of IP addresses worsened as more and more computers connected.

Exam tip: The CompTIA Network+ objectives list MTU as a switching or routing metric, and it definitely falls into the former category. The maximum transmission unit (MTU)determines the largest frame a particular technology can handle. Ethernet uses 1500-byte frames. Other technologies use smaller or larger frames.If an IP packet is too big for a particular technology, that packet is broken into pieces to fit into the network protocol in what is called fragmentation. Fragmentation is bad because fragmentation. Fragmentation is bad because it slows down the movement of IP packets. By setting the optimal MTU size before IP packets are sent,

you avoid or at least reduce fragmentation.

The routers cannot use different routing protocols to communicate with each other, but many routers can speak multiple routing protocols simultaneously. When a router takes routes it has learned by one method, say RIP or a statically set route, and announces those routes over another protocol such as OSPF, this is called route redistribution. This feature can come in handy when

you have a mix of equipment and protocols in your network, such as occurs when you switch vendors or merge with another organization.

Based on what you've read up to this point, it would seem that routes in your routing tables come from two sources: either they are manually entered or they are detected at setup by the router. In either case, a route seems to be a static beast, just sitting there and never changing. And based on what you've seen so far, that is absolutely true. Routers have static routes. But most routers also have the capability to update their routes dynamically, with dynamic routing protocols (both IPv4 and IPv6). If you've been reading carefully, you might be tempted at this point to say, "Why do I need this dynamic routing stuff? Don't routers use metrics so I can add two or more routes to another network ID in case I lose one of my routes?" Yes, but metrics really only help when

you have direct connections to other network IDs.

Here's the situation. You have a LAN with five computers that need access to the Internet. With classic TCP/IP and routing, several things have to happen. First,

you need to get a block of legitimate, unique, expensive IP addresses from an ISP. You could call up an ISP and purchase a network ID, say 1.2.3.136/29. Second, you assign an IP address to each computer and to the LAN connection on the router. Third, you assign the IP address for the ISP's router to the WAN connection on the local router, such as 1.2.4.1. After everything is configured, the network looks like Figure 7-13. All of the clients on the network have the same default gateway (1.2.3.137). This router, called a gateway router (or simply a gateway), acts as the default gateway for a number of client computers. This style of network mirrors how computers in LANs throughout the world connected to the Internet for the first 20+ years, but the major problem of a finite number of IP addresses worsened as more and more computers connected.

When you first unwrap a new Cisco router, you plug the rollover cable into the console port on the router (Figure 7-33) and a serial port on a PC. If you don't have a serial port, then buy a USB-to-serial adapter. Once you've made this connection,

you need to use a terminal emulation program to talk to the router. The two most popular programs are PuTTY (www.chiark.greenend.org.uk/~sgtatham/putty) and HyperTerminal (www.hilgraeve.com/hyperterminal). Using these programs requires that you to know a little about serial ports, but these basic settings should get you connected: -9600 baud -8 data bits -1 stop bit -No parity

With dynamic NAT (DNAT), many computers can share a pool of routable IP addresses that number fewer than the computers. The NAT might have 10 routable IP addresses, for example, to serve 40 computers on the LAN. LAN traffic uses the internal, private IP addresses. When a computer requests information beyond the network, the NAT doles out a routable IP address from its pool for that communication. Dynamic NAT is also called pooled NAT. This works well enough—unless

you're the unlucky 11th person to try to access the Internet from behind the company NAT—but has the obvious limitation of still needing many true, expensive, routable IP addresses.

Any router problem starts with someone not connecting to someone else. Even a small network has a number of NICs, computers, switches, and routers between you and whatever it is you're not connecting to. Compared to most of these, a router is a pretty robust device and shouldn't be considered as the problem until

you've checked out just about everything else first.

No incoming packets for network ID are getting out on interface 22.46.132.11. Can you see why? Yup, the Netmask is set to 255.255.255.255, and there are no computers that have exactly the address 22.46.132.0. Entering the wrong network destination, subnet mask, gateway, and so on, is very easy. If a new static route isn't getting the packets moved, first assume you made a typo. Make sure to watch out for missing routes. These usually take place either because

you've forgotten to add them (if you're entering static routes) or, more commonly, there is a convergence problem in the dynamic routing protocols. For the CompTIA Network+ exam, be ready to inspect a routing table to recognize these problems.


Ensembles d'études connexes

Missed Ch. 21: The Immune System

View Set

AP Gov Extreme Final Study Guide (1rst Semester) (Quizzes + Tests)

View Set

Chapter 10: E-Commerce Unique Features

View Set

Chapter 10 - Honors World History Short Answers

View Set

Chapter 3 Quiz: Medical, Legal, and Ethical Issues

View Set