CCNA 2 cap 1

43
INTRODUCTION TO ROUTING AND PACKET FORWARDING CCNA 2 1 ESCUELA POLITÉCNICA NACIONAL

Transcript of CCNA 2 cap 1

1

INTRODUCTION TO ROUTING AND PACKET FORWARDING

CCNA 2

ESCUELA POLITÉCNICA

NACIONAL

2

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

In addition to packet forwarding, a router provides other services as well. To meet the demands on today's networks, routers are also used to:

Ensure 24x7 availability. To help guarantee network reachability, routers use alternate paths in case the primary path fails.

Provide integrated services of data, video, and voice over wired and wireless networks. QoS prioritization of IP packets.

Mitigate the impact of worms, viruses, and other attacks on the network by permitting or denying the forwarding of packets.

3

Routers are computers

Specialized computers that send packets over the data network.They are responsible for interconnecting networks by:

Selecting the best path for a packet to travel andForwarding packets to their destination

Routers are the network centerRouters generally have 2 connections:

WAN connection (Connection to ISP)LAN connection

Routers have many of the same hardware and software components that are found in other computers including:

CPURAMROMOperating System

4

Routers are at the network center

Typical users may be unaware of the presence of numerous routers in their own network or in the Internet.Users expect to be able to access web pages, send e-mails, etc..However, networking professionals know it is the router that is responsible for forwarding packets from network-to-network.A router connects multiple networks.Each network that a router connects to typically requires a separate interface. Interfaces can be LANs and WANs.

5

Routers determine the best path

Routers examine a packet’s destination IP address and determine the best path by enlisting the aid of a routing table.

Routers can connect different data link technologies.The data link encapsulation depends on the type of interface on the router and the type of medium it connects to.

6

Routers determine the best path

7

Router as a computer

Router components and their functionsCPU - Executes operating system instructionsRandom access memory (RAM) - Contains the running configuration file. Stores routing table.

RAM contents lost when power is offRead-only memory (ROM) - Holds diagnostic software used when router is powered up.

Stores the router’s bootstrap program.Non-volatile RAM (NVRAM) - Stores startup configuration.Flash memory - Contains the operating system (Cisco IOS).Interfaces - There exist multiple physical interfaces that are used to connect network.Examples of interface types:

Ethernet / fast Ethernet interfacesSerial interfacesManagement interfaces

8

Internetwork Operati ng System (IOS)

Cisco IOS manages the hardware and software resources of the router.

including memory allocation, processes, security, and file systems.Cisco IOS is a multitasking OS that is integrated with routing, switching, internetworking, and telecommunications functions.

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.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.The command line interface (CLI) is a much more common method of configuring Cisco routers.

9

Router Boot-up process

10

Router Boot-up process

The show version command is used to view information about the router during the bootup process. Information includes:

Platform model numberImage name & IOS versionBootstrap version stored in ROMImage file name & where it was loaded fromNumber & type of interfacesAmount of NVRAMAmount of flashConfiguration register

11

Router Boot-up process

12

Router Managment portsRouters have physical connectors that are used to manage the router.

Are not used for packet forwarding.The most common management port is the console port.

Used to connect 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 initial configuration of the router.

Another management port is the auxiliary port.Not all routers have auxiliary ports.It can be used to attach a modem.

13

Router InterfacesRouter Interface is a physical connector that enables a router to send or receive packets

Each interface connects to a separate networkConsist of socket or jack found on the outside of a routerTypes of router interfaces:

EthernetFastethernetSerialDSLISDNCable

14

Router InterfacesLAN Interfaces:

Are used to connect router to LAN networkHas a layer 2 MAC addressCan be assigned a Layer 3 IP addressUsually consist of an RJ-45 jack

WAN InterfacesAre used to connect routers to external networks that interconnect LANs.Uses a layer 3 IP address

15

Routers and the Network layerA router is considered a Layer 3 device because its primary forwarding decision is based on the information in the Layer 3 IP packet, specifically the destination IP address.This process is known as routing.

The path is determined after a router consults information in the routing table.After router determines the best path, packet is encapsulated into a frameFrame is then placed on network medium in form of Bits

16

Routers operate at Layers 1,2 & 3

A router makes its primary forwarding decision at Layer 3, but it participates in Layer 1 and Layer 2 processes as well.

17

Implementi ng basic adressing schemes

When designing a new network or mapping an existing network you must provide the following information in the form of a document:

Topology drawing that Illustrates physical connectivityAddressing table that provides the following information:

Device nameInterfaces usedIP addresses & Subnet MasksDefault gateway

18

Basic Router Confi gurati on

A basic router configuration should contain the following:Router name - Host name should be uniqueBanner - At a minimum, banner should warn against unauthorized usePasswords - Use strong passwordsInterface 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 be Completed

Verify basic configuration and router operations.Save the changes on a router.

19

Basic Router Confi gurati on

20

Basic Router Confi gurati on

21

Verify basic router confi gurati on

22

Routi ng Table StructuresThe primary function of a router is to forward a packet toward its destination network. Routing table helps in this task.Routing Table is stored in RAM and contains information about:

Directly connected networks – router interfaces activated.Remotely connected networks - this is a network that is not directly connected to a particular router

Can be learned staticaly or dynamicalyDetailed information about the networks include:

Source of informationNetwork address& subnet maskIp address of next-hop router

Show ip route command is used to view a routing table

23

Adding a connected networkEach router interface is a member of a different networkActivated using the no shutdown commandIn order for static and dynamic routes to exist in routing table you must have directly connected networks.

The router cannot send packets out an interface if that interface is not enabled with an IP address and subnet mask

24

Stati c Routi ngRemote networks are added to the routing table either by configuring static routes or enabling a dynamic routing protocol.

Router adds that route to the routing table as long as the exit interface is enabled.

Static routes in the routing table includes:Network address and subnet mask andIP address of next hop router or exit interface

Denoted with the code S in the routing table

When 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

A hub-and-spoke topology consists of a central location (the hub) and multiple branch locations (spokes)Each spoke have only one connection to the hub.

25

Stati c Routi ng

26

Dynamic routi ng protocols

Dynamic routing lets routers to learn dynamically about topology changes.

Without administrator intervention.

Dynamic routing protocolsUsed to add remote networks to a routing tableAre used to discover networksAre used to update and maintain routing tables

RIP, IGRP, EIGRP, OSPF, IS-IS, BGP

Automatic network discoveryRouters are able discover new networks by sharing routing table information.

27

Dynamic Routi ng protocols

Dynamic routing protocols are used to share routing information with other router & to maintain and up date their own routing table.

28

Routi ng table principles

3 principles regarding routing tables:1. Every router makes its decisions alone, based on the information it has in its routing table.2. One router’s information in the routing table may not be the same as another router’s routing table.3. Routing information about a path to a network does not provide information on how to return to the original network.

Effects of the 3 Routing Table Principles1. Packets are forwarded through the network from one router to another, on a hop by hop basis.2. Packets can take path “X” to a destination but return via path “Y” (Asymmetric routing).3. A packet may be able to reach a destination network but not be able to return.

29

Packet fi elds & Frame fi elds

The Internet Protocol specified in RFC 791 defines the IP packet format.The IP packet header has specific fields that contain information about the packet and about the sending and receiving hosts.Fields that are importance for CCNA students:

Version - Version number (4 bits); predominant version is IPv4IP header length - Header length in 32-bit words (4 bits)Precedence and type of service - How handle the datagram (8 bits);

Precedence: the first 3 bitsThis use has been superseded by Differentiated Services Code Point[DSCP], which uses the first 6 bits [last 2 reserved]

Packet length - Total length ( header + data) (16 bits)

30

Packet fi elds & Frame fi elds

Identification - Unique IP datagram value (16 bits)Flags - Controls fragmenting (3 bits)Fragment offset - Supports fragmentation of datagrams to allowdiffering maximum transmission units (MTUs) in the Internet (13 bits)Time to Live (TTL) – # of routers can be traversed by the datagram (8b)Protocol - Upper-layer protocol sending the datagram (8 bits)Header checksum - Integrity check on the header (16 bits)Source IP address - 32-bit source IP address (32 bits)Destination IP address - 32-bit destination IP address (32 bits)IP options - Network testing, debugging, security, and others (0 or 32bits, if any)

31

Frame fi elds

MAC Frames are also divided into fields. They include:Preamble - Seven bytes of alternating 1s and 0s, (synchronize signals)Start-of-frame (SOF) delimiter - 1 byte, beginning of the frameDestination address - 6 byte MAC address of the receiving deviceSource address - 6 byte MAC address of the sending deviceType/length - 2 bytes specifying either

Type of upper layer protocol (Ethernet II frame format)The length of the data field (IEEE 802.3 frame format)

Data and pad - 46 to 1500 bytes of data; zeros used to pad any datapacket less than 46 bytes Frame check sequence (FCS) – 4 bytes used for a cyclical redundacy check to make sure the frame is not corrupted

32

Best Path and MetricDetermining a router's best path involves the evaluation of multiple paths tothe same destination network and selecting the optimum or "shortest" path.

The best path is selected by a routing protocol based on the value or metric.A metric determine the distance to reach a network.The smaller the value of the metric, the better the path.

Some routing protocols can base route selection on multiple metrics, combining them into a single metric.

2 types of metrics used by routing protocols are:Hop count - this is the number ofrouters a packet must travel throughto get to its destinationBandwidth - this is the “speed” of a link also known as the data capacity of a link

33

Best Path and Metric

34

Ecual cost load balancing

Equal cost metric is a condition where a router has multiple paths to the same destination that all have the same metric.

To solve this dilemma, a router will use Equal Cost Load Balancing.•This means the router sends packets over the multiple exit interfaces listed in the routing table.If configured correctly, load balancing can increase the effectiveness and performance of the network.Equal cost load balancing can be configured to use both dynamic routing protocols and static routes.Unequal Cost Load BalancingNote: EIGRP (as well as IGRP) are the onlyrouting protocols that can be configuredfor unequal cost load balancing.

35

Ecual cost load balancing

36

Path determinati onPacket forwarding involves two functions:

Path determination functionSwitching function

Path determination enables a router to evaluate paths to a destination and to establish the preferred way to handle the packet.One of 3 things happens when a router searches a routing table to find a route to destination

Exit interface determined , Directly connected routesNext hop determined, remote routesNo route determined, unknown network, does not in the routing table

37

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 to find best route to destination.Re-encapsulates layer 3 packet into layer 2 frame.Forwards frame out exit interface.

•As a packet travels from one networking device to anotherThe Source and Destination IP addresses NEVER changeThe Source & Destination MAC addresses CHANGE as packet is forwarded from one router to the next.TTL field decrement by one until a value of zero is reached at which point router discards packet (prevents packets from endlessly traversing the network)

38

Switching Functi on

39

Switching Functi on

40

Switching Functi on

41

Switching Functi on

42

Summary•Routers are computers that specialize in sending data over a network.•Routers are composed of:

Hardware i.e. CPU, Memory, System bus, InterfacesSoftware used to direct the routing process

IOSConfiguration file

Routers need to be configured. Basic configuration consists of:Router nameRouter bannerPassword(s)Interface configurations i.e. IP address and subnet mask

•Routing tables contain the following informationDirectly connected networksRemotely connected networksNetwork addresses and subnet masksIP address of next hop address

43

Summary

Routers determine a packets path to its destination by doing the following

Receiving 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 frameand 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.