addressing 1

Upload: somesh-mohan

Post on 07-Apr-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/6/2019 Addressing 1

    1/41

    NUMBER SYSTEM:- Base

    1. Binary - ( 0,1 ) 2

    2. Octal ( 0-7) 8

    3. Decimal (0-9) 10

    4. Hexadecimal (0-9,A,B,C,D,E,F) 16

    IP ADDRESSING:A. The format of an IP address is a 32-bit (four bytes ) numeric address,Each byte of an IP address is known as an octet ,separated by periods("dotteddecimal" notation). Each number can be zero to 255. For example,

    1.160.10.240 could be an IP address.

    B. An IPv4 address is divided into two parts: network and host address. Thenetwork address determines how many of the 32 bits are used for the network

    address, and remaining bits for the host address. The host address can furtherdivided into subnetwork and host number.

    ADDRESSING

    Physical Address

    Hardware add

    MAC add : 48 bits

    2. Logical Address

    1. Software add

    2. IP add: 32 bitsMAC address:

    48 bits represented by 12 digits.

    2. Ex: 00-E0-4C-4D-13-B0

    IP Address: 192.168.1.4

    Subnet Mask: 255.0.0.0Default Gateway: 192.168.1.1

    DNS Server: 192.168.1.1

    WINS Server:

    IP address

    32 bits are divided into four equal partEx : 192.168.1.4

  • 8/6/2019 Addressing 1

    2/41

    CLASSES:

    Class1st OctetDecimalRange

    1st

    OctetHighOrderBits

    Network/HostID (N=Network,

    H=Host)

    DefaultSubnetMask

    Number ofNetworks

    Hosts per

    Network(Usable

    Addresses)

    A 1 126* 0 N.H.H.H 255.0.0.0126 (27

    2)16,777,214

    (224 2)

    B 128 191 10 N.N.H.H 255.255.0.016,382 (214

    2)65,534 (216

    2)

    C 192 223 110 N.N.N.H 255.0.0.02,097,150(221 2)

    254 (28 2)

    D 224 239 1110 Reserved for MulticastingE 240 254 1111 Experimental: used for research

    Note: Class A addresses 127.0.0.0 to 127.255.255.255 cannot be used and isreserved for loop back and diagnostic functions.

    Private IP Addresses

    Class Private Networks Subnet Mask Address Range

    A 10.0.0.0 255.0.0.0 10.0.0.0 - 10.255.255.255

    B 172.16.0.0 - 172.31.0.0 255.240.0.0 172.16.0.0 - 172.31.255.255

    C 192.168.0.0 255.255.0.0 192.168.0.0 - 192.168.255.255

    SUBNET MASK: - A Subnet mask is a 32-bit number that masks an IP address, andDivides the IP address into network address and host address. Subnet Mask is made bysetting network bits to all "1"s and setting host bits to all "0"s

    SUBNETTING: - Subnettingallows you to create multiple logical networks that existwithin a single Class A, B, or C network. If you do not subnet, you are only able to useone network from your Class A, B, or C network, which is unrealistic.In order to subnet a network, extend the natural mask using some of the bits from thehost ID portion of the address to create a subnetwork ID. For example, given a Class Cnetwork of 204.17.5.0 which has a natural mask of 255.0.0.0, you can create subnets inthis manner:204.17.5.0 - 11001100.00010001.00000101.00000000

    255.255.255.224 - 11111111.11111111.11111111.11100000

    --------------------------|sub|----

  • 8/6/2019 Addressing 1

    3/41

    By extending the mask to be 255.255.255.224, you have taken three bits(Indicated by "sub") from the original host portion of the address and used themto make subnets. With these three bits, it is possible to create eight subnets. Withthe remaining five host ID bits, each subnet can have up to 32 host addresses,30 of which can actually be assigned to a device since host ids of all zeros or allones are not allowed(it is very important to remember this). So, with this in mind,

    these subnets have been created

    204.17.5.0 255.255.255.224 host address range 1 to 30

    204.17.5.32 255.255.255.224 host address range 33 to 62

    204.17.5.64 255.255.255.224 host address range 65 to 94

    204.17.5.96 255.255.255.224 host address range 97 to 126

    204.17.5.128 255.255.255.224 host address range 129 to 158

    204.17.5.160 255.255.255.224 host address range 161 to 190

    204.17.5.192 255.255.255.224 host address range 193 to 222

    204.17.5.224 255.255.255.224 host address range 225 to 254

    Note:There are two ways to denote these masks.

    1-since you are using three bits more than the "natural" Class C mask, you candenote these addresses as having a 3-bit subnet mask.

    2- This second method is used with CIDR. Using this method, one of thesenetworks can be described with the notation prefix/length. For example,204.17.5.32/27 denotes the network 204.17.5.32 255.255.255.224

    The network subnetting scheme in this section allows for eight subnets, and the networkmight appear as:

    Figure 1

    VLSM Example

    http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800a67f5.shtml#cidr%23cidrhttp://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800a67f5.shtml#cidr%23cidr
  • 8/6/2019 Addressing 1

    4/41

    In all of the previous examples of subnetting, notice that the same subnet mask wasapplied for all the subnets. This means that each subnet has the same number ofavailable host addresses. You can need this in some cases, but, in most cases, havingthe same subnet mask for all subnets ends up wasting address space. For example, inthe Sample Exercise 2 section, a class C network was split into eight equal-size subnets;however, each subnet did not utilize all available host addresses, which results in

    wasted address space. Figure 2 illustrates this wasted address space.

    Figure 2

    Figure 2 illustrates that of the subnets that are being used; NetA, NetC, and NetD have alot of unused host address space. It is possible that this was a deliberate design

    accounting for future growth, but in many cases this is just wasted address space due tothe fact that the same subnet mask is being used for all the subnets.

    Variable Length Subnet Masks (VLSM) allows you to use different masks for eachsubnet, thereby using address space efficiently.

  • 8/6/2019 Addressing 1

    5/41

    VLSM Example

    Given the same network and requirements as in Sample Exercise 2develops a

    subnetting scheme with the use of VLSM, given:

    netA: must support 14 hostsnetB: must support 28 hostsnetC: must support 2 hostsnetD: must support 7 hostsnetE: must support 28 host

    Determine what mask allows the required number of hosts.

    netA: requires a /28 (255.255.255.240) mask to support 14 hostsnetB: requires a /27 (255.255.255.224) mask to support 28 hosts

    netC: requires a /30 (255.255.255.252) mask to support 2 hostsnetD*: requires a /28 (255.255.255.240) mask to support 7 hostsnetE: requires a /27 (255.255.255.224) mask to support 28 hosts

    * a/29 (255.255.255.248) would only allow 6 usable host addressestherefore netD requires a /28 mask.

    The easiest way to assign the subnets is to assign the largest first. For example, you canassign in this manner:

    netB: 204.15.5.0/27 host address range 1 to 30netE: 204.15.5.32/27 host address range 33 to 62

    netA: 204.15.5.64/28 host address range 65 to 78netD: 204.15.5.80/28 host address range 81 to 94netC: 204.15.5.96/30 host address range 97 to 98

    This can be graphically represented as shown in Figure 3:

    Figure 3

    http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800a67f5.shtml#ex2%23ex2http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800a67f5.shtml#ex2%23ex2http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800a67f5.shtml#ex2%23ex2
  • 8/6/2019 Addressing 1

    6/41

    Figure 3 illustrates how using VLSM helped save more than half of the address space.

    Open System Interconnection Reference Model:-

    The Open System Interconnection(OSI)reference modeldescribes how informationfrom a software application in one computer moves through a network medium to asoftware application in another computer. The OSI reference model is a conceptualmodel composed of seven layers, each specifying particular network functions. Themodel was developed by the International Organization for Standardization (ISO) in1984. Each layer is reasonably self-contained so that the tasks assigned to each layercan be implemented independently.

  • 8/6/2019 Addressing 1

    7/41

    The following list details the seven layers of the Open System Interconnection (OSI) referencemodel:

    OSL Layer

    Data Unit Layer Function Devices / Protocol /Format

    Host

    layers

    Data

    7. Application Network process to application http, telnet, ftp

    6.

    Presentation

    Data translation, encryption

    ,decryptionJpeg, mpeg, ASCII (fileformat)

    5. Session Interhost communication SQL, NFS, RPC

    Medialayers

    Segments 4.Transport End-to-end connections andreliability, Flow control

    TCP /UDP

    Packet 3.Network Path determination and logicaladdressing

    IP, IPX, Routers, RoutingProtocols

    Frame 2. Data Link Physical addressing X.25, ATM ,Frame-relay

    Bit 1. Physical Media, signal and binary transmission Hubs, FDDI Hardware, Fas

    Ethernet, Token RingHardware

    OSI LAYER TCP/IP MODEL

    APPLICATON LAYER APPLICATON LAYER

    PRESENTATON LAYER

    SESSION LAYER

    TRANSPORT LAYER HOST-to-HOST

    NETWORK LAYER INTERNAT LAYER

    DATA LAYER NETWORK ACCESS LAYER PHYSICAL LAYER

    ROUTER / SWITCH / HUB

    ROUTER:-

    1. Routers are physical devices that join multiple networks.

    2. The router operates at the Network layer of the OSI model.

    3. by maintaining configuration information in a piece of storage called the routing table,routers also have the ability to filter traffic, either incoming or outgoing, based on theIP addresses of senders and receivers

    4. It as multiple collisions and multiple broadcast domains.

    SWITCH:-

    http://en.wikipedia.org/wiki/Application_Layerhttp://en.wikipedia.org/wiki/Presentation_Layerhttp://en.wikipedia.org/wiki/Session_Layerhttp://en.wikipedia.org/wiki/Transport_Layerhttp://en.wikipedia.org/wiki/Transport_Layerhttp://en.wikipedia.org/wiki/Network_Layerhttp://en.wikipedia.org/wiki/Logical_addresshttp://en.wikipedia.org/wiki/Logical_addresshttp://en.wikipedia.org/wiki/Data_Link_Layerhttp://en.wikipedia.org/wiki/Physical_Layerhttp://en.wikipedia.org/wiki/Application_Layerhttp://en.wikipedia.org/wiki/Presentation_Layerhttp://en.wikipedia.org/wiki/Session_Layerhttp://en.wikipedia.org/wiki/Transport_Layerhttp://en.wikipedia.org/wiki/Network_Layerhttp://en.wikipedia.org/wiki/Logical_addresshttp://en.wikipedia.org/wiki/Logical_addresshttp://en.wikipedia.org/wiki/Data_Link_Layerhttp://en.wikipedia.org/wiki/Physical_Layer
  • 8/6/2019 Addressing 1

    8/41

    1. The switch operates at the Data Link layer of the OSI model.

    2. It as single broadcast and multiple collision domain.

    3. It as processor and memory

    4. It understand MAC address

    5. It creates MAC table and after creating Mac table can send packet directly todestination

    HUB:-

    1. The Hub operates at the Physical layer of the OSI model.

    2 It as single broadcast and single collision domain.

    3 It as no processor and no memory.

    4 It simply forwards the packet.

    ROUTER BOOTING SEQUENCE:-

    When a router boots up, it performs a series of steps, called the boot sequence, to test the hardware and

    load the necessary software. The boot sequence consists of the following steps:

    1. The router performs a POST. The POST tests the hardware to verify that allcomponents of the device are operational and present. For example, the POST checks for the different

    interfaces on the router. The POST is stored in and run from ROM (read-only memory).

    2. The bootstrap looks for and loads the Cisco IOS software. Thebootstrap is a program in ROM that is used to execute programs. The bootstrap program is responsible for

    finding where each IOS program is located and then loading the file. By default, the IOS software is

    loaded from flash memory in all Cisco routers.

    3. The IOS software looks for a valid configuration file stored in

    NVRAM. This file is called startup-config and is only there if an administrator copies the running-config file into NVRAM.

    4. If a startup-config file is in NVRAM, the router will load and run this file. Therouter is now operational. If a startup-config file is not in NVRAM, the router will start the setup-mode

    configuration upon bootup.

    This above is the step before your router working and up to work follow your configurations on it.

    MODE OF ROUTER:-

  • 8/6/2019 Addressing 1

    9/41

    ROUTER PASSWORD COMMANDS:-

    1. Set the password for privileged mode:-Router (config) # enable password (sets plain text password)

    Router (config) # enable Secret (sets encrypted password byMD5)

    2. Set the password for console access:-Router (config) #line console 0Router (config-line) #loginRouter (config-line) #password

    3. Set password for virtual terminal (telnet) access (password must be set to access routerthrough telnet):Router(config) #line vty 0 4Router (config-line) #login

    Router (config-line) #password

    4. Set password for auxiliary (modem) access:Router (config)#line aux 0Router (config-line)#loginRouter (config-line)#password

    Connecting a Modem to the Console Port

  • 8/6/2019 Addressing 1

    10/41

    Connecting a Modem to the Auxiliary Port

    Rollover Cable

  • 8/6/2019 Addressing 1

    11/41

    .

  • 8/6/2019 Addressing 1

    12/41

    ROUTING PRINCIPLES: - Routers must be aware of destination network to be ableto forward packet to them. A router knows about the network directly attached to itsinterface; it calculates the subnet or network number of an interface by using theaddress and subnet mask configured on that interfaces. However, the router must relyon outside information. A router can be made aware of remote network in two ways: Anadministrator can manually configured the information (static routing), or a router canlearn from other router (dynamic routing). A routing table can contain both static and

    dynamic recognized routes.

    Network administrator can use static routing, dynamic routing, or a combination of both.

    Differences between a routing protocol and routed protocol:-

    Routing protocol: -A routing protocol is used by routers to dynamically find all thenetwork in the internetwork and to ensure that all routers have the same routing table. Arouting protocol determines the path of a packet through an internetwork.Example: RIP, RIPv2, EIGRP and OSPF

    Routed protocol: - A routed protocol can be used to send user data (packet) through

    the established enterprise. Routed protocols are assigned to an interface and determinethe method of delivery.Example: IP and IPv6

    There are three type of routing:-

    1. Static Routing2. Default Routing3. Dynamic Routing

  • 8/6/2019 Addressing 1

    13/41

    1. STATIC ROUTING: - Static routing occurs when you manually add routes ineach router's routing table. Static routes are routes that are administrativelyconfigured in routers. They are typically used when dynamic protocols are eitherunnecessary or unwanted.

    Static routing has following benefits:-

    1. There is no overhead on the routers CPU.

    2. There is no bandwidth usage between routers, which mean u could

    possibly save money on WAN links.

    Static routing has following disadvantages:-

    1. The administrator must really understand the internet work and how each router isconnected in order to configure routes properly.

    2. If a network is added to internet work, the administrator has to add a route to it onall routers.

    The syntax for the global configuration command used to enter a static route is: ip route

    {destination prefix} {destination prefix mask} {interface OR forwarding routers IP

    address} {distance}

    The network's configuration is as follows:

    Router Interface Addresses Network to Next Hop Router

    Router1E0 - 20.0.0.1 /8S0 - 10.0.0.1 /8

    Router1 to Router210.0.0.1/8

  • 8/6/2019 Addressing 1

    14/41

    Router2E0 - 30.0.0.1 /8S0 - 10.0.0.2 /8S1 - 40.0.0.1 /8

    Router2 to Router110.0.0.2/8Router2 to Router350.0.0.0.1/8

    Router3

    E0 - 50.0.0.1/8

    S1 40.0.0.2 /8

    Router3 to Router2

    40.0.0.2/8

    Router1Router1> enableRouter1# configure terminalEnter configuration commands, one per line. End with CNTL/Z.

    Router1 (config) # interface e0Router1 (config-if) # ip address 20.0.0.1 255.0.0.0Router1 (config-if) # no shutdownRouter1 (config-if) # exit

    Router1 (config-if) # interface s0

    Router1 (config-if) # ip address 10.0.0.1 255.0.0.0Router1 (config-if) # no shutdownRouter1 (config-if) # exit

    Router1 (config) # ip route 30.0.0.0 255.0.0.0 10.0.0.2Router1 (config) # ip route 50.0.0.0 255.0.0.0 10.0.0.2Router1 (config) # ip route 50.0.0.0 255.0.0.0 10.0.0.2

    Router1 (config) # sh ip route

    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

    i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static route

    Gateway of last resort is not set

    S 50.0.0.0/8 [1/0] via 10.0.0.2S 40.0.0.0/8 [1/0] via 10.0.0.2S 30.0.0.0/8 [1/0] via 10.0.0.2C 20.0.0.0/8 is directly connected, Serial 0C 10.0.0.0/8 is directly connected, Ethernet 0

    Router2Router2> enableRouter2# configure terminalEnter configuration commands, one per line. End with CNTL/Z.

    Router2 (config) # interface E0Router2 (config-if) # ip address 30.0.0.1 255.0.0.0Router2 (config-if) # no shutdown

    Router2 (config-if) # interface s0

  • 8/6/2019 Addressing 1

    15/41

    Router2 (config-if) # ip address 10.0.0.2 255.0.0.0Router2 (config-if) # no shutdown

    Router2 (config-if) # interface s1Router2 (config-if) # ip address 40.0.0.1 255.0.0.0Router2 (config-if) # no shutdownRouter2 (config-if) # exit

    Router2 (config) # ip route 20.0.0.0 255.0.0.0 10.0.0.1Router2 (config) # ip route 50.0.0.0 255.0.0.0 40.0.0.2

    Router3Router3> enableRouter3# configure terminalEnter configuration commands, one per line. End with CNTL/Z.

    Router3 (config) # interface E0Router3 (config-if) # ip address 50.0.0.1 255.0.0.0Router3 (config-if) # no shutdownRouter3 (config-if) # exit

    Router3 (config-if) # interface s0Router3 (config-if) # ip address 40.0.0.2 255.0.0.0Router3 (config-if) # no shutdownRouter3 (config-if) # exit

    Router3 (config) # ip route 20.0.0.0 255.0.0.0 40.0.0.1Router3 (config) # ip route 30.0.0.0 255.0.0.0 40.0.0.1Router3 (config) # ip route 10.0.0.0 255.0.0.0 40.0.0.1

    Viewing the routing table

    You can use the show ip route command to view the router's routing table.

    Router3#show ip route

    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate defaultU - per-user static route, o - ODR

    Gateway of last resort is not set

    s 10.0.0.0 [1/0] via 40.0.0.1, 00:00:04, Serial1s 30.0.0.0 [1/0] via 40.0.0.1, 00:00:04, Serial1s 20.0.0.0 [1/0] via 40.0.0.1, 00:00:04, Serial1C 40.0.0.0 is directly connected, Serial1C 50.0.0.0 is directly connected, Ethernet0

  • 8/6/2019 Addressing 1

    16/41

    2. DEFAULT ROUTING: - Default routing use to send packets with a remotedestination network not in the routing table to the next-hop router. You can onlyuse default routing on stub networks-those with only one exit path out of thenetwork.

    The network's configuration is as follows:

    Router Interface Addresses Network to Next Hop Router

    Router1E0 - 20.0.0.1 /8S0 - 10.0.0.1 /8

    Router1 to Router210.0.0.0/8

    Router2E0 - 30.0.0.1 /8S0 - 10.0.0.2 /8S1 - 40.0.0.1 /8

    Router2 to Router110.0.0.0/8Router2 to Router340.0.0.0/8

    Router3E0 - 50.0.0.1 /8

    S1 - 40.0.0.2 /8

    Router3 to Router2

    40.0.0.0/8

    Router1Router1> enableRouter1# configure terminalEnter configuration commands, one per line. End with CNTL/Z.

    Router1 (config) # interface E0Router1 (config-if) # ip address 20.0.0.1 255.0.0.0Router1 (config-if) # no shutdown

    Router1 (config-if) # interface s0Router1 (config-if) # ip address 10.0.0.1 255.0.0.0Router1 (config-if) # no shutdownRouter1 (config-if) # exit

    Router1 (config) # ip route 0.0.0.0 0.0.0.0 10.0.0.2

    Router2Router2> enableRouter2# configure terminal

  • 8/6/2019 Addressing 1

    17/41

    Enter configuration commands, one per line. End with CNTL/Z.

    Router2 (config) # interface E0Router2 (config-if) # ip address 30.0.0.1 255.0.0.0Router2 (config-if) # no shutdown

    Router2 (config-if) # interface s0Router2 (config-if) # ip address 10.0.0.2 255.0.0.0Router2 (config-if) # no shutdown

    Router2 (config-if) # interface s1Router2 (config-if) # ip address 40.0.0.1 255.0.0.0Router2 (config-if) # no shutdownRouter2 (config-if) # exit

    Router2 (config) # ip route 10.0.0.0 255.0.0.0 10.0.0.1Router2 (config) # ip route 50.0.0.0 255.0.0.0 40.0.0.2

    Router3Router3> enableRouter3# configure terminalEnter configuration commands, one per line. End with CNTL/Z.

    Router3 (config) # interface E0Router3 (config-if) # ip address 50.0.0.1 255.0.0.0Router3 (config-if) # no shutdownRouter3 (config-if) # exit

    Router3 (config-if) # interface s0Router3 (config-if) # ip address 40.0.0.2 255.0.0.0Router3 (config-if) # no shutdownRouter3 (config-if) # exit

    Router3 (config) # ip route 0.0.0.0 0.0.0.0 40.0.0.1

    Viewing the routing table

    You can use the show ip route command to view the router's routing table.

    Router3#show ip route

    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

    i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate defaultU - per-user static route, o - ODR

    Gateway of last resort is 40.0.0.1 to network 0.0.0.0

    s* 0.0.0.0 [1/0] via 40.0.0.1, 00:00:04, Serial1C 40.0.0.0 is directly connected, Serial1C 50.0.0.0 is directly connected, Ethernet0

  • 8/6/2019 Addressing 1

    18/41

    3. Dynamic Routing: - Dynamic routing is the process of using protocols to find andupdate routing tables on routers and to maintain a loop-free, single path to eachnetwork. This is easier than using static routing but it will cost u in terms of routerCPU processes and bandwidth on the network links

    Comparison: - Static Routing and Dynamic Routing

    Static routing and Dynamic Routing the router learns about remote networks fromneighbor routers or from an administrator. The router then builds a routing table thatdescribes how to find the remote networks. If the network is directly connected then therouter already knows how to get to the network. If the networks are not attached, therouter must learn how to get to the remote network with either static routing(administrator manually enters the routes in the router's table) or dynamic routing therouters then update each other about all the networks they know. If a change occurs e.g.a router goes down, the dynamic routing protocols automatically inform all routers aboutthe change. If static routing is used, then the administrator has to update all changes intoall routers and therefore no routing protocol is used.

    Static routing and Dynamic Routing Only Dynamic routing uses routing protocols, whichenable routers to: Dynamically discover and maintain routes Calculate routes Distributerouting updates to other routers Reach agreement with other routers about the networktopology statically programmed routers are unable to discover routes, or send routinginformation to other routers. They send data over routes defined by the networkAdministrator.

    Two types of routing protocols used in internetworks:-

    1. IGP: - IGP routing protocol are used to exchange routing information with routers inthe same autonomous system (AS). An AS is a collection of network under acommon administrative domain.

    IGP fall into three categories:

    Distance Vector Protocols: - The distance-vector protocols find the best path to aremote network by judging distance. Distance can be hops or a combination ofmetrics calculated to represent a distance value.The IP Distance Vector routingprotocols still in use today are:RIP, IGRP. they send the entire table to directlyconnected neighbors.

    Link State Protocols: - Link state protocol also called shortest path first protocol,the router each create three separate tables. One of these tables keep track ofdirectly attached neighbors. One determined the topology of entire internetwork, andone is used as routing tables. Link state protocols know more about the internetworkthen any distance vector routing protocol. Examples: - OSPF IS-IS

    Hybrid: - Hybrid protocols use aspects of both distance vector and link state for.Example, EIGRP

  • 8/6/2019 Addressing 1

    19/41

    2. EGP: - EGP's are used to communicate between AS. BGP is an example of EGP.Path vector

    CLASS FULL AND CLASS LESS ROUTING PROTOCOLS:-

    1. CLASS FULL: - The protocol which does not send the subnets mask informationwith routing updates. Example: RIPv1, IGRP

    2. CLASS LESS: - The protocol which sends the subnets mask information with routingupdates in the from of CIDR. Example: RIPv2, OSPF, EIGRP

    AD VALUE: - A numerical value between 0 and 255 (inclusive) associated with eachroute based on how the router learned the route. When a router learns more than oneroute to reach a subnet, using multiple ways to learn routes, the router chooses the routewith lowest administrator time distance.

    METRIC VALUE: - A metric is a value (such as path length) that routing protocol useto measure path to a destination. But different routing protocols base their metric ondifferent measurements, including hop count, interface speed, or more complex metric.Most routing protocols maintain database containing all network that the routing protocolrecognizes and all the path to each network.

    Protocol AD Value Metric Value

    Connected

    interface

    0 0

    Static route out

    an interface

    0

    Static route toa next hop add

    1 0

    Rip V1, V2 120 Hop count

    OSPF 110 Cost

    IGRP 100 Composite

    EIGRP 90 for Internal Route Composite

    170 for External Route Composite

    5 for Summary Route

    BGP 20 for External (EBGP) Attributes

    200 for Internal (IBGP) Attributes

    IS-IS 115 Cost

    ODR 160

  • 8/6/2019 Addressing 1

    20/41

    Unknown 255

    RIP (Routing Information Protocol):-

    1. RIP is a true distance vector routing protocol.2. It sends the complete routing table out to all other active interfaces every 30

    seconds.

    3. RIP uses Hop Count as it's only metric.4. The maximum number of hops in a RIP network is 15, one hop is a directly

    connected network, and 16 hops is an unreachable network.

    5. RIP v1 uses only classful routing. RIP v2 uses classless routing .6. RIP works well in small internet works, but is inefficient for large networks.7. It is slow to converge and forces routers to learn network information only from

    neighbors

    8. Routing Loop Prevention:-Unless a remedy is provided inherently by the protocol, a routing loop might easily occurin a mesh network (a network allowing multiple paths between destinations). A routingloop disallows some packets from being properly routed due to the incorrect routinginformation circulating in the network. The symptom of such a routing loop is counting toinfinity (see Figure 3): while routing updates on an unreachable network are incorrectlyreplaced by the older routing information, the metric when passed from router to routergradually increases. Unless some limit is put onto the metric indicating that the networkis unreachable (for IP RIP it is 16 hops), the routing loop will be infinite.

    Starting point -- routers converged

  • 8/6/2019 Addressing 1

    21/41

    Network 10.4.0.0 detected down by router C

    Router B advertises its old information about 10.4.0.0

    Incorrect routing information causes routing loops

  • 8/6/2019 Addressing 1

    22/41

    Figure 3. Routing Loop Creation

    Three modifications to the distance vector protocol have been developed in an attemptto reduce the chance of routing loops:

    SPLIT HORIZON: - Prevents loops between adjacent routers. Rule: Never advertise a

    route out of the interface through which you learned it!

    ROUTE POISONING: -Usually used in conjunction with split horizon, routepoisoning involves explicitly poisoning a routing table entry for an unreachablenetwork. In our example, once Router learned that network 172.16.0.0 wasunavailable it would have immediately poisoned the route to that network bysetting its hop count to the routing protocols infinity value. In the case of RIP,that would mean a hop count of 16.

    HOLDDOWN TIMER: -Prevents incorrect route information from enteringrouting tables. Rule: After a route is advertised as down, do not listen to routing

    updates on that route for a specific period of time

    9. RIP uses four different kinds of timers to regulate its performance:

    a. Update timer 30secb. Invalid timer 180secc. Holddown timer 180secd. Flush timer 240sec (set the time between a route becoming invalid and its removal

    from the routing table.

    Using the sample network below, we'll enable RIP routing for the network.

    The network's configuration is as follows:

    Router Interface Addresses Network to Next Hop Router

    Router1E0 - 20.0.0.1 /8S0 - 10.0.0.1 /8

    Router1 to Router210.0.0.0/8

  • 8/6/2019 Addressing 1

    23/41

    Router2E0 - 30.0.0.1 /8S0 - 10.0.0.2 /8S1 - 40.0.0.1 /8

    Router2 to Router110.0.0.0/8Router2 to Router340.0.0.0/8

    Router3

    E0 - 50.0.0.1 /8

    S1 - 40.0.0.2 /8

    Router3 to Router2

    40.0.0.0/8

    Router1Router1> enableRouter1# configure terminalEnter configuration commands, one per line. End with CNTL/Z.

    Router1 (config) # interface E0Router1 (config-if) # ip address 20.0.0.1 255.0.0.0Router1 (config-if) # no shutdownRouter1 (config-if) # exit

    Router1 (config-if) # interface s0

    Router1 (config-if) # ip address 10.0.0.1 255.0.0.0Router1 (config-if) # no shutdownRouter1 (config-if) # exit

    Router1 (config) # router ripRouter1 (config-router) # network 10.0.0.0Router1 (config-router) # network 20.0.0.0Router1 (config-router) # exit

    Router2Router2> enableRouter2# configure terminalEnter configuration commands, one per line. End with CNTL/Z.

    Router2 (config) # interface E0Router2 (config-if) # ip address 30.0.0.1 255.0.0.0Router2 (config-if) # no shutdown

    Router2 (config-if) # interface s0Router2 (config-if) # ip address 10.0.0.2 255.0.0.0Router2 (config-if) # no shutdown

    Router2 (config-if) # interface s1Router2 (config-if) # ip address 40.0.0.1 255.0.0.0Router2 (config-if) # no shutdownRouter2 (config-if) # exit

    Router2 (config) # router rip

    Router2 (config-router) # network 30.0.0.0Router2 (config-router) # network 10.0.0.0Router2 (config-router) # network 40.0.0.0Router2 (config-router) # exit

    Router3Router3> enableRouter3# configure terminalEnter configuration commands, one per line. End with CNTL/Z.

  • 8/6/2019 Addressing 1

    24/41

    Router3 (config) # interface E0Router3 (config-if) # ip address 50.0.0.1 255.0.0.0Router3 (config-if) # no shutdown

    Router3 (config-if) # interface s0Router3 (config-if) # ip address 40.0.0.2 255.0.0.0Router3 (config-if) # no shutdownRouter3 (config-if) # exit

    Router3 (config) # router ripRouter3 (config-router) # network 50.0.0.0Router3 (config-router) # network 40.0.0.0Router3 (config-router) # exit

    Viewing the routing table

    You can use the show ip route command to view the router's routing table.

    Router3#show ip route

    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate defaultU - per-user static route, o - ODR

    Gateway of last resort is not set

    R 10.0.0.0/8 [120/1] via 40.0.0.1, 00:00:14, Serial1R 20.0.0.0/8 [120/2] via 40.0.0.1, 00:00:14, Serial1R 30.0.0.0/8 [120/1] via 40.0.0.1, 00:00:14, Serial1C 40.0.0.0/8 is directly connected, Serial1C 50.0.0.0/8 is directly connected, FastEthernet0

    Stopping RIP Propagation:-

    Use thepassive-interface command to stop RIP broadcasts from going out an

    interface. The interface will still receive RIP updates, but it won't send them on the network thatthe interface is connected to.

    Router3 (config) # router ripRouter3 (config-router) # passive-interface serial 1

    IGRP (INTERIOR GETWAY ROUTING PORTOCOL):-

    1. IGRP is a true distance vector routing protocol.

    2. It is a Cisco proprietary protocol.

  • 8/6/2019 Addressing 1

    25/41

    3. IGRP supports multiple metrics for each route, includingbandwidth, delay, load,MTU, and reliability.

    4. IGRP is considered a classful routing protocol

    5. The maximum hop count of IGRP-routed packets is 255 (default 100),

    6. IGRP uses bandwidth and delay of the line by default as metric for determining thebest route to an internetwork.

    7.The AS number parameter specifies the autonomous system number that issupported by this IGRP.The AS number can be between 1 and 65,535.

    8. To control performance IGRP uses different kind of timers:

    a. Update Timers specifies how frequently IGRP routing messages will be sent. Thedefault is90 seconds.

    b.Invalid Timer specifies how long a router should wait in the absence of a routing-update message of a specific route before declaring it invalid. {3*90=270 seconds}

    c.Holddown Timer specifies the holddown period. The default is three times the updatetimer plus 10 seconds,280 seconds.

    d.Flush Timer indicates how much time should pass before an IGRP route is flushedfrom the routing table. {7*90=630}

    Creating the IGRP Routing Process

    To create the IGRP routing process, use the following commands beginning in global configurationmode:

    Command Purpose

    Step 1 Router(config)# router igrp as-number

    Enables an IGRP routing process,which places you in router configurationmode.

    Step 2 Router(config-router)# networknetwork-number

    Associates networks with an IGRProuting process.

    IGRP sends updates to the interfaces in the specified networks. If the network of an interface is notspecified, the interface will not be advertised in any IGRP update.

    It is not necessary to have a registered autonomous system number to use IGRP. If you do not have aregistered number, you are free to create your own. We recommend that if you do have a registerednumber, you use it to identify the IGRP process.

    http://en.wikipedia.org/wiki/Bandwidth_(computing)http://en.wikipedia.org/wiki/Bandwidth_(computing)http://en.wikipedia.org/wiki/Delayhttp://en.wikipedia.org/wiki/Load_(computing)http://en.wikipedia.org/wiki/Maximum_transmission_unithttp://en.wikipedia.org/wiki/Reliability_(computer_networking)http://en.wikipedia.org/wiki/Classful_networkhttp://en.wikipedia.org/wiki/Bandwidth_(computing)http://en.wikipedia.org/wiki/Delayhttp://en.wikipedia.org/wiki/Load_(computing)http://en.wikipedia.org/wiki/Maximum_transmission_unithttp://en.wikipedia.org/wiki/Reliability_(computer_networking)http://en.wikipedia.org/wiki/Classful_network
  • 8/6/2019 Addressing 1

    26/41

    OSPF (OPEN SHORTEST PATH FIRST):-Features can be broken into 3 main categories: Neighbor Discovery, Database

    exchange, and Route Calculation.OSPF routers first form a neighbor relationship that builds a foundation for all continuingOSPF communication. Then the neighbor routers exchange the contents of their LSDBs(Link-State Database), called database exchange. Last, as soon as the routers have thetopology information in their LSDBs, they use Dijkstra Shortest Path First algorithm tocalculate the new best routes, and adds them to the routing table. It supports VLSM/CIDR.

    1 The OSPF Hello process defines how neighbors can be dynamically discovered.(Knows when the neighbor is healthy, when the connection has been lost, and tells the

    router when to recalculate the routing table to reconverge the new routes.

    2OSPF does checks of the information in the Hello messages to ensure the 2 routersshould become neighbors

    3 OSPF neighbor discovery: neighbors check and verify basic OSPF settings before

    exchanging routing info:

    OSPF neighbor states: - OSPF creates adjacencies between neighboring routers forthe purpose of exchanging routing information. Not every neighbor becomes adjacent ina broadcast environment. The Hello protocol is responsible for establishing andmaintaining an adjacency. The hello packets contain various parameters. Some of them should matchbetween neighboring routers. These include:

    A Hello and Dead intervals

    B Area ID

    C Authentication type and password

    D Stub Area flag

    E Subnet ID and Subnet mask

    A router can be in several neighbor states:

    1 Down R1 and R2 are running OSPF. A known neighbor is no longer reachable,often because of an underlying interface failure.

    2. Init An interim state in which a Hello has been heard from the neighbor, but thathello does not list the routers RID as having been seen yet.

    3. Two-way The neighbor has sent a Hello that lists the local routers RID in the listof seen routers, also implying that neighbor verification checks all passed.

    4. Full This state means that the complete information has been exchangedbetween OSPF neigh-bors. R1 and R2 have exchanged their entire database

    information and are in the Full state.

  • 8/6/2019 Addressing 1

    27/41

    OSPF RIDs (ROUTER IDs) are 32-bit numbers written in dotted decimal. They areused to uniquely ID each router.

    Hellos are sent based on their Hello timer settings

    The hello message follows the IP packet header, with IP packet protocol type 89. Hello packets are sent to multicast IP address 224.0.0.5 OSPF routers listen for packets sent to IP multicast address 224.0.0.5, in part

    hoping to receive Hello packets and learn about new neighbors

    Hello messages include the sending RID, Area ID, Hello Interval, dead interval, routerpriority, and the RID of the designated router, the RID of the backup designated router,and a list of neighbors that the sending router already knows.

    Potential problems becoming a neighbor (If any of these are different, the routersdo not become neighbors).

    Subnet mask used on the subnet Subnet number (as derived using the subnet mask and each routers interface IP

    address) Hello interval Dead interval OSPF area ID Must pass authentication checks (if used) Value of the stub area flag

  • 8/6/2019 Addressing 1

    28/41

    4.OSPF Topology Database Exchange

    1. Based on the OSPF interface type, the routers may or may not collectively elect aDesignated Router (DR) and Backup Designated Router (BDR).

    2. For each pair of routers that need to become fully adjacent, mutually exchange thecontents of their respective LSDBs

    3. When completed, the neighbors monitor for changes and periodically reflood LSAswhile in the Full (fully adjacent) neighbor state.

    When a DR is required, the neighboring routers hold an election. To elect a DR, theneighboring routers look at two fields inside the Hello packets they receive and choosethe DR based on the following criteria:

    The router sending the Hello with the highest OSPF priority setting becomes theDR

    If two or more routers tie with the highest priority setting, the routers sending theHello wither highestRID wins.

    Its not always the case, but typically the router with the second-highest prioritybecomes the BDR.

    A priority setting of 0 means that the router does not participate in the electionand can never become the DR or BDR

    The range of priority values that allow a router to be a candidate are 1 through255.

    Any events which occur are advertised to the DR using the Multicast address of224.0.0.6

    When the DR advertises any events to the Non-DR devices it is done using theaddress of 224.0.0.5

    If a new, better candidate comes along after the DR and BDR have been elected, thenew candidate does not preempt the existing DR and BDR.

    5. OSPF areas: - OSPF areas break up the network so that routers in one area know

    less topology info about the subnets in the other area(s), And they do not know aboutthe routers in the other area at all.

    OSPF Design Terminology:-

    Area Border Router (ABR) An OSPF router with interfaces connected to the backbonearea and to at least one other area.

  • 8/6/2019 Addressing 1

    29/41

    Autonomous System Border Router (ASBR) An OSPF router that connects to routersthat do not use OSPF for the purpose of exchanging external routes into and out of theOSPF domain

    Backbone router -A router in one area, the backbone area.

    Internal router A router in a single nonbackbone area.

    Area Aset of routers and link s that share the same detailed LSDB information, but notwith routers in other areas, for better efficiency.

    Backbone area A special OSPF area to which all other areas must connect. Area 0.

    External route A route learned from outside the OSPF domain and then advertised intothe OSPF domain.

    Intra-area route A route to a subnet inside the same area as the router

    Interarea route A route to a subnet in an area of which the router is not a part.

    Autonomous system In OSPF, a reference to a set of routers that use OSPF

    6. OSPF Area Design Advantages

    1 The smaller per-area LSDB requires less memory.

    2 The router requires fewer CPU cycles to process the smaller per-area LSDB with theSPF algorithm, reducing CPU overhead and improving convergence time.

    3 The SPF algorithm has to be run on internal routers only when an LSA inside the area

    changes, so routers have to run SPF less often.

    4 Less information must be advertised between areas, reducing the bandwidth requiredto send LSAs.

    5 Manual summarization can only be configured on ABRs and ASBRs, so areas allowfor smaller IP routing tables by allowing for the configuration of manual routesummarization.

    Configuring the OSPF Router ID

    1. If the router-id rid OSPD subcommand is configured, this value is used as theRID.

    2. If any loopback interfaces have an IP address configured and the interface has aline and protocol status of up/up, the router picks the highest numeric IP addressamong the up/up loopback interfaces.

    3. The router picks the highest numeric IP address from all other working (up/up)

  • 8/6/2019 Addressing 1

    30/41

    OSPF Metrics (cost)

    OSPF calculates the metric for each possible route by adding up the outgoing interfacesOSPF costs. The OSPF cost for an interface can be configured, or a router can calculatethe cost based on the interfaces bandwidth setting.

    IOS chooses an interfaces cost based on the following rules:

    1. The cost can be explicitly set using the ip ospf cost xinterface subcommand, toa value between 1 and 65,535, inclusive

    2. IOS can calculate a value based on the generic formula ref-BW / Int-BW, whereRef-BWis a reference bandwidth that defaults to 100Mbps, and Int-BWis theinterfaces bandwidth setting.

    3. The reference bandwidth can be configured from its default setting of 100(100Mbps) using the router OSPF subcommand auto-cost reference-bandwidth ref-bw, which in turn affects the calculation of the default interfacecost.

    OSPF supports three types of authentication, Null authentication (meaning none), simpletext password (easy to break), MD5 (best option)

    Using the sample network below, we'll enable OSPF Single area routing for the network.

    The network's configuration is as follows:

    Router Interface Addresses Network to Next Hop Router

    Router1E0 - 20.0.0.1 /8S0 - 10.0.0.1 /8

    Router1 to Router210.0.0.0/8

    Router2E0 - 30.0.0.1 /8S0 - 10.0.0.2 /8S1 - 40.0.0.1 /8

    Router2 to Router110.0.0.0/8Router2 to Router340.0.0.0/8

    Router3E0 - 50.0.0.1 /8S1 - 40.0.0.2 /8

    Router3 to Router240.0.0.0/8

  • 8/6/2019 Addressing 1

    31/41

    Router1Router1> enableRouter1# configure terminalEnter configuration commands, one per line. End with CNTL/Z.

    Router1 (config) # interface E0

    Router1 (config-if) # ip address 20.0.0.1 255.0.0.0Router1 (config-if) # no shutdown

    Router1 (config-if) # interface s0Router1 (config-if) # ip address 10.0.0.1 255.0.0.0Router1 (config-if) # no shutdownRouter1 (config-if) # exit

    Router1 (config) # router ospf 10Router1 (config-router) # network 10.0.0.0 0.255.255.255 area0Router1 (config-router) # network 20.0.0.0 0.255.255.255 area0

    Router2Router2> enable

    Router2# configure terminalEnter configuration commands, one per line. End with CNTL/Z.

    Router2 (config) # interface E0Router2 (config-if) # ip address 30.0.0.1 255.0.0.0Router2 (config-if) # no shutdown

    Router2 (config-if) # interface s0Router2 (config-if) # ip address 10.0.0.2 255.0.0.0Router2 (config-if) # no shutdown

    Router2 (config-if) # interface s1Router2 (config-if) # ip address 40.0.0.1 255.0.0.0Router2 (config-if) # no shutdownRouter2 (config-if) # exit

    Router2 (config) # router ospf 20Router2 (config-router) # network 10.0.0.0 0.255.255.255 area0Router2 (config-router) # network 40.0.0.0 0.255.255.255 area0Router2 (config-router) # network 30.0.0.0 0.255.255.255 area0

    Router3Router3> enableRouter3# configure terminalEnter configuration commands, one per line. End with CNTL/Z.

    Router3 (config) # interface E0Router3 (config-if) # ip address 50.0.0.1 255.0.0.0Router3 (config-if) # no shutdown

    Router3 (config-if) # interface s0Router3 (config-if) # ip address 40.0.0.2 255.0.0.0Router3 (config-if) # no shutdownRouter3 (config-if) # exit

    Router3 (config) # router ospf 30Router3 (config-router) # network 50.0.0.0 0.255.255.255 area0

  • 8/6/2019 Addressing 1

    32/41

    Router3 (config-router) # network 40.0.0.0 0.255.255.255 area0

    Viewing the routing table

    You can use the show ip route command to view the router's routing table.

    Router3#show ip route

    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate defaultU - per-user static route, o - ODR

    Gateway of last resort is not set

    O 10.0.0.0/8 [110/1562] via 40.0.0.1, 00:00:59, Serial1O 20.0.0.0/8 [110/1563] via 40.0.0.1, 00:00:18, Serial1O 30.0.0.0/8 [110/782] via 40.0.0.1, 00:00:59, Serial1

    C 40.0.0.0/8 is directly connected, Serial1C 50.0.0.0/8 is directly connected, Ethernet0

    Using the sample network below, we'll enable OSPF multiple area (ABR) routing for thenetwork.

    The network's configuration is as follows:

    Router Interface Addresses Network to Next Hop Router

    Router1E0 - 20.0.0.1 /8S0 - 10.0.0.1 /8

    Router1 to Router210.0.0.0/8

    Router2E0 - 30.0.0.1 /8S0 - 10.0.0.2 /8S1 - 40.0.0.1 /8

    Router2 to Router110.0.0.0/8Router2 to Router340.0.0.0/8

    Router3E0 - 50.0.0.1 /8S1 - 40.0.0.2 /8

    Router3 to Router240.0.0.0/8

  • 8/6/2019 Addressing 1

    33/41

    Router1Router1> enableRouter1# configure terminalEnter configuration commands, one per line. End with CNTL/Z.

    Router1 (config) # interface E0

    Router1 (config-if) # ip address 20.0.0.1 255.0.0.0Router1 (config-if) # no shutdown

    Router1 (config-if) # interface s0Router1 (config-if) # ip address 10.0.0.1 255.0.0.0Router1 (config-if) # no shutdownRouter1 (config-if) # exit

    Router1 (config) # router ospf 10Router1 (config-router) # network 10.0.0.0 0.255.255.255 area0Router1 (config-router) # network 20.0.0.0 0.255.255.255 area0

    Router2Router2> enable

    Router2# configure terminalEnter configuration commands, one per line. End with CNTL/Z.

    Router2 (config) # interface E0Router2 (config-if) # ip address 30.0.0.1 255.0.0.0Router2 (config-if) # no shutdown

    Router2 (config-if) # interface s0Router2 (config-if) # ip address 10.0.0.2 255.0.0.0Router2 (config-if) # no shutdown

    Router2 (config-if) # interface s1Router2 (config-if) # ip address 40.0.0.1 255.0.0.0Router2 (config-if) # no shutdownRouter2 (config-if) # exit

    Router2 (config) # router ospf 20Router2 (config-router) # network 10.0.0.0 0.255.255.255 area0Router2 (config-router) # network 30.0.0.0 0.255.255.255 area0Router2 (config-router) # network 40.0.0.0 0.255.255.255 area1

    Router3Router3> enableRouter3# configure terminalEnter configuration commands, one per line. End with CNTL/Z.

    Router3 (config) # interface E0Router3 (config-if) # ip address 50.0.0.1 255.0.0.0Router3 (config-if) # no shutdown

    Router3 (config-if) # interface s0Router3 (config-if) # ip address 40.0.0.2 255.0.0.0Router3 (config-if) # no shutdownRouter3 (config-if) # exit

    Router3 (config) # router ospf 30Router3 (config-router) # network 50.0.0.0 0.255.255.255 area1

  • 8/6/2019 Addressing 1

    34/41

    Router3 (config-router) # network 40.0.0.0 0.255.255.255 area1

    Viewing the routing table

    You can use the show ip route command to view the router's routing table.

    Router3#show ip route

    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate defaultU - per-user static route, o - ODR

    Gateway of last resort is not set

    O IA 10.0.0.0/8 [110/1562] via 40.0.0.1, 00:01:33, Serial1O IA 20.0.0.0/8 [110/1563] via 40.0.0.1, 00:01:33, Serial1O IA 30.0.0.0/8 [110/782] via 40.0.0.1, 00:01:33, Serial1

    C 40.0.0.0/8 is directly connected, Serial1C 50.0.0.0/8 is directly connected, Ethernet0

    Using the sample network below, we'll enable OSPF (ABSR) routing for the network.

    The network's configuration is as follows:

    Router Interface Addresses Network to Next Hop Router

    Router1E0 - 20.0.0.1 /8S0 - 10.0.0.1 /8

    Router1 to Router210.0.0.0/8

    Router2E0 - 30.0.0.1 /8S0 - 10.0.0.2 /8S1 - 40.0.0.1 /8

    Router2 to Router110.0.0.0/8Router2 to Router340.0.0.0/8

    Router3 E0 - 50.0.0.1 /8 Router3 to Router2

  • 8/6/2019 Addressing 1

    35/41

    S1 - 40.0.0.2 /8 40.0.0.0/8

    Router1Router1> enableRouter1# configure terminalEnter configuration commands, one per line. End with CNTL/Z.

    Router1 (config) # interface E0Router1 (config-if) # ip address 20.0.0.1 255.0.0.0Router1 (config-if) # no shutdown

    Router1 (config-if) # interface s0Router1 (config-if) # ip address 10.0.0.1 255.0.0.0Router1 (config-if) # no shutdownRouter1 (config-if) # exit

    Router1 (config) # router ospf 10Router1 (config-router) # network 10.0.0.0 0.255.255.255 area0Router1 (config-router) # network 20.0.0.0 0.255.255.255 area0

    Router2Router2> enableRouter2# configure terminalEnter configuration commands, one per line. End with CNTL/Z.

    Router2 (config) # interface E0Router2 (config-if) # ip address 30.0.0.1 255.0.0.0Router2 (config-if) # no shutdown

    Router2 (config-if) # interface s0Router2 (config-if) # ip address 10.0.0.2 255.0.0.0Router2 (config-if) # no shutdown

    Router2 (config-if) # interface s1Router2 (config-if) # ip address 40.0.0.1 255.0.0.0Router2 (config-if) # no shutdownRouter2 (config-if) # exit

    Router2 (config) # router ospf 20Router2 (config-router) # network 10.0.0.0 0.255.255.255 area0

    Router2 (config-router) # network 30.0 0.0 0.255.255.255 area0Router2 (config-router) # Redistribute rip subnetsRouter2 (config-router) # default-metric 64Router2 (config-router) # exitRouter2 (config) # router ripRouter2 (config-router) # network 40.0.0.0Router2 (config-router) # Redistribute ospf 20

    Router2 (config-router) # default-metric 1Router2 (config-router) # exit

    Router3Router3> enableRouter3# configure terminalEnter configuration commands, one per line. End with CNTL/Z.

    Router3 (config) # interface E0

  • 8/6/2019 Addressing 1

    36/41

    Router3 (config-if) # ip address 50.0.0.1 255.0.0.0Router3 (config-if) # no shutdown

    Router3 (config-if) # interface e1Router3 (config-if) # ip address 172.20.35.1 255.0.0.0Router3 (config-if) # no shutdown

    Router3 (config-if) # interface s0Router3 (config-if) # ip address 40.0.0.2 255.0.0.0Router3 (config-if) # no shutdownRouter3 (config-if) # exit

    Router3 (config) # router RIPRouter3 (config-router) # network 50.0.0.0Router3 (config-router) # network 40.0.0.0

    Viewing the routing table

    You can use the show ip route command to view the router's routing table.

    Router3#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate defaultU - per-user static route, o - ODR

    Gateway of last resort is not set

    R 10.0.0.0/8 [120/1] via 40.0.0.1, 00:00:10, Serial1R 20.0.0.0/8 [120/2] via 40.0.0.1, 00:00:10, Serial1

    R 30.0.0.0/8 [120/1] via 40.0.0.1, 00:00:10, Serial1C 40.0.0.0/8 is directly connected, Serial1C 50.0.0.0/8 is directly connected, Ethernet0

    EIGRP (ENHANCED INTERIOR GATEWAY ROUTING PROTOCOL):-

    EIGRP follows three steps to be able to add routes to the IP routing table :

    1. Neighbor discovery:EIGRP routers send Hello messages to discover potentialneighboring EIGRP routers and perform basic parameter checks to determine which

    routers should become neighbors.

    2. Topology exchange:Neighbors exchange full topology updates when the neighborrelationship comes up, and then only partial updates as needed based on changes tothenetwork topology.

    3. Choosing routes:Each router analyzes its respective EIGRP topology tables,choosing the lowest-metric route to reach each subnet.

  • 8/6/2019 Addressing 1

    37/41

    EIGRP Neighbors

    The router checks the following settings to determine if the router should be allowed to

    be a neighbor:

    1. It must pass the authentication process.

    2. It must use the same configured AS number

    3. The source IP address used by the neighbors Hello must be in the same subnet.

    Exchanging EIGRP Topology Information

    EIGRP users EIGRP update messages to send topology information to neighbors.

    Update messages can be sent to multicast IP 224.0.0.10 if the sending router needs toupdate multiple routers on the same subnet; otherwise they are sent to the unicast IPaddress of the particular neighbor.

    Update messages are sent using Reliable Transport Protocol (RTP)

    EIGRP can resend routing updates that are lost in transit, and by using RTP, EIGRP canbetter avoid loops.

    Calculating the Best Routes for the Routing Table

    EIGRP uses a composite metric, calculated as a function of bandwidth and delay bydefault. The calculation can also include interface load and interface reliability, althoughCisco recommends against using either.

    EIGRPs metric formula, assuming that the default settings use just bandwidth and delay

    is; Metric = ((107 / least-bandwidth) + cumulative-delay)*256

    Feasible Distance and Reported Distance

    1. Feasible Distance (FD):The metric of the best route to reach a subnet, as calculatedon a router

    2. Reported Distance (RD):The metric as calculated on a neighboring router and thenreported and learned in an EIGRP update.

    EIGRP Successors and Feasible Successors

    EIGRP calculates the metric for each router to reach each subnet. For a particularsubnet, the route with the best metric is called the successor, with the router filling upthe IP routering table with this route. The immediately usable backup routers in the

  • 8/6/2019 Addressing 1

    38/41

    topology table are called the feasiblesuccessorroutes, because they can feasibly beused when the successor route fails.

    If a non successor routes RD is less than the FD, the route is a feasible successorroute.

    Variance

    1.The variance is multiplied by the current FD (the metric of the best route to reach thesubnet).

    2.Any FS routes whose calculated metric is less than or equal to the product of variancetimes the FD are added to the IP routing table, assuming that the maximum-pathssetting allows more routes.

    3.Routes that are neither successor nor feasible successor can never be added to theIP routing table, regardless of the variance setting.

    EIGRP Features Compared to OSPF

    1. Converges quickly EIGRP OSPF2. Built-in loop prevention EIGRP OSPF3. Sends partial routing updates, advertising only new or changed information EIGRP OSPF

    4. Classless; therefore, supports manual summarization and VLSM EIGRP OSPF

    5. Allows manual summarization at any router EIGRP6. Sends routing information using IP multicast on LANs -EIGRP OSPF

    7. Uses the concept of a designated router on a LAN OSPF8. Flexible network design with no need to create areas EIGRP9. Supports both equal-metric and unequal-metric load balancing EIGRP10. Robust metric based on bandwidth and delay EIGRP11.Can advertise IP, IPX, and AppleTalk routes EIGRP12. Public Standard OSPF

    Ospf and Eigrp Difference

    There are many differences between these two routing protocols.

    1.Ospf is open standard and EIGRP is Cisco proprietary.

    2. Administrative distance for OSPF is 110 and for EIGRP (Internal Eigrp 90 & ExternalEigrp 170).3. Ospf uses Cost as the metric values to calculate the shortest path wheres as EIGRP

    used 5 metric values (Bandwidth, Delay, Load, MTU & Reliability) to calculate theshortest path.

  • 8/6/2019 Addressing 1

    39/41

    4. Eigrp use Dual algorithm for calculating shortest path where as Ospf use SPFAlgorithm fro calculating shortest path.

    5. Eigrp use multicast address 224.0.0.10 where Ospf use multicast address 224.0.0.5goes for all ospf routers and 224.0.0.6 goes for all DR and BDR

    6. In OSPF, there is no Backup route option, wheres as in EIGRP it will maintain backuproute. So if main link goes down, it will directly take the backup route and starts working,where as in OSPF, if main route fails it has to recalculate the shortest path.

    Characteristics of EIGRP

    1. Support for VLSM/CIDR

    2. Uses Diffusing Updates Algorithm (DUAL) for path selection.

    3. Maximum hop count is 255 (default is set to 100)

    4. Use hello packets for neighbor discovery

    5. Supports for IP and IPv6

    Using the sample network below, we'll enable EIGRP routing for the network

    The network's configuration is as follows:

    Router Interface Addresses Network to Next Hop Router

    Router1E0 - 20.0.0.1 /8S0 - 10.0.0.1 /8

    Router1 to Router210.0.0.0/8

    Router2E0 - 30.0.0.1 /8S0 - 10.0.0.2 /8S1 - 40.0.0.1 /8

    Router2 to Router110.0.0.0/8Router2 to Router340.0.0.0/8

  • 8/6/2019 Addressing 1

    40/41

    Router3E0 - 50.0.0.1 /8S1- 40.0.0.2 /8

    Router3 to Router240.0.0.0/8

    Router1Router1> enableRouter1# configure terminal

    Enter configuration commands, one per line. End with CNTL/Z.

    Router1 (config) # interface E0Router1 (config-if) # ip address 20.0.0.1 255.0.0.0Router1 (config-if) # no shutdown

    Router1 (config-if) # interface s0Router1 (config-if) # ip address 10.0.0.1 255.0.0.0Router1 (config-if) # no shutdownRouter1 (config-if) # exit

    Router1 (config) # router eigrp 10Router1 (config-router) # network 10.0.0.0

    Router1 (config-router) # network 20.0.0.0Router2

    Router2> enableRouter2# configure terminalEnter configuration commands, one per line. End with CNTL/Z.

    Router2 (config) # interface E0Router2 (config-if) # ip address 30.0.0.1 255.0.0.0Router2 (config-if) # no shutdown

    Router2 (config-if) # interface s0Router2 (config-if) # ip address 10.0.0.2 255.0.0.0Router2 (config-if) # no shutdown

    Router2 (config-if) # interface s1Router2 (config-if) # ip address 40.0.0.1 255.0.0.0Router2 (config-if) # no shutdownRouter2 (config-if) # exit

    Router2 (config) # router eigrp 10Router2 (config-router) # network 10.0.0.0Router2 (config-router) # network 30.0.0.0Router2 (config-router) # network 40.0.0.0

    Router3Router3> enableRouter3# configure terminal

    Enter configuration commands, one per line. End with CNTL/Z.

    Router3 (config) # interface E0Router3 (config-if) # ip address 50.0.0.1 255.0.0.0Router3 (config-if) # no shutdown

    Router3 (config-if) # interface s0Router3 (config-if) # ip address 40.0.0.2 255.0.0.0Router3 (config-if) # no shutdown

  • 8/6/2019 Addressing 1

    41/41

    Router3 (config-if) # exit

    Router3 (config) # router eigrp 10Router3 (config-router) # network 50.0.0.0Router3 (config-router) # network 40.0.0.0

    Viewing the routing table

    You can use the show ip route command to view the router's routing table.

    Router3#show ip route

    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate defaultU - per-user static route, o - ODR

    Gateway of last resort is not setD 10.0.0.0/8 [90/21024000] via 40.0.0.1, 00:00:14, Serial1D 20.0.0.0/8 [90/21026560] via 40.0.0.1, 00:00:14, Serial1D 30.0.0.0/8 [90/20514560] via 40.0.0.1, 00:00:14, Serial1C 40.0.0.0/8 is directly connected, Serial1C 50.0.0.0/8 is directly connected, Ethernet0