Bài giảng Mạng máy tính nâng cao - Chapter 4: Routing

Tài liệu Bài giảng Mạng máy tính nâng cao - Chapter 4: Routing: Chapter4: ROUTINGMẠNG MÁY TÍNH NÂNG CAOROUTING Introduction to Routing and Packet Forwarding Routers determine the best path The primary responsibility of a router is to direct packets destined for local and remote networks by: Determining the best path to send packets Forwarding packets toward their destinationRouters determine the best path Routers determine the best path Implementing Basic Addressing When designing a new network or mapping an existing network, document the network. At a minimum, 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 PCsImplementing Basic Addressing Implementing Basic Addressing Basic Router Configuration Router namePasswordsBannerBasic Router Configuration Basic Router Configuration Verifying Basic Router Configuration Iss...

ppt81 trang | Chia sẻ: honghanh66 | Lượt xem: 794 | Lượt tải: 0download
Bạn đang xem trước 20 trang mẫu tài liệu Bài giảng Mạng máy tính nâng cao - Chapter 4: Routing, để tải tài liệu gốc về máy bạn click vào nút DOWNLOAD ở trên
Chapter4: ROUTINGMẠNG MÁY TÍNH NÂNG CAOROUTING Introduction to Routing and Packet Forwarding Routers determine the best path The primary responsibility of a router is to direct packets destined for local and remote networks by: Determining the best path to send packets Forwarding packets toward their destinationRouters determine the best path Routers determine the best path Implementing Basic Addressing When designing a new network or mapping an existing network, document the network. At a minimum, 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 PCsImplementing Basic Addressing Implementing Basic Addressing Basic Router Configuration Router namePasswordsBannerBasic Router Configuration Basic Router Configuration Verifying Basic Router Configuration Issue the show running-config command Save the basic router configuration by issuing the copy running-config startup-config commandAdditional commands that will enable you to further verify router configuration are:show running-config :Displays configuration currently in RAMshow startup-config :Displays configuration file NVRAMshow ip route :Displays routing tableshow interfaces :Displays all interface configurationsshow ip interface brief :Displays abbreviated interface configuration informationIntroducing the Routing Table The primary function of a router is to forward a packet toward its destination network, which is the destination IP address of the packet.Routing Table is stored in RAM and contains information about:Directly connected networks -this occurs when a device is connected to another router interfaceRemotely connected networks -this is a network that is not directly connected to a particular routerDetailed information about the networks include source of routing information, Network address & subnet mask, and ip address of next-hop router, exit interfacecommand is used to view a routing table show ip routeIntroducing the Routing Table Directly Connected RoutesStatic Routes Dynamic RoutesDirectly-Connected Networks Once the interface is "up," the network of that interface is added to the routing table as a directly connected network.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 S in the routing table Routing tables must contain directly connected networks used to connect remote networks before static or dynamic routing can be usedWhen to use static routes When network only consists of a few routers Network is connected to internet only through one ISP Hub-and-spoke topology is used on a large networkStatic RoutingSource: route operation Static route operations can be divided into these three parts: Network administrator configures the routeRouter installs the route in the routing table Packets are routed using the static routeThe administrator must configure the static route on the router using the ip route command Static Routing Dynamic Routing Dynamic routing protocols are used by routers to share information about the reachability and status of remote networks. Dynamic routing protocols perform several activities, including: – Network discovery – Updating and maintaining routing tablesWhy dynamic routing is necessary Dynamic Routing Dynamic routing features: Automatic Network Discovery: allows the routers to automatically learn about these networks from other routers. Maintaining Routing Tables: automatically share routing information with other routers and compensate for any topology changes without involving the network administrator.Introduction to routing protocols A routing protocol is the communication used between routers. A routing protocol allows one router to share information with other routers. The information a router gets from another router, using a routing protocol, is used to build and maintain a routing table.  IP Routing Protocols: RIP (Routing Information Protocol) IGRP (Interior Gateway Routing Protocol) EIGRP (Enhanced Interior Gateway Routing Protocol) OSPF (Open Shortest Path First) IS-IS (Intermediate System-to-Intermediate System) BGP (Border Gateway Protocol)Dynamic routing operations The success of dynamic routing depends on two basic router functions: Maintenance of a routing table Timely distribution of knowledge, in the form of routing updates, to other routers  A routing protocol defines the set of rules used by a router when it communicates with neighboring routers. For example, a routing protocol describes: How to send updates What knowledge is contained in these updates When to send this knowledge How to locate recipients of the updates Best Path and Metric A Metric is a numerical value used by routing protocols to assess a given routeMetrics may be based on a single path variable or multiple variables of a path2 types of metrics used by routing protocols are:Hop count -this is the number of routers a packet must travel through to get to its destinationBandwidth - this is the “speed” of a link also known as the data capacity of a linkBest Path and MetricRouter Paths and Packet Switching Equal cost metric is a condition where a router has multiple paths to the same destination that all have the same metricTo 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.Router Paths and Packet Switching Path determination is a process used by a router to pick the best path to a destinationOne of 3 path determinations results from searching for the best path Directly connected network Remote network No route determinedRouter Paths and Packet Switching 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 routerA 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 layer 2 frame Forwards frame out exit interfaceSwitching Function Step 1: PC1 has a packet to be sent to PC2Switching Function Step 1: PC1 has a packet to be sent to PC2Switching Function Step 2: Router R1 receives the Ethernet frameSwitching Function Step 2: Router R1 receives the Ethernet frameSwitching Function Step 2: Router R1 receives the Ethernet frameSwitching Function Step 2: Router R1 receives the Ethernet frameSwitching Function Step 2: Router R1 receives the Ethernet frameSwitching Function Step 2: Router R1 receives the Ethernet frameSwitching Function Step 3: Packet arrives at router R2Switching Function Step 3: Packet arrives at router R2Switching Function Step 3: Packet arrives at router R2Switching Function Step 3: Packet arrives at router R2Switching Function Step 3: Packet arrives at router R2Switching Function Step 3: Packet arrives at router R2Switching Function Step 3: Packet arrives at router R3Switching Function Step 4: The packet arrives at R3Switching Function Step 4: The packet arrives at R3Switching Function Step 4: The packet arrives at R3Switching Function Step 4: The packet arrives at R3Switching Function Step 4: The packet arrives at R3Switching Function Step 4: The packet arrives at R3Switching Function Step 5:The Ethernet Frame with encapsulated IP packet arrives at PC2 Switching Function Step 5: The Ethernet Frame with encapsulated IP packet arrives at PC2 PC2 examines the destination MAC address, which matches the MAC address of the receiving interface, its Ethernet NIC. PC2 will therefore copy the rest of the frame into its buffer.PC2 sees that the Ethernet Type field is 0x800, which means that the Ethernet frame contains an IP packet in the data portion of the frame. PC2 decapsulates the Ethernet frame and passes the IP packet to the IP process of its operating system.Mạng Máy Tính Nâng Cao STATIC ROUTING 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 (Cisco Discovery 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 routesTopology Lab Topology Lab Examining Router Interfaces show ip route command –used to view routing tableshow interfaces command –used to show status of an interfaceshow ip interface brief command –used to show a portion of the interface informationshow running-config command –used to show configuration file in RAM Configuring an Ethernet Interface By default all serial and Ethernet interfaces are down To enable an interface use the no shutdown commandConfiguring an Ethernet Interface Verifying Ethernet interface Show interfaces for fastEthernet 0/0 –command used to show status of fast Ethernet port Show ip interface brief Show running-configEthernet interfaces participate in ARPLogging Synchronous Command 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.Configuring a Serial Interfaces Configuring a Serial interface Enter interface configuration mode Enter in the ip address and subnet mask Enter in the no shutdown commandExample: R1(config)#interface serial 0/0 R1(config-if)#ip address 172.16.2.1 255.255.255.0 R1(config-if)#no shutdownExamining 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. Data Terminal Equipment (DTE) –Typically the router is the DTE device.Examining Router Interfaces Configuring serial links in a lab environmentOne side of a serial connection must be considered a DCEThis requires placing a clocking signal –use the clockrate command.Example: R1(config)#interface serial 0/0R1(config-if)#clockrate 64000Serial Interfaces require a clock signal to control the timing of the communications.Verifying the Serial Interface Configuration show interfaces commandshow ip interface brief commandshow running-configping commandshow ip route Verifying Changes to the Routing Table Observing Routes as They are Added to the Routing Tabledebug ip routing command will let us see any changes that the router performs when adding or removing routes.Devices on Directly Connected Networks 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. Static routing Static routes are commonly used when routing from a network to a stub network. A stub network is a network accessed by a single route. Command Syntax of ip route Configuring Static Routes Installing a Static Route in the Routing TableVerifying Static Route Commands Resolving to an Exit Interface Static Route with an Exit Interface Static routes can be configured with an exit interface, which allows the routing table to resolve the exit interface in a single search instead of two searches Modifying Static Routes There are times when a previously configured static route needs to be modified:The destination network no longer exists, and therefore the static route should be deleted.There is a change in the topology, and either the intermediate address or the exit interface has to be changed.Static Routes with Ethernet Interfaces Ethernet interfaces and ARP.If a static route is configured on an Ethernet link, if the packet is sent to the next-hop router thenThe destination MAC address will be the address of the next hop’s Ethernet interfaceThis is found by the router consulting the ARP tableIf an entry isn’t found then an ARP request will be sent outStatic Routes with Ethernet InterfacesStatic Routes with Ethernet Interfaces Static routes and Ethernet exit interfacesWith Ethernet networks, may be many different devices sharing the same multi-access network so the router does not know the next-hop IP address and it cannot determine the destination MAC address for the Ethernet frame.Default Static Route A default static route is a route that will match all packets. Default static routes are used:When no other routes in the routing table match the packet's destination IP address. In other words, when a more specific match does not exist. A common use is when connecting a company's edge router to the ISP network.When a router has only one other router to which it is connected. This condition is known as a stub router.A default route is actually a special static route that uses this format: ip route 0.0.0.0 0.0.0.0 [next-hop-address | outgoing interface]Default Static Route Verifying a Default Static Route Troubleshooting a Missing Route Tools that can be used to isolate routing problems include:ping–tests end to end connectivitytraceroute–used to discover all of the hops (routers) along the path between 2 pointsshow IP route –used to display routing table & ascertain forwarding processshow ip interface brief-used to show status of router interfacesshow cdp neighbors detail–used to gather configuration information about directly connected neighborsSolving the Missing Route Finding a missing or miss-configured route requires methodically using the correct toolsStart with ping. If ping fails then use traceroute to determine where packets are failing to arriveIssue: show ip route to examine routing table.If there is a problem with a miss-configured static route remove the static route then reconfigure the new static routeSolving the Missing Route Solving:R2(config)#no ip route 172.16.3.0 255.255.255.0 serial0/0/1R2(config)#ip route 172.16.3.0 255.255.255.0 serial0/0/0

Các file đính kèm theo tài liệu này:

  • pptchapter04_routing_6579.ppt
Tài liệu liên quan