NOTA KURSUS CCNA Exploration Module 2 Routing Protocols & Concepts Siri /2010 Nama Peserta : Tarikh : Masa : 8:30 pagi - 5:00 petang Tempat : INTAN NetAcad, Makmal Siber 4, Aras 3 IMATEC, INTAN Bukit Kiara, Kuala Lumpur C C C C N N A A E E X X P P L L O O R R A A T T I I O O N N M M O O D D U U L L 2 2 Anjuran: Program Pembangunan Kepakaran ICT Pusat ICT Institut Tadbiran Awam Negara (INTAN) Jabatan Perkhidmatan Awam Malaysia http://www.intanbk.intan.my
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
NOTA KURSUS
CCNA Exploration Module 2 Routing Protocols & Concepts Siri /2010
Nama Peserta : Tarikh : Masa : 8:30 pagi - 5:00 petang Tempat : INTAN NetAcad, Makmal Siber 4, Aras 3 IMATEC, INTAN Bukit Kiara, Kuala Lumpur
CC CC NN AA EE XX PP LL OO RR AA TT II OO NN MM OO DD UU LL 22 Anjuran:
Program Pembangunan Kepakaran ICT Pusat ICT Institut Tadbiran Awam Negara (INTAN) Jabatan Perkhidmatan Awam Malaysia http://www.intanbk.intan.my
� Describe the basic purpose of a routeresc be e bas c pu pose o a ou e-Computers that specialize in sending packets over the data network.They are responsible for interconnecting networks by selecting the best path for a packet to travel and forwarding packets to their destination
� Routers have many of the same hardware and software components that are found in other computersp pincluding:
� Router components and their functions”p�CPU - Executes operating system instructions
� such as system initialization, routing functions, and switching functions.�Random access memory (RAM) RAM stores the instructions and data needed�Random access memory (RAM) -RAM stores the instructions and data neededto be executed by the CPU. RAM is used to store these components:
–Operating System: The Cisco IOS (Internetwork Operating System) is copied into RAM during bootup.g p–Running Configuration File: This is the configuration file that stores the configuration commands that the router IOS is currently using.–IP Routing Table: This file stores information about directly connected and g yremote networks. It is used to determine the best path to forward the packet.–ARP Cache: This cache contains the IPv4 address to MAC address mappings, similar to the ARP cache on a PC. The ARP cache is used on
h h LAN i f h E h i frouters that have LAN interfaces such as Ethernet interfaces.–Packet Buffer: Packets are temporarily stored in a buffer when received on an interface or before they exit an interface.
RAM is volatile memory and loses its content when the router is powered down or restarted.
Router as a Computer
� Router components and their functions”ou e co po e s a d e u c o s�Read-only memory (ROM) - Holds diagnostic software used when router is powered up. Stores the router’s bootstrap program.p g
–ROM is a form of permanent storage.Cisco devices use ROM to store:
–The bootstrap instructions–Basic diagnostic software–Scaled-down version of IOS–Scaled-down version of IOS
ROM uses firmware, which is software that is embedded inside the integrated circuit.
– Firmware includes the software that does not normally need to be modified or upgraded, such as the bootup instructions. – ROM does not lose its contents when the router loses power
R t C tRouter as a Computer� Router components and their functions”
�Non-volatile RAM (NVRAM) - Stores startup configuration. This may include IP addresses (Routing protocol Hostname of router)addresses (Routing protocol, Hostname of router)
�NVRAM (Nonvolatile RAM) does not lose its information when power is turned off. This is in contrast to the most common forms of RAM, such as DRAM, that requires continual power to maintain its information. �NVRAM is used by the Cisco IOS as permanent storage for the startup configuration file�NVRAM is used by the Cisco IOS as permanent storage for the startup configuration file.
�All configuration changes are stored in the running-config file in RAM, and with few exceptions, are implemented immediately by the IOS. �To save those changes in case the router is restarted or loses power, the running-config must be copied to NVRAM where it is stored as the startup-config file NVRAM retains itsmust be copied to NVRAM, where it is stored as the startup-config file. NVRAM retains itscontents even when the router reloads or is powered off.
�Flash memory - Contains the operating system (Cisco IOS)�In most models of Cisco routers, the IOS is permanently stored in flash memory and copied into RAM during the bootup process, where it is then executed by the CPU. �Flash consists of SIMMs or PCMCIA cards, which can be upgraded to increase the amount of flash memoryincrease the amount of flash memory.
�Interfaces - There exist multiple physical interfaces that are used to connect network. Examples of interface types:-Ethernet / fast Ethernet interfaces
� The operating system software used in Cisco routers is known as Cisco Internetwork Operating System (IOS)Internetwork Operating System (IOS).
– Cisco IOS is a multitasking operating system that is integrated with routing, switching, internetworking, and telecommunications functions.
� Although the Cisco IOS may appear to be the same on many routers,Although the Cisco IOS may appear to be the same on many routers,there are many different IOS images.
– An IOS image is a file that contains the entire IOS for that router. Cisco creates many different types of IOS images, depending upon the model of the router and the features within the IOS.the router and the features within the IOS.– Typically the more features in the IOS, the larger the IOS image, and therefore, the more flash and RAM that is required to store and load the IOS.
� Although some routers provide a graphical user interface (GUI), the d li i t f (CLI) i h th d fcommand line interface (CLI) is a much more common method of
configuring Cisco routers. – The CLI is used throughout this curriculum.
� Upon bootup the startup config file in NVRAM is copied into RAM and� Upon bootup, the startup-config file in NVRAM is copied into RAM andstored as the running-config file.
– IOS executes the configuration commands in the running-config. Any changes entered by the network administrator are stored in the running-config and are immediately implemented by the IOS
R t C tRouter as a Computer� Major phases to the router boot-up process
Step 1 and 2: Test router hardwareP O S lf T t (POST)•Power-On Self Test (POST)
–During this self-test, the router executes diagnostics from ROM on several hardware components including the CPU, RAM, and NVRAM
•Execute bootstrap loader–The main task of the bootstrap program is to locate the Cisco IOS and load it into RAM.–Note: At this point, if you have a console connection to the router, you will begin to see output on the screen.
Step 3 and 4: Locate & load Cisco IOS softwareLocate IOS and Load IOS-Locate IOS and Load IOS
–The IOS is typically stored in flash memory, but can also be stored in other places such as a TFTP server.–If a full IOS image can not be located, a g ,scaled-down version of the IOS is copied from ROM into RAM. This version of IOS is used to help diagnose any problems and can be used to load a complete version of the IOS into RAM.
–Note: A TFTP server is usually used as a backup server for IOS but it can also be used as a central point for storing and loading the IOS.
R t C tRouter as a ComputerStep 5 and 6: Locate & load startup configuration file or enter setup
mode
-After the IOS is loaded, the bootstrap program searches for the startup configuration file, known as startup-config, in NVRAM. This parameters including:
•interface addressesinterface addresses•routing information•passwords•any other configurationsy g
–If the startup-config, is located in NVRAM, it is copied into RAM as the running-config.
•The IOS loads the commands in the file, one line at a timetime.
–If the startup configuration file does not exist in NVRAM, the router may search for a TFTP server.
• If the router detects that it has an active link to another configured router, it sends a broadcast searching for a configuration file across the active link. You will eventually see message like the following one:•%Error opening tftp://255.255.255.255/network-confg
Router as a ComputerRouter as a Computer� Locate & load startup configuration file or enter setup
mode–Enter Setup Mode (Optional). If the startup configuration file can not be located the routerconfiguration file can not be located, the routerprompts the user to enter setup mode.
•Setup mode is a series of questions prompting the user for basic configuration information. Setup mode is not intended to be used to enter complex router configurations and it is notcomplex router configurations, and it is notcommonly used by network administrators.
–When booting a router that does not contain a startup configuration file, you will see the following question after the IOS has been loaded:
•Would you like to enter the initial configuration dialog? [yes/no]: no
–Setup mode will not be used in this course to configure the router. When prompted to enter setup mode, always answer no. If youe te setup ode, a ays a s e o youanswer yes and enter setup mode, you can press Ctrl-C at any time to terminate the setup process.
–When setup mode is not used, the IOS creates a default running-config.default running config.
•The default running-config is a basic configuration file that includes the router interfaces, management interfaces, and certain default information. Th d f lt i fi d t t i
�Platform model number �CPU�Amount of RAM�Amount of RAM
�Some series of routers, like the 2600, use a fraction of DRAM as packet memory. Packet memory is
d f b ff i k tused for buffering packets.�To determine the total amount of DRAM on the router, add both numbers. In this example, the Cisconumbers. In this example, the Cisco2621 router has 60,416 KB (kilobytes) of free DRAM used for temporarily storing the Cisco IOS and other system processes. The y pother 5,120 KB is dedicated for packet memory. The sum of these numbers is 65,536K, or 64 megabytes (MB) of total DRAM.
�Number & type of interfaces2 FastEthernet/IEEE 802.3 interface(s)2 Low-speed serial(sync/async) network interface(s)
�Amount of NVRAM�32K bytes of non-volatile configuration memory.�NVRAM is used to store the startup config filestartup-config file.
�Amount of flash�16384K bytes of processor board System flash (Read/Write)System flash (Read/Write)�This is the amount of flash memory on the router. Flash is used to permanently store the Cisco IOS.
� Configuration register is 0x2102–The last line of the show version command displays the current
fi d l f th ftconfigured value of the softwareconfiguration register in hexadecimal. If there is a second value displayed in parentheses, it denotes the configuration registerdenotes the configuration registervalue that will be used during the next reload.–The configuration register has
l i l di dg g
several uses, including passwordrecovery. The factory default setting for the configuration register is 0x2102. This value indicates that th t ill tt t t l dthe router will attempt to load a Cisco IOS software image from flash memory and load the startup configuration file from NVRAM.
–Note: The configuration register is discussed in more detail in a later course.
C fi ti i tConfiguration register� The order in which the router looks for system
bootstrap depends on the boot field setting in the configuration register.g g
The default configuration register setting can be changed with the global configuration mode command config-register.Use a hexadecimal number as the argument for this command.command.
� The configuration register is a 16-bit register in NVRAM.
The lowest four bits of the configuration register form the boot field. To ensure that the upper 12 bits are not changed, first retrieve the current values of the configuration register using the show version command. Then use the config-register command, changing only the value of the last hexadecimal digit.
Configuration register (cont )Configuration register (cont.)� To enter the ROM monitor mode, set the configuration
register value to 0xnnn0,where nnn represents the previous value of the non-boot field di itdigits.This value sets the boot field bits to 0000 binary. From ROM monitor, boot the operating system manually by using the b command at the ROM monitor prompt.
� To configure the system to boot automatically from ROM� To configure the system to boot automatically from ROM,set the configuration register to 0xnnn1,
This value sets the boot field bits to 0001 binary.
� To configure the system to use the boot system commands in NVRAM set the configuration register tocommands in NVRAM, set the configuration register toany value from 0xnnn2 to 0xnnnF,
These values set the boot field bits to a value between 0010 and 1111 binary. Using boot system commands in NVRAM is the default.
Stages of the router power-on boot sequenceStages of the router power-on boot sequence1. ROM
1. POST
2. Bootstrap code executed
1, 2
3. Check Configuration Register value (NVRAM)
0 = ROM Monitor mode
1 = ROM IOS
2 - 15 = Boot system from flash
3
42. Check for IOS boot system commands in startup-config file (NVRAM)
If boot system commands in startup-config
a. Run boot system commands in order they appear in startup-config to locate the IOS
4
b If boot system commands fail, use default fallback sequence to locate the IOS (Flash, TFTP, ROM)
3. Locate and load IOS, Default fallback sequence: No IOS boot system commands in startup-config
a. Flash (sequential)
b. TFTP server (netboot) - The router uses the configuration register value to form a filename from which to boot a default system image stored on a network server.
c. ROM (partial IOS) or keep retrying TFTP depending upon router model
- If no IOS located, get partial IOS version from ROM
4. Locate and load startup-configa. If startup-config found, copy to running-config
b. If startup-config not found, prompt for setup-mode
c If setup mode bypassed create a “skeleton” default running config (no startup config)
c. If setup-mode bypassed, create a skeleton default running-config (no startup-config)
How a Cisco device locates and loads IOSHow a Cisco device locates and loads IOS� The router can use its own fallback
sequence to load the software. qThe router looks to the boot system commands saved in NVRAM.(Tony) The router has its own default fallback sequence This default sequencefallback sequence. This default sequencecan be interrupted by using the boot system command and/or config register.
� The settings in the configuration registerg g genable the following alternatives:
Global configuration mode boot system commands can be specified to enter fallback sources.fallback sources.If NVRAM lacks boot system commandsthe system by default uses the Cisco IOS software in flash memory.
(T ) N b t t d(Tony) No boot system commands(Tony) IOS specified in the boot system does not exist
U i th b t t dUsing the boot system command� The three examples show boot system
entries which specify that a Cisco IOS ft i ill l dsoftware image will loadFirst from flash memory,
Flash memory – A system image from flash memory can be loadedflash memory can be loaded.
Then from a network server, andNetwork server – In case flash memory becomes corrupted, a system i b l d d f TFTPimage can be loaded from a TFTPserver.
Finally from ROM: ROM – If flash memory is corruptedROM If flash memory is corruptedand the network server fails to load the image, booting from ROM is the final bootstrap option in software. However the system image in ROM isHowever, the system image in ROM isa subset of the Cisco IOS that lacks the protocols, features of the full Cisco IOS.Also, if the software has been updated, the router may have an older version
� Routers have physical connectors that are d t th t Th tused to manage the router. These connectors
are known as management ports. –Unlike Ethernet and serial interfaces, management ports are not used for packet f diforwarding.
� The most common management port is the console port.
The console port is used to connect a terminal–The console port is used to connect a terminal,or most often a PC running terminal emulator software, to configure the router without the need for network access to that router. –The console port must be used during initialThe console port must be used during initialconfiguration of the router.
� Another management port is the auxiliary port. –Not all routers have auxiliary ports.y p–At times the auxiliary port can be used in ways similar to a console port. It can also be used to attach a modem. –Auxiliary ports will not be used in this
Auxiliary ports will not be used in thiscurriculum.
Routers determine the best path
� Router Interface is a physical connector that enables a router to send or receive packets
–Each interface connects to a separate network•different IP network•different IP network
� Typically, the interfaces connect to various types of networks, which means that different yptypes of media and connectors are required. Types of router interfaces:
Two major groups of Router Interfaces: LAN & WAN� LAN Interfaces: such as Ethernet and
FastEthernet�Are used to connect router to LAN network�Has a layer 2 MAC address
�a router Ethernet interface participates in the ARP process for that LAN.
�Can be assigned a Layer 3 IP address�Can be assigned a Layer 3 IP address�Usually consist of an RJ-45 jack
�When a router is connected to a switch a straight-through cable isswitch, a straight through cable isused.�When two routers are connected directly through the Ethernet interfaces or when a PC NIC isinterfaces, or when a PC NIC isconnected directly to a router Ethernet interface, a crossovercable is used.
f f &Two major groups of Router Interfaces: LAN & WAN� WAN Interfaces- such as serial, ISDN, and
F R lFrame Relay�Are used to connect routers to external networks that interconnect LANs, usually over a larger geographical distance..�Depending on the WAN technology, a p g gy,layer 2 address may be used.�Uses a layer 3 IP address
�Similar to LAN interfaces each WAN�Similar to LAN interfaces, each WANinterface has its own IP address and subnet mask, which identifies it as a member of a specific network.
�The Layer 2 encapsulation can be of different types,
f f &Two major groups of Router Interfaces: LAN & WAN� The router in the figure has four
i t finterfaces.–Each interface has a Layer 3 IP address and subnet mask that configures it for a different network. –The Ethernet interfaces also have Layer 2 Ethernet MAC addresses.
� The WAN interfaces are using different Layer 2 encapsulations.
S 0/0/0 C–Serial 0/0/0 is using HDLC–Serial 0/0/1 is using PPP. –Both of these serial point-to-pointBoth of these serial point to pointprotocols use a broadcast address for the Layer 2 destination address when encapsulating the IP packet into a data link
� A router connects multiple networks. p�This means that it has multiple interfaces that each belong to a different IP network. �When a router receives an IP packet on one interface it�When a router receives an IP packet on one interface, itdetermines which interface to use to forward the packet onto its destination.The interface that the ro ter ses to for ard the packet ma be�The interface that the router uses to forward the packet may be
the network of the final destination of the packet (the network with the destination IP address of this packet), or it may be a network connected to another router that is used to reach the destinationconnected to another router that is used to reach the destinationnetwork.
� Routers are the network center-Routers generally have 2 connections:
� Routers examine a packet’s destination IP address andou e s e a e a pac e s des a o add ess a ddetermine the best path by enlisting the aid of a routing table
� The primary responsibility of a router is to direct packets destined for local and remote networks by:and remote networks by:
–Determining the best path to send packets –Forwarding packets toward their destination
� The router uses its routing table to determine the best path to forward the� The router uses its routing table to determine the best path to forward thepacket.
–When the router receives a packet, it examines its destination IP address and searches for the best match with a network address in the router's routing table. –The routing table also includes the interface to be used to forward the packet. Once a match is found, the router encapsulates the IP packet into the data link frame of the outgoing or exit interface, and the packet is then forwarded toward its destination.
� It is very likely that a router will receive a packet that is encapsulated in one type of data link frame, such as an Ethernet frame and when forwarding the packet, the router will encapsulate it in a different type of data link
� Routers Operate at Layers 1, 2 & 3ou e s Ope a e a aye s , & 3–A router makes its primary forwarding decision at Layer 3, but as we saw earlier, it participates in Layer 1 and Layer 2participates in Layer 1 and Layer 2processes as well. �Router receives a stream of encoded bits�Bits are decoded and passed to layer 2�Router de-encapsulates the frame�Remaining packet passed up to layer 3
-Routing decision made at this layer by examining destination IP addressexamining destination IP address
�Packet is then re-encapsulated & sent out outbound interface
� PC1 operates at all seven layers, encapsulating the data and sending the frame out as a stream of encoded bits to R1 its default gatewayof encoded bits to R1, its default gateway.
� R1 receives the stream of encoded bits on its interface. The bits are decoded and passed up to Layer 2, where R1 decapsulates the frame. The router examines the destination address of the data link frame to determine if it matches the receiving interface, including a broadcast or multicast address. If there is a match with the data portion of the frame, the IP packet is passed up to Layer 3, where R1 makes its routing decision. R1 then re-encapsulates the packet into a new Layer 2 data link frame and forwards it out the outbound interface as a stream of encoded bits.
� R2 receives the stream of bits, and the process repeats itself. R2 decapsulates the frame and passes the data portion of the frame, the IP packet, to Layer 3 where R2 makes its routing decision. R2 then re-encapsulates the packet into a new Layer 2 data link frame and forwards it out the outbound interface as a stream of encoded bits.
� This process is repeated once again by router R3, which forwards the IP packet, encapsulated inside a data link frame and encoded as bits, to PC2.
� Implementing Basic Addressing Schemesp e e g as c dd ess g Sc e es
� When designing a new network or mapping an existing network you must provide the following information innetwork you must provide the following information inthe form of a document:
-Topology drawing that Illustrates physical connectivityp gy g p y y–Address table that provides the following information:
� Basic Router Configuration� A basic router configuration should contain the following:
-Router name - Host name should be uniqueBanner At a minimum banner should warn against unauthorized use-Banner - At a minimum, banner should warn against unauthorized use
-Passwords - Use strong passwords-Interface configurations –
•Specify interface type, •IP address and subnet mask.•Describe purpose of interface. •Issue no shutdown command. •If DCE serial interface issue clock rate command.
� After entering in the basic configuration the following tasks should beAfter entering in the basic configuration the following tasks should becompleted
-Verify basic configuration and router operations.-Save the changes on a router
message-of-the-day (motd) banner. A delimiting character, such as a "#" is used at the beginning and at the end of the message. The delimiter allows you to configure a multiline banner, as shown here.
R1(config)#banner motd #
Enter TEXT message. End with the character '#'.
******************************************
WARNING!! Unauthorized Access Prohibited!!
******************************************
#
Configuring an appropriate banner is part of a good security plan. At a very minimum, a banner should warn against unauthorized access. Never configure a
Limiting Device Access Enable and Enable Secret PasswordsLimiting Device Access – Enable and Enable Secret Passwords� To provide additional security, use enable password
or enable secret command to establish h i i b f i i il d EXECauthentication before accessing privileged EXEC
(enable) mode. Always use the enable secret command, not the older
bl d d if iblenable password command, if possible.
� The following commands are used to set the passwords:
� If no enable password or enable secret password is� If no enable password or enable secret password isset, the IOS prevents privileged EXEC access from a Telnet session.
Without an enable password having been set a TelnetWithout an enable password having been set, a Telnetsession would appear this way:
Limiting Device Access Enable and Enable Secret PasswordsLimiting Device Access – Enable and Enable Secret Passwords� Example of enable password and enable secret:
Limiting Device Access – VTY PasswordLimiting Device Access VTY Password� The vty lines allow access to a router via Telnet.
By default, many Cisco devices support 5 VTY lines that are b d 0 t 4numbered 0 to 4.
A password needs to be set for all available vty lines. The same password can be set for all connections. However it is often desirable that a unique password be set forHowever, it is often desirable that a unique password be set forone line to provide a fall-back for administrative entry to the device if the other connections are in use.
� The following commands are used to set a password:g pRouter(config)#line vty 0 4Router(config-line)#password passwordRouter(config-line)#login
� By default, the IOS includes the login command on the VTY lines. This prevents Telnet access to the device without first requiring authentication.
If, by mistake, the no login command is set, which removes the requirement for authentication, unauthorized persons could connect to the line using Telnet. This would be a major security risk.
Encrypting Password DisplayEncrypting Password Display� Another useful command prevents passwords from
showing up as plain text when viewing the fi i filconfiguration files.This is the service password-encryption command.This command causes the encryption of passwords to occur when a password is configured.
� The service password-encryption command applies weak encryption to all unencrypted passwords.yp yp p
This encryption does not apply to passwords as they are sent over media only in the configuration. The purpose of this command is to keep unauthorized p p pindividuals from viewing passwords in the configuration file.
� Once the encryption has been applied, removing the yp pp , gencryption service does not reverse the encryption.
Note: When cabling a point-to-point serial link in our lab environment, one end ofNote: When cabling a point to point serial link in our lab environment, one end ofthe cable is marked DTE and the other end is marked DCE. The router that has the DCE end of the cable connected to its serial interface will need the additional clock rate command configured on that serial interface.This step is only necessary in a lab environmentThis step is only necessary in a lab environment
th F tEth t i t f d t b fi d� the FastEthernet interface needs to be configuredR1(config)#interface FastEthernet0/0R1( fi if)#i dd 192 168 1 1 255 255 255 0R1(config-if)#ip address 192.168.1.1 255.255.255.0R1(config-if)#description R1 LANR1(config if)#no shutdownR1(config-if)#no shutdown
� Each interface must belong to a different network. Alth h th IOS ll t fi IP dd–Although the IOS allows you to configure an IP address
from the same network on two different interfaces, the router will not activate the second interface. –For example, what if you attempt to configure the FastEthernet 0/1 interface on R1 with an IP address on the 192 168 1 0/24 t k? F tEth t 0/0 h l d b192.168.1.0/24 network? FastEthernet 0/0 has already beenassigned an address on that same network. you will get the following message:
–If there is an attempt to enable the interface with the no shutdown command, the following message will appear:
R1(config-if)#no shutdownR1(config-if)#no shutdown192.168.1.0 overlaps with FastEthernet0/0FastEthernet0/1: incorrect IP address assignment
� The output from the show ip interface brief command shows that the second interface configured for the 192.168.1.0/24 network, FastEthernet 0/1, is still down.
SRouting Table Structure� The primary function of a router is to forward a packet toward its
destination network which is the destination IP address of the packetdestination network, which is the destination IP address of the packet.–To do this, a router needs to search the routing information stored in its routing table.
� Routing Table is stored in ram and contains information:Routing Table is stored in ram and contains information:�Directly connected networks - this occurs when a device is connected to another router interfaceR t l t d t k thi i t k th t i t di tl�Remotely connected networks - this is a network that is not directly
connected to a particular router�network/next hop associations - about the networks include source of i f ti t k dd & b t k d I dd f t hinformation, network address & subnet mask, and Ip address of next-hoprouter
� Show ip route command is used to view a routing tablep g
Routing Table Structure� The network/exit-interface association can also represent the destination network
address of the IP packet. This association occurs on the router's directly connected networks.
� A directly connected network is a network that is directly attached to one of the router interfaces.
When a router interface is configured with an IP address and subnet mask, the interfaceWhen a router interface is configured with an IP address and subnet mask, the interfacebecomes a host on that attached network. The network address and subnet mask of the interface, along with the interface type and number, are entered into the routing table as a directly connected network. When a router forwards a packet to a host, such as a web server, that host is on the same network as a router's directly connected network.
� A remote network is a network that is not directly connected to the router� A remote network is a network that is not directly connected to the router.In other words, a remote network is a network that can only be reached by sending the packet to another router. Remote networks are added to the routing table using either a dynamic routing protocol or by configuring static routes. Dynamic routes are routes to remote networks that were learned automatically by the router, using a dynamic routing
t l St ti t t t t k th t t k d i i t t llprotocol. Static routes are routes to networks that a network administrator manuallyconfigured.
� As shown in the figure the routing table is displayed with the show ip route d At thi i t th h t b t ti t fi dcommand. At this point, there have not been any static routes configured
nor any dynamic routing protocol enabled. Therefore, the routing table for R1 only shows the router's directly connected networks. For each network listed in the routing table, the following information is included:g , g
–C - The information in this column denotes the source of the route information, directly connected network, static route or a dynamic routing protocol. The C represents a directly connected route.192 168 1 0/24 Thi i th t k dd d b t k f th di tl–192.168.1.0/24 - This is the network address and subnet mask of the directly
connected or remote network. In this example, both entries in the routing table, 192.168.1./24 and 192.168.2.0/24, are directly connected networks.–FastEthernet 0/0 - The information at the end of the route entry represents the y pexit interface and/or the IP address of the next-hop router. In this example, both FastEthernet 0/0 and Serial0/0/0 are the exit interfaces used to reach these networks.
� PCs also have a routing table.Cs a so a e a ou g ab eIn the figure, you can see the route print command output. The command reveals the configured or acquired default gateway, connected loopback multicast and broadcast networksconnected, loopback, multicast, and broadcast networks.The output from route print command will not be analyzed during this course. It is shown here to emphasize the point that g p pall IP configured devices should have a routing table.
� The following analogies may help clarify the concept of connected static andthe concept of connected, static, anddynamic routes:
� Directly Connected Routes - To visit a neighbor, you only have to go down the
hi h l d li Thig y y g
street on which you already live. Thispath is similar to a directly-connected route because the "destination" is available directly through your " t d i t f " th t t"connected interface," the street.
� Static Routes - A train uses the same railroad tracks every time for a specified route This path is similar to a staticroute. This path is similar to a staticroute because the path to the destination is always the same.
� Dynamic Routes - When driving a car, "d i ll " hyou can "dynamically" choose a
different path based on traffic, weather, or other conditions. This path is similar to a dynamic route because you can choose a new path at many different
choose a new path at many differentpoints on your way to the destination.
Routing Table StructureRouting Table Structure� Adding a connected network to the routing table
-Router interfaces�Each router interface is a member of a different network�Activated using the no shutdown command�In order for static and dynamic routes to exist in routingIn order for static and dynamic routes to exist in routingtable you must have directly connected networks
� Remote networks are added to the routing table either by configuring static routes or enabling a dynamic routing protocol.g p
� 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 used
� When to use static routes-When network only consists of a few routers
•Using a dynamic routing protocol in such a case does not present any substantialcase does not present any substantialbenefit.
-Network is connected to internet only through one ISP
There is no need to use a dynamic routing• There is no need to use a dynamic routingprotocol across this link because the ISP represents the only exit point to the Internet.
-Hub & spoke topology is used on a large networknetwork
•A hub-and-spoke topology consists of a central location (the hub) and multiple branch locations (spokes), with each spoke having only one connection to the hubonly one connection to the hub.•Using dynamic routing would be unnecessary because each branch has only one path to a given destination-through the central location
� Dynamic routing protocols-Are used to add remote networks to a routing table-Are used to discover networks-Are used to update and maintain routing tables
� Automatic network discovery–-Network discovery is the ability of a routing protocol to share information about the networks that it knows about with other routers that are also using the same routing protocol. –Instead of configuring static routes to remote networks on every router, a dynamic routing protocol allows the routers to automatically learn about these networks from other routers.–These networks - and the best path to each network - are added to the router's prouting table and denoted as a network learned by a specific dynamic routing protocol.
� Maintaining routing tablesDynamic routing protocols are used to share routing information with other router & to-Dynamic routing protocols are used to share routing information with other router & to
maintain and up date their own routing table.–Dynamic routing protocols not only make a best path determination to various networks, they will also determine a new best path if the initial path becomes unusable (or if the topology changes)
•R1 has learned about two remote•R1 has learned about two remotenetworks:
•A route that dynamically used RIP •In the figure R1 has automatically•In the figure, R1 has automaticallylearned about the 192.168.4.0/24 network from R2 through the dynamic routing protocol, RIP (Routingg p , ( gInformation Protocol).
•A static route that was configured manually.
•This is an example of how routing tables can contain routes learned dynamically and configureddynamically and configuredstatically and is not necessarily representative of the best
� IP routing protocols. Example of routing protocols include:g p p g p–RIP (Routing Information Protocol) - - CCNA–IGRP (Interior Gateway Routing Protocol) - - ignore it–EIGRP (Enhanced Interior Gateway Routing Protocol) - - CCNA & NP–OSPF (Open Shortest Path First) - - CCNA & CCNP–IS-IS (Intermediate System-to-Intermediate System) - - CCNP–BGP (Border Gateway Protocol) - - CCNP
RIP (versions 1 and 2), EIGRP, and OSPF are discussed in this course. EIGRP d OSPF l l i d i d t il i CCNP l ith IS IS d BGPand OSPF are also explained in more detail in CCNP, along with IS-IS and BGP.
IGRP is a legacy routing protocol and has been replaced by EIGRP. Both IGRP and EIGRP are Cisco proprietary routing protocols, whereas all other routing protocols listed are standard, non-proprietary protocols.
protocols listed are standard, non proprietary protocols.
Routing Table Structure� Routing Table Principles
-3 principles regarding routing tables: �Every router makes its decisions alone, based on the information it has in its routing tableinformation it has in its routing table.�Different routing table may contain different information� A routing table can tell how to get to a destination but not g ghow to get back (Asymmetric Routing)
�Routing information about a path from one network to another does not provide routing information about the reverse ordoes not provide routing information about the reverse, orreturn, path.
� Internet Protocol (IP) packet format contains fields thate e o oco ( ) pac e o a co a s e ds aprovide information about the packet and the sending and receiving hosts
� Fields that are importance for CCNA students:-Version
L 3-IP header length-TTL
Layer 3
-Precedence & type of service-Packet lengthS-Source IP address
� The Layer 2 data link frame usually contains header information with a data link source and destination address, trailer information, and the actual transmitted d t
Router Paths and Packet Switchingdata.
–The data link source address is the Layer 2 address of the interface that sent the data link frame.
� MAC Layer Frame FormatA k t i f d d f t t t th L 3 d d ti ti IPAs a packet is forwarded from router to router, the Layer 3 source and destination IPaddresses will not change; however, the Layer 2 source and destination data link addresses will change.
� MAC Frames are also divided into fields. They include:y-Preamble
•Seven bytes of alternating 1s and 0s, used to synchronize signals
-Start of frame delimiter1 b t i li th b i i f th f
Data and pad•46 to 1500 bytes of data; zeros used to pad any data packet less than 46 bytes
-Frame check sequence•4 byte
Ethernet frame fields (cont.) � The original Ethernet standards defined the
i i f i 64 b t d thminimum frame size as 64-bytes and themaximum as 1518-bytes.
These numbers include all bytes from the Destination MAC Address field through the 10101011
A Start Frame Delimiterg
Frame Check Sequence field. The Preamble and Start Frame Delimiter fields are not included when quoting the size of a frame. z
10101011.
frame. z
� The IEEE 802.3ac standard released in 1998 extended the maximum allowable frame size to 1522-bytes to allow a "VLAN tag" to be i t d i t th Eth t f f tinserted into the Ethernet frame format.
Router Paths: Best Path� Whenever multiple paths to reach the same network
exist, each path uses a different exit interface on the router to reach that network.
– The best path is selected by a routing protocol based on the value or metric it uses to determine the distance to reach a networkto reach a network.
•Metrics can be based on either a single characteristic or several characteristics of a path. •Some routing protocols can base route selection g pon multiple metrics, combining them into a single metric.•The smaller the value of the metric, the better the pathpath.
–Routing protocols, such as RIP, use simple hop-count, which the number of routers between a router and the destination network.
• For example, a router will prefer a path that is 5 hops away over a path that is 10 hops away.
–Other routing protocols, such as OSPF, determine the shortest path by examining the bandwidth of the
the shortest path by examining the bandwidth of thelinks, and using the links with the fastest bandwidth from a router to the destination network.
Router Paths and Packet Switching
� A Metric is a numerical value used by routing protocols help determine the best path to a destinationbest path to a destination
–The smaller the metric value the better the path� 2 types of metrics used by routing protocols are:
Hop count this is the number of routers a packet must travel through to-Hop count - this is the number of routers a packet must travel through toget to its destination
• Hop count of four indicates that a packet must pass through four routers to reach its destination. • If multiple paths are available to a destination, the routing protocol, such as RIP, picks the path with the least number of hops.
-Bandwidth - this is the “speed” of a link also known as the data capacity of a linka link
•OSPF routing protocol uses bandwidth as its metric. The best path to a network is determined by the path with an accumulation of links that have the highest bandwidth values, or the fastest links.
Router Paths: Equal Cost Load Balancing� You may be wondering what happens if a routing table has
two or more paths with the same metric to the sametwo or more paths with the same metric to the samedestination network.
–When a router has multiple paths to a destination network and the value of that metric (hop count, bandwidth, etc.) is the same, this is known as an equal cost
t i d th t ill f l t l d b l imetric, and the router will perform 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
–The router will forward packets using the multiple exit interfaces listed in the routing table.
CRouter Paths: Equal Cost Load Balancing� To solve this dilemma, a router will use Equal Cost Load
Balancing This means the router sends packets over the multipleBalancing. This means the router sends packets over the multipleexit interfaces listed in the routing table.
Router Paths: Un-Equal Cost Load Balancing� Just in case you are wondering, a router can send packets over y g p
multiple networks even when the metric is not the same if it is using a routing protocol that has this capability. This is known as unequal cost load balancing. EIGRP (as well as IGRP) are the onlyq g ( ) yrouting protocols that can be configured for unequal cost load balancing.
� Unequal cost load balancing in EIGRP is not discussed in this� Unequal cost load balancing in EIGRP is not discussed in thiscourse but is covered in CCNP.
Every routing protocol supports equal costpath load balancing. In addition to that, IGRP and EIGRP also support unequal cost path load balancing.
Use the variance command to instruct the router to include routes with a metric less than n times the minimum metric route for that destination, where n is the number specified by the variancecommand.Example: E-C-A: 20 * 2 = 40. Therefore, E-C-A and E-B-A will be used for load balancing. router eigrp 1
� Packet forwarding involves two functions:g–Path determination function–Switching function
� Path determination is a process used by a router to pick the best path to a destination
� One of 3 path determinations results from searching f h b hfor the best path
–Directly connected network•The destination IP address of the packet is a host dd th t k thi t 'address on the same network as this router's
interface–Remote network
If th d ti ti IP dd f th k t b l• If the destination IP address of the packet belongsto a remote network, then the packet is forwarded to another router.
R t P th d P k t S it hiRouter 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 thea packet from an incoming interface to an outgoing interface on thesame router.
� What does a router do with a packet received from one network and destined for another network?
-A packet received by a router will do the following:�Strips off layer 2 headers�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 interface.
Router Paths and Packet Switching� As a packet travels from one networking device to another
-The Source and Destination IP addresses NEVER change-The Source & Destination MAC addresses CHANGE as packet is forwarded from one router to the next.
•The Layer 2 data link source address represents the Layer 2 address of the outbound•The Layer 2 data link source address represents the Layer 2 address of the outboundinterface. The Layer 2 destination address represents the Layer 2 address of the next-hop router. If the next hop is the final destination device, it will be the Layer 2 address of that device.•It is very likely that the packet will be encapsulated in a different type of Layer 2 frameIt is very likely that the packet will be encapsulated in a different type of Layer 2 framethan the one in which it was received. For example, the packet might be received by the router on a FastEthernet interface, encapsulated in an Ethernet frame, and forwarded out a serial interface encapsulated in a PPP frame.
-TTL field decrement by one until a value of zero is reached at which point router y pdiscards packet (prevents packets from endlessly traversing the network)
� Path determination and switching function details. PC1a de e a o a d s c g u c o de a s CWants to send something to PC 2 here is part of what happens
Step 1 - PC1 encapsulates packet into a frame. Frame contains R1’s destination MAC address Ethertypes
The 13th and 14th octets of an Ethernet or IEEE802 3 packet (after theor IEEE802.3 packet (after thepreamble) consist of the "Ethernet Type" or "IEEE802.3 Length" field. The "Ethernet Type" values are managed by XEROX. Some assignments are public (see + below), others private.( ), p
Router Paths and Packet SwitchingRouter Paths and Packet SwitchingStep 2 - R1 receives Ethernet frame.
�R1 sees that destination MAC address matches its own MAC.�R1 then strips off Ethernet frame. �R1 Examines destination IP. �R1 consults routing table looking for destination IP.
R1�After finding destination IP in routing table, R1 now looks up next hop IP address.�R1 re-encapsulates IP packet with a new Ethernet frame.
�f the entry is not in the ARP cache, R1 sends an ARP request out its FastEthernet 0/1 interface. R2 sends back an ARP reply.
Router Paths and Packet SwitchingRouter Paths and Packet Switching� Path determination and switching function details. PC1 Wants to send something
to PC 2 here is part of what happensStep 3 - Packet arrives at R2Step 3 Packet arrives at R2
�R2 receives Ethernet frame�R2 sees that destination MAC address matches its own MAC�R2 then strips off Ethernet frame
R2R2 then strips off Ethernet frame
�R2 Examines destination IP�R2 consults routing table looking for destination IP�After finding destination IP in routing table, R2 now looks up next hop IPAfter finding destination IP in routing table, R2 now looks up next hop IPaddress�R2 re-encapsulates IP packet with a new data link frame�R2 forwards Ethernet packet out S0/0 interface
�When the interface is a point-to-point serial connection, R2 encapsulates the IP packet into the proper data link frame format used by the exit interface (HDLC, PPP, etc.). In this case, the Layer 2 encapsulation is PPP; therefore, the data link destination address is set to a broadcast. Remember, there are no MAC addresses on serial interfaces.
�R3 then strips off PPP frame�R3 Examines destination IP �R3 consults routing table looking for destination IP�After finding destination IP in routing table, R3 is directly connected to destination via its fast Ethernet interface
�If the entry is not in the ARP cache R3 sends an ARP request out its�If the entry is not in the ARP cache, R3 sends an ARP request out itsFastEthernet 0/0 interface. PC2 sends back an ARP reply with its MAC address.
�R3 re-encapsulates IP packet with a new Ethernet frame�R3 forwards Ethernet packet out Fa0/0 interfacep
Step 5 - IP packet arrives at PC2. Frame is decapsulated & processed by upper layer protocols.
SummarySummary� Routers are computers that specialize in sending data over a network.� Routers are composed of:
-Hardware i.e. CPU, Memory, System bus, Interfaces-Software used to direct the routing processSoftware used to direct the routing process
�IOS�Configuration file
� Routers need to be configured. Basic configuration consists of:-Router name-Router bannerRouter banner-Password(s)-Interface configurations i.e. IP address and subnet mask
� Routing tables contain the following information-Directly connected networks-Remotely connected networks
Remotely connected networks-Network addresses and subnet masks-IP address of next hop address
Summary
� Routers determine a packets path to its destination by doing the following
�Receiving an encapsulated frame & examining destination MAC addressMAC address.�If the MAC address matches then Frame is de-encapsulated so that router can examine the destination IP address.�If destination IP address is in routing table or there is a static route then Router determines next hop IP address. Router will re-encapsulate packet with appropriate layer 2 frame and sendre encapsulate packet with appropriate layer 2 frame and sendit out to next destination.�Process continues until packet reaches destination.�Note - only the MAC addresses will change the source and destination IP addresses do not change.
� Functions of a Routeru c o s o a ou eBest Path SelectionsForwarding packets to destination
� Routers perform packet forwarding by learning about remote networks and maintaining routing information. g g
– 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
the appropriated data link frame for that outgoing interface.
General Role of the Router
� Introducing the Topologyoduc g e opo ogy– 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
� 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 ppinterface 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:Straight through used to connect:
� Examining Router Interfacesa g oute te aces-Show IP router 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 formatSh i fi d d t h fi ti-Show running-config command – used to show configuration
� Configuring an Ethernet interfaceCo gu g a t e et te ace-By default all serial and Ethernet interfaces are down-To enable an interface use the No Shutdown command
•The show ip routecommand is used to display the routing table. •Initially, the routing table is empty if no interfaces have b fi dbeen configured.•Static routes and dynamic routes will not be added to th ti t bl til ththe routing table until theappropriate local interfaces have been configured on the router
Verifying Ethernet interfaceVerifying Ethernet interface- Show interfaces - command shows the status and gives a detailed description for all interfaces on the routerp– Show interfaces fastEthernet 0/0 – command used to show status of fast Ethernet port
R1#show interfaces fastethernet 0/0•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•Line protocol is down means, in this case, that the interface is not receiving a carrier signal froma 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 theinterfaces. The reason for this is because we have not yet configured IP addresses on any of theinterfaces.
– Show run –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 routerand 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.
Configuring an Ethernet interfaceConfiguring an Ethernet interfaceBy default, all router interfaces are shutdown. To enable this interface, use the no shutdown command, which changes the interface from administratively down to upinterface from administratively down to up.
*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 upp , g p
–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 g , p p ya 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
• However, WAN interfaces in a lab environment requireclocking on one side of the link. If you do correctly set the clock rate, then line protocol will not change to up.
Configuring an Ethernet interfaceConfiguring an Ethernet interface� Unsolicited Messages from IOSg� The IOS often sends unsolicited messages.
� As you can see in the figure, sometimes these messages will occur when you are in the middlemessages will occur when you are in the middleof 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 separateIn order to keep the unsolicited output separatefrom your input, enter line configuration mode for the consoled port and add the loggingsynchronous command, as shown. You will see that messages returned by IOS no longerthat messages returned by IOS no longerinterfere with your typing.
-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 networknetwork.–The /24 subnet mask for this route is displayed in the line above the actual route.
InterfacesInterfaces� Reading the Routing Table� 172.16.0.0/24 is subnetted, 1 subnets172.16.0.0/24 is subnetted, 1 subnets
–Having a single route represent an entire network of host IP addresses makes thenetwork of host IP addresses makes therouting table smaller, with fewer routes, which results in faster routing table lookups.
•It means that this route matches all•It means that this route matches allpackets with a destination address belonging to this network.
–The routing table could contain all 254 i di id l h t IP dd f thindividual host IP addresses for the172.16.3.0/24 network, but that is an inefficient way of storing addresses.
show interfaces fastethernet 0/0show ip interface brief
� The show interfaces fastethernet 0/0 commandin the figure now showsin 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 li t l i (i d d f t)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 LANfor 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
g y172.16.3.1.–172.16.3.1 is router R1's FastEthernet IP address.
Ethernet Interfaces Participate in ARPEthernet Interfaces Participate in ARP� A router's Ethernet interface participates
in a LAN network just like any other device on that networkdevice 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 dd f th Eth t i t fMAC 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, ywith that destination IP address in order to map it to the MAC address.
� Configuring a Serial interface� Configuring a Serial interface-Enter interface configuration mode-Enter in the ip address and subnet maskEnter in the ip address and subnet mask-Enter in the no shutdown command
� Example:Example:-R1(config)#interface serial 0/0/0-R1(config-if)#ip address 172.16.2.1 255.255.255.0( g ) p-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–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 downp, p
– 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.
InterfacesStep 1 Step 3
Nothing is configured Setup “no shut”
Step 2 Step 4
Setup IP but not “no shut” Configured the clock rate
� Examining Router Interfaces� Examining Router Interfaces-Physically connecting a WAN Interface. A WAN Physical Layer connection has sides:-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.
Cisco 1 Port T1/Fractional T1DSU/CSU WAN Interface Card (WIC-1DSU-T1-V2=)
Interfaces- What is the significant of the information 1?
� 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 DCEThe DTE cable has a male connector, whereas the DCEcable has a female connector.–2) If a cable is connected between the two routers, you can use the show controllers command to determinecan use the show controllers command to determinewhich end of the cable is attached to that interface.
R1#show controllers serial 0/0/0Interface Serial0/0/0Hardware is PowerQUICC MPC860DCE V.35, no clock<output omitted>
� Once the cable is attached, the clock can now be set with the clock rate commandthe 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 40000001000000, 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 Li t l� 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� Note: If a router s interface with a DTE cable is configuredwith 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
Routing Table ConceptsRouting Table Concepts� Purpose of the debug ip routing command
�Allows you to view changes that the router performs when adding orAllows you to view changes that the router performs when adding orremoving routes in real time
13
enable debugging with the debug ip routing command Configuring the IP address and Subnet Mask
� When a router only has its interfaces configured, and the ti t bl t i th di tl t d t k b trouting 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/24R1 can communicate with any device on the 172.16.3.0/24and 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/24and 192.168.2.0/24 networks.
–Cisco Discovery Protocol (CDP) is a powerfulnetwork monitoring and troubleshooting tool.
•CDP runs at the Data Link layer connecting the physical di t th l t l (ULP )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 y p ( p , ),learn about each other.
–A layer 2 cisco proprietary tool used to gather information about other directly connected Cisco 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, th i t f th t d t–the interfaces they are connected to,
–the interfaces used to make the connections, –the model numbers of the devices.
Routing Table and CDP Protocol� Concept of neighbors
-2 types of neighbors�Layer 3 neighbors
� At Layer 3, routing protocols consider neighbors to be d i th t h th t k dddevices that share the same network address space.
� R1 and R2 are neighbors. Both are members of the 172.16.1.0/24 network. � R2 and R3 are also neighbors because they both shareR2 and R3 are also neighbors because they both sharethe 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�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 d R3 CDP i hb
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
»R2 and R3 are CDP neighbors.»R3 and S3 are CDP neighbors.
the switches are operating at Layer 2 only.However, the switches are Layer 2 neighbors to their directly connected routers.
Routing Table and CDP Protocol� CDP is on by default.
–CDP exchanges hardware and software–CDP exchanges hardware and softwaredevice information with its directly connected CDP neighbors.
� CDP show commands�Show cdp neighbors command
-Displays the following information:�Neighbor device ID�Local interface�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.
� A router can learn about remote networks in one of two ways:y–Manually, from configured static routes–Automatically, from a dynamic routing protocol
D i ti t l i t d d i th t h t•Dynamic routing protocols are introduced in the next chapter.
� Purpose of a static routeA manually configured route used when routing from a network to a stub–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 orwhether to networks attached to R2 orto 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
�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 route172 16 1 0 N t k dd f th t–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
–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 interfaceinterface
� Zinin’s 3 routing principlesf�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�Principle 2: The fact that one router has certain information in its routing table doesnot 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� Using Principle 2, we still need to configure the proper routing on the otherrouters (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.“
M f h i i k i bidi i l Thi h� Most of the communication over networks is bidirectional. This means thatpackets 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.
� Resolving to an Exit Interface-Recursive route lookup - Occurs when the router has to perform multiple lookups in the routing table before forwarding a packet. A static route that forwards all packets to the next-hop IP address goes through the following process (reclusive route lookup)
� (Step 1) The router first must match static route’s destination IP address with the Next hop addressp
� The packet's destination IP address is matched to the static route 192.168.2.0/24 with the next-hop IP address 172.16.2.2.
� (Step 2) The next hop address is then matched to an exit interface(Step 2) The next hop address is then matched to an exit interface�The next-hop IP address of the static route, 172.16.2.2, is matched to the directly connected network 172.16.2.0/24 with the exit interface of Serial 0/0/0.
Static Routes with Exit InterfacesStatic Routes with Exit Interfaces� Configuring a Static route with an Exit
InterfaceS i fi d i h i i f-Static routes configured with an exit interface
are more efficient because the routing–The routing table can resolve the exit interface in a single search instead of 2 searchesin a single search instead of 2 searches
� If the static route cannot be resolved to an exit interface, the static route is removed from th ti t blthe routing table
–Notice from the debug output that all three static routes were deleted when the Serial 0/0/0 interface was shut downinterface was shut down.–They were deleted because all three static routes were resolved to Serial 0/0/0. However the static routes are still in the R1's–However, the static routes are still in the R1 s
running configuration. If the interface comes back up (is enabled again with no shutdown), the IOS routing table process will reinstall these t ti t b k i t th ti t bl
Static Routes with Exit Interfaces� Modifying Static routes
�Existing static routes cannot be modified. The old static route must be deleted by placing no in front of the ip routeExample:�Example:
-no ip route 192.168.2.0 255.255.255.0 172.16.2.2�A new static route must be rewritten in the configuration�A new static route must be rewritten in the configuration
R1(config)# no ip route 192.168.2.0 255.255.255.0 172.16.2.2R1(config)#ip route 192.168.2.0 255.255.255.0 serial 0/0/0
� Verifying the Static Route Configuration-Use the following commands
�Step 1 show running-config�Step 2 verify static route has been entered correctlyStep 2 verify static route has been entered correctly�Step 3 show ip route�Step 4 verify route was configured in routing tableSt 5 i i d t if k t�Step 5 issue ping command to verify packets can
Static Routes with Exit InterfacesStatic Routes with Exit Interfaces� Ethernet interfaces and ARP.
– If a static route is configured on an Ethernet linkIf a static route is configured on an Ethernet link•If the packet is sent to the next-hop router then…
–the destination MAC address will be the address of the next–the destination MAC address will be the address of the nexthop’s Ethernet interface–This is found by the router consulting the ARP table.
»If an entry isn’t found then an ARP request will be sent out
R1(config)#ip route 192 168 2 0 255 255 255 0 fa 0/1R1(config)#ip route 192.168.2.0 255.255.255.0 fa 0/1
Static Routes with Exit InterfacesStatic Routes with Exit Interfaces
B t t t l it i t f ith Eth t i t fR1(config)#ip route 192.168.2.0 255.255.255.0 fastethernet 0/1� Best not to use only an exit interface with Ethernet interfaces.� Router will have difficulty determining the destination MAC address.� With Ethernet networks many different devices can be sharing the� With Ethernet networks, many different devices can be sharing the
same multiaccess network, including hosts and even multiple routers. � Router will not have sufficient information to determine which device
is the next-hop deviceis the next hop device.� Use both the next-hop interface and the exit interface for
Ethernet exit interfaces.O l i l t l k d d� Only a single route lookup now needed.
� Summarizing routes reduces the size of the routingg gtable.
� Route summarization is the process of combining a fnumber of static routes into a single static route.
–For example, the networks 10.0.0.0/16, 10.1.0.0/16, 10.2.0.0/16, 10.3.0.0/16, 10.4.0.0/16, 10.5.0.0/16, all the way0 0 0/ 6, 0 3 0 0/ 6, 0 0 0/ 6, 0 5 0 0/ 6, a e aythrough 10.255.0.0/16 can be represented by a single network address: 10.0.0.0/8.
� Multiple static routes can be summarized into a single� Multiple static routes can be summarized into a singlestatic route if:
–The destination networks can be summarized into a singlegnetwork address, and –The multiple static routes all use the same exit-interface or next-hop IP address
� Here's the process of creating the summary route 172 16 1 0/22 as sho n in the fig re172.16.1.0/22, as shown in the figure:
1. Write out the networks that you want to summarize in binary.
2. To find the subnet mask for summarization, start with the left-most bitthe left-most bit.
3. Work your way to the right, finding all the bits that match consecutively.
4. When you find a column of bits that do not match, stop. You are at the summary boundary.p y y
5. Now, count the number of left-most matching bits, which in our example is 22. This number becomes your subnet mask for the summarized route, /22 or 255.255.252.0
6 To find the network address for summarization copy6. To find the network address for summarization, copythe matching 22 bits and add all 0 bits to the end to make 32 bits.
� By following these steps, we can discover that the 3 static routes on R3 can be summarized into a singlestatic routes on R3 can be summarized into a singlestatic route, using the summary network address of 172.16.0.0 255.255.252.0:ip route 172.16.0.0 255.255.252.0 Serial0/0/1
� Which address can be� Which address can beused to summarize networks � 11000000 00000001 00000001 00000000• 192.1.1.0/27• 192.1.1.32/27• 192 1 1 64/28
–Step 1: Delete the current static routeR3(config)#no ip route 172.16.1.0 255.255.255.0 serial0/0/1R3(config)#no ip route 172.16.2.0 255.255.255.0 serial0/0/1R3(config)#no ip route 172.16.3.0 255.255.255.0 serial0/0/1
� Static routes and subnet masks–The routing table lookup process will use the most specific matchwhen comparing destination IP address and subnet mask
For example what if we had the following two static routes in the–For example, what if we had the following two static routes in therouting table
•172.16.0.0/24 is subnetted, 3 subnetsS 172 16 1 0 i di tl t d S i l0/0/0 d•S 172.16.1.0 is directly connected, Serial0/0/0 and
•S 172.16.0.0/16 is directly connected, Serial0/0/1
–Consider a packet with the destination IP address 172.16.1.10. ThisIP address matches both routes.
•The routing table lookup process will use the most-specific match. •Because 24 bits match the 172 16 1 0/24 route and only 16 bits ofBecause 24 bits match the 172.16.1.0/24 route, and only 16 bits ofthe 172.16.0.0/16 route match, the static route with the 24 bit match will be used. •This is the longest match
� Default Static Route�This is a route that will match all packets.�Like route summarization this will help reducethe size of the routing table
� Default static routes are used:–When no other routes in the routing table match the packet's destination IP address. A common use is when connecting a company's edge router to the ISPwhen connecting a company s edge router to the ISPnetwork.–When a router has only one other router to which it is connected. This condition is known as a stub router.
� Configuring a default static route�Similar to configuring a static route. Except that destination IP address and subnet mask are all zeros�Example:
-Router(config)#ip route 0.0.0.0 0.0.0.0 [ it i t f | i dd ]
It i l t d t R2–It is only connected to R2.–Currently R1 has three static routes, which are used to reach all of the remote networks in our topology. –All three static routes have the exit interface Serial 0/0/0, forwarding packets, g pto the next-hop router R2.
� R1 is an ideal candidate to have all f it t ti t l d bof its static routes replaced by a
single default route. –First, delete the three static routes,–Next, configure the single default static route using the same Serial 0/0/0 exit interface
interfaceR1(config)#ip route 0.0.0.0 0.0.0.0 serial 0/0/0
Static Routes and Packet ForwardingStatic Routes and Packet Forwarding� Verify the change to the routing table y g g
with the show ip route command� S* 0.0.0.0/0 is directly connected, Serial0/0/0
–Note the * or asterisk next to the S–Note the or asterisk next to the S.•As you can see from the Codes table in the figure, the asterisk indicates that this static route is a candidate default route.
–The key to this configuration is the /0 mask.
•We previously said that it is the subnet•We previously said that it is the subnetmask in the routing table that determines how many bits must match between the destination IP address of the packet and th t i th ti t blthe route in the routing table.•A /0 mask indicates that zero or no bits are needed to match.
S lf t t St ti d t ti d f lt tSelf test: Static and static default route� Can you use both static andCa you use bo s a c a d
static default route to configure the communication b t b th LANS d thbetween both LANS and thecommunication to the Internet.Internet.
-Only 3 statement of static route needed to setup the network.
1 t ti t-1 static route-2 default static route
WinterPark(config)# ip route 0.0.0.0 0.0.0.0 192.168.146.1Altamonte(config)# ip route 10.0.234.0 255.255.255.0 192.168.146.2Alt t ( fi )# i t 0 0 0 0 0 0 0 0 0/1
� Troubleshooting a Missing Routeoub es oo g a ss g ou e
� Tools that can be used to isolate routing problems include:include:
-Ping– tests end to end connectivity-Traceroute– used to discover all of the hops (routers) along the
Layer 3p ( ) g
path between 2 points-Show IP route– used to display routing table & ascertain forwarding processforwarding process-Show ip interface brief- used to show status of router interfaces-Show cdp neighbors detail– used to gather configuration
Layer 2Show cdp neighbors detail used to gather configuration
� Finding a missing or mis-configured route requires methodically using the correct toolsmethodically using the correct tools
-Start with PING. If ping fails then use traceroute to determine where packets are failing to arrive- Than trace route
� Issue: show ip route to examine routing table.-If there is a problem with a mis-configured static route remove the static route then reconfigure the new static route
-Operate at layer 3p y-Functions include best path selection & forwarding packets
� Connecting NetworksWANs
Serial cables are connected to router serial ports. In the lab environment clock rates must be configured for DCEt e ab e o e t c oc ates ust be co gu ed o C
LANsStraight through cables or cross over cables are used to connect to fastethernet port (The type of cable used dependsconnect to fastethernet port. (The type of cable used dependson what devices are being connected)
� Cisco Discovery ProtocolA layer 2 proprietary protocolA layer 2 proprietary protocolUsed to discover information about directly connected Ciscodevices
-This is a manually configured path that specifies how the routerThis is a manually configured path that specifies how the routerwill get to a certain point using a certain path.
� Summary static routes-This is several static routes that have been condensed into a-This is several static routes that have been condensed into asingle static route.
� Default routeIt is the route packets use if there is no other possible match for-It is the route packets use if there is no other possible match for
their destination in the routing table.� Forwarding of packets when static route is used
Zi i ’ 3 ti i i l d ib h k t f d d-Zinin’s 3 routing principles describe how packets are forwarded� Troubleshooting static routes may require some of the following
� Describe the role of dynamic routing protocols andesc be e o e o dy a c ou g p o oco s a dplace these protocols in the context of modern network design.
� Identify several ways to classify routing protocols.
� Describe how metrics are used by routing protocolsDescribe how metrics are used by routing protocolsand identify the metric types used by dynamic routing protocols.
� Determine the administrative distance of a route and describe its importance in the routing process.
� Identify the different elements of the routing table.
� Dynamic routing protocols are usuallyy a c ou g p o oco s a e usua yused in larger networks to ease the administrative and operational overhead f i l t ti tof using only static routes.
� Typically, a network uses a combination f b th d i ti t l dof both a dynamic routing protocol and
� One of the earliest routing protocols was Routing Information Protocol (RIP).RIP h l d i t i RIP 2 H–RIP has evolved into a newer version RIPv2. However,
–The newer version of RIP still does not scale to larger network implementations.
� To address the needs of larger networks, two advanced routing protocols were developed: Open Shortest Path First (OSPF) and Intermediate System-to-I t di t S t (IS IS)Intermediate System (IS-IS).
� Cisco developed Interior Gateway Routing Protocol (IGRP) and Enhanced IGRP (EIGRP), which also scales well in larger network implementations.
� Additionally there was the need to interconnect different internetworks and provide� Additionally, there was the need to interconnect different internetworks and providerouting among them. Border Gateway Routing (BGP) protocol is now used between ISPs as well as between ISPs and their larger private clients to exchange routing information.
� With the advent of numerous consumer devices using IP the IPv4 addressing space� With the advent of numerous consumer devices using IP, the IPv4 addressing spaceis nearly exhausted. Thus IPv6 has emerged. To support the communication based on IPv6, newer versions of the IP routing protocols have been developed (see the IPv6 row in the table).
� Function(s) of Dynamic Routing Protocols:-Dynamically share information between routers.-Automatically update routing table when topology changes.-Determine best path to a destinationDetermine best path to a destination.–Compared to static routing, dynamic routing protocols require less administrative overhead.
•However, the expense of using dynamic routing protocols is dedicating part of a router'sHowever, the expense of using dynamic routing protocols is dedicating part of a router sresources for protocol operation including CPU time and network link bandwidth.
– One of the primary benefits to using a dynamic routing protocol is that routers exchange routing information whenever there is a topology change. This exchange ll t t t ti ll l b t t k d l t fi d lt tallows routers to automatically learn about new networks and also to find alternate
paths when there is a link failure to a current network.
� Despite the benefits of dynamic routing, static routing stillesp e e be e s o dy a c ou g, s a c ou g shas its place.
� There are times when static routing is more appropriate andThere are times when static routing is more appropriate andother times when dynamic routing is the better choice.
� More often than not you will find a combination of bothMore often than not, you will find a combination of bothtypes of routing in any network that has a moderate level of complexity.
� A routing protocolg p–is a set of processes, algorithms, and messages that are used to exchange routing information and populate the routing table with the routing protocol's choice of best pathsg p p
� The purpose of a dynamic routing protocol is to:-Discover remote networks-Maintaining up-to-date routing information-Choosing the best path to destination networksAbilit t fi d b t th if th t th i l il bl-Ability to find a new best path if the current path is no longer available
Dynamic Routing ProtocolsDynamic Routing Protocols� Components of a routing protocol
–Data structuresData structures•Some routing protocols use tables and/or databases for its operations. This information is kept in RAM
Al ith–Algorithm•Algorithm is a finite list of steps used in accomplishing a task•Algorithms are used for facilitating routing information and best pathAlgorithms are used for facilitating routing information and best pathdetermination
–Routing protocol messagesTh f di i i hb d h f•These are messages for discovering neighbors and exchange of
routing information , and other tasks to learn and maintain accurate information about the network.
Dynamic Routing Protocol OperationDynamic Routing Protocol Operation� All routing protocols have the same purpose - to learn about remote networks
and to quickly adapt whenever there is a change in the topology.
� The method that a routing protocol uses to accomplish this depends upon the algorithm it uses and the operational characteristics of that protocol.
� In general the operations of a dynamic routing protocol can be described as� In general, the operations of a dynamic routing protocol can be described asfollows:
–The router sends and receives routing messages on its interfaces.–The router shares routing messages and routing information with other routers that are using the same routing protocol.–Routers exchange routing information to learn about remote networks. –When a router detects a topology change the routing protocol can advertise this change to other routers.
Classifying Routing ProtocolsClassifying Routing Protocols� An autonomous system (AS) - otherwise known as a
routing domain - is a collection of routers under a common administration.common administration.
� Because the Internet is based on the ASs concept, two types of routing protocols are required: interior and exterior routing protocols.
Interior Gateway Protocols (IGP)-Interior Gateway Protocols (IGP)•are used for intra-autonomous system routing - routing inside an autonomous system•IGPs are used for routing within a routing domain, those networks within the control of a single organization.g g
–An autonomous system is commonly comprised of many individual networks belonging to companies, schools, and other institutions.
• IGPs for IP include RIP, IGRP, EIGRP, OSPF, and IS-ISExterior Gateway Protocols (EGP)-Exterior Gateway Protocols (EGP)
•are used for inter-autonomous system routing - routing between autonomous systems that are under the control of different administrations•At the ISP level, there are often more important issuesAt the ISP level, there are often more important issuesthan just choosing the fastest path. •BGP is typically used between ISPs and sometimes between a company and an ISP
A t tAutonomous systems� An autonomous system (AS) is a collection of
networks under a common administrationnetworks under a common administrationsharing a common routing strategy.
To the outside world, an AS is viewed as a single entity. The AS may be run by one or more operators while presenting a consistent view of routing to the external world.
� The American Registry of Internet Numbers (ARIN), a service provider, or an administrator assigns an identifying number to each AS. This g y gautonomous system number is a 16 bit number.Routing protocols, such as Cisco’s IGRP, require assignment of a unique, autonomous system number.
American Registry for Internet Numbershttp://www.arin.net/registration/asn/index.html
to apply from ARIN or the appropriate region and be unique on the i t tinternet.
� The Internet Assigned Numbers Authority (IANA) has reserved the following block of AS numbers for private use (not to be advertised on the global Internet): 64512 through 65535
Classifying Routing ProtocolsClassifying Routing Protocols� IGP: Comparison of Distance Vector & Link
State Routing ProtocolsDistance vector
– routes are advertised as vectors of distance & direction.
•Distance is defined in terms of a metric such as hop count (RIP)•Direction is simply the next-hop router or exit interfaceinterface•Distance vector protocols typically use the Bellman-Ford algorithm for the best path route determination
– incomplete view of network topologyincomplete view of network topology.•Distance vector protocols use routers as sign posts along the path to the final destination. •Distance vector routing protocols do not have an g pactual map of the network topology
Link State Routing ProtocolsLink State Routing ProtocolsLink state
– complete view of network topology is created.p p gy•The sign posts along the way from source to destination are not necessary, because all link-state routers are using an identical "map" of thestate routers are using an identical map of thenetwork.
– updates are not periodic.•After the network has converged, a link-state update only sent when there is a change in the topology.
–Do NOT send subnet mask in routing updatesDo NOT send subnet mask in routing updates,–Do NOT support VLSM,–Classful routing protocols cannot be used when a network is subnetted using more than one gsubnet mask,
• Tony: This does not mean you can not subnet the clasasfull network. You can still subnet it but can only do it once and allsubnet it, but can only do it once and allnetwork needs to have the identical mask.
•In the figure, the classless version of the network is g ,using both /30 and /27 masks in the same topology. •Tony: It means you can create the network with all different sizes of subnets. They don’t need to have the same mask.
need to have the same mask.•Classless routing protocols are RIPv2, EIGRP, OSPF, IS-IS, BGP.
Classifying Routing Protocols
� Convergence is defined as when all routers’ routingCo e ge ce s de ed as e a ou e s ou gtables are at a state of consistency
– The network has converged when all routers have complete and faccurate information about the network
� Convergence time is the time it takes routers to sharei f ti l l t b t th d d t th i tiinformation, calculate best paths, and update their routingtables.R ti t l b t d b d� Routing protocols can be rated based on the speed to convergence; the faster the convergence, the better the routing
t lprotocol.–RIP and IGRP are slow to converge–EIGRP and OSPF are faster to converge.
� To select the best path, the routing l b bl l dprotocol must be able to evaluate and
differentiate between the available paths. For this purpose a metric is used.
� Metric–A value used by a routing protocol to determine which routes are better than others.
� Each routing protocol uses its own metric. –RIP uses hop count,
•The hop count refers to the number of routersThe hop count refers to the number of routersa packet must cross to reach the destination network.•For R3 in the figure, network 172.16.3.0 is two hops or two routers awayhops, or two routers away.
–EIGRP uses a combination of bandwidth and delay,–OSPF uses bandwidth (cost).
•Influences path selection by preferring the path with the highest bandwidth
–CostCost•A value determined either by the IOS or by the network administrator to indicate preference for a route. Cost can represent a metric, a combination of metrics or a policy.
RIP
OSPFp y
–Delay•Considers the time a packet takes to traverse a path
Hop count
RIP
–Hop count•A simple metric that counts the number of routers a packet must traverse
–Load•Considers the traffic utilization of a certain link
–Reliability•Assesses the probability of a link failure, calculated from the interface error count or
calculated from the interface error count orprevious link failures
Routing Protocols MetricsRouting Protocols Metrics� The Metric Field in the Routing Table
� Metric used for each routing protocol-RIP - hop count-IGRP & EIGRP - Bandwidth (used by default), Delay (used by default), Load,ReliabilityReliability-IS-IS & OSPF – Cost, Bandwidth(Cisco’s implementation)
� Refer to the example in the figure TheRefer to the example in the figure Therouters are using the RIP routing protocol.
–The metric associated with a certain t b b t i d i throute can be best viewed using the
show ip route command.–The metric value is the second value in the brackets for a routing table entry. –In the figure, R2 has a route to the 192.168.8.0/24 network that is 2 hops away.
R 192.168.8.0/24 [120/2] via192.168.4.1, 00:00:26, Serial0/0/1
Routing Protocols Metrics
� Load balancingoad ba a c g–when two or more routes to the same destination have identical metric values–This is the ability of a router to distribute packets among multiple same cost pathsp
Load balancing does notLoad balancing does notautomatically means the interfaces
will get use equally. R2 load balances traffic to PC5 over two equal cost paths.
CRouter Paths: Equal Cost Load Balancing� To solve this dilemma, a router will use Equal Cost Load
Balancing This means the router sends packets over the multipleBalancing. This means the router sends packets over the multipleexit interfaces listed in the routing table.
Every routing protocol supports equal costpath load balancing. In addition to that, IGRP and EIGRP also support unequal cost path load balancing.
Use the variance command to instruct the router to include routes with a metric less than n times the minimum metric route for that destination, where n is the number specified by the variancecommand.Example: E-C-A: 20 * 2 = 40. Therefore, E-C-A and E-B-A will be used for load balancing. router eigrp 1
� In fact, a router might learn of a , groute to the same network from more than one source.
For example a static route might have– For example, a static route might havebeen configured for the same network/subnet mask that was learned dynamically by a dynamic routingdynamically by a dynamic routingprotocol, such as RIP. The router must choose which route to install.
P f t i� Purpose of a metric–It’s a calculated value used to determine the best path to a destination
� Purpose of Administrative Distance–It’s a numeric value that specifies the
For equal cost routes to be installed they both must be static routes or they both must be RIP
preference of a particular route source. routes or they both must be RIProutes.
Administrative Distance of a Route
� Administrative distance is an integer value from 0 to 255.g
� The lower the value the more preferred the route source. –An administrative distance of 0 is the most preferred. –Only a directly connected network has an administrative distance of 0, which cannot be changed–An administrative distance of 255 means the router will not believeAn administrative distance of 255 means the router will not believethe source of that route and it will not be installed in the routing table.
Administrative Distance of a RouteAdministrative Distance of a Route� Identifying the Administrative Distance (AD) in a routing
tabletableIt is the first number in the brackets in the routing table
•R2 is running both RIP and EIGRP routing protocols.•R2 has learned of the 192.168.6.0/24 route from R1 through EIGRP updates and from R3 throughR1 through EIGRP updates and from R3 throughRIP updates. •RIP has an administrative distance of 120, but EIGRP has a lower administrative distance of 90. S R2 dd th t l d i EIGRP t
This show ip rip database commandshows all RIP routes learned by R2,
SummarySummary� Dynamic routing protocols fulfill the following functions
-Dynamically share information between routers-Dynamically share information between routers-Automatically update routing table when topology changes-Determine best path to a destination
� Routing protocols are grouped as either-Interior gateway protocols (IGP)Or-Exterior gateway protocols(EGP)
� Types of IGPs includeCl l ti t l th t l i l d b t k-Classless routing protocols - these protocols include subnet mask
in routing updates-Classful routing protocols - these protocols do not include subnet
� Dynamic routing protocols help the network administrator overcome the time-consuming and exacting process of configuring and maintaining static routesconsuming and exacting process of configuring and maintaining static routes.
� Examples of Distance Vector routing protocols:�Routing Information Protocol (RIP)
RFC 1058–RFC 1058.–Hop count is used as the metric for path selection. –If the hop count for a network is greater than 15, RIP cannot supply a route to that network.R ti d t b d t lti t 30 d b d f lt–Routing updates are broadcast or multicast every 30 seconds, by default.
�Interior Gateway Routing Protocol (IGRP)–proprietary protocol developed by Cisco. –Bandwidth, delay, load and reliability are used to create a composite metric.Bandwidth, delay, load and reliability are used to create a composite metric.–Routing updates are broadcast every 90 seconds, by default. –IGRP is the predecessor of EIGRP and is now obsolete.
�Enhanced Interior Gateway Routing Protocol (EIGRP)y g ( )–Cisco proprietary distance vector routing protocol. –It can perform unequal cost load balancing. –It uses Diffusing Update Algorithm (DUAL) to calculate the shortest path. –There are no periodic updates as with RIP and IGRP Routing updates are sent only
–There are no periodic updates as with RIP and IGRP. Routing updates are sent onlywhen there is a change in the topology.
Distance Vector Routing Protocols
� The Meaning of Distance Vector:The Meaning of Distance Vector:–A router using distance vector routing protocols knows 2 things:
�Distance to final destination�Distance to final destination�The distance or how far it is to the destination network
�Vector or direction traffic should be directed�Vector, or direction, traffic should be directed�The direction or interface in which packets should be forwarded
For example, in the figure, R1 knows that the distance to reach network 172.16.3.0/24 is 1 hop and that the direction is out the i t f S0/0/0 t d R2
� Periodic updatesp•Periodic Updates sent at regular intervals (30 seconds for RIP). Even if the topology has not changed in several days,
� Neighbors�The router is only aware of the network addresses of its own interfaces and the remote network addresses it can reach through its neighbors. �It has no broader knowledge of the network topology
� Broadcast updates�Broadcast Updates are sent to 255.255.255.255. �Some distance vector routing protocols use multicast addresses instead of broadcast addressesaddresses instead of broadcast addresses.
� Entire routing table is included with routing update�Entire Routing Table Updates are sent, with some exceptions to be discussed later, periodically to allexceptions to be discussed later, periodically to allneighbors.�Neighbors receiving these updates must process the entire update to find pertinent information and discard the rest. �Some distance vector routing protocols like EIGRP do not
Th l ith i d t l l t th b t th d th d–The algorithm is used to calculate the best paths and then sendthat information to the neighbors.–Different routing protocols use different algorithms to install routes g p gin the routing table, send updates to neighbors, and make path determination decisions.
Criteria used to compare routing protocols includes–Criteria used to compare routing protocols includes�Time to convergence
�Time to convergence defines how quickly the routers in the network topology share routing information and reach a state of consistent knowledge. �The faster the convergence, the more preferable the protocol.
�Scalability�Scalability defines how large a network can become based on the routing protocol that is deployeddeployed.�The larger the network is, the more scalable the routing protocol needs to be.
�Resource usage�Resource usage includes the requirements of a routing protocol such as memory space,g q g p y p ,CPU utilization, and link bandwidth utilization. �Higher resource requirements necessitate more powerful hardware to support the routing protocol operation
�Classless (Use of VLSM) or Classful( )�Classless routing protocols include the subnet mask in the updates. �This feature supports the use of Variable Length Subnet Masking (VLSM) and better route summarization.
�Implementation & maintenance�Implementation and maintenance describes the level of knowledge that is required for a network administrator to implement and maintain the network based on the routing protocol deployed.
Cold Starts� Router initial start up (Cold Starts)
When a router cold starts or powers up, it knows nothing about the network topology. It does not even know that there are devices on the other end of its links. The only information that a router has is from its own saved configuration file stored in NVRAM.
Initial network discovery-Initial network discovery�Directly connected networks are initially placed in
Network Discovery I iti l E hNetwork Discovery� Initial Exchange of Routing Information
–If a routing protocol is configured then
Initial Exchange
If a routing protocol is configured then•Routers will exchange routing information•Initially, these updates only include information about their directly connected networks.
� Routing updates received from other routers–Router checks update for new information
•If there is new information:–Metric is updated–New information is stored in routing table
� After this first round of update exchanges, each t k b t th t d t k f th irouter knows about the connected networks of their
directly connected neighbors. � However, did you notice that R1 does not yet know
about 10 4 0 0 and that R3 does not yet know aboutabout 10.4.0.0 and that R3 does not yet know about10.1.0.0?
–Full knowledge and a converged network will not take place until there is another exchange of routing information
Network DiscoveryNetwork Discovery� Next Update of Routing Information
At thi i t th t h k l d b t
Next Update
–At this point the routers have knowledge abouttheir own directly connected networks andabout the connected networks of their immediate neighborsimmediate neighbors.–Continuing the journey toward convergence, the routers exchange the next round of periodic updates Each router again checks the updatesupdates. Each router again checks the updatesfor new information.
� Routing updates received from other routers–Router checks update for new information
•If there is new information:–Metric is updated–New information is stored in routing table
typically implement a technique known as split horizon.
–Split horizon prevents information from being sent out the same interface from which it wasinterface from which it wasreceived.
For example R2 would not send–For example, R2 would not sendan update out Serial 0/0/0 containing the network 10.1.0.0 gbecause R2 learned about that network through Serial 0/0/0.
Network DiscoveryNetwork Discovery� Exchange of Routing Information Next Update
–Router convergence is reached when•All routing tables in the network contain the same network informationinformation,•[Tony]: The above statement is trying to tell you, the routing tables contains the same network information, BUT, each router has it’s own
i i f h i blvariation of the routing table.
–Routers continue to exchange routing information
-If no new information is found then Convergence isreached
Network Discovery and convergence� The amount of time it takes for a network to converge isThe amount of time it takes for a network to converge is
directly proportional to the size of that network.
� Convergence must be reached before a network is considered completely operable
� Speed of achieving convergence consists of 2 interdependent categoriescategories
–How quickly the routers propagate a change in the topology in a routing update to its neighbors–The speed of calculating best path routes using the new routing information collected
45
For example: It takes five rounds of periodic update intervals before most of the branch routers in Regions 1 2 and 3
routers in Regions 1, 2, and 3learn about the new routes advertised by B2-R4.
1
Routing Table Maintenance
� Periodic Updates: RIPv1 & RIPv2� Periodic Updates: RIPv1 & RIPv2–These are time intervals in which a router sends out its entire routing table.
•RIPv1: updates are sent every 30 seconds as a broadcast (255.255.255.255) whether or not there has been a topology changechange•RIPv2: updates are sent every 30 seconds as a multicast (224.0.0.9) whether or not there has been a topology change
� Periodic Updates: distance vector protocols� Periodic Updates: distance vector protocolsemploy periodic updates to exchange routing information with their neighbors and to maintain up-information with their neighbors and to maintain up-to-date routing information in the routing table.
Failure of a link–Failure of a link–Introduction of a new link–Failure of a router–Change of link parameters
R ti T bl M i tRouting Table Maintenance� RIP uses 4 timers
–Update timerp• interval is a route sends an update
–Invalid timer•If an update has not been received after 180 seconds (the default) the route is marked asseconds (the default), the route is marked asinvalid by setting the metric to 16. •The route is retained in the routing table until the flush timer expires.
–Holddown timer•This timer stabilizes routing information and helps prevent routing loops during periods when the topology is converging on new information.B d f lt th h ldd ti i t f 180•By default, the holddown timer is set for 180
seconds.–Flush timer
•By default, the flush timer is set for 240 seconds which is 60 seconds longer than theseconds, which is 60 seconds longer than theinvalid timer. •When the flush timer expires, the route is removed from the routing table.
� EIGRPEIGRP–Unlike other distance vector routing protocols, EIGRP does not send periodic updates. –Instead, EIGRP sends bounded updates about a , proute when a path changes or the metric for that route changes.
� EIGRP routing updates are –Partial updates
•Updates sent only when there is a change in topology that influences routing information
T i d b t l h–Triggered by topology changes–Bounded
•Propagation of partial updates are automatically bounded so that only those routers that need thebounded so that only those routers that need theinformation are updated
–Non periodic•Updates are not sent out on a regular basis.
–Routing table update that is sent immediately to adjacent routers in response to a routing change– The receiving routers in turn generate triggered updates– The receiving routers, in turn, generate triggered updatesthat notify their neighbors of the change.
� Conditions in which triggered updates are sentConditions in which triggered updates are sent–Interface changes state–Route becomes unreachable–Route is placed in routing table
� RIP Triggered Updates (problems)–Using only triggered updates would be sufficient if there were a guarantee that the wave of updates would reach everywave of updates would reach everyappropriate router immediately.
� However, there are two problems with triggered updates:triggered updates:
–Packets containing the update message can be dropped or corrupted by some link in the networknetwork.–The triggered updates do not happen instantaneously. It is possible that a router that has not yet received the triggered update will y gg pissue a regular update at just the wrong time, causing the bad route to be reinserted in a neighbor that had already received the triggered update
Triggered Extensions to RIPTriggered Extensions to RIP
P i itProblems and Prerequisites
� Prerequisites–RIP must be enabled for this feature to function.function.–This feature runs on a point-to-point, serial interface only –Triggered extensions to IP RIP increase efficiency of RIP on point-to-point, serial interfaces.p ,
Routing Table MaintenanceRouting Table Maintenance� Random Jitter
Synchronized updatesSynchronized updatesA condition where multiple routers on multi access LAN segments transmit routing updates at the same time.P bl ith h i d d t�Problems with synchronized updates
-Bandwidth consumption-Packet collisions (with hubs and not with switches)Packet collisions (with hubs and not with switches)
�Solution to problems withsynchronized updates
- Used of random variable called RIP_JITTER
•A good reference is : Routing TCP/IP (Jeff Doyle) page 193-196. •Update timers : timer for periodic update
Update timers : timer for periodic update(default 30s) - RIP_JITTER (random to prevent colision - 15% of the update timers)
Routing Table MaintenanceRouting Table Maintenance� Random Jitter•Figure 5 1 RIP adds a small random variable to the update timer•Figure 5.1. RIP adds a small random variable to the update timerat each reset to help avoid routing table synchronization. The RIP updates from Cisco routers vary from 25.5 to 30 seconds, as h i th d lt ti f th d tshown in the delta times of these updates.
Routing TCP/IP, Volume I (CCIE ProfessionalProfessionalDevelopment)
� Routing loops may be caused by:-Incorrectly configured static routes-Incorrectly configured route redistribution-Slow convergenceIncorrectl config red discard ro tes-Incorrectly configured discard routes
� Routing loops can create the following issuesExcess use of bandwidth-Excess use of bandwidth
-CPU resources may be strained-Network convergence is degradedNetwork convergence is degraded-Routing updates may be lost or not processed in a timely manner
� Routing loops can eliminate–Defining a maximum metric to prevent count to infinityg p y–Holddown timers–Split horizon–Route poisoning or poison reverse–Triggered updates
� Note: The IP protocol has its own mechanism to prevent the possibility of a packet traversing the
( ) fnetwork endlessly. IP has a Time-to-Live (TTL) fieldand its value is decremented by 1 at each router.
fHolddown timers work in the following way1. A router receives an update from a neighbor indicating that a network that previously
ibl i l iblwas accessible is now no longer accessible.
2. The router marks the network as possibly down and starts the holddown timer.
3. If an update with a better metric for that network is received from any neighboring router during the holddown period the network is reinstated and the holddown timerrouter during the holddown period, the network is reinstated and the holddown timeris removed.
4. If an update from any other neighbor is received during the holddown period with the same or worse metric for that network, that update is ignored. Thus, more time is allowed for the information about the change to be propagated.
5. Routers still forward packets to destination networks that are marked as possibly down. This allows the router to overcome any issues associated with intermittent connectivity. If the destination network truly is unavailable and the packets areconnectivity. If the destination network truly is unavailable and the packets areforwarded, black hole routing is created and lasts until the holddown timer expires.
� Split horizon with Route� Split horizon with Routepoisoning
–Route poisoning is used toRoute poisoning is used tomark the route as unreachable in a routing update that is sent to otherupdate that is sent to otherrouters.–Unreachable is interpreted
t i th t i t t th 1616as a metric that is set to themaximum.–For RIP, a poisoned route
� Split horizon with poison� Split horizon with poisonreverse
–The rule states that once aThe rule states that once arouter learns of an unreachable route through an interface advertise it asinterface, advertise it asunreachable back through the same interface
P i i ifi–Poison reverse is a specificcircumstance that overrides split horizon. It occurs to
th t R3 i tensure that R3 is notsusceptible to incorrect updates about network 10 4 0 0
•Includes the subnet mask in the routing updates,making it a classless routing protocol.•Has authentication mechanism to secure routing t bl d ttable updates.•Supports variable length subnet mask (VLSM).•Uses multicast addresses instead of broadcast.•Supports manual route summarization.
� Characteristics of Distance Vector routing� Characteristics of Distance Vector routingprotocols
–Periodic updatesp–RIP routing updates include the entire routing table–Neighbors are defined as routers that share a link and are configured to use the same protocolconfigured to use the same protocol
� The network discovery process for D.V. routing protocolprotocol
–Directly connected routes are placed in routing table 1st
–If a routing protocol is configured then•Routers will exchange routing information
–Convergence is reached when all network routers have the t k i f ti
� D.V. routing protocols maintains routing tables byg p g y–RIP sending out periodic updates–RIP using 4 different timers to ensure information is accurate and convergence is achieved in a timely manner–EIGRP sending out triggered updates
� D.V. routing protocols may be prone to routing loops– routing loops are a condition in which packets continuously traverse a networktraverse a network–Mechanisms used to minimize routing loops include defining maximum hop count, holddown timers, split horizon, route poisoning and triggered updates
� RIP evolved from an earlier protocolpdeveloped at Xerox, called Gateway Information Protocol (GWINFO).
� With the development of Xerox Network System (XNS) GWINFO evolved intoSystem (XNS), GWINFO evolved intoRIP.
� It later gained popularity because it was implemented in the Berkeley Software p yDistribution (BSD) as a daemon named routed (pronounced "route-dee", not "rout-ed").
� Recognizing the need for standardization� Recognizing the need for standardizationof the protocol, Charles Hedrick wrote RFC 1058 in 1988, in which he documented the existing protocol and specified some improvementsspecified some improvements.
� Since then, RIP has been improved with RIPv2 in 1994 and with RIPng in 1997. IPv6 form of RIP called
� RIP Characteristics–A classful, Distance Vector (DV) routing protocol(DV) routing protocol–Metric = hop count–Routes with a hop count > 15 pare unreachable–Updates are broadcast every 30 seconds30 seconds–The data portion of a RIP message is encapsulated into a UDP segment with botha UDP segment, with bothsource and destination port numbers set to 520.
B i RIP 1 C fi tiBasic RIPv1 Configuration� Router RIP CommandRouter RIP Command
–To enable RIP enter:Router rip at the global configuration prompt-Router rip at the global configuration prompt-Prompt will look like R1(config-router)#
Preventing routing updates through an interface g g p g� Route filtering works by regulating the
routes that are entered into or advertised out of a route table.
L bAs a result, a route filter influences which routes the router advertises to its neighbors.
� On the other hand routers running link
Lab:
� On the other hand, routers running linkstate protocols determine routes based on information in the link-state database. Route filters have no effect on link-state advertisements or the link state databaseadvertisements or the link-state database.
(Tony) Route filtering could have negative effect on the link-state routing protocol.
� Using the passive interface command� Using the passive interface commandcan prevent routers from sending routing updates through a router interface, butthe router continues to listen and use routing updates from that neighborrouting updates from that neighbor.
Keeping routing update messages from being sent through a router interface prevents other systems on that network from learning about routes dynamically
RIP automatically summarizes classful networks–RIP automatically summarizes classful networks–Boundary routers summarize RIP subnets from one major network to anothermajor network to another.
Default Route and RIPv1Default Route and RIPv1� Modified Topology: Scenario Cp gy
� Default routes P k h d fi d ifi ll i iPackets that are not defined specifically in a routingtable will go to the specified interface for the default routeroute
Example: Customer routers use default routes to connect to an ISP router.connect to an ISP router.
Command used to configure a default route isip route 0 0 0 0 0 0 0 0 s0/0/1ip route 0.0.0.0 0.0.0.0 s0/0/1
D f lt R t d RIP 1Default Route and RIPv1� Propagating the Default Route in RIPv1Propagating the Default Route in RIPv1
� Default-information originate commandThis command is used to specify that the router is to originate-This command is used to specify that the router is to originate
default information, by propagating the static default route in RIP update.
Centre#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile,
Gateway of last resort is not set M bil # h i tGateway of last resort is not set
R 192.168.4.0/24 [120/1] via 192.168.2.1, 00:00:11, Serial0R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:11, Serial0C 192.168.2.0/24 is directly connected, Serial0
Mobile#sho ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile,
Gateway of last resort is not set
R 192 168 4 0/24 [120/1] i 192 168 1 1 00 00 04 S i l0C 192.168.3.0/24 is directly connected, Ethernet0 R 192.168.4.0/24 [120/1] via 192.168.1.1, 00:00:04, Serial0
C 192.168.5.0/24 is directly connected, Ethernet0
C 192.168.1.0/24 is directly connected, Serial0
R 192.168.2.0/24 [120/1] via 192.168.1.1, 00:00:04, Serial0
R 192 168 3 0/24 [120/2] via 192 168 1 1 00:00:04 Serial0
Centre(config)#ip route 0.0.0.0 0.0.0.0 loopback0Setup up a default route on the Centre router
Centre(config)#router rip R 192.168.3.0/24 [120/2] via 192.168.1.1, 00:00:04, Serial0Centre(config)#router ripCentre(config-router)#default-information originate
Centre#sh ip route
Codes: C - connected, S - static, * - candidate default
Mobile#sho ip route
Codes: C - connected, S - static, * - candidate default - RIP, , ,
Gateway of last resort is 0.0.0.0 to network 0.0.0.0
C 172.16.1.1 is directly connected, Loopback0
R 192.168.4.0/24 [100/8576] via 192.168.2.1, 00:00:22, Serial0
Gateway of last resort is 192.168.1.1 to network 0.0.0.0
R 192.168.4.0/24 [120/1] via 192.168.1.1, 00:00:09, Serial0
� Compare and contrast classful and classless IP Co pa e a d co as c ass u a d c ass essaddressing.
� Review VLSM and explain the benefits of classless IPReview VLSM and explain the benefits of classless IPaddressing.
� Describe the role of the Classless Inter-DomainDescribe the role of the Classless Inter DomainRouting (CIDR) standard in making efficient use of scarce IPv4 addresses
� In addition to subnetting, it became possible to summarize a large collection of classful networks into an aggregate route, or supernet.
IntroductionIntroduction� Prior to 1981, IP addresses used only the first 8 bits to specify the
network portion of the addressp
� In 1981, RFC 791 modified the IPv4 32-bit address to allow for three different classes
•Class A addresses used 8 bits for the network portion of the address, •Class B used 16 bits, •Class C used 24 bits•Class C used 24 bits.
–This format became known as classful IP addressing.
� IP address space was depleting rapidlyIP address space was depleting rapidlythe Internet Engineering Task Force (IETF) introduced ClasslessInter-Domain Routing (CIDR)
–CIDR uses Variable Length Subnet Masking (VLSM) to help conserve address space.
IntroductionIntroduction� With the introduction of CIDR and VLSM, ISPs
co ld no assign one part of a classf l net ork tocould now assign one part of a classful network toone customer and different part to another customercustomer.
� This discontiguous address assignment by ISPs was paralleled by the development of classless routing protocols.
–Classless routing protocols do include the subnet mask in routing updates and are not required to perform
i tisummarization.–The classless routing protocols discussed in this course are RIPv2 EIGRP and OSPF
Classful and Classless IP AddressingClassful and Classless IP Addressing� Classful IP addressing
When the ARPANET was commissioned in 1969 no one–When the ARPANET was commissioned in 1969, no oneanticipated that the Internet would explode. –1989, ARPANET transformed into what we now call the Internet.
As of January 2007 there are over 433 million hosts on internet–As of January 2007, there are over 433 million hosts on internet
� Initiatives to conserve IPv4 address space include:VLSM & CIDR notation (1993 RFC 1519)-VLSM & CIDR notation (1993, RFC 1519)
Classf l and Classless IP AddressingClassful and Classless IP Addressing� As shown in the figure, class A networks used the first octet
for network assignment which translated to a 255 0 0 0for network assignment, which translated to a 255.0.0.0classful subnet mask.
–Because only 7 bits were left in the first octet (remember the first bitBecause only 7 bits were left in the first octet (remember, the first bitis always 0), this made 2 to the 7th power or 128 networks. –With 24 bits in the host portion, each class A address had the
t ti l f 16 illi i di id l h t ddpotential for over 16 million individual host addresses.
Classf l and Classless IP AddressingClassful and Classless IP Addressing� With 24 bits in the host portion, each class A address had
the potential for over 16 million individual host addressesthe potential for over 16 million individual host addresses.� What was one organization going to do with 16 million
addresses?addresses?� Now you can understand the tremendous waste of address
space that occurred in the beginning days of the Internet, p g g ywhen companies received class A addresses.
� Some companies and governmental organizations still have l A ddclass A addresses.
–General Electric owns 3.0.0.0/8, Apple Computer owns 17 0 0 0/8–Apple Computer owns 17.0.0.0/8,
Classf l and Classless IP AddressingClassful and Classless IP Addressing� Class B: RFC 790 specified the first two octets as
networknetwork.–With the first two bits already established as 1 and 0, 14 bits remained in the first two octets for assigning networks, which resulted in 16 384 class B network addressesresulted in 16,384 class B network addresses.–Because each class B network address contained 16 bits in the host portion, it controlled 65,534 addresses. (Remember, 2 addresses were reserved for the network and broadcastaddresses were reserved for the network and broadcastaddresses.)
Classf l and Classless IP AddressingClassful and Classless IP Addressing� class C: RFC 790 specified the first three octets
as networkas network.–With the first three bits established as 1 and 1 and 0, 21 bits remained for assigning networks for over 221 bits remained for assigning networks for over 2million class C networks.–But, each class C network only had 8 bits in the host yportion, or 254 possible host addresses.
Classf l and Classless IP AddressingClassful and Classless IP Addressing� Classful Routing Updates
–Recall that classful routing protocols (i.e. RIPv1) do not send subnet masks in their routing updates –This is because the router receiving the routing update could–This is because the router receiving the routing update coulddetermine the subnet mask simply by examining the value of the first octet in the network address, or by applying its ingress interface mask for subnetted routes The subnet mask wasinterface mask for subnetted routes. The subnet mask wasdirectly related to the network address.
Classf l and Classless IP AddressingClassful and Classless IP Addressing� In the example,
R1 knows that subnet 172 16 1 0 belongs to the same major classful–R1 knows that subnet 172.16.1.0 belongs to the same major classfulnetwork as the outgoing interface. Therefore, it sends a RIP update to R2 containing subnet 172.16.1.0.
When R2 recei es the pdate it applies the recei ing interface s bnet•When R2 receives the update, it applies the receiving interface subnetmask (/24) to the update and adds 172.16.1.0 to the routing table
–When sending updates to R3, R2 summarizes subnets 172.16.1.0/24, 172 16 2 0/24 d 172 16 3 0/24 i t th j l f l t k 172 16 0 0172.16.2.0/24, and 172.16.3.0/24 into the major classful network 172.16.0.0.
•Because R3 does not have any subnets that belong to 172.16.0.0, it will apply the classful mask for a class B network, /16
�Requires subnet mask to be included in routing update because address class is meaningless
� The network portion of the address is determined by the network subnet mask, also known as the network prefix, or prefix length (/8, /19, etc.). �The network address is no longer determined by the class of the address�Blocks of IP addresses could be assigned to a network based on the
Blocks of IP addresses could be assigned to a network based on therequirements of the customer, ranging from a few hosts to hundreds or thousands of hosts.
Classful and Classless IP AddressingClassful and Classless IP Addressing� Classless IP Addressing
� CIDR & Route Summarization–Variable Length Subnet Masking (VLSM)–Allows a subnet to be further sub-netted
•according to individual needs–Prefix Aggregation a.k.a. Route Summarization–CIDR allows for routes to be summarized as a single route
Classful and Classless IP AddressingClassful and Classless IP Addressing� Route Summarization
– In the figure, notice that ISP1 has four customers, each with a variable amount of IP address space.
However all of the customer address space can be summarized–However, all of the customer address space can be summarizedinto one advertisement to ISP2. –The 192.168.0.0/20 summarized or aggregated route includes all the networks belonging to Customers A, B, C, and D.
•This type of route is known as a supernet route. A t i lti l t k dd ith k•A supernet summarizes multiple network addresses with a mask
Classful and Classless IP AddressingClassful and Classless IP Addressing� Route Summarization
– Propagating VLSM and supernet routes requires a classless routing protocol, because the subnet mask can no longer be determined by the value of the first octet.
•Classless routing protocols include the subnet mask ith th t k dd i th ti d twith the network address in the routing update.
� For example, the networks 172.16.0.0/16, 172.17.0.0/16, 172.18.0.0/16 pand 172.19.0.0/16 can be summarized as 172.16.0.0/14.
–If R2 sends the 172.16.0.0 summary route without the /14 mask, R3 only knows to apply the default classful mask of /16. –In a classful routing protocol scenario, R3 is unaware of the 172.17.0.0/16, 172.18.0.0/16 and 172.19.0.0/16 networks–With a classless routing protocol, R2 will advertise the 172.16.0.0g pnetwork along with the /14 mask to R3. R3 will then be able to install the supernet route 172.16.0.0/14 in its routing table giving it reachability to the 172.16.0.0/16, 172.17.0.0/16, 172.18.0.0/16 and 172.19.0.0/16 networks.
sub netting a subnet to fitsub-netting a subnet to fityour needs-Example:Example:Subnet 10.1.0.0/16, 8 more bits are borrowedo e b ts a e bo o edagain, to create 256 subnets with a /24 mask.
M k ll f 254 h t-Mask allows for 254 host addresses per subnet-Subnets range from: 10 1 0 0 / 24 t10.1.0.0 / 24 to10.1.255.0 / 24
Classless Inter Domain Routing (CIDR)Classless Inter-Domain Routing (CIDR)� Note: You may recall that a supernet is always a route summary, but
a route summary is not always a supernet.a route summary is not always a supernet.–It is possible that a router could have both a specific route entry and a summary route entry covering the same network.
L t th t t X h ifi t f 172 22 0 0/16 i–Let us assume that router X has a specific route for 172.22.0.0/16 usingSerial 0/0/1 and a summary route of 172.16.0.0/13 using Serial0/0/0. –Packets with the IP address of 172.22.n.n match both route entries. –These packets destined for 172.22.0.0 would be sent out the Serial0/0/1 interface because there is a more specific match of 16 bits, than with the 13 bits of the 172.16.0.0/13 summary route.
� In this activity, you will use the network address 192 168 1 0/24address 192.168.1.0/24to subnet and provide the IP addressing for a ggiven topology.
Th t k h th f ll i dd i i t� The network has the following addressing requirements:� East Network Section
–The N-EAST (Northeast) LAN1 will require 4000 host IP addresses. –The N-EAST (Northeast) LAN2 will require 4000 host IP addresses. –The SE-BR1 (Southeast Branch1) LAN1 will require 1000 host IP addresses. –The SE-BR1 (Southeast Branch1) LAN2 will require 1000 host IP addresses. –The SE-BR2 (Southeast Branch2) LAN1 will require 500 host IP addresses. –The SE-BR2 (Southeast Branch2) LAN2 will require 500 host IP addresses. The SE ST1 (Southeast Satellite1) LAN1 will require 250 host IP addresses–The SE-ST1 (Southeast Satellite1) LAN1 will require 250 host IP addresses.
–The SE-ST1 (Southeast Satellite1) LAN2 will require 250 host IP addresses. –The SE-ST2 (Southeast Satellite2) LAN1 will require 125 host IP addresses. –The SE-ST2 (Southeast Satellite2) LAN2 will require 125 host IP addresses.
� West Network Section� West Network Section–The S-WEST (Southwest) LAN1 will require 4000 host IP addresses. –The S-WEST (Southwest) LAN2 will require 4000 host IP addresses. –The NW-BR1 (Northwest Branch1) LAN1 will require 2000 host IP addresses. –The NW-BR1 (Northwest Branch1) LAN2 will require 2000 host IP addressesThe NW BR1 (Northwest Branch1) LAN2 will require 2000 host IP addresses.–The NW-BR2 (Northwest Branch2) LAN1 will require 1000 host IP addresses. –The NW-BR2 (Northwest Branch2) LAN2 will require 1000 host IP addresses.
� Central Network Section The Central LAN1 will require 8000 host IP addresses
–The Central LAN1 will require 8000 host IP addresses.–The Central LAN2 will require 4000 host IP addresses.
� The WAN links between each of the routers will require an IP address for each end of the link.
Troubleshooting VLSM Addressing 6.4.3
� In this activity, the network address 172.16.128.0/17 was used to provide the IP addressing for a network. VLSM has been used to subnet the address spacepincorrectly.
� You will need to troubleshoot the addressing that wasthe addressing that wasassigned to each subnet to determine where errors are present and determine thepresent and determine thecorrect addressing assignments where needed.
� Link from WEST to N-WEST 192.168.7.64/30 � Link from WEST to S-WEST 192.168.7.68/30 � Link from HQ to WEST 192.168.7.72/30 � NW-BR1 LAN1 192.168.7.128/27
N EAST LAN2 192.168.5.32/27� Link from EAST to N-EAST 192.168.5.192/30 � Link from EAST to S-EAST 192.168.5.196/30 � Link from HQ to EAST 192.168.5.200/30 � SE BR1 LAN1 192 168 4 0/26
� NW-BR1 LAN2 192.168.7.160/27 � NW-BR2 LAN1 192.168.7.192/28 � NW-BR2 LAN2 192.168.7.208/28 � Link from N-WEST to NW-BR1 192.168.7.224/30
Link from N WEST to NW BR1 192.168.7.224/30� Link from N-WEST to NW-BR2 192.168.7.228/30� CENTRAL LAN1 192.168.6.0/25 � CENTRAL LAN2 192.168.6.128/26 � Link from HQ to CENTRAL 192 168 6 192/30
� Link from HQ to CENTRAL 192.168.6.192/30� Link from SE-BR2 to SE-ST1 192.168.4.224/30 � Link from SE-BR2 to SE-ST2 192.168.4.228/30 � Link from S-EAST to SE-BR2 192.168.4.232/30 � Link from S-EAST to SE-BR1 192 168 4 236/30
� In this activity, the LAN IP addressing is already completed for the network. VLSM was used to subnet the address space. The summary routes are yincorrect.
� You will need to troubleshoot the summary routes that
Addressing Table the summary routes thathave been assigned to determine where errors are present and determine the
Router Summary Route Network Address
HQ WEST LANs 172.16.52.0/21
HQ EAST LANs 172.16.56.0/23
WEST HQ LAN 172 16 32 0/19present and determine thecorrect summary routes.
�IPv4 addresses have 2 parts:-Network portion found on left side of an IP addressaddress-Host portion found on right side of an IP addressaddress
�Class A, B, & C addresses were designed to provide IP addresses for different sized organizations�The class of an IP address is determined by the decimal value found in the 1st octet�IP addresses are running out so the use of Classless Inter Domain Routing (CIDR) and Variable Length Subnet Mask (VLSM) are used to try and conserve address space
� Encounter and describe the limitations of RIPv1’s cou e a d desc be e a o s o slimitations.
� Apply the basic Routing Information Protocol VersionApply the basic Routing Information Protocol Version 2 (RIPv2) configuration commands and evaluate RIPv2 classless routing updates.
� Analyze router output to see RIPv2 support for VLSM and CIDR
� Identify RIPv2 verification commands and common RIPv2 issues.
� Configure, verify, and troubleshoot RIPv2 in “hands-on” labs
IntroductionIntroduction� Difference between RIPv1 & RIPv2
�RIPv1�RIPv1•A classful distance vector routing protocol•Does not support discontiguous subnetsDoes not support discontiguous subnets•Does not support VLSM•Does not send subnet mask in routing update•Routing updates are broadcast
�RIPv2•A classless distance vector routing protocol that is an enhancement of RIPv1’s featuresenhancement of RIPv1 s features.•Next hop address is included in updates•Routing updates are multicast (224.0.0.9 vs. 255.255.255.255)
� Similarities between RIPv1 & RIPv2– Use of timers to prevent routing loopsUse of timers to prevent routing loops– Use of split horizon or split horizon with poison reverse to also help prevent routing loops.– Use of triggered updates when there is a change in the topology for faster convergence.
Maximum hop count of 15 with the hop count of 16 signifying– Maximum hop count of 15, with the hop count of 16 signifying an unreachable network.
3 t t�3 router set up�Topology is discontiguous�There exists a static summary route�Static route information can be injected into routing table updates using redistribution.�Routers 1 & 3 contain VLSMRouters 1 & 3 contain VLSM networks�Remember that both the R1 and R3 routers have subnets that are part of the 172 30 0 0/16 major classfulthe 172.30.0.0/16 major classful network (class B). �Also remember that R1 and R3 are connected to R2 using subnets of the g209.165.200.0/24 major classful network (class C). �This topology is discontiguous and will not converge because
RIP 1 Li it tiRIPv1 Limitations� Review the VLSM addressing
scheme in the figure As shownscheme in the figure. As shown in the top chart, both R1 and R3 have had the 172.30.0.0/16 network subnetted into /24 subnetssubnets.
–Four of these /24 subnets are assigned: –two to R1 (172.30.1.0/24 and (172.30.2.0/24)–two to R3 (172.30.100.0/24 and 172.30.110.0/24).
I th b tt h t h� In the bottom chart, we have taken the 172.30.200.0/24 subnet and subnetted it again, using the first four bits for gsubnets and the last four bits for hosts. The result is a 255.255.255.240 mask or /28. Subnet 1 and Subnet 2 are
Cisco has set these addresses aside for educational purposes.
RIPv1 Limitations
� Loopback interfaces�Notice that R3 is using loopback interfaces (Lo0, Lo1, and Lo2). �A loopback interface is a software-only interface that is used to emulate a physical interfaceis used to emulate a physical interface.
�Like other interfaces, it can be assigned an IP address. �Loopback interfaces are also used by other routing protocols, such as OSPF, for different purposes. p , , p p
�These uses will be discussed in Chapter 11 OSPF.�In a lab environment, loopback interfaces are useful in creating additional networks without having to add more physical interfaces on the routermore physical interfaces on the router. �A loopback interface can be pinged and the subnet can be advertised in routing updates. �Therefore, loopback interfaces are ideal forTherefore, loopback interfaces are ideal for simulating multiple networks attached to the same router. �In our example, R3 does not need four LAN interfaces to demonstrate multiple subnets and
Redistribution involves taking the routes from one routing– Redistribution involves taking the routes from one routing source and sending those routes to another routing source.
• In our example topology, we want the RIP process on R2 to redistribute our static route (192.168.0.0/16) by importing the route into RIP and then sending it to R1 and R3 using the RIP process.
R2( fi t )# di t ib t t ti-R2(config-router)#redistribute static
The address space represented by the static summary route–The address space represented by the static summary route 192.168.0.0/16 does not actually exist. –In order to simulate this static route, we use a null interface as the exit interface.– You do not need to enter any commands to create or configure the null interfaceconfigure the null interface. –It is always up but does not forward or receive traffic. Traffic sent to the null interface is discarded.
� Static routes and null interfacesStat c outes a d u te acesR2(config)#ip route 192.168.0.0 255.255.0.0 Null0
�a static route must have an active exit interfacea static route must have an active exit interface before it will be installed in the routing table. �Using the null interface will allow R2 to advertise the gstatic route in RIP even though networks belonging to the summary 192.168.0.0/16 do not actually exist.
V if i d T ti C ti itVerifying and Testing Connectivity� show ip interfaces brief
T t t h th t th t l h f ll–To test whether or not the topology has full connectivity, we first verify that both serial links on R2 are up using the show ip interface brief
� Ping�Whenever R2 pings any of the 172.30.0.0 subnets on R1 or R3, only about 50% of the ICMP are successful.�R1 is able to ping 10.1.0.1 but is unsuccessful when attempting to ping the 172.30.100.1 on R3�R3 is able to ping 10 1 0 1 but is unsuccessful�R3 is able to ping 10.1.0.1 but is unsuccessful when attempting to ping the 172.30.1.1 on R1.
RIP 1 Li it tiRIPv1 Limitations� RIPv1 – a classful routing protocol
–Subnet mask are not sent in updatesSubnet mask are not sent in updates–Summarizes networks at major network boundaries–RIPv1 cannot support discontiguous networks, VLSM, or CIDR.
if t k i di ti d RIP 1 fi d ill t b–if network is discontiguous and RIPv1 configured convergence will not be reached–RIPv1 on both the R1 and R3 routers will summarize their 172.30.0.0 subnets to the classful major network address of 172 30 0 0 when sendingsubnets to the classful major network address of 172.30.0.0 when sending routing updates to R2. –From the perspective of R2, both updates have an equal cost of 1 hop to reach network 172 30 0 0/16 As you will see R2 installs both paths in thereach network 172.30.0.0/16. As you will see, R2 installs both paths in the routing table.
RIP 1 Li it tiRIPv1 Limitations�Examining the routing tables
-To examine the contents of routing updates use the debug ip rip command
R2 i i i t 172 30 0 0 l tR2 is receiving two 172.30.0.0 equal cost routes with a metric of 1 hop. R2 is receiving one route on Serial 0/0/0 from R1 and the other route on Serial 0/0/1 from R3.
R2 has two equal cost routes to the 172.30.0.0/16 network.
•R1 has its own 172 30 0 0 routes:•R1 has its own 172.30.0.0 routes: 172.30.2.0/24 and 172.30.1.0/24. •But R1 does not send R2 those subnets. •R3 has a similar routing table. B th R1 d R3 b d t d•Both R1 and R3 are boundary routers and
are only sending the summarized 172.30.0.0 network to R2 in their RIPv1 routing updates. A lt R2 l k b t th
•R2 that it is not including the 172.30.0.0 network in its updates to either R1 or R3. •Because the split horizon rule is in effect. •R2 learned about 172 30 0 0/16 on both the•As a result, R2 only knows about the
172.30.0.0/16 classful network and is unaware of any 172.30.0.0 subnets.
•R2 learned about 172.30.0.0/16 on both the Serial 0/0/0 and Serial 0/0/1 interfaces, it does not include that network in updates it sends out these same interfaces.
do not match the /24 mask of the outgoing interface.
RIP 1 Li it tiRIPv1 Limitations� No CIDR Support
R2(config)#ip route 192 168 0 0R2(config)#ip route 192.168.0.0 255.255.0.0 Null0–the static route is included in R2's routing table, but R2 will not include the static route in itsnot include the static route in its update –R1 is not receiving this 192.168.0.0/16 route in its RIP updates from R2,
� Reason: Classful routing protocols do not support p ppCIDR routes that are summarized with a smaller mask than the classful
b t ksubnet mask–If the 192.168.0.0 static route were configured with a /24 mask or greater, this route would be
–RIPv2 Message format is similar to RIPv1 but has 2 extensionsg1st extension is the subnet mask field
�allows a 32 bit mask to be included in the RIP route entry.�the receiving router no longer depends upon the subnet mask of thethe receiving router no longer depends upon the subnet mask of the inbound interface or the classful mask when determining the subnet mask for a route
2nd extension is the addition of next hop address�The Next Hop address is used to identify a better next-hop address - if one exists - than the address of the sending router. �If the field is set to all zeros (0.0.0.0), the address of the sending router is the best next-hop addressis the best next-hop address.
� Enabling and Verifying RIPv2� Enabling and Verifying RIPv2
� Configuring RIP on a Cisco router–By default it is running RIPv1–Even though the router only sends RIPv1 messages, it can interpret both RIPv1 and RIPv2 messagesinterpret both RIPv1 and RIPv2 messages. –A RIPv1 router will just ignore the RIPv2 fields in the route entry. RIPv1 RIPv2RIPv1 RIPv2
C fi i RIP 2Configuring RIPv2� Auto-Summary & RIPv2Auto Summary & RIPv2
� RIPv2 will automatically summarize routes at majorsummarize routes at major network boundaries andcan also summarize routes with a subnet mask that is smaller than the classful subnet masksubnet mask
� 3 router setup-R1 and R2 share a common 172.16.0.0/16 network with 172 16 2 0/24 subnets172.16.2.0/24 subnets.-R2 and R3 are connected by the 192.168.1.0/24 network.-R3 also has a 172 16 4 0/24 subnet which is disconnected orR3 also has a 172.16.4.0/24 subnet, which is disconnected, ordiscontiguous, from the 172.16.0.0 network that R1 and R2 share.
Routing Table StructureRouting Table Structure� The figure shows what happens as the Serial 0/0/1 interface for R2 is
configured with the 192.168.1.1/24 address. – R1 and R3 already have their interfaces configured with the appropriate IP addresses and subnet masks.–We will now configure the interfaces for R2 and use debug ip routing to view the routing table process that is used to add these entries.
� As soon as the “no shutdown” command is issued the route is added to routing table g
–Have a subnet mask equal to or less than the classful qmask of the network address.–192.168.1.0/24 is a level 1 network route, because the subnet mask is equal to the network's classful mask. /24 f l C t k h th 192 168 1 0 t kfor class C networks, such as the 192.168.1.0 network.
� Level 1 route can function as–Default route
•A default route is a static route with the address 0.0.0.0/0.
–Supernet routeS p•A supernet route is a network address with a mask less than the classful mask.
–Network routeNetwork route•A network route is a route that has a subnet mask equal to that of the classful mask.
� The source of the level 1 route can be a directly
� The source of the level 1 route can be a directlyconnected network, static route, or a dynamic routing protocol.
Routing Table StructureRouting Table Structure� The level 1 route 192.168.1.0/24 can be further defined as an
ultimate route.ultimate route.�ultimate route includes either:
-A next-hop ip address (another path)OROR
-An exit interface� The directly connected network 192.168.1.0/24
It i l l 1 t k t b it h b t k th t i th–It is a level 1 network route because it has a subnet mask that is the same as its classful mask.–This same route is also an ultimate route because it contains the exit interface Serial 0/0/1Serial 0/0/1.
Parent and Child Routes� A parent route is a level 1 route
Parent and Child Routes
–A parent route does not containany next-hop IP address or exitinterface information
� When the 172.16.3.0 subnet was added to the routing table, another route, 172.16.0.0, was also added. , ,
–The first entry, 172.16.0.0/24, does not contain any next-hop IP address or exit interface information.or exit interface information.–This route is known as a level 1 parent route.
A t t i t ll h di–A parent route is actually a headingthat indicates the presence of level 2 routes, also known as child routes.
Routing Table StructureRouting Table Structure� A level 1 parent route is automatically
created any time a subnet is added tocreated any time a subnet is added tothe routing table.
–In other words, a parent route is created whenever a route with a maskcreated whenever a route with a maskgreater than the classful mask is entered into the routing table.
172 16 0 0/24 i b tt d 1 b t–172.16.0.0/24 is subnetted, 1 subnets
� A level 2 route is a route that is a subnet of a classful network address.
– Child routes are level 2 routes– Child routes are a subnet of a l f l t k ddclassful network address
–C 172.16.3.0 is directly connected, FastEthernet0/0
Routing Table StructureRouting Table Structure� The parent route contains the 172.16.0.0 - The classful network
address for our subnet.
� Level 2 child routes contain 172.16.3.0, route source & the network address of the route
–Notice that the subnet mask is not included with the subnet the level–Notice that the subnet mask is not included with the subnet, the level2 child route. The subnet mask for this child route (subnet) is the /24 mask included in its parent route, 172.16.0.0
� Level 2 child routes are also considered ultimate routes� Level 2 child routes are also considered ultimate routes–Reason: they contain the next hop address &/or exit interface
-This means the parent route maintains the /24 mask
Note: If there is only a single level 2 child route and that route isand that route isremoved, the level 1 parent route will be automatically deleted. A level 1 parent route exists only when there is at least one level 2 child route
The role of the parent route will be examined when we discuss the route lookup process.
Routing Table Structure� In classless networks, child routes do not have to share
the same subnet mask–Whenever there are two or more child routes with different subnet masks belonging to the same classful network thesubnet masks belonging to the same classful network, therouting table presents a slightly different view, which states that this parent network is variably subnetted.
R ti T bl L k PRouting Table Lookup Process� Longest Match: Level 1 Network Routes
Best match is also known as the longest match–Best match is also known as the longest match–The best match is the one that has the most number of left most bits matching between the destination IP address and the route in the routing table.
� For example, in the figure we have a packet destined for 172 16 0 10 Many possible routes could match this packet Three172.16.0.10. Many possible routes could match this packet. Threepossible routes are shown that do match this packet: 172.16.0.0/12, 172.16.0.0/18, and 172.16.0.0/26. Of the three routes, 172 16 0 0/26 has the longest match172.16.0.0/26 has the longest match.
Routing Table Lookup ProcessRouting Table Lookup Process� The process of matching
–1st there must be a match made between the parent route & destination IP
•If a match is made then an attempt at finding a match•If a match is made then an attempt at finding a matchbetween the destination IP and the child route is made.•Do at least 16 of the left-most bits of the parent route match the pfirst 16 bits of the packet's destination IP address of 192.168.1.2?
Fi di t h b t k t’ d ti ti IP dd� Finding a match between packet’s destination IP addressand the next route in the routing table
The figure shows a match between the destination IP of 192 168 1 0–The figure shows a match between the destination IP of 192.168.1.0and the level one IP of 192.168.1.0 / 24 then packet forwarded out s0/0/0–Not only does the minimum of 24 bits match, but a total of 30 bits match, as shown in the figure.
Routing Table Lookup ProcessRouting Table Lookup Process� How a router finds a match with one of the level 2
child routeschild routes–First router examines parent routes for a match–If a match exists then:
Child routes are examined•Child routes are examined•Child route chosen is the one with the longest match
� First, the router examines the parent route for a match.
� The router checks the last child route forThe router checks the last child route for172.16.3.0/24 and finds a match. The first 24 bits do match. The routing table process will use this route, 172.16.3.0/24, to forward the packet with the destination IP address of 172.16.3.10 out the exit interface of Serial 0/0/0.
� What happens if there isppnot a match with any level 2 child routes of the parent?parent?-Router must determine if the routing behavior is gclassless or classful
-If router is utilizing classfulrouting behavior thenrouting behavior then
-Lookup process is terminated and ip classless and no ip classless
What is IP Classless?� The "ip classless" command prevents the existence of a single "subnet" route from blocking access via the
http://www.networkking.net/out/IPClassless.htmp p g g
default route to other subnets of the same old-style network. Default only works with single-homed ISPs.� RFC 1879
� IP classless command is not easy to understand, we know that. But I bet, after you read the following lines, you will understand what it is all about.
� First, you must understand a very simple logic. Here is the logic: Me and you are on a journey. If you break my leg, then you must carry me all the way! If you understand this logic, you will understand "IP classless".
� RIP is telling you: I am classful, if you break my class, then you have to show me every route there is, or I will drop your packet. I will drop it even though there is a default route (0.0.0.0).
� What is classful? Classful means that a class A subnet should be shown as x 0 0 0 such as 10 0 0 0 255 0 0 0� What is classful? Classful means that a class A subnet should be shown as x.0.0.0 such as 10.0.0.0 255.0.0.0� If you show it as 10.44.0.0 255.255.0.0, you are breaking its class.� Or, a class B subnet should be shown as x.x.0.0 255.255.0.0 such as 172.29.0.0 255.255.0.0� If you show it as 172.29.26.0 255.255.255.0, you are breaking its class.� Let’s assume RIP knows about 10.0.0.0� If you break 10.0.0.0 into three, for example to 10.1.0.0 and 10.2.0.0 and 10.3.0.0, and then give RIP a packet with a
destination of 10.4.0.1, RIP will drop it. Why? Why doesn’t RIP send the packet to the default route? � Because RIP told you, if you break my class, then you have to show me every damn route, otherwise I will drop it.
Here you broke RIP's class so you must show him the way to 10 4 0 1 and every other 10 x x x route in the universeHere, you broke RIP s class so you must show him the way to 10.4.0.1 and every other 10.x.x.x route in the universe.Otherwise RIP will drop the packet, even if there is a default route. RIP will not care about your default route or last resort gateway; it will drop your packet.
� How do you ask RIP not to drop your packet and send the unknown destinations to the default route, although you have been so mean to him and have broken its class? You tell him: please, please, ip classless!If i l l d th k t
Routing Behavior “no ip classless”Routing Behavior� Classful Routing Behavior – Search Process
–when classful routing behavior is in effect (no ip
no ip classless
g ( pclassless) the process will not continue searching level 1 routes in the routing table. If a packet doesn't match a child route for the parent network route, then the router drops the packetthe router drops the packet.
� R2 receives a packet destined for PC3 at 172.16.4.10.
–Even with the default route configured. –The destination’s subnet mask is a /24 and none of the child routes left most bits match the first 24 bits.Thi k t i d dThis means packet is dropped
R ti B h iRouting Behavior� Classful Routing Behavior – Search
P
“no ip classless”
Process� The reason why the router will not search
beyond the child routesy�At the beginning of the Internet's growth, networks were all classful�This meant an organization could�This meant an organization couldsubnet a major network address and “enlighten” all the organization’s routers about the subnettingrouters about the subnetting�Therefore, if the subnet was not in the routing table, the subnet did not exist and packet was droppedand packet was dropped
� The routing table process will not use the default route, 0.0.0.0/0, or any other route
R ti B h iRouting Behavior� The routing table process will not
“no ip classless”g p
use the default route, 0.0.0.0/0, or any other route.
�A common error is to assume that a default route will always be used if the router does not have a better route. �In our example, R2's default route is not examined nor used, although it is a matchmatch.� This is often a very surprising result when a network administrator does not
d t d th diff b tunderstand the difference betweenclassful and classless routing behavior.
ip lassless� Step 3: If classless routing behavior inStep 3: If classless routing behavior in
effect then, continue searching level 1 supernet routes in the routing table for a match including the default route if there ismatch, including the default route, if there isone.
� Step 4: Match with supernet or default�Supernet routes Checked first–If a match exists then forward packet
�Default routes Checked second
� Step 5: If there is no match or no default t th th Packet is dropped
Routing BehaviorRouting BehaviorS* 0.0.0.0/0 is directly connected, Serial0/0/1
“ip classless”
� The mask is /0, which means that zero or no bits need to match.
� A default route will be the lowest-bit match. In classless routing behavior, if no other route matches the default routeroute matches, the default routewill match.
–In this case the router will use theIn this case the router will use thedefault route, because it is the best match. The packet will be forwarded out the Serial 0/0/1 interface.
O QLongest Match http://www.cisco.com/warp/public/105/21.html
POP QUIZp p p
� Let's look at the three routes we just installed in the routing table, and see how they look on the router.
� router# show ip route....D 192.168.32.0/26 [90/25789217] via 10.1.1.1 ----� (192.168.32.0 to 192.168.32.63)[ ] ( )R 192.168.32.0/24 [120/4] via 10.1.1.2 ----� (192.168.32.0 to 192.168.32.255)O 192.168.32.0/19 [110/229840] via 10.1.1.3 ----� (192.168.32.0 to 192.168.63.255)....
� If a packet arrives on a router interface destined for 192.168.32.1, which route would the router choose?
� If a packet arrives on a router interface destined for 192.168.32.100,which route would the router choose?
� Let's look at the three routes we just installed in the routing table, and see how j g ,they look on the router.
� router# show ip route....D 192.168.32.0/26 [90/25789217] via 10.1.1.1 ----� (192.168.32.0 to 192.168.32.63)R 192.168.32.0/24 [120/4] via 10.1.1.2 ----� (192.168.32.0 to 192.168.32.255)O 192.168.32.0/19 [110/229840] via 10.1.1.3 ----� (192.168.32.0 to 192.168.63.255)....
� If a packet destined to 192.168.32.1 is directed toward 10.1.1.1, because 192.168.32.1 falls within the 192.168.32.0/26 network (192.168.32.0 to 192 168 32 63) It also falls within the other two routes available but the192.168.32.63). It also falls within the other two routes available, but the192.168.32.0/26 has the longest prefix within the routing table (26 bits verses 24 or 19 bits).
� if a packet destined for 192.168.32.100 arrives on one of the router's interfaces, f fp
it's forwarded to 10.1.1.2, because 192.168.32.100 doesn't fall within 192.168.32.0/26 (192.168.32.0 through 192.168.32.63), but it does fall within the 192.168.32.0/24 destination (192.168.32.0 through 192.168.32.255). Again, it also falls into the range covered by 192.168.32.0/19, but 192.168.32.0/24 has a longer
SummarySummaryRouting table lookup process� Begins with examining level 1 routes for best match with packet’s destination IPBegins with examining level 1 routes for best match with packet s destination IP
� If the best match = an ultimate route then-Packet is forwarded -Else--Parent route is examined-Parent route is examined
If parent route & destination IP match then Level 2 (child) routes are examined
Level 2 route examinationLevel 2 route examination� If a match between destination IP and child route found then
Packet forwarded -Else � If Router is using classful routing behavior then g g
Packet is dropped -Else
� If router is using classless routing behavior thenRouter searches Level 1 supernet & default routes for a match
� If a match is found then Packet if forwarded -Else� Packet is dropped
� Roots of EIGRP: IGRP-Developed in 1985 to overcome RIPv1’s limited hop count-Distance vector routing protocolM t i d b IGRP-Metrics used by IGRP
�bandwidth (used by default)�Delay (used by default)�Delay (used by default)�Reliability (not used by default)�Load (not used by default)Load (not used by default)
-Discontinued support starting with IOS 12.2(13)T & 12.2(R1s4)S
� EIGRP is a distance vector, classless routing protocol that was released in 1992 with IOS 9 21released in 1992 with IOS 9.21.
� As its name suggests, EIGRP is an enhancement of Cisco IGRP (Interior Gateway Routing Protocol).
� Both are Cisco proprietary protocols and only operate on CiscoBoth are Cisco proprietary protocols and only operate on Ciscorouters.
� The main purpose in Cisco's development of EIGRP was to create a classless version of IGRP. EIGRP includes several features that are not commonly found in other distance vectorfeatures that are not commonly found in other distance vectorrouting protocols like RIP (RIPv1 and RIPv2) and IGRP. These features include:
–Reliable Transport Protocol (RTP)–Bounded Updatesp–Diffusing Update Algorithm (DUAL)–Establishing Adjacencies–Neighbor and Topology Tables
Alth h EIGRP t lik li k t t ti t l it i� Although EIGRP may act like a link-state routing protocol, it isstill a distance vector routing protocol.
–Note: The term hybrid routing protocol is sometimes used to define EIGRP. However, this term is misleading because EIGRP is not a hybrid between distance vector and link-state routing protocols - it is
hybrid between distance vector and link state routing protocols it issolely a distance vector routing protocol. Therefore, Cisco is no longer using this term to refer to EIGRP.
EIGRP
� The Algorithm� The Algorithm–EIGRP uses the Diffusing Update Algorithm (DUAL).–EIGRP does not send periodic updates and route entries do not age outout.–Only changes in the routing information, such as a new link or a li k b i il bllink becoming unavailable cause a routing update to occur. –EIGRP routing updates are still g pvectors of distances transmitted to directly connected neighbors.
G–EIGRP's DUAL maintains a topologytable separate from the routing table, which includes both the best path to a destination network and any backupdestination network and any backuppaths that DUAL has determined to be loop-free.
If a route becomes unavailable DUAL–If a route becomes unavailable, DUALwill search its topology table for a valid backup path.
If i t th t t i•If one exists, that route isimmediately entered into the routing table.If d t i t DUAL f•If one does not exist, DUAL performs
a network discovery process to see if there happens to be a backup path that did not meet the requirement of
that did not meet the requirement ofthe feasibility condition.
EIGRP� Convergence
–EIGRP does not use holddown timers.
Instead loop free paths are–Instead, loop-free paths areachieved through a system of route calculations (diffusing computations) that are performed in a coordinatedthat are performed in a coordinatedfashion among the routers. –The detail of how this is done is beyond the scope of this course, but the result is faster convergence than traditional distance vector routing protocols.
�Data link frame header - contains source and destination MAC address�IP packet header - contains source & destination IP address�EIGRP packet header - contains AS numberAS number�Type/Length/Field - data portion of EIGRP message�In the IP packet header,p ,
�the protocol field is set to 88 to indicate EIGRP�the destination address is set to th lti t 224 0 0 10the multicast 224.0.0.10.
�If the EIGRP packet is encapsulated in an Ethernet frame,
neighbor receiving this messageshould wait before considering the advertising router to be down.
EIGRPEIGRP� TLV: IP internal contains (EIGRP routes
within an autonomous system)–Metric field (Delay and Bandwidth)–Metric field (Delay and Bandwidth)
•Delay is calculated as the sum of delays from source to destination in units of 10 microseconds.•Bandwidth is the lowest configured bandwidth gof any interface along the route.
–Subnet mask field•The subnet mask is specified as the prefixlength or the number of network bits in the
b t ksubnet mask.•255.255.255.0 is 24
–Destination field•the address of the destination network.t e add ess o t e dest at o et o•Although only 24 bits are shown in this figure. •If a network address is longer than 24 bits, then the Destination field is extended for another 32 bits
� TLV: IP external contains–Fields used when external
EIGRP routing process– import or redistribute a route into EIGRP.
EIGRPEIGRPProtocol Dependent Modules (PDM)
EIGRP PDM t t l� EIGRP uses PDM to route severaldifferent protocols i.e. IP, IPX & AppleTalk
� PDMs are responsible for the specific routing task for each network layerrouting task for each network layerprotocol
–As you can see in the figure, EIGRP uses different EIGRP packets and
i t i t i hb t lmaintains separate neighbor, topology,and routing tables for each Network layer protocol.
•The IP-EIGRP module is responsibleThe IP EIGRP module is responsiblefor sending and receiving EIGRP packets that are encapsulated in IP and for using DUAL to build and maintain the IP routing table. How do people routeg•The IPX EIGRP module is responsible for exchanging routing information about IPX networks with other IPX EIGRP routers
How do people routeIPX or Appletalk today if they still get either IPX A l t lk?
other IPX EIGRP routers.•Apple-Talk EIGRP is for Apple-talk
IPX or Appletalk?
EIGRPEIGRPReliable Transport Protocol (RTP)
P rpose of RTP� Purpose of RTP–Used by EIGRP to transmit and receive EIGRP packets– EIGRP was designed as a Network layerg yindependent routing protocol; therefore, it cannot use the services of UDP or TCP because IPX and Appletalk do not use protocols from the TCP/IP protocol suite.
� Characteristics of RTP–Involves both reliable & unreliable delivery ofEIGRP packet
�Reliable delivery requires acknowledgment�Reliable delivery requires acknowledgmentfrom destination�Unreliable delivery does not require an acknowledgement from destination
•Hello•Update•ACKUpdate packets are used to propagate
routing information–Update packets are sent only when necessary.
G
ACK•Query•Reply
–EIGRP updates are sent only to those routers that require it. –When a new neighbor is discovered, unicast update packets are sent so that the p pneighbor can build up its topology table. –In other cases, such as a link-cost change, updates are multicast. U d t l t itt d li bl–Updates always are transmitted reliably
� Acknowledgement packets–Used to acknowledge receipt of update,query & reply packets–An acknowledgment packet is a hello packet that has no data. EIGRP acknowledgement packets are
•R2 has lost connectivity to the LAN attached to its FastEthernet interface. •R2 immediately sends an unicast Update to R1 and R3 noting the downed route.
–EIGRP acknowledgement packets arealways sent as an unreliable unicast
g•R1 and R3 respond with an unicastacknowledgement.
EIGRP
Q & R l k t
•Hello•Update•ACK� Query & Reply packets
�Used by DUAL for searching for networks
ACK•Query•Replynetworks
�Queries and replies use reliable delivery.�Query packets can use
�MulticastR l k t l�Reply packet use only
�unicast•R2 has lost connectivity to the LAN•R2 has lost connectivity to the LANand it sends out queries to all EIGRP neighbors.•All neighbors must send a reply
To discover neighbors & establish adjacencies with neighbor routers–To discover neighbors & establish adjacencies with neighbor routers
� Characteristics of hello protocolTime interval for sending hello packet–Time interval for sending hello packet�5 seconds - high bandwidth (greater than T1) �60 seconds - multipoint circuits T1 bandwidth or slower p
-Holdtime�This is the maximum time router should wait before declaring a neighbor down�Default holdtime
–Purpose•EIGRP’s primary method for preventing routing loops•And also hold-down timers and split horizon, too.
–Advantage of using DUALP id f f t ti b k i li t f l•Provides for fast convergence time by keeping a list of loop-
free backup routes–DUAL maintains a list of backup routes it has already determined to be loop-free. If the primary route in the routing table fails, the best backup route is immediately added to the routing table.
� EIGRP canEncrypt routing information– Encrypt routing information
– Authenticate routing information
� It is good practice to authenticateIt is good practice to authenticatetransmitted routing information. – This practice ensures that routers will
only accept routing information fromonly accept routing information fromother routers that have been configured with the same password or authentication information.authentication information.
� Note: Authentication does not encrypt the router's routing table.
Basic EIGRP ConfigurationBasic EIGRP Configuration� Autonomous System (AS) & Process IDs
–This is a collection of networks under the control of a–This is a collection of networks under the control of asingle authority (reference RFC 1930)–AS Numbers are assigned by IANA
�� ARIN not IANA–Entities needing AS numbers
�ISP�Internet Backbone prodiersInternet Backbone prodiers�Institutions connecting to other institutions using AS numbers�These ISPs and large institutions use the exterior gateway routing protocol or BGP, to propagate routing information.
16-bit and 32-bit AS NumbersCommencing 1 January 2007,"16-bit only AS Numbers" refers to AS numbers in the range 0 - 65535
16 bit only AS Numbers refers to AS numbers in the range 0 65535"32-bit only AS Numbers" refers to AS Numbers in the range 65,536 - 4,294,967,295"32-bit AS Numbers" refers to AS Numbers in the range 0 - 4,294,967,295
Basic EIGRP ConfigurationBasic EIGRP Configuration� EIGRP autonomous system
number actually functions as anumber actually functions as aprocess ID
–The vast majority of companies and institutions with IP networksand institutions with IP networksdo not need an AS number–The ISP is responsible for the
ti f k t ithi itrouting of packets within itsautonomous system and between other autonomous systems.
� Process ID represents an instance of the routing protocol running on a router
When EIGRP is configured on R2, DUAL sends a notification message to the console stating that a neighbor relationship with another EIGRP router has been established.
Basic EIGRP ConfigurationBasic EIGRP Configuration� The network Command with a Wildcard Mask
-This option is used when you want to configure EIGRP to advertise specific subnets-Example
EIGRP Null0 Summary RouteEIGRP Null0 Summary Route� EIGRP has automatically included a summary route to Null0
(192 168 10 0/24 and 172 16 0 0/16)(192.168.10.0/24 and 172.16.0.0/16)–Null0 is not a physical interface–In the routing table summary routes are sourced from Null0
�Reason: routes are used for advertisement purposes–EIGRP will automatically include a null0 summary route as child route when2 conditions are met2 conditions are met
�At least one subnet is learned via EIGRP�Automatic summarization is enabled�If the packet matches the level 1 parent - the classful network address - but none of the subnets, the packet is discarded.
EIGRP Metric CalculationEIGRP Metric CalculationEIGRP Composite Metric & the K Values
EIGRP th f ll i l i it it t i� EIGRP uses the following values in its composite metric-Bandwidth, delay, reliability, and load (reliability and load are not used)
� The composite metric used by EIGRP� The composite metric used by EIGRP– formula used has values K1 �K5
U th h i t l d t if th K� Use the sh ip protocols command to verify the Kvalues
Again, changing these values to other than the default is not recommended unless the networkunless the networkadministrator has a very good reason to do so.
U th h i t f� Use the show interfacescommand to view metrics
� EIGRP Metrics–Bandwidth – EIGRP uses a static bandwidth to calculate metric
Most serial interfaces use–Most serial interfaces usea default bandwidth value of 1.544Mbos (T1)–The value of the b d idthbandwidth may or may not reflect the actual SPEED of the interface. –If actual SPEED of the link differs from the default bandwidth value, then you should modify the bandwidth value,
The default bandwidth for ethernet is 10,000 Kbits. The default bandwidth for fastethernet is 100,000 Kbits.
EIGRP Metric Calculation
EIGRP MetricsEIGRP Metrics
� Delay is the defined as the measure of time it takes for ameasure of time it takes for apacket to traverse a route
–it is a static value based onit is a static value based onlink type to which interface is connected–The delay value, much like the bandwidth value, is a default value that can be changed by thethat can be changed by thenetwork administrator manually.
EIGRP M t i C l l tiEIGRP Metric Calculation� Reliability (not a default EIGRP metric)
–A measure of the likelihood that a link will fail or how often the link has experienced errors. –Measure dynamically & expressed as a fraction of 255
•the higher the fraction the better the reliability•the higher the fraction the better the reliability–Reliability is calculated on a 5-minute weighted average to avoid the sudden impact of high (or low) error rates.
� Load (not a default EIGRP metric)( )– A number that reflects how much traffic is using a link– Number is determined dynamically and is expressed as a fraction of 255
�The lower the fraction the less the load on the link�This value is calculated on a 5-minute weighted average to avoid the sudden impact of high (or low) channel usage.
10,000,000 is divided by 1024. If the result is not a whole number, then the value is rounded down. In this case, 10,000,000 divided by 1024 equals 9765.625. The .625 is dropped before multiplying by 256. The bandwidth portion of the composite metric is 2 499 840bandwidth portion of the composite metric is 2,499,840.
–This is a loop free backup route to the same destination as successor route–If the link between R2 and–If the link between R2 andR3 failed, the R1 will become the successor for sending traffic to 192 168 1 0traffic to 192.168.1.0
� Feasibility Condition (FC)–Met when a neighbor’s reported distance (RD) is less than the local router’sthan the local router sFD to the same destination network
Th t d di t i–The reported distance issimply an EIGRP neighbor's feasible distance to the same destination networksame destination network.–The reported distance is the metric that a router reports to a neighbor about
The metric that a router–The metric that a routerreports to a neighbor about its own cost to that network–R2 examines the reportedR2 examines the reporteddistance (RD) of 2172416 from R1. Because the reported distance (RD) of R1 is less than R2's own feasible distance (FD)( )of 3014400, R1 meets the feasibility condition. R1 is now a feasible successor for R2 to the 192.168.1.0/24 network.
� Why isn't R1 the successor if its reported distance (RD) is less than R2's feasible distance (FD) t 192 168 1 0/24?to 192.168.1.0/24?
–Because the total cost for R2, its feasible distance (FD), to reach 192 168 1 0/24 is greater
P - This route is in theP This route is in thepassive state. When DUAL is not performing its diffusing computations to d t i th fdetermine a path for a network, the route will be in a stable mode, known as the passive statethe passive state.A - If DUAL is recalculating or searching for a new path, the route will be in an
table should be in thepassive state for a stable routing domain.
if there is not a second entry, then there are no feasible successors
DUAL ConceptsDUAL Concepts
� To view detailed� To view detailedinformation about the metrics of a specific entry in the topology table, add the optional parameter [network] toparameter [network] tothe show ip eigrp topology command
� Remember that EIGRP is a distance vector routing protocol.
DUAL ConceptsDUAL ConceptsTopology Table: No Feasible
SuccessorSuccessor
� The topology table for R1 to the network 192.168.1.0 only shows theet o 9 68 0 o y s o s t esuccessor 192.168.10.6. There are no feasible successors.
By looking at the actual physical–By looking at the actual physicaltopology or network diagram, it is obvious that there is a backup route to 192.168.1.0/24 through R2.to 192.168.1.0/24 through R2.
� Why isn't R2 listed as a feasible successor?
–R2 is not a feasible successor because it does not meet the feasibility condition.
� Looking at the topology it is obvious that R2 is a backup routeR2 is a backup route,
–The command shows all possible paths to a network including successors, feasible successors and even thosefeasible successors, and even thoseroutes that are not feasible successors.–For R2 to be considered a feasible successor it must meet the feasibilitysuccessor, it must meet the feasibilitycondition. R2's feasible distance to reach 192.168.1.0/24 must be less the R1's current feasible distance (FD) As we cancurrent feasible distance (FD). As we cansee in the figure, R2's feasible distance is 3014400, which is higher than R1's feasible distance of 2172416.
DUAL ConceptsDUAL Concepts� Does this mean R2 cannot be
used if the successor fails?–No, R3 can be used, but there will be a longer delay before adding it tobe a longer delay before adding it tothe routing table. –Before this can happen, DUAL will need to do some further processing.
� The centerpiece of EIGRP is DUAL d it EIGRP t l l tiand its EIGRP route-calculation
engine. The actual name of this technology is DUAL Finite State Machine (FSM).Machine (FSM).
� Finite Sate Machine (FSM)–An abstract machine that defines a set of possible states somethinga set of possible states somethingcan go through, what event causes those states and what events result form those states–FSMs are used to describe how a device, computer program, or routing algorithm will react to a set of input eventsof input events–Selects a best loop-free path to a destination
More EIGRP ConfigurationsMore EIGRP Configurations� Regardless of whether classful or classless
routing behavior is being used the null0routing behavior is being used, the null0summary will potentially be used and denying the use of any supernet or default routeroute.
� Disabling Automatic Summarization–The no auto-summary command is usedThe no auto-summary command is usedto disable automatic summarization
•This causes all EIGRP neighbors to send updates that will not besend updates that will not beautomatically summarized
�this will cause changes in both g-routing tables -topology tables
More EIGRP ConfigurationsMore EIGRP Configurations� The no auto-summary command
Witho t a tomatic s mmari ation R3's� Without automatic summarization, R3'srouting table now includes the three subnets, 172.16.1.0/24, 172.16.2.0/24, and 172.16.3.0/24. Why does R3's routing table y gnow have two equal cost paths to 172.16.3.0/24? Shouldn't the best path only be through R1 with the 1544 Mbps link?
Remember that EIGRP only uses the link with–Remember that EIGRP only uses the link withthe slowest bandwidth when calculating the composite metric. –The slowest link is the 64 Kbps link that contains the 192.168.3.0/24 network. In this example, the 1544 Mbps link and the 1024 Kbps link are irrelevant in the calculation as far as the bandwidth metric is concerned. –Because both paths have the same number and types of outgoing interfaces, the delay values end up being the same. As a result the EIGRP metric for both paths is
� “quad zero” static default routeCan be used with any currently-Can be used with any currently
supported routing protocol-Is usually configured on a router that is connected a network outside the EIGRP domain (for example, to an ISP. )
� EIGRP & the “Quad zero” static default route� EIGRP & the Quad zero static default route–Requires the use of the redistributestatic command to include the static default route in EIGRP routing updates to other routers.
� In the routing tables for R1In the routing tables for R1and R3, notice the routing source and administrative distance for the new static default route. The entry for the static default route on R1the static default route on R1is the following:
–D: This static route was learned from an EIGRP routing updaterouting update.–*: The route is a candidate for a default route.–EX: The route is an external EIGRP route in this case aEIGRP route, in this case astatic route outside of the EIGRP routing domain.–170: This is the administrative distance of an external EIGRP route
Fi T i EIGRPFine-Tuning EIGRP� EIGRP bandwidth utilization
–By default, EIGRP uses only up to 50% of interface bandwidth for EIGRP information
Thi t th EIGRP f tili i li k d t•This prevents the EIGRP process from over-utilizing a link and notallowing enough bandwidth for the routing of normal traffic.
–The command to change the percentage of bandwidth used by EIGRP is
More EIGRP ConfigurationsMore EIGRP Configurations� Configuring Hello Intervals and Hold Times
Hello inter als and hold times are config rable on a per interface-Hello intervals and hold times are configurable on a per-interfacebasis-The command to configure hello interval is
� EIGRP terms and characteristicsEIGRP uses a hello protocol–EIGRP uses a hello protocol�Purpose of hello protocol is to discover & establish adjacenciesj
–EIGRP routing updates�AperiodicAperiodic�Partial and bounded�Fast convergenceFast convergence
Aft t h i d ll d t f di tl–After router has received all updates from directlyconnected neighbors, it can calculate its DUAL
1st metric is calculated for each route�1st metric is calculated for each route�2nd route with lowest metric is designated successor & is placed in routing tablesuccessor & is placed in routing table�3rd feasible successor is found
C i i f f ibl i h–Criteria for feasible successor: it must havelower reported distance to the destination than the installed route’s feasible distancethe installed route s feasible distance–Feasible routes are maintained in topology table
� Describe the basic features & concepts of link-state prouting protocols.– Distance vector routing protocols are like road signs
because routers must make preferred path decisions basedbecause routers must make preferred path decisions basedon a distance or metric to a network.
– Link-state routing protocols are more like a road map because they create a topological map of the network andbecause they create a topological map of the network andeach router uses this map to determine the shortest path to each network.The ultimate objective is that every router receives all of the– The ultimate objective is that every router receives all of thelink-state information about all other routers in the routing area. With this link-state information, each router can create its own topological map of the network and independentlyits own topological map of the network and independentlycalculate the shortest path to every network.
� List the benefits and requirements of link-state routing
Link-State Routing Process� How routers using Link State Routing Protocols reach convergence
1 Each routers learns about its own directly connected networks1. Each routers learns about its own directly connected networks– interface is in the up state
2. Each router is responsible for meeting its neighbors on directly t d t kconnected networks
– exchange hello packet to other directly connected link state routers.3. Each router builds a Link-State Packet (LSP) containing the state of ( ) g
each directly connected link – recording all the pertinent information about each neighbor, including
neighbor ID, link type, and bandwidth.4. Each router floods the LSP to all neighbors, who then store all LSPs
received in a database.– Each router stores a copy of each LSP received from its neighbors in
a local databasea local database.5. Each router uses the database to construct a complete map of the
topology and computes the best path to each destination network.Th SPF l ith i d t t t th f th t l d
Link-State Routing:step 3 - Building the Link State Packet (LSP)
� Contents of LSP:– State of each directly connected link– Includes information about neighbors such as neighbor ID linkneighbors such as neighbor ID, linktype, & bandwidth.
� A simplified version of the LSPs from R1 is:
1. R1; Ethernet network 10.1.0.0/16; Cost 22. R1 -> R2; Serial point-to-point network; 10.2.0.0/16; Cost 203. R1 -> R3; Serial point-to-point network; 10.3.0.0/16; Cost 54. R1 -> R4; Serial point-to-point
Link-State Routing:step 4 - Flooding LSPs to Neighbors
� Once LSP are created they areforwarded out to neighbors.
–Each router floods its link-stateac ou e oods s s a einformation to all other link-state routers in the routing area.
Whenever a router receives an LSP–Whenever a router receives an LSPfrom a neighboring router, it immediately sends that LSP out all other interfaces except the interfaceother interfaces except the interfacethat received the LSP. –This process creates a flooding effect p gof LSPs from all routers throughout the routing area.
Link-State Routing:step 4 - Flooding LSPs to Neighbors� LSPs are sent out under the following conditions
– Initial router start up or routing processWh th i h i t l– When there is a change in topology• including a link going down or coming up, or a neighbor adjacency being established or brokenj y g
Link-State Routing:step 5 - Constructing a link state data base
� Routers use a database toconstruct a topology map of the network
–After each router has propagated its own LSPs using the link-state flooding process each router willflooding process, each router willthen have an LSP from every link-state router in the routing area. –These LSPs are stored in the link-state database. –Each router in the routing area canEach router in the routing area cannow use the SPF algorithm to construct the SPF trees that you saw earlier
Link-State Routing:Link-State Routing:step 5 - Constructing a link state data base
router R1 has learned the link-state information for each router in its routing area.routing area.
With a complete link-state database, R1 pcan now use the database and the shortest path first (SPF) algorithm to calculate the preferred path or shortest path to each network.p
� Process begins by examining R2’s LSP information
Link-State Routing:Example - How R1 constructs its SPF tree.
Process begins by examining R2 s LSP information–R1 can ignore the first LSP, because R1 already knows that it is connected to R2 on network 10.2.0.0/16 with a cost of 20.
R1 th d LSP d t li k f R2 t th–R1 can use the second LSP and create a link from R2 to anotherrouter, R5, with the network 10.9.0.0/16 and a cost of 10. This information is added to the SPF tree.
Using the third LSP R1 has learned that R2 has a network–Using the third LSP, R1 has learned that R2 has a network10.5.0.0/16 with a cost of 2 and with no neighbors. This link is added to R1's SPF tree.
� Process begins by examining R3’s LSP information
Link-State Routing:Example - How R1 constructs its SPF tree.
Process begins by examining R3 s LSP information–R1 can ignore the first LSP, because R1 already knows that it is connected to R3 on network 10.3.0.0/16 with a cost of 5.
R1 th d LSP d t li k f R3 t th–R1 can use the second LSP and create a link from R3 to therouter R4, with the network 10.7.0.0/16 and a cost of 10. This information is added to the SPF tree.
Using the third LSP R1 has learned that R3 has a network–Using the third LSP, R1 has learned that R3 has a network10.6.0.0/16 with a cost of 2 and with no neighbors. This link is added to R1's SPF tree.
� Process begins by examining R4’s LSP information
Link-State Routing:Example - How R1 constructs its SPF tree.
Process begins by examining R4 s LSP information–R1 can ignore the first LSP because R1 already knows that it is connected to R4 on network 10.4.0.0/16 with a cost of 20. –R1 can also ignore the second LSP because SPF has already learnedR1 can also ignore the second LSP because SPF has already learnedabout the network 10.6.0.0/16 with a cost of 10 from R3. –However, R1 can use the third LSP to create a link from R4 to the router R5, with the network 10.10.0.0/16 and a cost of 10. This information is
dd d t th SPF tadded to the SPF tree.–Using the fourth LSP, R1 learns that R4 has a network 10.8.0.0/16 with a cost of 2 and with no neighbors. This link is added to R1's SPF tree.
� Process begins by examining R5’s LSP information
Link-State Routing:Example - How R1 constructs its SPF tree.
Process begins by examining R5 s LSP information–R1 can ignore the first two LSPs (for the networks 10.9.0.0/16 and 10.10.0.0/16), because SPF has already learned about these links and added them to the SPF tree. –R1 can process the third LSP learning that R5 has a network 10.11.0.0/16 with a cost of 2 and with no neighbors. This link is added to the SPF tree for R1.
� Determining the shortest pathDetermining the shortest path–The shortest path to a destination determined by adding the costs & finding the lowest cost
•Network 10.5.0.0/16 via R2 serial 0/0/0 at a cost of 22•Network 10.6.0.0/16 via R3 serial 0/0/1 at a cost of 7at a cost of 7•Network 10.7.0.0/16 via R3 serial 0/0/1 at a cost of 15•Network 10.8.0.0/16 via R3 serial 0/0/1 at a cost of 17•Network 10.9.0.0/16 via R2 serial 0/0/0 at a cost of 30N t k 10 10 0 0/16 i R3 i l 0/0/1•Network 10.10.0.0/16 via R3 serial 0/0/1
at a cost of 25•Network 10.11.0.0/16 via R3 serial 0/0/1 at a cost of 27
Only the LANs are shown in the table, but SPF can also be used to determine the
used to determine theshortest path to each WAN link network.
Link-State Routing
O th SPF l ith h� Once the SPF algorithm hasdetermined the shortest path routes, these routes are placed inroutes, these routes are placed inthe routing table.
� The routing table will also includeThe routing table will also includeall directly connected networks and routes from any other sources, such as static routes. Packets will now be forwarded according to these entries in theaccording to these entries in therouting table.
� There are several advantages of link-state routing protocols compared to distance vector routing t lprotocols.
� Builds a Topological Map• Link-state routing protocols create a topological map, or SPF tree of the network topology.
•Using the SPF tree each router can independently determine the shortest path to every networkUsing the SPF tree, each router can independently determine the shortest path to every network.• Distance vector routing protocols do not have a topological map of the network.
•Routers implementing a distance vector routing protocol only have a list of networks, which includes the cost (distance) and next-hop routers (direction) to those networks.
� Fast Convergence• When receiving a Link-state Packet (LSP), link-state routing protocols immediately flood the LSP out all
interfaces except for the interface from which the LSP was received. • A router using a distance vector routing protocol needs to process each routing update and update its
ti t bl b f fl di th t th i t f ith t i d d trouting table before flooding them out other interfaces, even with triggered updates.
� Event-driven Updates• After the initial flooding of LSPs, link-state routing protocols only send out an LSP when there is a change
in the topology. The LSP contains only the information regarding the affected link. • Unlike some distance vector routing protocols, link-state routing protocols do not send periodic updates.
� Hierarchical Design• Link-state routing protocols such as OSPF and IS-IS use the concept of areas. Multiple areas create a
hierarchical design to networks allowing for better route aggregation (summarization) and the isolation of
hierarchical design to networks, allowing for better route aggregation (summarization) and the isolation ofrouting issues within an area.
Link-State Routing Protocols
R i t f i li k t t ti t lRequirements for using a link state routing protocol� Memory requirements
T i ll li k t t ti t l– Typically link state routing protocols use more memory
� Processing RequirementsM CPU i i i d f li k t t ti– More CPU processing is required of link state routing
protocols
� Bandwidth Requirementsq– Initial startup of link state routing protocols can consume lots of bandwidth
This should only occur during initial startup of routers but can– This should only occur during initial startup of routers, but canalso be an issue on unstable networks.
Link-State Routing Protocols� Modern link-state routing protocols are designed to
i i i h ff CPU dminimize the effects on memory, CPU, andbandwidth.
• The use and configuration of multiple areas can reduce the size of the link-state databases. Multiple areas canthe size of the link state databases. Multiple areas canalso limit the amount of link-state information flooding in a routing domain and send LSPs only to those routers that need them.
• For example when there is a change in the topologyFor example, when there is a change in the topology,only those routers in the affected area receive the LSP and run the SPF algorithm.
• This can help isolate an unstable link to a specific area in the routing domainin the routing domain.
� In the figure, If a network in Area 51 goes down, the LSP with the information about this downed link is only flooded to other routers in that area.only flooded to other routers in that area.
• Routers in other areas will learn that this route is down, but this will be done with a type of link-state packet that does not cause them to rerun their SPF algorithm.
� 2 link state routing protocols used for routing IP� 2 link state routing protocols used for routing IP-Open Shortest Path First (OSPF)-Intermediate System-Intermediate System (IS-IS)
� Link State Routing protocols are also known as Shortest Path First protocols
� Summarizing the link state process-Routers 1ST learn of directly connected networksRouters 1ST learn of directly connected networks-Routers then say “hello” to neighbors-Routers then build link state packets-Routers then build link state packets-Routers then flood LSPs to all neighborsRouters use LSP database to build a network topology-Routers use LSP database to build a network topology
Introduction to OSPFIntroduction to OSPFOSPF Message Encapsulation� OSPF packet typeOSPF packet type
– There exist 5 types (next slide)
� OSPF packet header –Contains - Router ID an area IDand Type code for OSPF packet type
� IP packet header– Contains - Source IP address, Destination IP address, & Protocoles a o add ess, & o ocofield set to 89. the destination address is set to one of two multicast addresses: 224.0.0.5 or224 0 0 6224.0.0.6.
� Data Link Frame Header –Contains - destination MAC address is
also a multicast address: 01-00-5E-00-00-05 or 01-00-5E-00-00-06.
I t d ti t OSPFIntroduction to OSPF5 OSPF Packet Types:
� 1. Hello - Hello packets are used to establish and maintain adjacency with other OSPF routers.
� 2. DBD - The Database Description (DBD) packet contains an abbre iated list of the sending ro ter'scontains an abbreviated list of the sending router'slink-state database and is used by receiving routers to check against the local link-state database.
� 3. LSR - Receiving routers can then request more information about any entry in the DBD by sending a Link-State Request (LSR).
� 4. LSU - Link-State Update (LSU) packets are used to reply to LSRs as well as to announce new information.
–LSUs contain 7 different types of Link-State Advertisements (LSAs).–LSUs and LSAs are discussed in a later topic.
� 5. LSAck - When an LSU is received, the routersends a Link-State Acknowledgement (LSAck) to confirm receipt of the LSU.
OSPF: Hello ProtocolOSPF: Hello Protocol� Purpose of Hello Packet
� Discover OSPF neighbors & establish adjacencies� Discover OSPF neighbors & establish adjacencies� Advertise parameters on which routers must agree to become neighbors� Used by multi-access networks to elect a Designated Router and a Backup Designated Router
� Type: OSPF Packet Type: Hello (1), DD (2), LS Request (3), LS Update (4), LS ACK (5)
� Router ID: ID of the originating router
� Area ID: area from which the packet originated
� Network Mask: Subnet mask associated with the sending interfacesending interface
� Hello Interval: number of seconds between the sending router's hellos
� Router Priority: Used in DR/BDR election (discussed l t )later)
� Designated Router (DR): Router ID of the DR, if any
� Backup Designated Router (BDR): Router ID of the BDR, if any
– They must agree on three values: Hello Why 10 second hello interval
Also need to have the same Area ID.
y ginterval, Dead interval, and network type.
� OSPF Hello Intervals–Hello interval indicates how often an OSPF router transmits its Hello packets
Why 10 second hello intervalcommunications consider better than the 30 second routing update for RIP?
router transmits its Hello packets–Usually multicast (224.0.0.5) for ALLSPFRouters–sent every 10 seconds on multiaccess and ypoint-to-point segments–Sent every 30 seconds for NBMA segments
� OSPF Dead Intervals–This is the time that must transpire before the neighbor is considered down–Default time is 4 times the hello interval–For multiaccess and point-to-point segmentsFor multiaccess and point to point segments,this period is 40 seconds. –For NBMA networks, the Dead interval is 120 seconds.If the Dead interval expires before the routers
–If the Dead interval expires before the routersreceive a Hello packet, OSPF will remove that neighbor from its link-state database.
OSPF: Hello Protocol
� To reduce the amount of OSPF traffic onTo reduce the amount of OSPF traffic onmultiaccess networks, OSPF elects a Designated Router (DR) and Backup Designated Router (BDR).g ( )
� Hello protocol packets contain information that is used in electing DR and BDR
The DR is responsible for updating all other–The DR is responsible for updating all otherOSPF routers (called DROthers) when a change occurs in the multiaccess network. –The BDR monitors the DR and takes over asThe BDR monitors the DR and takes over asDR if the current DR fails.
� In the figure, R1, R2, and R3 are connected through point to point links Therefore no More detail discussionthrough point-to-point links. Therefore, noDR/BDR election occurs.
–The DR/BDR election and processes will be discussed in a later topic and the topology will
More detail discussionon the DR, BDR, DROther later. You need to know this for
Introduction to OSPFIntroduction to OSPF� OSPF Authentication
–It is good practice to authenticate transmittedIt is good practice to authenticate transmittedrouting information. –This is an interface specific configurationp g–This practice ensures that routers will only accept routing information from other routers that have been configured with the same password or authenticationconfigured with the same password or authenticationinformation
MD5 authentication k ID th t
Note: Authentication does not encrypt the router's routing table
uses a key ID thatallows the router to reference multiple passwords, making
� Topology used for this chapter –Discontiguous IP addressing scheme–Since OSPF is a classless routing protocol the subnet mask is will be configured as part of ouris will be configured as part of ourOSPF configuration.
–Requires entering:q g•network address•wildcard mask - the inverse of the subnet mask•area-id - area-id refers to the OSPF area OSPF area•area-id - area-id refers to the OSPF area. OSPF areais a group of routers that share link state information
Router(config-router)#network network-address wildcard-ask area area-idRouter(config router)#network network address wildcard ask area area id
Basic OSPF ConfigurationBasic OSPF Configuration� Cisco IOS now properly handles overlapping network ... area configuration commands.
� Consider the following example:g pfw#conf tEnter configuration commands, one per line. End with CNTL/Z.fw(config)#router ospf 100fw(config router)#network 0 0 0 0 255 255 255 255 area 0fw(config-router)#network 0.0.0.0 255.255.255.255 area 0fw(config-router)#network 10.0.0.0 0.0.3.255 area 113:06:57: %OSPF-6-AREACHG: 10.0.0.0 255.255.252.0 changed from area 0 to area 1fw(config-router)#network 10.0.0.0 0.0.0.7 area 213:07:10: %OSPF-6-AREACHG: 10.0.0.0 255.255.255.248 changed from area 1 to area 2fw(config-router)#^Z
� I've entered overlapping network statements, each one with a smaller address range. Not l d IOS d t t th t th l it l i t i l d donly does IOS detect that they overlap, it also prints nice syslog messages and reorders
the commands in the running configuration. Well done !fw#show run | begin router ospfrouter ospf 100plog-adjacency-changesnetwork 10.0.0.0 0.0.0.7 area 2network 10.0.0.0 0.0.3.255 area 1network 0 0 0 0 255 255 255 255 area 0
� Area area id� Area area-id�An OSPF area is a group of routers that share link-state information.� In this chapter, we will configure all of the OSPF routers within a single area. This is known as single-area OSPF. �Multi-area OSPF is covered in CCNP.
B i OSPF C fi tiBasic OSPF Configuration� Router ID
– This is an IP address used to identify a router– 3 criteria for deriving the router ID
1 U IP dd fi d ith OSPF t id d1. Use IP address configured with OSPF router-id command-Takes precedence over loopback and physical interface
addresses2. If router-id command not used then router chooses highest
IP address of any loopback interfaces3 If no loopback interfaces are configured then the highest IP3. If no loopback interfaces are configured then the highest IP
address on any active physical interface is used� The interface does not need to be enabled for OSPF,
meaning that it does not need to be included in one of themeaning that it does not need to be included in one of theOSPF network commands.
� However, the interface must be active - it must be in the up state
(configured)–Highest loopback address will be used as router IDHighest loopback address will be used as router ID–Advantage of using loopback address the loopback interface cannot fail � OSPF stability
� The OSPF router-id commandThe OSPF router id command–Introduced in IOS 12.0–OSPF router-id command, which is a fairly recent addition to IOS, it is more common to find loopback, paddresses used for configuring OSPF router IDs.–Command syntax
U th h i f d t if &� Use the show ip ospf command to verify &trouble shoot OSPF networks:
� Neighbor adjacency�Adjacency indicated by
�The OSPF state of the interface is “full state”full state
�No adjacency indicated by -�Neighboring router’s Router ID is not displayed�A state of full is not displayed
-Consequence of no adjacency-•Neighbor ID - The router ID of the neighboring router.•Pri - The OSPF priority of the interface..St t Th OSPF t t f th i t f FULL t tConsequence of no adjacency
�No link state information exchanged�Inaccurate SPF trees & routing tables
•State - The OSPF state of the interface. FULL statemeans that the router and its neighbor have identical OSPF link-state databases.•Dead Time - The amount of time remaining that the router will wait to receive an OSPF Hello packet from the neighbor before declaring the neighbor down. This value is reset when the interface receives a Hello packet
is reset when the interface receives a Hello packet.•Address - The IP address of the neighbor's interface to which this router is directly connected.•Interface - The interface on which this router has formed adjacency with the neighbor.
Basic OSPF ConfigurationBasic OSPF ConfigurationNote:� On multiaccess networks such as Ethernet,
two routers that are adjacent may have their states displayed as 2WAYstates displayed as 2WAY.
–This will be discussed in a DR and BDR section.
� Two routers may not form an OSPF dj ifadjacency if:
–The subnet masks do not match, causing the routers to be on separate networks. •Neighbor ID - The router ID of the neighboring router.
•Pri - The OSPF priority of the interface..St t Th OSPF t t f th i t f FULL t t
–OSPF Hello or Dead Timers do not match.–OSPF Network Types do not match.
Th i i i i t OSPF
•State - The OSPF state of the interface. FULL statemeans that the router and its neighbor have identical OSPF link-state databases.•Dead Time - The amount of time remaining that the router will wait to receive an OSPF Hello packet from the neighbor before declaring the neighbor down. This value is reset when the interface receives a Hello packet
–There is a missing or incorrect OSPFnetwork command.
is reset when the interface receives a Hello packet.•Address - The IP address of the neighbor's interface to which this router is directly connected.•Interface - The interface on which this router has formed adjacency with the neighbor.
Verifying OSPFVerifying OSPF� Show ip protocols
–OSPF process ID,p ,–the router ID, –networks the router is advertising, –the default administrative distance, 110 for OSPF.
� Show ip ospf–OSPF process ID –router IDrouter ID.–OSPF area information –the last time the SPF algorithm was calculated.
•R1 has participated in during the past 11 and a half hours is to send small Hello packets to its neighbors.
–SPF schedule delay •The router waits 5000 msecs after receiving an LSU before running the SPF algorithm. •There is an additional Hold Time of 10000 msecs between 2 SPF calculations.
–The quickest way to verify Hello and Dead intervals• for OSPF routers to become neighbors, their OSPF Hello and Dead intervals must be identical.
Configuring OSPF loopback address and router priorityConfiguring OSPF loopback address and router priorityThe command show ip ospf interface will display the interface priority value as well as other key information.p y y
OSPF M t iOSPF Metric� OSPF uses cost as the metric for determining the
best routebest route–A cost is associated with the output side of each router interface.
Th l th t th lik l th i t f i–The lower the cost, the more likely the interface isto be used to forward data traffic
� The Cisco IOS uses the cumulative b d idth f th t i i t f fbandwidths of the outgoing interfaces fromthe router to the destination network as the cost value.
C i b d b d id h f i f-Cost is based on bandwidth of an interface�Cost is calculated using the formula
108 / bandwidth-Reference bandwidth
�The 100Mbps (FastEthernet) and higher will have the same OSPF cost of 1.
�This reference bandwidth can be modified using�auto-cost reference-bandwidth command
OSPF MetricOSPF Metric� COST of an OSPF route is the accumulated value from
one router to the destination networkone router to the destination network•For example, in the figure, the routing table on R1 shows 64 + 1 65the routing table on R1 showsa cost of 65 to reach the 10.10.10.0/24 network on R2.
•Because 10.10.10.0/24
64 + 1 = 65
is attached to a FastEthernet interface, R2 assigns the value 1 asthe cost for 10.10.10.0/24. •R1 then adds the additional cost value of 64
d d hto send data across thedefault T1 link between R1 and R2.
OSPF MetricOSPF Metric� Sometimes the actual speed of a link is different than
the default bandwidthThi k it i ti th t th b d idth l fl t–This makes it imperative that the bandwidth value reflects
link’s actual speed�Reason: so routing table has best path information
� The show interface command will display interface’s� The show interface command will display interface sbandwidth
–Most serial link default to 1.544Mbps–However, some serial interfaces may default to 128 kbps.However, some serial interfaces may default to 128 kbps.
OSPF Metric: BandwidthOSPF Metric: Bandwidth� Remember, this bandwidth value
does not actually affect the speed of the link; it is used by some routingthe link; it is used by some routingprotocols to compute the routing metric.
–It is important that the bandwidth l fl t th t l d f thvalue reflect the actual speed of the
link so that the routing table has accurate best path information.
� The figure displays the routing table g p y gfor R1.
–R1 believes that both of its serial interfaces are connected to T1 links,
f th li k i 64 kb li k•one of the links is a 64 kbps link•the other one is a 256 kbps link.
–This results in R1's routing table having two equal-cost paths to thehaving two equal cost paths to the192.168.8.0/30 network, when Serial 0/0/1 is actually the better path.
� The creation of an adjacency between every pair of routers in a network would create an unnecessary numberwould create an unnecessary numberof adjacencies.
–This would lead to an excessive number of LSAs passing betweennumber of LSAs passing betweenrouters on the same network.
•5 routers in the figure will need 10 adjacencies,j ,•10 routers would require 45 adjacencies.•20 routers would require 190
Steps in the operation of OSPF � OSPF routers send Hello packets on OSPF enabled interfaces. � On multi-access networks the routers elect a DR and BDR On these networks other routersOn multi access networks, the routers elect a DR and BDR. On these networks other routers
become adjacent to the DR.
To reduce the number of adjacencies trafficsTo reduce the number of adjacencies each router must form, OSPF calls one of the routers the designated router. A designated router is elected as
f i dj i d h ll h bli hrouters are forming adjacencies, and then all other routers establishadjacencies only with the designated router. This simplifies the routing table update procedure and reduces the number of link-state records in the database. The designated router plays other important roles as well to reduce the overhead of a OSPF link-state procedures. For example, other routers send link-state advertisements it to the designated router only byg y yusing the all-designated-routers multicast address of 224.0.0.6.
•this solution is analogous to electing i th t d d lsomeone in the room to go around and learn
everyone's names and then announce these names to everyone in the room at once.
–DROther• All other routers become DROthers (this indicates a router that is neither the DR or the BDR).DROth l f f ll dj i ith th•DROthers only form full adjacencies with the
DR and BDR in the network.
� DR & BDRO lti t k OSPF l t–On multiaccess networks, OSPF elects a
Designated Router (DR) to be the collection and distribution point for LSAs sent and received. –A Backup Designated Router (BDR) is also
p g ( )elected in case the Designated Router fails. –DR & BDR are elected to send & receive LSA
OSPF i M lti N t kOSPF in Multiaccess Networks� DR & BDR & DROther
–Routers on a multiaccess network elect a DR and BDR.
DR & BDR are elected to send &–DR & BDR are elected to send &receive LSA–DROthers only form full adjacencies with the DR and BDR inadjacencies with the DR and BDR inthe network.
� Sending & Receiving LSASending & Receiving LSA–DRothers send LSAs via multicast 224.0.0.6 to DR & BDR (ALLDRouters - All DR routers)(ALLDRouters All DR routers)–DR forward LSA via multicast address 224.0.0.5 to all other routers (AllSPFRouters - All OSPF routers)
DROthers only form FULL adjacencies with the DR and BDR, but will still form a neighbor adjacency with any DROthers that join the network. When two DROther routers form a neighbor adjacency, the neighbor state is displayed as 2WAY.
You need 4 routers topology to see this “2way” adjacency.
OSPF network types (cont.)
Real DR and BDR election processThe first router up on the network is the DRDR.The second router up on the network is the BDR.If the DR fails then the BDR becomes DRIf the DR fails then the BDR becomes DRand another router is elected the BDR. The DR does not change just because another router comes on line with a highergpriority or a higher router id. If both the existing DR and BDR fail and a new DR must be elected, the router with the highest priority is elected DRthe highest priority is elected DR.If there's a tie, the router with the highest router id is elected DR.
Timing of DR/BDR Election(This is really of how the election works)
� Election occurs as soon as 1st router has its OSPFElection occurs as soon as 1 router has its OSPFenabled on multiaccess network. This can happen when
1 When the routers are powered on1. When the routers are powered-on• it is possible that a router with a lower router ID will become the DR. This could be a lower-end router that took less time to bootrouter that took less time to boot.
2. when the OSPF network command for that interface is configured.
� When a DR is elected it remains as the DR until one of the following occurs
The DR fails-The DR fails.-The OSPF process on the DR fails.-The multiaccess interface on the DR fails.
Timing of DR/BDR Election(This is really of how the election works)
� DR FailsDR Fails–If the DR fails, the BDR assumes the role of DR and an election is held to choose a new BDRBDR.–In the figure, RouterC fails and the former BDR, RouterB, becomes DR. The only otherBDR, RouterB, becomes DR. The only otherrouter available to be BDR is RouterA.
Timing of DR/BDR Election(This is really of how the election works)
� New RouterNew Router–If a new router enters the network after the DR and BDR have been elected, it will
t b th DR th BDR if itnot become the DR or the BDR even if ithas a higher OSPF interface priority or router ID than the current DR or BDR.
•If the current DR fails, the BDR will become the DR, and the new router can be elected the new BDR.can be elected the new BDR.•After the new router becomes the BDR, if the DR fails, then the new
t ill b th DRrouter will become the DR.•The current DR and BDR must both fail before the new router can be
Timing of DR/BDR Election(This is really of how the election works)
� Old DR ReturnsOld DR Returns–A previous DR does not regain DR status if it returns to the network.
•In the figure, RouterC has finished a reboot and becomes a DROther even though its router ID, 192.168.31.33, isthough its router ID, 192.168.31.33, ishigher than the current DR and BDR.
Timing of DR/BDR Election(This is really of how the election works)
� BDR FailsBDR Fails–If the BDR fails, an election is held among the DRothers to see which router
ill b th BDRwill be the new BDR.•In the figure, the BDR router fails. •An election is held between RouterC•An election is held between RouterCand RouterD. •RouterD wins the election with the higher router ID.
Timing of DR/BDR Election(This is really of how the election works)
� New DR FailsNew DR Fails–In the figure, RouterB fails. Because RouterD is the current BDR, it is promoted to DR RouterC becomes the BDRto DR. RouterC becomes the BDR.
� So, how do you make sure that the routers you want to be DR and BDR ywin the election? Without further configurations, the solution is to either:either:
–Boot up the DR first, followed by the BDR, and then boot all other routers, or–Shut down the interface on all routers, followed by a no shutdown on the DR, then the BDR, and then all other routers.
OR: use the priority command set not desired DR and BDR to 0
OSPF in Multiaccess NetworksOSPF in Multiaccess NetworksOSPF Interface Priority� Manipulating the DR/BDR election process continued� Manipulating the DR/BDR election process continued
–Use the ip ospf priority interface command.–Example:Router(config-if)#ip ospf priority {0 - 255}
�Priority number range 0 to 255–0 means the router cannot become the DR or BDR–1 is the default priority value–1 is the default priority value
OSPF in Multiaccess NetworksOSPF in Multiaccess NetworksOSPF Interface Priority� Modify Priority� Modify Priority
–Router(config-if)#ip ospf priority {0 - 255}
� Force ElectionAft d i h td d h td–After doing a shutdown and a no shutdown
on the FastEthernet 0/0 interfaces of all three routers, we see the result of the change of OSPF interface priorities. –The show ip ospf neighbor command on RouterC now shows that RouterA (Router ID 192.168.31.11) is the DR with the highest OSPF interface priority of 200 DRp y–RouterB (Router ID 192.168.31.22) is still the BDR with the next highest OSPF interface priority of 100.
N ti f R t A' t t f h i BDR–Notice from RouterA's output of show ipospf neighbor that it does not show a DR, because RouterA is the actual DR on this network.
The default route in R2 and R3 with the routing source OSPF, but with the additional code, E2. For R2, the route is:
O*E2 0.0.0.0/0 [110/1] via 192.168.10.10, 00:05:34, Serial0/0/1
E2 denotes that this route is an OSPF ExternalE2 denotes that this route is an OSPF ExternalType 2 route. the cost of an E2 route is always the external cost, irrespective of the interior cost to reach that route. (CCNP)
•the default value is equivalent to 100. To increase it to 10GigE speeds you would needincrease it to 10GigE speeds, you would needto change the reference bandwidth to 10000.
R1 Before, the cost to 10.10.10.0/24 is 1172. Aft fi i f b d idth
After configuring a new reference bandwidth,the cost for the same route is now 117287.
More OSPF ConfigurationMore OSPF Configuration
Fine-Tuning OSPF� Modifying OSPF timers
–Reason to modify timers�Faster detection of network failures
–Manually modifying Hello & Dead intervals�Router(config-if)#ip ospf hello-interval secondsR t ( fi if)#i f d d i t l d�Router(config-if)#ip ospf dead-interval seconds
–Point to be made�Hello & Dead intervals must be the same between�Hello & Dead intervals must be the same betweenneighbors
What will be the result of the DR and BDR elections for this single areaWhat will be the result of the DR and BDR elections for this single areaOSPF network? (Choose three.)
HQ ill b DR f 10 4 0 0/16
*. Decision process:
1. Which segment will have election?HQ will be DR for 10.4.0.0/16.
Router A will be DR for 10.4.0.0/16.
HQ will be BDR for 10 4 0 0/16
2. Priority?
3. Router ID (each router will only has 1 ID)?HQ will be BDR for 10.4.0.0/16.
Remote will be BDR for 10.5.0.0/16.3. Highest physical IP address
(include serial interface)?
The End
� Questions?� Questions?
The routers in the diagram are configured as shown The loopback interface onThe routers in the diagram are configured as shown. The loopback interface onrouter R1 is labeled as lo0. All OSPF priorities are set to the default except for Ethernet0 of router R2, which has an OSPF priority of 2. What will be the result of the OSPF DR/BDR elections on the 192.1.1.0 network? (Choose two.)the OSPF DR/BDR elections on the 192.1.1.0 network? (Choose two.)
R1 will be the DR *. Decision process:
1 Which segment will have election?R1 will be the BDR
R2 will be the DR
1. Which segment will have election?
2. Priority?
3. Router ID (each router will only has 1 ID)?R2 will be the BDR