1 / 59

Introduction to Routing and Packet Forwarding

Introduction to Routing and Packet Forwarding. Routing Protocols and Concepts – Chapter 1. Objectives. Identify a router as a computer with an OS and hardware designed for the routing process. Demonstrate the ability to configure devices and apply addresses.

barny
Télécharger la présentation

Introduction to Routing and Packet Forwarding

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. Introduction to Routing and Packet Forwarding Routing Protocols and Concepts – Chapter 1

  2. Objectives • Identify a router as a computer with an OS and hardware designed for the routing process. • Demonstrate the ability to configure devices and apply addresses. • Describe the structure of a routing table. • Describe how a router determines a path and switches packets

  3. Context Index • 1.1 Inside the Router • 1.2 CLI Configuration and Addressing • 1.3Building Routing Table • 1.4 Path Determination and Switching Functions • 1.5 Router Configuration Lab

  4. 1.1 Inside the Router 路由器内部构造

  5. 1.1.1 Router as a Computer • Basic components of a router • CPU • RAM • ROM • Operating System • Routers are the network center • -Routers generally have 2 connections: • -WAN connection (Connection to ISP) • -LAN connection

  6. 1.1.1 Router as a Computer • Routing table • Then Router Forwarding packets toward their destination

  7. 电源 ROM CPU RAM 闪存(Flash) 1.1.2 Router CPU and Memory • 一般而言,除非要升级Memory,否则不必打开路由器。

  8. Router components • CPU • Random access memory (RAM) – RAM中内容断电丢失 • Operating System • Running Configuration File • IP Routing Table • ARP Cache • Packet Buffer • Read-only memory (ROM) • The bootstrap instructions • Basic diagnostic software • Scaled-down version of IOS(精简版IOS). • Non-volatile RAM (NVRAM) - Stores startup configuration. • Flash memory - Contains the operating system (Cisco IOS) • Interfaces

  9. 1.1.2 Router CPU and Memory • Router components • Router software Internetwork Operating System (IOS)

  10. 1.1.3 InternetworkOperatingSystem Internetwork Operating System (IOS). • Cisco 根据路由器型号和 IOS 内部的功能,创建了许多不同类型的IOS 映像。 • IOS 内部的功能越多,IOS 映像就越大。 • 命令行界面 (CLI) 是配置 Cisco 路由器的最常用方法。 • 路由器启动时,NVRAM 中的 startup-config 文件会复制到 RAM,并存储为 running-config 文件。IOS 接着会执行 running-config 中的配置命令。 • 网络管理员输入的任何更改均存储于 running-config 中,并由 IOS 立即执行。

  11. 1.1.4 Router Boot-up Process

  12. show version Configuration register

  13. 1.1.5 Router Interfaces • Router management ports: • Consoleport • Auxiliary port • Each interface connects to a separate network • Types of router interfaces: • -Ethernet • -Fastethernet • -Serial • -DSL • -ISDN • -Cable LAN WAN

  14. 1.1.5 Router Interfaces • Two major groups of Router Interfaces • LAN Interfaces: • Has a layer 2 MAC address • Can be assigned a Layer 3 IP address • WAN Interfaces • Depending on the WAN technology, a layer 2 address may be used. • Uses a layer 3 IP address

  15. 1.1.6 Routers and the Network Layer • Routers use destination IP address to forward packets • The path a packet takes is determined after a router consults information in the routing table • After router determines the best path • Packet is encapsulated into a frame • Frame is then placed on network medium in form of Bits

  16. 1.1.6 Routers and the Network Layer • Routers Operate at Layers

  17. 1.2 CLI Configuration and Addressing CLI配置和编址

  18. Document the network The documentation should include a topology diagram that indicates the physical connectivity and an addressing table that lists all of the following information: Device names Interfaces used in the design IP addresses and subnet masks Default gateway addresses for end devices, such as PCs 1.2.1 Implementing Basic Addressing Schemes

  19. 1.2.2 Basic Router Configuration • Basic Router Configuration

  20. 1.2.2 Basic Router Configuration • Implementing Basic Addressing Schemes

  21. 1.2.2 Basic Router Configuration • Verify Basic Router Configuration • -Issue the show running-config command • -Save the basic router configuration • copy running-config startup-config • -Additional commands that will enable you to further verify router configuration are: • Show running-config- Displays configuration currently in RAM • Show startup-config- Displays configuration file NVRAM • Show ip route- Displays routing table • Show interfaces- Displays all interface configurations • Show ip interface brief- Displays abbreviated interface configuration information(显示接口的简要信息)

  22. 1.3 Building the Routing Table 构建路由表

  23. 1.3.1 Introducing the Routing Table • Routing Table is stored in RAM and contains information about: • Directly connected networks • Remotely connected networks • The 3 ways to building Routing Table: • Directly Connected Routes –直接连到路由器上的网络 • Static Routes –管理员手工构建路由表 • Dynamic Routes –路由器之间动态学习到的路由表

  24. 1.3.2 Directly-Connected Networks • Show ip route command is used to view a routing table

  25. Routing Table in the life

  26. Adding a connected network to the routing table 直连路由出现在路由表的条件 Interfaceshould be up up. IP address must assign in the interface. 1.3.2 Directly-Connected Networks

  27. Connected route in the life

  28. 1.3.3 Static Routing • Static routes in the routing table • -Includes: network address and subnet mask and IP address of next hop router or exit interface • -Denoted with the code Sin the routing table • -Routing tables must contain directly connected networks used to connect remote networks before static or dynamic routing can be used • When to use static routes • -When network only consists of a few routers (路由器较少) • -Network is connected to internet only through one ISP (唯一外连出口) • -Hub & spoke topology is used on a large network(星型拓扑)

  29. 1.3.3 Static Routing

  30. Static route in the life

  31. Static route in the life

  32. 1.3.4 Dynamic Routing • Dynamic routing protocols • -Add remote networks to a routing table • -Discover networks • -Update and maintain routing tables • Automatic network discovery • -Routers are able discover new networks by sharing routing table information

  33. 1.3.4 Dynamic Routing • Maintaining routing tables • -Dynamic routing protocols are used to share routing information with other router & to maintain and up date their own routing table. • IP routing protocols. Example of routing protocols include: • -RIP • -IGRP • -EIGRP • -OSPF

  34. 1.3.5 Routing Table Principles • Routing Table Principles • -3 principles regarding routing tables: • Every router makes its decisions alone, based on the information it has in its routing table. 每台路由器根据其自身路由表中的信息独立作出决策。 • One router’s information in the routing table may not be the same as another router’s routing table. 一台路由器的路由表中包含某些信息并不表示其它路由器也包含相同的信息。 • Routing information about a path to a network does not provide information on how to return to the original network. 有关两个网络之间路径的路由信息并不能提供反向路径(即返回路径)的路由信息。 • Asymmetric Routing

  35. ? ? 1.3.5 Routing Table Principles 1: 2: 3: ?

  36. 1.4 Path Determination and Switch Functions 路径决定和交换功能

  37. 1.4.1 Packet Fields and Frame Fields • Internet Protocol (IP) packet format contains fields that provide information about the packet and the sending and receiving hosts • Fields that are importance for CCNA students: • -Destination IP address • -Source IP address • -Version & TTL • -IP header length • -Precedence & type of service • -Packet length

  38. 1.4.1 Packet Fields and Frame Fields • MAC Layer Frame Format • MAC Frames are also divided into fields. They include: • -Preamble • -Start of frame delimiter • -Destination MAC address • -Source MAC address • -Type/length • -Data and pad • -Frame check sequence

  39. 1.4.2 Best Paths and Metric • A Metric is a numerical value used by routing protocols to assess a given route • Metrics may be based on a single path variable or multiple variables of a path • 2 types of metrics used by routing protocols are: • -Hop count • -Bandwidth • Metric(度量)越小路由越优先

  40. 1.4.3 Equal Cost Load Balancing • Equal cost metric is a condition where a router has multiple paths to the same destination that all have the same metric • To solve this dilemma, a router will use Equal Cost Load Balancing. This means the router sends packets over the multiple exit interfaces listed in the routing table.

  41. 1.4.4 Path Determination • Packet forwarding involves two functions: • Path determination function(找出最佳路径) • Switching function(送到外出接口) • One of three path determinations results from this search: • -Directly Connected Network • 直接通过本路由器接口转发数据包到主机 • -Remote Network • 转发数据包到下一跳路由器 • -No Route Determined • 丢弃该数据包并报告差错

  42. 1.4.5 Switching Function • Switching Function of Router is the process used by a router to switch a packet from an incoming interface to an outgoing interface on the same router.(把数据包从一个接口转到另一个接口) • -A packet received by a router will do the following: • Strips off layer 2 headers. • Examines destination IP address located in Layer 3 header to find best route to destination. • Re-encapsulates layer 3 packet into new layer 2 frame. • Forwards frame out exit interface. • As a packet travels from one networking device to another • -The Source and Destination IP addresses NEVER change • -The Source & Destination Layer 2 addressesCHANGE as packet is forwarded from one router to the next.(二层地址不一定总是MAC地址) • -TTL field decrement by one until a value of zero is reached at which point router discards packet.(TTL值每经过一跳减1)

  43. 1.4.5 Switching Function • Step1- PC1 encapsulates packet into a frame. Frame contains R1’s destination MAC address

  44. 1.4.5 Switching Function • Step2(1)- R1 sees that destination MAC address matches its own MAC • Step2(2-3)- R1 then strips off Ethernet frame and Examines destination IP.

  45. 1.4.5 Switching Function • Step2(4)- R1 consults routing table looking for destination IP.

  46. 1.4.5 Switching Function • Step2(5)- R1 now looks up next hop IP address and re-encapsulates IP packet with a new Ethernet frame.

  47. 1.4.5 Switching Function • Step2(6)- R3 forwards Ethernet packet out Fa0/0 interface

  48. 1.4.5 Switching Function • Step3(1)- R2 sees that destination MAC address matches its own MAC • Step3(2-3)- R2 then strips off Ethernet frame and Examines destination IP

  49. 1.4.5 Switching Function • Step3(4)- R2 consults routing table looking for destination IP

  50. 1.4.5 Switching Function • Step3(4)- R2 re-encapsulates IP packet with a new data link frame

More Related