4 Router as a ComputerData is sent in form of packets between 2 end devicesRouters are used to direct packet to its destinationData posíláme v paketech mezi dvěma koncovými zařízenímiRoutery směrují pakety k jejich cíli

10 Steps in Router InitializationRouter as a ComputerSteps in Router InitializationKde najde co a udělá coOBDOBA V PC:Spustí BIOS, udělá základní kontrolyVyhledá DOS, spustí hoVyhledá konfigurační soubory (config, autoexec) a zařídí se podle nichStep 1 -- The generic bootstrap loader, in ROM, executes on the CPU card. A bootstrap is a simple, preset operation to load instructions that in turn cause other instructions to be loaded into memory, or cause entry into other configuration modes.Step 2 -- The operating system (Cisco IOS) can be found in one of several places. The location is disclosed in the boot field of the configuration register. If the boot field indicates a Flash, or network load, boot system commands in the configuration file indicate the exact location of the image.Step 3 -- The operating system image is loaded. Then, when it is loaded and operational, the operating system locates the hardware and software components and lists the results on the console terminal.Step 4 -- The configuration file saved in NVRAM is loaded into main memory and executed one line at a time. These configuration commands start routing processes, supply addresses for interfaces, set media characteristics, and so on.Step 5 -- If no valid configuration file exists in NVRAM, the operating system executes a question-driven initial configuration routine referred to as the system configuration dialog, also called the setup dialog.

12 Router as a ComputerRouter Interface is a physical connector that enables a router to send or receive packetsEach interface connects to a separate networkConsist of socket or jack found on the outside of a routerTypes of router interfaces:-Ethernet-Fastethernet-Serial-DSL-ISDN-Cable

29 Routing Table StructureAdding a connected network to the routing table-Router interfacesEach router interface is a member of a different networkActivated using the no shutdown commandYou must have directly connected networks

31 Routing Table StructureStatic routesInclude:network address and subnet maskIP address of next hop router or exit interfaceWhen to use static routesWhen network only consists of a few routersNetwork is connected to internet only through one ISPHub & spoke topology is used on a large network

41 Router Paths and Packet SwitchingA Metric is a numerical value used by routing protocols help determine the best path to a destinationThe smaller the metric value the better the path2 types of metrics used by routing protocols are:-Hop count - this is the number of routers a packet must travel through to get to its destination-Bandwidth - this is the “speed” of a link also known as the data capacity of a link

42 Router Paths and Packet SwitchingEqual cost metric is a condition where a router has multiple paths to the same destination that all have the same metricTo solve this dilemma, a router will use Equal Cost Load Balancing. This means the router sends packets over the multiple exit interfaces listed in the routing table.Do cíle existují dvě rovnocenné cesty.Co s tím?Router vyvažuje (balancuje) provoz tak, aby obě cesty byly stejně zatížené.

43 Router Paths and Packet SwitchingPath determination is a process used by a router to pick the best path to a destinationOne of 3 path determinations results from searching for the best pathDirectly connected networkRemote networkNo route determinedHledání nejlepší cesty má tři možné výsledky:Přímo připojená síťVzdálená síťŽádná cesta nenalezena

44 Router Paths and Packet SwitchingSwitching Function of Router is the process used by a router to switch a packet from an incoming interface to an outgoing interface on the same router.-A packet received by a router will do the following:Strips off layer 2 headers.Examines destination IP address located in Layer 3 header to find best route to destination.Re-encapsulates layer 3 packet into layer 2 frame.Forwards frame out exit interface.Dostane frame na jeden interface, a co s ním udělá?Strhne vrchní obal vrstvy 2 s MAC adresami a zahodí ho.Podívá se na IP adresu na paketu a najde k ní nejlepší cestu.Zabalí paket do nového framu s novými MAC adresami.Pošle frame na správný interface.

52 SummaryRouters determine a packet‘s path to its destination by doing the followingReceiving an encapsulated frame & examining destination MAC 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 send it 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.