Top Banner
The Wonderful World of Routing Chapter 8
89
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Networking Chapter 8

The Wonderful World of RoutingThe Wonderful World of Routing

Chapter 8

Page 2: Networking Chapter 8

ObjectivesObjectives• Explain how routers work• Describe dynamic routing technologies• Install and configure a router successfully

Page 3: Networking Chapter 8

OverviewOverview

Page 4: Networking Chapter 8

Three Parts to Chapter 8Three Parts to Chapter 8

• How Routers Work• Dynamic Routing• Working with Routers

Page 5: Networking Chapter 8

How Routers WorkHow Routers Work

Page 6: Networking Chapter 8

• Router– Hardware or software– Forwards packet based on destination IP

address– Layer 3, the Network layer– Classically, dedicated boxes

• At least two connections

– Popular router: CISCO 2600

Page 7: Networking Chapter 8

Figure 8.1 Cisco 2611 router

Page 8: Networking Chapter 8

• Home router– First exposure to a router for most techs– Connect PC to DSL receiver or cable modem– More than it appears to be– LAN side may connect internally to a built-in

switch

Page 9: Networking Chapter 8

Figure 8.2 Business end of a typical home router

Page 10: Networking Chapter 8

Figure 8.3 Cisco router diagram

Page 11: Networking Chapter 8

Figure 8.4 Linksys home router diagram

Page 12: Networking Chapter 8

• All routers– Examine packets– Send packets to proper destination

Page 13: Networking Chapter 8

• Routing Tables– Router strips off Layer 2 information– Drops IP packet into a queue

• Source address is not important• Every packet dropped into the same queue based

on time of arrival– Router inspects the destination IP address– Router send IP packet out correct port– Routing table tells router where to send packets

Page 14: Networking Chapter 8

Figure 8.5 Incoming packets

Page 15: Networking Chapter 8

Figure 8.6 All incoming packets stripped of Layer 2 data and dropped into a common queue

Page 16: Networking Chapter 8

• Routing Tables (cont.)– Example home router (Figure 8.7)

• Two ports• Each row in table defines a single route• Each column identifies specific criteria

– Destination LAN IP– Subnet Mask

• If packet’s network ID matches a Destination LAN IP, router uses other information in row to determine where to send it

Page 17: Networking Chapter 8

• Routing Tables (cont.)– Example home router (Figure 8.7)

• Third and fourth columns– Gateway

» IP address for the next hop router» Packet sent to Gateway if network ID does not

match one of the directly connected ports– Interface

» Tells router which port to use» “LAN” or “WAN” on sample router» Other routing tables use IP address or other info

Page 18: Networking Chapter 8

• Routing Tables (cont.)– Example home router (Figure 8.7)

• First Router compares destination IP address to every listing in the routing table

• Then router makes a decision

Page 19: Networking Chapter 8

• Routing Tables (cont.)– Example home router (Figure 8.7)

• Every router (with two exceptions) has a default route• Default route in Figure 8.7

– Destination LAN IP: 0.0.0.0– Subnet Mask: 0.0.0.0– Gateway: 76.30.4.1– Interface: WAN

• Router sends incoming packet to default route unless another line gives another route

Page 20: Networking Chapter 8

• Routing Tables (cont.)– Example home router (Figure 8.7)

• Destination LAN IP: 10.12.14.0 (any packet for this network)

• Subnet Mask: 255.255.255.0 (using /24 network ID)• Gateway: 0.0.0.0 (don’t use a gateway)• Interface: LAN (ARP on the LAN interface to get MAC

address and send directly to host)

Page 21: Networking Chapter 8

• Routing Tables (cont.)– Example home router (Figure 8.7)

• Destination LAN IP: 76.30.4.0 (any packet for this network)

• Subnet Mask: 255.255.254.0 (using /23 network ID)• Gateway: 0.0.0.0 (don’t use a gateway)• Interface: WAN (ARP on the WAN interface to get MAC

address and send directly to host)

Page 22: Networking Chapter 8

Figure 8.7 Routing table from a home router

Page 23: Networking Chapter 8

Figure 8.8 Electronic diagram of the router

Page 24: Networking Chapter 8

Figure 8.9 The network based on the routing table

Jane Holcombe
Replace???
Page 25: Networking Chapter 8

• Routing Tables (cont.)– Every node on the network has a routing table

• Some computers (multi-homed) have more than one NIC

• IP uses a routing table for every packet it sends– Send directly to a host on a LAN or …– Send to the default gateway

Page 26: Networking Chapter 8

• Routing Tables (cont.)– Computer routing table (next slide)

• More routes than example home router• Computer IP address: 10.12.14.201/24• Computer loopback: 127.0.0.1• Metric: a relative value defining the “cost” of using a

route– When more than one route to a destination,

lower metric is used– When route with lower metric goes down,

other route used

Page 27: Networking Chapter 8

Figure 8.10 Two routes to the same network

Page 28: Networking Chapter 8

Figure 8.11 When a route no longer works, the router automatically switches

Page 29: Networking Chapter 8

Routing table on an XP computer connected to Figure 8.7 router

Page 30: Networking Chapter 8

IPv4 portion of Vista route print command

Page 31: Networking Chapter 8

• Freedom from Layer 2– Routers can connect different network

technologies– Routers strip off all Layer 2 data – Routers can connect almost anything that

stores IP packets

Page 32: Networking Chapter 8

Figure 8.12 Modular Cisco router

Page 33: Networking Chapter 8

Figure 8.13 Network setup

Page 34: Networking Chapter 8

Figure 8.14 Ports at work

Page 35: Networking Chapter 8

Figure 8.15 Redone network IDs; nodes in the LAN use private IP addressees internally

Page 36: Networking Chapter 8

• Inside the router– Host 192.168.10.202 sends a packet to 12.43.65.223– Packet is sent to the gateway router– Router replaces the sending host’s IP with its

own public IP address– Router then adds the destination IP address

and the source ephemeral port to the NAT translation table

– On receiving response, router reverses the IP addresses and ports

Page 37: Networking Chapter 8

Figure 8.16 NATing a packet

Page 38: Networking Chapter 8

Figure 8.17 Updating the packet

Page 39: Networking Chapter 8

• Inside the router (cont.)– Router compares incoming destination

port and source address to entries in NAT translation table

– Determines which local IP address to put back on the packet

– Sends packet to the correct computer on the LAN

Page 40: Networking Chapter 8

• Port forwarding– Hides a port number from the Internet– Enables public servers to work behind a

NAT router– Gives servers the protection of NAT while

allowing access to a local server from the Internet

Page 41: Networking Chapter 8

Dynamic RoutingDynamic Routing

Page 42: Networking Chapter 8

A. Background1. Routers have static routes

I. Manually enteredII. Detected at setup by the router

Page 43: Networking Chapter 8

• Background (cont.)2. Dynamic routing protocols defined

I. Routers communicate among themselves with change information

II. Update each other on changes about direct connections and distant routers

III. A passage of a packet through a single router is a hop

Page 44: Networking Chapter 8

Figure 8.22 Lots of routers

Page 45: Networking Chapter 8

Figure 8.23 Hopping through a WAN

Page 46: Networking Chapter 8

Dynamic Routing Makes the Internet1. Internet depends on dynamic routing for

self-healing2. Manual updating impossible with so many

routes coming up and going down

Page 47: Networking Chapter 8

Dynamic Routing Protocols

Protocol Type IGP(Intergateway protocol)or Notes

BGP(Border Gateway)?

RIPv1 Distance vector IGP Old; only used classful subnets

RIPv2 Distance vector IGP Supports CIDR

BGP-4 Distance vector BGP Used on the Internet, connectsAutonomous Systems

OSPF Link state IGP Fast, popular, uses Area IDs(Area 0/backbone)

IS-IS Link state IGP Alternative to OSPF

EIGRP Hybrid IGP Cisco proprietary

Table 8.1

Page 48: Networking Chapter 8

Working with RoutersWorking with Routers

Page 49: Networking Chapter 8

A. Simple physical installation 1. Home router

I. Give it powerII. Plug in connections

2. Business-class routerI. Insert it into a rackII. Give it powerIII. Plug in connections

Page 50: Networking Chapter 8

B. Connecting to Routers1. Each router must be configured2. Yost cable

I. Oldest method for connecting to router for configuration

II. Almost unique to Cisco-brand routersIII. Also called rollover cable

Page 51: Networking Chapter 8

Figure 8.39 Cisco console cable

Page 52: Networking Chapter 8

B. Connecting to Routers3. Managed devices include both routers

and advanced switches that can be configured

4. Plug the rollover into console port on Cisco router; plug other end into serial port on a PC (may need USB-to-serial adapter)

Page 53: Networking Chapter 8

Figure 8.40 Console port

Page 54: Networking Chapter 8

B. Connecting to Routers5. Use a terminal emulation program to talk

to the router from the PC over this connection

I. PuTTYII. HyperTerminalIII. Serial port settings: 9600 baud, 8 data bits,

1 stop bit, no parity

Page 55: Networking Chapter 8

Figure 8.41 Configuring PuTTY

Page 56: Networking Chapter 8

B. Connecting to Routers 6. Once connected and running terminal

emulatorI. You will see the initial router promptII. On Cisco router, this is the Cisco IOS promptIII. Working with IOS commands

a. Type enable and press ENTERb. Prompt changes to Router#c. IOS is complexd. Newer CISCO routers will lead you through initial

configuration for basic setup

Page 57: Networking Chapter 8

Figure 8.42 Initial router prompt

Page 58: Networking Chapter 8

B. Connecting to Routers 7. Normally, you will access a router

through Web access or network management software (both explored next)

8. Web accessI. Most routers have a built-in Web serverII. Can do everything you need to do

Page 59: Networking Chapter 8

B. Connecting to Routers 8. Web access

III. Easier than working with Cisco command-line IOS

IV. Web access only works if router has a built-in IP address from the factory, or you must enable Web interface after assigning an IP address to the router

V. To access the Web interface, you must know the IP address

Page 60: Networking Chapter 8

B. Connecting to Routers 8. Web access

VI. Most techs use a laptop and a special cable (Yost or rollover or crossover) to connect directly to router for initial configurationa. Know the IP address of the routerb. Assign to the laptop an IP address with the same

network ID of the routerc. Connect to router

Page 61: Networking Chapter 8

Figure 8.43 Default IP address

Page 62: Networking Chapter 8

B. Connecting to Routers8. Web access

d. Check the link lights to verify proper connectione. Open the Web browser and enter the IP address

of the routerf. You will need to enter the default user name and

password (check the router’s documentation)g. Once logged in, find the settings you need

Page 63: Networking Chapter 8

Figure 8.44 Entering the IP address

Page 64: Networking Chapter 8

Figure 8.45 User name and password

Page 65: Networking Chapter 8

B. Connecting to Routers9. Network Management Software

I. When managing many routers, administrators need a more advanced tool than the simple “Web-server-in-a-router”

II. Network Management Software includes utilities that will allow you to manage the entire network in a single interface (Routers, Switches, and Computers)

Page 66: Networking Chapter 8

B. Connecting to Routers 9. Network Management Software

III. Often a Web site

IV.Administrators manage network and make necessary changes

V. Proprietary tools (OEM)a. By manufacturers of managed devices

b. Usually very powerful and easy to use

c. Only work on that OEM’s devices

Page 67: Networking Chapter 8

Figure 8.46 Cisco Network Assistant

Page 68: Networking Chapter 8

B. Connecting to Routers 9. Network Management Software

VI.Third-party NMS toolsa. Some free

b. Usually harder to configure

c. Must constantly be updated to work with as many devices as possible

d. Usually lack the amount of detail in an OEM NMS

Page 69: Networking Chapter 8

B. Connecting to Routers 9. Network Management Software

VI.Third-party NMS toolse. While CiscoWorks enables you to change the

IP address of a port, third-party tools only let you see the IP settings

f. OpenNMS is a popular open-source NMS

Page 70: Networking Chapter 8

Figure 8.47 OpenNMS

Page 71: Networking Chapter 8

B. Connecting to Routers 10.Other connection methods

I. Most routers have more than one way to connect

II. Home router may come with a USB port and configuration softwarea. More powerful routers may allow connection

with Telnet protocol or newer Secure Shell (SSH)

Page 72: Networking Chapter 8

B. Connecting to Routers10.Other connection methods

a. Terminal emulations protocols that look like the terminal emulators seen earlier, but that use the network rather than a serial cable

b. More on terminal emulators in Chapter 9, “TCP/IP Applications”

Page 73: Networking Chapter 8

C. Basic Router Configuration1. Must have at least two connections2. You must properly configure every port

on a router to talk to connected network IDs

3. Make sure the routing table sends packets to where you want them to go

Page 74: Networking Chapter 8

C. Basic Router Configuration4. STEP 1: Set up the WAN side

I. WAN side in home or small business router connects to an ISP

II. Get setup information from ISPIII. Most home routers use DHCP on the WAN

side and just need to be configured to use DHCP

Page 75: Networking Chapter 8

C. Basic Router Configuration 4. STEP 1: Set up the WAN side

iv.May need to enter a static addressv. You can buy a single static IP addressvi. If static address, ISP will tell you what to

enter into the router

Page 76: Networking Chapter 8

Figure 8.48 The setup

Page 77: Networking Chapter 8

Figure 8.49 WAN router setup

Page 78: Networking Chapter 8

C. Basic Router Configuration5. STEP 2: Set up the LAN

I. You usually have total control over the LAN side

II. Choose a network ID from the private rangeIII. Assign the correct IP information to the

LAN-side NIC

Page 79: Networking Chapter 8

Figure 8.50 Entering a static IP

Page 80: Networking Chapter 8

Figure 8.51 Setting up an IP address for LAN side

Page 81: Networking Chapter 8

C. Basic Router Configuration6. STEP 3: Establish routes

I. Router will usually build a routing table based on information you provided

II. You may add more routes if neededIII. Use IOS command line on Cisco routers

Page 82: Networking Chapter 8

C. Basic Router Configuration7. STEP 4 (Optional): Configure a Dynamic

Protocol I. Dynamic routing protocols tied to

individual NICsII. When you connect two routers together,

make sure the NICs are configured to use the same dynamic routing protocol

Page 83: Networking Chapter 8

C. Basic Router Configuration7. STEP 4 (Optional): Configure a Dynamic

Protocol III. Unless you are in charge of two or more

routers, you will never use a dynamic routing protocol

IV. Once a dynamic routing protocol is turned on, it is all automatic

Page 84: Networking Chapter 8

C. Basic Router Configuration8. Document and back up

I. Document what you’ve done to configure each router

II. Back up the configuration using whatever method router has

Page 85: Networking Chapter 8

D. Router Problems1. Consider non-router issues first, because

routers don’t fail very often I. Check NICs, computer, and switches

before routerII. Routers are more reliable than other

equipment

Page 86: Networking Chapter 8

D. Router Problems2. Keep in mind what your router is

supposed to do I. Does it just route traffic?II. Does it also perform NAT?III. Is routing failing, or is another function

of the router failing?

Page 87: Networking Chapter 8

D. Router Problems3. Know how to use a few basic tools

that can help you check the router I. TRACEROUTE

a. Records the route between any two hostsb. Like PING, it sends out a single packet to

another hostc. Unlike PING, it returns information about

every router between them

Page 88: Networking Chapter 8

D. Router Problems3. Know how to use a few basic tools

that can help you check the router I. TRACEROUTE

d. Tells you when things are not workinge. Gives you an idea of where to look for a problemf. Windows – TRACERTg. UNIX/Linux – TRACEROUTEh. UNIX/Linux – My TRACEROUTE (MTR)

i. Dynamic, continually updating the route

Page 89: Networking Chapter 8

Figure 8.52 MTR in action