1 / 80

Static Routing

Static Routing. Routing Protocols and Concepts – Chapter 2 Modified by Tony Chen. 02/19/2010. Notes:. If you see any mistake on my PowerPoint slides or if you have any questions about the materials, please feel free to email me at chento@cod.edu . Thanks! Tony Chen College of DuPage

kyra-chavez
Télécharger la présentation

Static Routing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Static Routing Routing Protocols and Concepts – Chapter 2 Modified by Tony Chen 02/19/2010

  2. Notes: • If you see any mistake on my PowerPoint slides or if you have any questions about the materials, please feel free to email me at chento@cod.edu. Thanks! Tony Chen College of DuPage Cisco Networking Academy

  3. Objectives • Define the general role a router plays in networks. • Describe the directly connected networks, different router interfaces • Examine directly connected networks in the routing table and use the CDP protocol • Describe static routes with exit interfaces • Describe summary and default route • Examine how packets get forwarded when using static routes • Identify how to manage and troubleshoot static routes

  4. General Role of the Router • Functions of a Router • Best Path Selections • Forwarding packets to destination • Routers perform packet forwarding by learning about remote networks and maintaining routing information. • The routers primary forwarding decision is based on Layer 3 information, the destination IP address. • The router's routing table is used to find the best match between the destination IP of a packet and a network address in the routing table. • The routing table will ultimately determine the exit interface to forward the packet and the router will encapsulate that packet in the appropriated data link frame for that outgoing interface.

  5. General Role of the Router • Introducing the Topology • The figure shows the topology used in this chapter. • 3 1800 series routers connected via WAN links • Each router connected to a LAN represented by a switch and a PC

  6. General Role of the Router • Connections of a Router for WAN • -A router has a DB-60 port that can support 5 different cabling standards • Newer routers support the smart serial interface that allows for more data to be forwarded across fewer cable pins. • Connections of a Router for Ethernet • -2 types of connectors can be used: Straight through and Cross-over • Straight through used to connect: • -Switch-to-Router, Switch-to-PC, Hub-to-PC, Hub-to-Server • Cross-over used to connect (pin 1 connected to pin 3, and pin 2 connected to pin 6): • -Switch-to-Switch, PC-to-PC, Switch-to-Hub, Hub-to-Hub, Router-to-Router, PC-Router

  7. General Role of the Router in COD • Smart Serial cables: DCE and DTE • -Use straight cable to connect between the DTE and DCE.. • Ethernet cables: • Cross-over cable: RED cable • Roll-over cable: flat cables • Straight cable: all other cables DCE and DTE Adapter http://www.csdata.com/csdonline/customer/home.php

  8. Serial Connectors DTE DCE DCE DTE DTE DCE • In our labs we will use serial DTE/DCE cables (no CSU/DSU) with a DTE cable connected to one router and a DCE cable connected to the other router.

  9. Interfaces • Examining Router Interfaces • -Show IP route command – used to view routing table • -Show Interfaces command – used to show status of an interface • -Show IP Interface brief command – used to show a portion of the interface information on a condensed format • -Show running-config command – used to show configuration file in RAM

  10. Interfaces • Configuring an Ethernet interface • -By default all serial and Ethernet interfaces are down • -To enable an interface use the No Shutdown command • The show ip route command is used to display the routing table. • Initially, the routing table is empty if no interfaces have been configured. • Static routes and dynamic routes will not be added to the routing table until the appropriate local interfaces have been configured on the router.

  11. Verifying Ethernet interface • - Show interfaces - command shows the status and gives a detailed description for all interfaces on the router • Show interfaces fastEthernet 0/0 – command used to show status of fast Ethernet port • R1#show interfaces fastethernet 0/0 • FastEthernet0/0 is administratively down, line protocol is down • Administratively down means that the interface is currently in the shutdown mode, or turned off. • Line protocol is down means, in this case, that the interface is not receiving a carrier signal from a switch or the hub. This condition may also be due to the fact that the interface is in shutdown mode • You will notice that the show interfaces command does not show any IP addresses on R1's interfaces. The reason for this is because we have not yet configured IP addresses on any of the interfaces.

  12. Interfaces • Verifying Ethernet interface • Show run – • command displays the current configuration file that the router is using. Configuration commands are temporarily stored in the running configuration file and implemented immediately by the router. • However, using show running-config is not necessarily the best way to verify interface configurations. • Show ip interface brief – • can be used to see a portion of the interface information in a condensed format.

  13. Configuring an Ethernet interface • By default, all router interfaces are shutdown. To enable this interface, use the no shutdown command, which changes the interface from administratively down to up. • R1(config)#interface fastethernet 0/0 • R1(config-if)#ip address 172.16.3.1 255.255.255.0 • R1(config-if)#no shutdown • The following message is returned from the IOS: • *Mar 1 01:16:08.212: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up • *Mar 1 01:16:09.214: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up • The first changed state to up message indicates that, physically, the connection is good. If you do not get this first message, be sure that the interface is properly connected to a carrier signal from switch or a hub. • The second changed state to up message indicates that the Data Link layer is operational. • However, WAN interfaces in a lab environment require clocking on one side of the link. If you do not correctly set the clock rate, then line protocol will not change to up.

  14. Configuring an Ethernet interface • Unsolicited Messages from IOS • The IOS often sends unsolicited messages. • As you can see in the figure, sometimes these messages will occur when you are in the middle of typing a command, such as configuring a description for the interface. • The IOS message does not affect the command, but it can cause you to lose your place when typing. • In order to keep the unsolicited output separate from your input, enter line configuration mode for the consoled port and add the logging synchronous command, as shown. You will see that messages returned by IOS no longer interfere with your typing.

  15. Interfaces • Verifying Ethernet interface • -Show interfaces fastEthernet 0/0 • Reading the Routing Table • Now look at routing table shown in the figure. Notice R1 now has a "directly connected" FastEthernet 0/0 interface a new network. • The interface was configured with the 172.16.3.1/24 IP address which makes it a member of the 172.16.3.0/24 network. • 172.16.0.0/24 is subnetted, 1 subnets • C 172.16.3.0 is directly connected, FastEthernet0/0 • The C at the beginning of the route indicates that this is a directly connected network. In other words, R1 has an interface that belongs to this network. • The /24 subnet mask for this route is displayed in the line above the actual route.

  16. Interfaces • Reading the Routing Table • 172.16.0.0/24 is subnetted, 1 subnets • Having a single route represent an entire network of host IP addresses makes the routing table smaller, with fewer routes, which results in faster routing table lookups. • It means that this route matches all packets with a destination address belonging to this network. • The routing table could contain all 254 individual host IP addresses for the 172.16.3.0/24 network, but that is an inefficient way of storing addresses.

  17. Interfaces • Verifying Ethernet interface • show interfaces fastethernet 0/0 • show ip interface brief • The show interfaces fastethernet 0/0 command in the figure now shows • The interface is up, and the line protocol is up. The no shutdown command changed the interface from administratively down to up. • Notice that the IP address is now displayed. • The command show ip interface brief in the figure shows that the interface is up, and the line protocol is up. (in a condensed format) • Typically, the router's Ethernet or FastEthernet interface will be the default gateway IP address for any devices on that LAN. • For example, PC1 would be configured with a IP address belonging to the 172.16.3.0/24 network, with the default gateway IP address 172.16.3.1. • 172.16.3.1 is router R1's FastEthernet IP address.

  18. Ethernet Interfaces Participate in ARP • A router's Ethernet interface participates in a LAN network just like any other device on that network. • This means that these interfaces have a Layer 2 MAC address, as shown in the figure. The show interfaces command displays the MAC address for the Ethernet interfaces. • If a router has a packet destined for a device on a directly connected Ethernet network, it checks the ARP table for an entry with that destination IP address in order to map it to the MAC address.

  19. Interfaces • Configuring a Serial interface • -Enter interface configuration mode • -Enter in the ip address and subnet mask • -Enter in the no shutdown command • Example: • -R1(config)#interface serial 0/0/0 • -R1(config-if)#ip address 172.16.2.1 255.255.255.0 • -R1(config-if)#no shutdown

  20. Interfaces • R1(config)#interface serial 0/0/0 • R1(config-if)#ip address 172.16.2.1 255.255.255.0 • R1(config-if)#no shutdown • R2(config)#interface serial 0/0/0 • R2(config-if)#ip address 172.16.2.2 255.255.255.0 • R2(config-if)#no shutdown • There is no requirement that both ends of the serial link use the same interface, (0/0/0, 0/0/1, 0/1/0, 0/1/1, ….) • in this case, Serial 0/0/0. However, because both interfaces are members of the same network, they both must have IP addresses that belong to the 172.16.2.0/24 network. • If we now issue the show interfaces serial 0/0/0 command on either router, we still see that the link is up/down. • R2#show interfaces serial 0/0/0 • Serial0/0/0 is up, line protocol is down • The physical link between R1 and R2 is up because both ends of the serial link have been configured correctly with an IP address/mask and enabled with the no shutdown command. • However, the line protocol is still down. This is because the interface is not receiving a clock signal. • There is still one more command that we need to enter, the clock rate command, on the router with the DCE cable. The clock rate command will set the clock signal for the link.

  21. Interfaces Step 1 Step 3 Setup “no shut” Nothing is configured Step 2 Step 4 Configured the clock rate Setup IP but not “no shut”

  22. Examining Router Interfaces • -Physically connecting a WAN Interface. • -A WAN Physical Layer connection has sides: • Data Circuit-terminating Equipment (DCE) – This is the service provider. CSU/DSU is a DCE device. • The CSU/DSU (DCE device) is used to convert the data from the router (DTE device) into a form acceptable to the WAN service provider. • a DCE device such as a CSU/DSU will provide the clock. • Data Terminal Equipment (DTE) – Typically the router is the DTE device. Up-to-date technology Cisco 1-Port T1/Fractional T1 DSU/CSU WAN Interface Card (WIC-1DSU-T1-V2=)

  23. - What is the significant of the information 1? Interfaces • For serial links that are directly interconnected, as in a lab environment, one side of a connection must be considered a DCE and provide a clocking signal. • You can also distinguish DTE from DCE • 1) by looking at the connector between the two cables. The DTE cable has a male connector, whereas the DCE cable has a female connector. • 2) If a cable is connected between the two routers, you can use the show controllers command to determine which end of the cable is attached to that interface. • R1#show controllers serial 0/0/0 • Interface Serial0/0/0 • Hardware is PowerQUICC MPC860 • DCE V.35, no clock • <output omitted>

  24. Interfaces • Once the cable is attached, the clock can now be set with the clock rate command. • The available clock rates, in bits per second, are 1200, 2400, 9600, 19200, 38400, 56000, 64000, 72000, 125000, 148000, 500000, 800000, 1000000, 1300000, 2000000, and 4000000. • Some bit rates might not be available on certain serial interfaces. • R1(config)#interface serial 0/0 • R1(config-if)#clock rate 64000 • 01:10:28: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up • Note: If a router's interface with a DTE cable is configured with the clock rate command, the IOS will disregard the command and there will be no ill effects. • Use the “show controllers serial 0/0/0” to find out whether it is a DTE or DCE cable.

  25. Testing Verifying the Serial Interface Configuration R1#show interfaces R1#show ip interface brief R1#ping 172.16.2.2 R1#show ip route

  26. Routing Table Concepts • The show ip route command reveals the content of the routing table. • The main purpose of a routing table is to provide the router with paths to different destination networks. • The routing table consists of a list of "known" network addresses • directly connected, • configured statically, • learned dynamically. • POP Quiz: • Can R1 ping R2? • Can PC1 ping PC2?

  27. Routing Table Concepts 3 disable interfaces with the shutdown command. • Purpose of the debug ip routing command • Allows you to view changes that the router performs when adding or removing routes in real time 1 enable debugging with the debug ip routing command Configuring the IP address and Subnet Mask 4 Check the routing table 2 Check the routing table Disable debug ip routing by using either the “undebug ip routing” command or the “undebug all” command. 5 Never use the debug all command on the production router.

  28. Routing Table and CDP Protocol • When a router only has its interfaces configured&no other routing protocols are configured then: • -The routing table contains only the directly connected networks • -Only devices on the directly connected networks are reachable POP Quiz: Why pings failed? The output in this figure verifies that all configured interfaces are "up" and "up".

  29. Routing Table and CDP Protocol • When a router only has its interfaces configured, and the routing table contains the directly connected networks but no other routes, only devices on those directly connected networks are reachable. • R1 can communicate with any device on the 172.16.3.0/24 and 172.16.2.0/24 networks. • R2 can communicate with any device on the 172.16.1.0/24, 172.16.2.0/24, and 192.168.1.0/24 networks. • R3 can communicate with any device on the 192.168.1.0/24 and 192.168.2.0/24 networks.

  30. Routing Table and CDP Protocol • Checking each route in turn • The ping command is used to check end to end connectivity • Ping 172.16.3.1 failed • Route does not match any route in the routing table • Ping 192.168.1.1 succeed • 192.168.1.0/24, matches the first 24 bits of the destination IP address

  31. Routing Table and CDP Protocol • Purpose of CDP • Cisco Discovery Protocol (CDP) is a powerful network monitoring and troubleshooting tool. • CDP runs at the Data Link layer connecting the physical media to the upper-layer protocols (ULPs). • Because CDP operates at the Data Link layer, two or more Cisco network devices, such as routers that support different Network layer protocols (for example, IP and Novell IPX), can learn about each other. • A layer 2 cisco proprietary tool used to gather information about other directly connectedCisco devices. • enables you to access a summary of protocol and address information about Cisco devices that are directly connected. • the types of devices that are connected, • the interfaces they are connected to, • the interfaces used to make the connections, • the model numbers of the devices. • ……..

  32. Routing Table and CDP Protocol • Concept of neighbors • -2 types of neighbors • Layer 3 neighbors • At Layer 3, routing protocols consider neighbors to be devices that share the same network address space. • R1 and R2 are neighbors. Both are members of the 172.16.2.0/24 network. • R2 and R3 are also neighbors because they both share the 192.168.1.0/24 network. • But R1 and R3 are not neighbors because they do not share any network address space. • Layer 2 neighbors • CDP operates at Layer 2 only. Therefore, CDP neighbors are Cisco devices that are directly connected physically and share the same data link. • R1 and S1 are CDP neighbors. • R1 and R2 are CDP neighbors. • R2 and S2 are CDP neighbors. • R2 and R3 are CDP neighbors. • R3 and S3 are CDP neighbors. Notice the difference between Layer 2 and Layer 3 neighbors. The switches are not neighbors to the routers at Layer 3, because the switches are operating at Layer 2 only. However, the switches are Layer 2 neighbors to their directly connected routers.

  33. Routing Table and CDP Protocol • CDP is on by default. • CDP exchanges hardware and software device information with its directly connected CDP neighbors. • CDP show commands • Show cdp neighbors command • -Displays the following information: • Neighbor device ID • Local interface • Holdtime value, in seconds • Neighbor device capability code • Neighbor hardware platform • Neighbor remote port ID • Show cdp neighbors detail command • -It can also reveals the IP address of a neighboring device • knowing the IP address of the CDP neighbor is often allows you to telnet into that device. • and a lot more • IOS version • Platform • …………

  34. Routing Table and CDP Protocol • Disabling CDP • CDP be a security risk • Because some IOS versions send out CDP advertisements by default, it is important to know how to disable CDP. • If you need to disable CDP globally, for the entire device, use this command: • Router(config)#no cdp run • If you want to use CDP but need to stop CDP advertisements on a particular interface, use this command: • Router(config-if)#no cdp enable

  35. Static Routes • A router can learn about remote networks in one of two ways: • Manually, from configured static routes • Automatically, from a dynamic routing protocol • Dynamic routing protocols are introduced in the next chapter. • Purpose of a static route • A manually configured route used when routing from a network to a stub network • A stub network is a network accessed by a single route. • For an example, here we see that any network attached to R1 would only have one way to reach other destinations, whether to networks attached to R2 or to destinations beyond R2. • Therefore, network 172.16.3.0 is a stub network and R1 is a stub router. • Running a routing protocol between R1 and R2 is a waste of resources

  36. Static Routes • IP routecommand • To configure a static route use the following command: ip route • Example: • -Router(config)# ip route network-address subnet-mask {ip-address | exit-interface }

  37. Static route operation Example: Fly from Chicago to LA Chicago O’Hare Los Angeles Chicago  O’Hare Airport  Los Angeles RTR(config)# ip route prefix mask {address | interface} Los Angeles O’Hare

  38. Static route operation Example: Fly from Chicago to LA Los Angeles O’Hare Chicago Midway Chicago  O’Hare Airport  Los Angeles Midway Airport RTR(config)# ip route prefix mask {address | interface} Los Angeles O’Hare

  39. Static route operation Example: Fly from Chicago to LA Midway O’Hare Los Angeles Chicago Chicago  O’Hare Airport  Los Angeles Midway Airport RTR(config)# ip route prefix mask {address | interface} Los Angeles O’Hare

  40. Static route operation Example: Fly from Chicago to LA O’Hare Midway Los Angeles Chicago Chicago  O’Hare Airport  Los Angeles Midway Airport RTR(config)# ip route prefix mask {address | interface} Los Angeles O’Hare

  41. Static route operation Example: Fly from Chicago to LA O’Hare Midway Los Angeles Chicago Chicago  O’Hare Airport  Los Angeles Midway Airport RTR(config)# ip route prefix mask {address | interface} Los Angeles O’Hare

  42. Static route operation Example: Fly from Chicago to LA S 0/0/1 11.11.11.2 /24 S 0/0/0 11.11.11.1 /24 Los Angeles O’Hare Chicago Midway 20.20.20.0 /24 5.5.5.0 /24 Chicago  O’Hare Airport  Los Angeles Midway Airport RTR(config)# ip route prefix mask {address | interface} RTR(config)# ip route 20.20.20.0 255.255.255.0 11.11.11.2 Or RTR(config)# ip route 20.20.20.0 255.255.255.0 s 0/0/0 Los Angeles O’Hare 20.20.20.0 /24 Los Angeles 20.20.20.0 /24 Midway

  43. Static route operation Example: Fly from Chicago to LA S 0/0/0 11.11.11.1 /24 S 0/0/1 11.11.11.2 /24 Midway Los Angeles O’Hare Chicago Chicago  O’Hare Airport  Los Angeles Midway Airport RTR(config)# ip route prefix mask {address | interface} RTR(config)# ip route 20.20.20.0 255.255.255.0 11.11.11.2 Or RTR(config)# ip route 20.20.20.0 255.255.255.0 s 0/0/0 Los Angeles O’Hare 20.20.20.0 /24 Los Angeles 20.20.20.0 /24 Midway

  44. Static route operation Example: Fly from Chicago to LA S 0/0/1 11.11.11.2 /24 O’Hare S 0/0/0 11.11.11.1 /24 Midway Los Angeles Chicago Chicago  O’Hare Airport  Los Angeles Midway Airport RTR(config)# ip route prefix mask {address | interface} RTR(config)# ip route 20.20.20.0 255.255.255.0 11.11.11.2 Or RTR(config)# ip route 20.20.20.0 255.255.255.0 s 0/0/0 Los Angeles O’Hare 20.20.20.0 /24 Los Angeles 20.20.20.0 /24 Midway

  45. Static route operation Example: Fly from Chicago to LA S 0/0/1 11.11.11.2 /24 S 0/0/0 11.11.11.1 /24 O’Hare Midway Los Angeles Chicago Chicago  O’Hare Airport  Los Angeles Midway Airport RTR(config)# ip route prefix mask {address | interface} RTR(config)# ip route 20.20.20.0 255.255.255.0 11.11.11.2 Or RTR(config)# ip route 20.20.20.0 255.255.255.0 s 0/0/0 Los Angeles O’Hare 20.20.20.0 /24 Los Angeles 20.20.20.0 /24 Midway

  46. Static Routes • Remember R1 knows about its directly connected networks. • These are the routes currently in its routing table. • The remote networks that R1 does not know about are: • 172.16.1.0/124 - The LAN on R2 • 192.168.1.0/24 - The serial network between R2 and R3 • 192.168.2.0/24 - The LAN on R3

  47. Static Routes • R1(config)#ip route 172.16.1.0 255.255.255.0 172.16.2.2 • Dissecting static route syntax • ip route - Static route command • 172.16.1.0 – Destination network address • 255.255.255.0 - Subnet mask of destination network • 172.16.2.2 - Serial 0/0/0 interface IP address on R2, which is the "next-hop" to this network • show ip route output • S - Routing table code for static route • 172.16.1.0 - Network address for the route • /24 - Subnet mask for this route; this is displayed in the line above, known as the parent route, and discussed in Chapter 8 • [1/0] - Administrative distance and metric for the static route (explained in a later chapter) • via 172.16.2.2 - IP address of the next-hop router, the IP address of R2's Serial 0/0/0 interface

  48. Static Routes • R1(config)#ip route 172.16.1.0 255.255.255.0 172.16.2.2 • show ip route output • S - Routing table code for static route • 172.16.1.0 - Network address for the route • /24 - Subnet mask for this route; this is displayed in the line above, known as the parent route, and discussed in Chapter 8 • [1/0] - Administrative distance and metric for the static route (explained in a later chapter) • via 172.16.2.2 - IP address of the next-hop router, the IP address of R2's Serial 0/0/0 interface

  49. Static Routes • Configuring routes to 2 or more remote networks • Use the following commands for R1 • -R1(config)#ip route 192.168.1.0 255.255.255.0 172.16.2.2 • -R1(config)#ip route 192.168.2.0 255.255.255.0 172.16.2.2

  50. Static Routes • Zinin’s 3 routing principles • Principle 1: "Every router makes its decision alone, based on the information it has in its own routing table.“ • R1 has three static routes in its routing table and makes forwarding decisions based solely upon the information in the routing table. • R1 does not consult the routing tables in any other routers. • Making each router aware of remote networks is the responsibility of the network administrator. • Principle 2: "The fact that one router has certain information in its routing table does not mean that other routers have the same information.“ • The network administrator would be responsible for ensuring that the next-hop router also has a route to this network • Using Principle 2, we still need to configure the proper routing on the other routers (R2 and R3) to make sure that they have routes to these three networks. • Principle 3: "Routing information about a path from one network to another does not provide routing information about the reverse, or return path.“ • Most of the communication over networks is bidirectional. This means that packets must travel in both directions between the end devices involved. • Using Principle 3 as guidance, we will configure proper static routes on the other routers to make sure they have routes back to the 172.16.3.0/24 network.

More Related