Chapter 1 Introduction to Routing and Packet ForwardingRouting Protocols and Concepts quangkien@gmail.com.Topicsl Inside the Router Ÿ Routers are computers Ÿ Router CPU and Memory Ÿ Internetwork Operating System Ÿ Router Bootup Process Ÿ Router Ports doc
Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 79 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
79
Dung lượng
2,07 MB
Nội dung
Chapter Introduction to Routing and Packet Forwarding Routing Protocols and Concepts quangkien@gmail.com Topics l l Inside the Router Ÿ Routers are computers Ÿ Router CPU and Memory Ÿ Internetwork Operating System Ÿ Router Bootup Process Ÿ Router Ports and Interfaces Ÿ Routers and the Network Layer Path Determination and Switching Function Ÿ Packet Fields and Frame Formats Ÿ Best Path and Metrics Ÿ Equal Cost Load Balancing Ÿ Path Determination Ÿ Switching Function l l CLI Configuration and Addressing Ÿ Implementing Basic Addressing Schemes Ÿ Basic Router Configuration Building the Routing Table Ÿ Introducing the Routing Table Ÿ Directly Connected Networks Ÿ Static Routing Ÿ Dynamic Routing Ÿ Routing Table Principles Inside the Router l Routers are computers l Router CPU and Memory l Internetwork Operating System l Router Bootup Process l Router Ports and Interfaces l Routers and the Network Layer Routers are Computers Leonard Kleinrock and the first IMP l A router is a computer: Ÿ CPU, RAM, ROM, Operating System l The first router: used for the Advanced Research Projects Agency Network (ARPANET): Ÿ IMP (Interface Message Processor) Ÿ Honeywell 516 minicomputer that brought the ARPANET to life on August 30, 1969 l Routers forwarding packets (packet switching): Ÿ From the original source to the final destination Ÿ Selects best path based on destination IP address l A router connects multiple networks: Ÿ Interfaces on different IP networks l Router interfaces: Ÿ LAN Ÿ WAN Routers Determine the Best Path l The router’s primary responsibility: Ÿ Determining the best path Ÿ Forwarding packets toward their destination Routers Determine the Best Path IP Packet enters router’s Ethernet interface Router examines the packet’s destination IP address Router searches for a best match between packet’s destination IP address and network address in routing table Using the exit-interface in the route, the packet is forwarded to the next router or the final destination l Routing table Ÿ Determines best path Ÿ Best match between destination IP address and network address in routing table Router CPU and Memory l CPU - Executes operating system instructions l Random access memory (RAM) Ÿ running copy of configuration file Ÿ routing table Ÿ ARP cache l Read-only memory (ROM) Ÿ Diagnostic software used when router is powered up Ÿ Router’s bootstrap program Ÿ Scaled down version of operating system IOS l Non-volatile RAM (NVRAM) Ÿ Stores startup configuration (including IP addresses, Routing protocol) l Flash memory - Contains the operating system (Cisco IOS) l Interfaces - There exist multiple physical interfaces that are used to connect network Examples of interface types: Ÿ Ethernet / fast Ethernet interfaces Ÿ Serial interfaces Ÿ Management interfaces Router physical characteristics 10 Show Routing Table R1# show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set C C 192.168.1.0/24 is directly connected, FastEthernet0/0 192.168.2.0/24 is directly connected, Serial0/0/0 65 Verifying Interfaces R1# show interfaces FastEthernet0/0 is up, line protocol is up (connected) Hardware is Lance, address is 0007.eca7.1511 (bia 00e0.f7e4.e47e) Description: R1 LAN Internet address is 192.168.1.1/24 MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, rely 255/255, load 1/255 Encapsulation ARPA, loopback not set ARP type: ARPA, ARP Timeout 04:00:00, Last input 00:00:08, output 00:00:05, output hang never Last clearing of “show interface” counters never Queueing strategy: fifo Output queue :0/40 (size/max) minute input rate bits/sec, packets/sec minute output rate bits/sec, packets/sec packets input, bytes, no buffer Received broadcasts, runts, giants, throttles Serial0/0 is up, line protocol is up (connected) Hardware is HD64570 Description: Link to R2 Internet address is 192.168.2.1/24 MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 1/255 Encapsulation HDLC, loopback not set, keepalive set (10 sec) Last input never, output never, output hang never 66 Building the Routing Table l Introducing the Routing Table l Directly Connected Networks l Static Routing l Dynamic Routing l Routing Table Principles Introducing the Routing Table R1# show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set C C 192.168.1.0/24 is directly connected, FastEthernet0/0 192.168.2.0/24 is directly connected, Serial0/0/0 l Routing table is a data file in RAM that is used to store route information about: Ÿ Directly connected Ÿ Remote networks 68 Introducing the Routing Table R1# show ip route C C 192.168.1.0/24 is directly connected, FastEthernet0/0 192.168.2.0/24 is directly connected, Serial0/0/0 Exit Interfaces l The routing table contains network/next-hop associations l The “next hop” is the IP address of a next-hop router (coming) l May also include an outgoing or exit interface (more later) 69 Introducing the Routing Table R1# show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP C C 192.168.1.0/24 is directly connected, FastEthernet0/0 192.168.2.0/24 is directly connected, Serial0/0/0 Directly Connected Networks l directly connected network is a network that is directly attached to one of the router interfaces l When a router’s interface is configured with an IP address and subnet mask, the interface becomes a host on that attached network l Active directly connected networks are added to the routing table 70 Introducing the Routing Table R1# show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP C C 192.168.1.0/24 is directly connected, FastEthernet0/0 192.168.2.0/24 is directly connected, Serial0/0/0 Directly Connected Networks l directly connected network is a network that is directly attached to one of the router interfaces l When a router’s interface is configured with an IP address and subnet mask, the interface becomes a host on that attached network l Active directly connected networks are added to the routing table 71 Introducing the Routing Table R1# show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP C C 192.168.1.0/24 is directly connected, FastEthernet0/0 192.168.2.0/24 is directly connected, Serial0/0/0 Remote Network l A remote network is a network that is not directly connected to the router l A remote network is a network that can only be reached by sending the packet to another router l Remote networks are added to the routing table using Ÿ a dynamic routing protocol or Ÿ by configuring static routes l Dynamic routes are routes to remote networks that were learned automatically by the router, using a dynamic routing protocol l Static routes are routes to networks that a network administrator manually configured 72 Directly Connected Networks R1# show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP C C 192.168.1.0/24 is directly connected, FastEthernet0/0 192.168.2.0/24 is directly connected, Serial0/0/0 Directly Connected Networks l C: Source of the route information, directly connected network, static route, or a dynamic routing protocol Ÿ The C represents a directly connected route l 192.168.1.0/24: The network address and subnet mask of the directly connected or remote network Ÿ In this example, 192.168.1.0/24 is the directly connected network l FastEthernet 0/0: The exit interface and/or the IP address of the next-hop router Ÿ In this example, both FastEthernet 0/0 is the exit interfaces used to reach these networks 73 Directly Connected Networks R1# show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP C C 192.168.1.0/24 is directly connected, FastEthernet0/0 192.168.2.0/24 is directly connected, Serial0/0/0 Directly Connected Networks l Before any static or dynamic routing is configured on a router, the router only knows about its own directly connected networks l These are the only networks that are displayed in the routing table until static or dynamic routing is configured l Static and dynamic routes cannot exist in the routing table without a router’s own directly connected networks l The router cannot send packets out an interface if that interface is not enabled with an IP address and subnet mask, just as a PC cannot send IP packets out its Ethernet interface if that interface is not configured with an IP address and subnet mask 74 Static Routes R1# show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP Gateway of last resort is not set C C S 192.168.1.0/24 is directly connected, FastEthernet0/0 192.168.2.0/24 is directly connected, Serial0/0/0 192.168.3.0/24 [1/0] via 192.168.2.2c Static Route l Static route includes the network address and subnet mask of the remote network, along with the IP address of the next-hop router or exit interface l Note: Configuration of the static route is not shown l Static routes are denoted with the code S in the routing table, l Static routes are examined in detail in the next chapter 75 Dynamic Routes R1# show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set C C S R 192.168.1.0/24 192.168.2.0/24 192.168.3.0/24 192.168.4.0/24 is directly connected, FastEthernet0/0 is directly connected, Serial0/0/0 [1/0] via 192.168.2.2 [120/1] via 192.168.2.2, 00:00:20, Serial0/0/0 l R1 has automatically learned about the 192.168.4.0/24 network from R2 through the dynamic routing protocol RIP (Routing Information Protocol) l RIP was one of the first IP routing protocols and will be fully discussed in later chapters l Note: Configuration of RIP not shown 76 Routing Table Principles l These principles, listed as follows, are from Alex Zinin’s book, Cisco IP Routing: Ÿ Every router makes its decision alone, based on the information it has in its own routing table Ÿ The fact that one router has certain information in its routing table does not mean that other routers have the same information Ÿ Routing information about a path from one network to another does not provide routing information about the reverse, or return, path 77 Asymmetric Routing l Asymmetric routing - Because routers not necessarily have the same information in their routing tables, packets can traverse the network in one direction, using one path, and return through another path l Asymmetric routing is more common in the Internet, which uses the BGP routing protocol, than it is in most internal networks 78 Chapter Introduction to Routing and Packet Forwarding ...Topics l l Inside the Router Ÿ Routers are computers Ÿ Router CPU and Memory Ÿ Internetwork Operating System Ÿ Router Bootup Process Ÿ Router Ports and Interfaces Ÿ Routers and the Network... the Router l Routers are computers l Router CPU and Memory l Internetwork Operating System l Router Bootup Process l Router Ports and Interfaces l Routers and the Network Layer Routers are Computers. .. including T1, DSL, and ISDN 21 Router Interfaces FastEthernet 0/0 MAC: 0c00-41cc-ae12 10 .1. 0 .1/ 16 FastEthernet 0/0 MAC: 0c00-3a44 -19 0a 19 2 .16 8 .1. 1/24 Serial 0/0 17 2 .16 .1. 1/24 Serial 0 /1 172 .16 .1. 2/24