IP advanced.pdf

download IP advanced.pdf

of 306

Transcript of IP advanced.pdf

  • 8/22/2019 IP advanced.pdf

    1/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 1

    Alcatel University - 8AS 90200 1140 VT ZZA Ed.011

    Routing

  • 8/22/2019 IP advanced.pdf

    2/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 2

    2

    Page intentionally left blankPage intentionally left blank

  • 8/22/2019 IP advanced.pdf

    3/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 3

    3

    1 TitleSession presentation

    Objective: to be able to configure RIP and OSPF dynamic

    routing

    program:

    1 Overview

    2 RIP protocol

    3 OSPF protocol

  • 8/22/2019 IP advanced.pdf

    4/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 4

    4

    Page intentionally left blank

  • 8/22/2019 IP advanced.pdf

    5/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 5

    Alcatel University - 8AS 90200 1140 VT ZZA Ed.015

    Routing

    1. Overview

  • 8/22/2019 IP advanced.pdf

    6/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 6

    6

    Page intentionally left blank

  • 8/22/2019 IP advanced.pdf

    7/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 7

    7

    1- OverviewVarious types of routing

    Static

    Prevent traffic due to routing protocol

    Easy design on small network

    Risk of errors

    Programmed manually

    No re-routing in case of failure

    Dynamic

    Re-route automatically the traffic in case of network failure

    Ideal for large network

    Involve over processing in the routers

    Generate over traffic on the network

    Static routing

    Static routing is manually performed by the network administrator. The administrator is responsible for discoveringand propagating routes through the network. These definitions are manually programmed in every routing devicein the environment.

    Once a device has been configured, it simply forwards packets out the predetermined ports. There is nocommunication between routers regarding the current topology of the network.

    In small networks with minimal redundancy, this process is relatively simple to administer. However, there areseveral disadvantages to this approach for maintaining IP routing tables:

    Static routes require a considerable amount of coordination and maintenance in non-trivial networkenvironments.

    Static routes cannot dynamically adapt to the current operational state of the network. If a destinationsubnetwork becomes unreachable, the static routes pointing to that network remain in the routing table. Trafficcontinues to be forwarded toward that destination. Unless the network administrator updates the static routes toreflect the new topology, traffic is unable to use any alternate paths that may exist.

    Dynamic routing:

    Dynamic routing algorithms allow routers to automatically discover and maintain awareness of the paths throughthe network.

  • 8/22/2019 IP advanced.pdf

    8/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 8

    8

    1- OverviewPrinciple of routing tables :

    Fill-in this table

    Network Mask Next hop If

    Network Mask Next hop If

    204.92.77.0 255.255.255.0

    192.168.201.0 255.255.255.0

    204.92.76.0 255.255.255.0 e0

    e1

    204.92.76.2

    204.92.75.0 255.255.255.0 e2

    204.92.75204.92.75.0.0

    192.168.201192.168.201.0.0204.92.76204.92.76.0.0204.92.77204.92.77.0.0R1

    R2R2

    .1.1 .1.1.1.1.2.2

    0.0.0.0(default) 0.0.0.0

    192.168.201.0 255.255.255.0

    204.92.76.0 255.255.255.0 e1e1

    204.92.76.1

    e0

    .2.2

    e0e0e1e1

    e2

    e1e1

    e0

    Fill-in this table

    Network Mask Next hop If

    An important function of the IP layer is IP routing. This provides the basic mechanism for routers to interconnectdifferent physical networks.

    The router only has information about various kinds of destinations:

    networks that are directly attached to one of the physical networks to which the router is attached.

    Hosts or networks for which the router has been given explicit definitions.

    The metrics provide indication about cost of a route to a destination.

    Metrics are based on :

    the number of hops,

    the bandwidth,

    the delay, ...

  • 8/22/2019 IP advanced.pdf

    9/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 9

    9

    1- OverviewRouting table : the metric

    R1

    R2

    192.168.201.0

    204.92.76.0

    204.92.77.0

    .1 .1.1.2

    204.92.75.0

    .2

    .2

    Network Mask Next hop metric

    204.92.77.0 255.255.255.0192.168.201.0 255.255.255.0204.92.76.0 255.255.255.0

    204.92.76.1

    204.92.75.0 255.255.255.0 204.92.76.1 e1

    204.92.77.0 255.255.255.0 e2

    001

    1

    0

    Secondary route

    Primary routePrimary route

    204.92.75.0 255.255.255.0 204.92.77.1 e2 1

    If

    e1e1e0

    e1e1

    e0e0e1e1

    e2

    e2

    The metrics provide indication about cost of a route to a destination and allow the choice when several routes areavailable.

  • 8/22/2019 IP advanced.pdf

    10/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 10

    10

    ISDN

    1- OverviewOther advantage of static routing

    If dynamic routing on ISDN linkIf dynamic routing on ISDN link

    The connection should beThe connection should be continiouselycontiniousely onon

    for routing information updatefor routing information updateHigh costHigh cost

    Normally, static routes are used only in simple network topologies. However, there are additional circumstanceswhen static routing can be attractive. For example, static routes can be used:

    To manually define a default route. This route is used to forward traffic when the routing table does not contain amore specific route to the destination.

    To define a route that is not automatically advertised within a network.

    When utilization or line tariffs make it undesirable to send routing advertisement traffic through lower-capacityWAN connections.

    When complex routing policies are required. For example, static routes can be used to guarantee that trafficdestined for a specific host traverses a designated network path.

    To provide a more secure network environment. The administrator is aware of all subnetworks defined in theenvironment. The administrator specifically authorizes all communication permitted between these subnetworks.

    To provide more efficient resource utilization. This method of routing table management requires no networkbandwidth to advertise routes between neighboring devices. It also uses less processor memory and CPU cyclesto calculate network paths.

  • 8/22/2019 IP advanced.pdf

    11/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 11

    11

    network

    140.252.13.32

    1- OverviewExample of routing (1)

    140.252.1.92 140.252.1.32 140.252.1.11

    140.252.1.4

    Internet

    140.252.1.183

    140.252.1.29

    140.252.13.33 140.252.13. 34140. 252.13.35

    140.252.13.66

    140.252.13.65

    network

    140.252.1

    140 252. .13 35.IP @ :

    1 0 0 0 1 1 1 0 1 1 1 1 1 1 0 0 0 0 1 0 0 0 1 10 0 0 0 1 1 0 1

    140 252. .13 32.Network :

    1 0 0 0 1 1 1 0 1 1 1 1 1 1 0 0 0 0 1 0 0 0 0 00 0 0 0 1 1 0 1

    1 1 1 1 1 1 1 11 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0

    Masque :

    /27

  • 8/22/2019 IP advanced.pdf

    12/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 12

    12

    Destination Gateway Flags InterfaceRefcnt Use

    1- OverviewExample of routing (2)- Routing table

    140.252.1.92 140.252.1.32 140.252.1.11

    140.252.1.4

    Internet

    140.252.1.183

    140.252.1.29

    140.252.13.33 140.252.13. 34140. 252.13.35

    140.252.13.66

    140.252.13.65Network

    140.252.13.32

    Network

    140.252.1

    140.252.13.65/32

    To go to :

    UU

    U: This routeU: This route isis UpUp

    Refcnt: nb of TCP session

    Use : nb of packets sent on this @

    0 0 eth0

    ethernet

    140.252.13.35

    G: Go througth Gateway

    G

    H: This address is a full IP@ of host

    H

  • 8/22/2019 IP advanced.pdf

    13/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 13

    13

    Network

    140.252.13.32

    1- OverviewExample of routing (3)- Routing table

    140.252.1.92 140.252.1.32 140.252.1.11

    140.252.1.4

    Internet

    140.252.1.183

    140.252.1.29

    140.252.13.33140.252.13.35

    140.252.13.66

    140.252.13.65

    Network

    140.252.1

    Direct route : route connected to this machine , on this interface

    140.252.13.34

    Destination Gateway Flags InterfaceRefcnt Use

    140.252.13.65/32 140.252.13.35 U G H eth00 0

    To go to :

    140.252.13.32/27

    U: This routeThis route isis UpUp

    U 4 2543

    _: This address is an IP@ of network

    _

    _: direct route

    140.252.13.34 _ eth0

    ethernet

  • 8/22/2019 IP advanced.pdf

    14/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 14

    14

    1- OverviewExample of routing (4)- Routing table

    140.252.1.92 140.252.1.32 140.252.1.11

    140.252.1.4

    Internet

    140.252.1.183

    140.252.1.29

    140.252.13.33140.252.13.35

    140.252.13.66

    140.252.13.65

    Network

    140.252.13.32

    Network

    140.252.1

    Destination Gateway Flags

    140.252.13.65/32 140.252.13.35 U G H

    140.252.13.32/27 140.252.13.34 U _ _

    Loopback between 2 applications

    Interface

    eth0

    Refcnt Use

    0 0

    140.252.13.34

    eth04 2543

    To go to :

    127.0.0.1 /32

    U:U: thisthis routeroute isis UpUp

    UU 0 0 lo0

    loopback

    _: direct route

    127.0.0.1 _

    H: This address is a full IP@ of host

    H

  • 8/22/2019 IP advanced.pdf

    15/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 15

    15

    1- OverviewExample of routing (5)- Routing table

    140.252.1.92 140.252.1.32 140.252.1.11

    140.252.1.4

    Internet

    140.252.1.183

    140.252.1.29

    140.252.13.33140.252.13.35

    140.252.13.66

    140.252.13.65

    Network

    140.252.13.32

    Network

    140.252.1

    Destination Gateway Flags

    140.252.13.65 /32 140.252.13.35 U G H

    140.252.13.32 /27 140.252.13.34U _ _

    InterfaceRefcnt Use

    0 0

    140.252.13.34

    eth04 2543

    127.0.0.1 /32U _ H

    lo00 0127.0.0.1default

    Default route

    U

    U: This routeU: This route isis UpUp

    eth0

    140.252.13.33

    Go through

    G: indirect route

    G_ 0 0 eth0

    ethernet

  • 8/22/2019 IP advanced.pdf

    16/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 16

    16

    1- OverviewExample of routing (6)- routing table using

    140.252.1.92 140.252.1.32 140.252.1.11140.252.1.4

    Internet

    140.252.1.183

    140.252.1.29

    140.252.13.33140.252.13.35

    140.252.13.66

    140.252.13.65

    Network

    140.252.13.32

    Network

    140.252.1

    140.252.13.34

    Destination Gateway Flags

    140.252.13.65 /32 140.252.13.35 U G H

    140.252.13.32 /27 140.252.13.34 U _ _

    Interface

    eth0

    Refcnt Use

    0 0

    eth04 2543

    default 140.252.13.33 eth00 0U G _

    127.0.0.1 /32 U _ H lo00 0127.0.0.1

    Example :Search IP@ 140.252.13.35

    1- Search of precise IP @ (among entries with flag=H)=> fail

    2- Search on network@, The network@ 140.252.13.32 is found=> send the packet to the MAC@ of the search host (140.252.13.35) on Ethernet interface : eth0

  • 8/22/2019 IP advanced.pdf

    17/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 17

    17

    1- OverviewExample of routing (7)- routing table using

    140.252.1.92 140.252.1.32 140.252.1.11 140.252.1.4

    Internet

    140.252.1.183

    140.252.1.29

    140.252.13.33140.252.13.35

    140.252.13.66

    140.252.13.65Network

    140.252.13.32

    Network

    140.252.1

    140.252.13.34

    Destination Gateway Flags

    140.252.13.65 /32 140.252.13.35 U G H

    140.252.13.32 /27 140.252.13.34 U _ _

    Interface

    eth0

    Refcnt Use

    0 0

    eth04 2543

    default 140.252.13.33 eth00 0U G _

    127.0.0.1 /32 U _ H lo00 0127.0.0.1

    Example :search IP @ 140.252.13.65

    1- Search of precise IP @ (among entries with flag=H)=>the @ 140.252.13.65 is found

    => indirect route (G), sends the packet to MAC@ of the router (140.252.13.35) on Ethernet interface : eth0

  • 8/22/2019 IP advanced.pdf

    18/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 18

    18

    1- OverviewExample of routing (8)- routing table using

    140.252.1.92 140.252.1.32 140.252.1.11140.252.1.4

    Internet

    140.252.1.183

    140.252.1.29

    140.252.13.33140.252.13.35

    140.252.13.66

    140.252.13.65

    Network

    140.252.13.32

    Network

    140.252.1

    140.252.13.34

    Destination Gateway Flags

    140.252.13.65 /32 140.252.13.35 U G H

    140.252.13.32 /27 140.252.13.34 U _ _

    Interface

    eth0

    Refcnt Use

    0 0

    eth04 2543

    default 140.252.13.33 eth00 0U G _

    127.0.0.1 /32 U _ H lo00 0127.0.0.1

    1- Search of precise IP @ (among entries with flag=H)=> fail

    3- Selection of dfault => indirect route (G), sends the packet to MAC@ of the router (140.252.13.33)on Ethernet interface : eth0

    Exemple :recherche @IP 192.207.117.2

    2- Search on network@, => fail

  • 8/22/2019 IP advanced.pdf

    19/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 19

    19

    1- OverviewExample of routing (9)- Configuration

    % netstat -rnDestination Gateway Flags InterfaceRefcnt Use

    140.252.1.92 140.252.1.32 140.252.1.11

    140.252.1.4

    Internet

    140.252.1.183

    140.252.1.29

    140.252.13.33140.252.13.35

    140.252.13.66

    140.252.13.65

    Network

    140.252.13.32

    Network

    140.252.1

    140.252.13.34

    Creation of direct routes : at the (ifconfig) : route creation : command route .Examples:

    default 140.252.13.33 eth00 0U G _

    route add default 140.252.13.33

    140.252.13.65 /32 140.252.13.35 U G H 0 0 eth0

    route add -host 140.252.13.65 140.252.13.35

    127.0.0.1 /32U _ H

    lo00 0127.0.0.1

    One entry for loopback

    140.252.13.32 /27 140.252.13.34 U _ _ eth00 0

    One entry for the local network

  • 8/22/2019 IP advanced.pdf

    20/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 20

    20

    1- OverviewExample of routing (12)

    140.252.1.92 140.252.1.32 140.252.1.11

    140.252.1.4

    Internet

    140.252.1.183

    140.252.1.29

    140.252.13.33 140.252.13.34140.252.13.35

    140.252.13.66

    140.252.13.65

    Network

    140.252.13.32

    Network

    140.252.1

    Destination Gateway Flags InterfaceRefcnt Use

    0 0

    H: This address is a full IP@ of host

    H140.252.13.65 /32

    To go to :

    UU

    U: This routeU: This route isis UpUp

    eth0

    ethernet

    140.252.13.35

    G: go through Gateway

    G

  • 8/22/2019 IP advanced.pdf

    21/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 21

    21

    1- OverviewExample of routing (13)

    140.252. 1.92 140.252.1.32 140.252.1.11

    140.252.1.4

    Internet

    140.252.1.183

    140.252.1.29

    140.252.13.33140.252.13.35

    140.252.13.66

    140.252.13.65

    network

    140.252.13.32

    network

    140.252.1

    140.252.13.34

    Direct route : route connected to this machine , on this interface

    Destination Gateway Flags

    140.252.13.65 /32 140.252.13.35 U G H

    Interface

    eth0

    Refcnt Use

    0 0

    eth0

    ethernet

    _: H: This address is a network IP @

    _

    To go to :

    140.252.13.32 /27

    _: direct route

    140.252.13.33 _

    U: This route is Up

    U 0 0

  • 8/22/2019 IP advanced.pdf

    22/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 22

    22

    1- OverviewExample of routing (14)

    140.252. 1.92 140.252.1.32 140.252.1.11

    140.252.1.4

    Internet

    140.252.1.183

    140.252.1.29

    140.252.13.33140.252.13.35

    140.252.13.66

    140.252.13.65

    Network

    140.252.13.32

    Network

    140.252.1

    140.252.13.34

    Destination Gateway Flags

    140.252.13.65 /32 140.252.13.35 U G H

    Interface

    eth0

    Refcnt Use

    0 0

    eth0_140.252.13.32 /27 140.252.13.33 _U 0 0

    Loopback between 2 applications

    127.0.0.1 /32 UU 0 0 lo0

    loopback

    127.0.0.1_ H

  • 8/22/2019 IP advanced.pdf

    23/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 23

    23

    1- OverviewExample of routing (15)

    140.252. 1.92 140.252.1.32 140.252.1.11

    140.252.1.4

    Internet

    140.252.1.183

    140.252.1.29

    140.252.13.33140.252.13.35

    140.252.13.66

    140.252.13.65

    Network

    140.252.13.32

    Network

    140.252.1

    140.252.13.34

    Destination Gateway Flags

    140.252.13.65 /32 140.252.13.35 U G H

    Interface

    eth0

    Refcnt Use

    0 0

    eth0_140.252.13.32 /27 140.252.13.33 _

    U

    0 0

    127.0.0.1 /32

    UU

    0 0 lo0127.0.0.1 _ H

    140.252.1.29

    G: go through Gateway

    G s0

    SerialInterface

    To go to :

    default

    U: This routeU: This route isis UpUp

    UU 0 0_

  • 8/22/2019 IP advanced.pdf

    24/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 24

    24

    Cisco- Static route command

    ipip routeroute netnet--idid netmasknetmask {nextnext--hophop--ipip@@ | interface} [distancedistance]

    ipip routeroute 172.31.10.0172.31.10.0 255.255.255.0255.255.255.0 10.10.10.210.10.10.2 101101

    Examples :

    ipip routeroute 0.0.0.00.0.0.0 0.0.0.00.0.0.0 Serial3Serial3 192.168.20.1192.168.20.1

    2- Get out by this interface

    3- pass by this gateway1- To go to this destination

    4- The cost to reach the destination is

    ipip routeroute 0.0.0.00.0.0.0 0.0.0.00.0.0.0 Ethernet0Ethernet0broadcast interface : the route will be insertedinto the routing table only when the broadcast

    interface is up

    If you point a static route to a broadcast interface,

    for example, ip route 0.0.0.0 0.0.0.0 Ethernet0

    the route will be inserted into the routing table only when the broadcast interface is up.

    This configuration is not recommended because when the next hop of a static route points to an interface, the router considerseach of the hosts within the range of the route to be directly connected through that interface.

    With this type of configuration, a router will perform Address Resolution Protocol (ARP) on the Ethernet for every destination therouter finds through the default route because the router will consider all of these destinations as directly connected to Ethernet0.

    Specifying a numerical next hop on a directly connected interface will prevent the router from performing ARP or eachdestination address.

    However, if the interface with the next hop goes down and the numerical next hop is reachable through a recursive route, youshould specify both the next hop IP address and the interface through which the next hop should be found.

    For example, ip route 0.0.0.0 0.0.0.0 Serial3 192.168.20.1

    Administrative distance is the feature used by routers to select the best path when there are two or more different routes tothe same destination from two different routing protocols. Administrative distance defines the reliability of a routing protocol.

    Each routing protocol is prioritized in order of most to least reliable (believable) using an administrative distance value. Thesmaller the administrative distance value, the more reliable the protocol.

  • 8/22/2019 IP advanced.pdf

    25/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 25

    25

    172.31.10.0172.31.10.0

    /24/24

    E0

    .2.2

    .1.1

    192.168.20.0 /30192.168.20.0 /30

    .11

    S3.22

    S1

    10.10.10.0 /3010.10.10.0 /30

    .11

    S2

    .22S0

    192.168.10.0 /30192.168.10.0 /30

    .22

    S0.11S0

    Cisco - Static routing configuration example

    Internet R1R1 R2R2

    64kb/s

    2Mb/s2Mb/s

    R2#show ip route

    Codes: C - connected, S - static, * - candidate default

    Gateway of last resort is 10.10.10.1 to network 0.0.0.0

    C 172.31.10.0172.31.10.0/24 is directly connected, Ethernet0

    C 192.168.20.0192.168.20.0/30 is directly connected, Serial1

    C 10.10.10.010.10.10.0/30 is directly connected, Serial0

    ip route 0.0.0.0 0.0.0.0 Serial0 10.10.10.110.10.10.1default route

    Other administrative distance

    ip route 0.0.0.0 0.0.0.0 Serial1 192.168.20.1192.168.20.1 250250

    Defaultadministrativedistance = 1

    S* 0.0.0.0/0 [1/0] via 10.10.10.110.10.10.1

    Only the primary route is inserted

    R1#show ip route

    Codes: C - connected, S - static, * - candidate default

    Gateway of last resort is 0.0.0.0 to network 0.0.0.0

    C 10.10.10.010.10.10.0/30 is directly connected, Serial2

    C 192.168.10.0192.168.10.0/30is directly connected, Serial0

    C 192.168.20.0192.168.20.0/30is directly connected, Serial3

    ip route 0.0.0.0 0.0.0.0 Serial3/0

    ip route 172.31.10.0172.31.10.0 255.255.255.0 Serial3 192.168.20.2192.168.20.2 250250

    ip route 172.31.10.0172.31.10.0 255.255.255.0 Serial2 10.10.10.210.10.10.2

    primary

    S* 0.0.0.0/0 is directly connected, Serial3/0

    S 172.31.10.0172.31.10.0/24 [250/0] via 10.10.10.210.10.10.2, Serial2

    By default, static routes have an administrative distance of one, which gives them precedence over routes fromdynamic routing protocols. By increasing the administrative distance to a value greater than that of a dynamicrouting protocol, the static route can be a safety net in the event that dynamic routing fai ls.

    If you would specify an administrative distance for a static route.This kind of static route is called "floating" static.It is installed in the routing table only when the preferred route disappears.

  • 8/22/2019 IP advanced.pdf

    26/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 26

    26

    1- OverviewExercise : Static routing

    Internet

    172.16.0.0

    /16

    10.2.0.0/16

    10.1.0.0/16

    192.168.2.0

    /24

    192.168.1.0

    /24

    172.17.0.0/16

    IP@:1

    IP@:2

    IP@:3

    IP@:4

    IP@:5

    IP@:6

    IP@:7

    IP@:8

    IP@:9

    IP@:10

    10.1.0.0/16@IP1

    10.2.0.0/16@IP2

    Routing Table

    172.16.0.0/16@IP4

    10.2.0.0/16@IP3

    Routing Table

    172.17.0.0/16@IP5

    172.16.0.0/16@IP9

    Routing Table

    192.168.1.0/24@IP7

    172.17.0.0/16@IP6

    Routing Table

    192.168.2.0/24@IP8

    0.0.0.0 / 00.0.0.0 / 0 @IP3@IP3

    0.0.0.0 / 00.0.0.0 / 0 @IP5@IP5

    192.168.0.0/16192.168.0.0/16 @IP6@IP6

    10.1.0.0/1610.1.0.0/16 @IP2@IP2

    0.0.0.0 / 00.0.0.0 / 0 @IP10@IP10

    10.0.0.0 / 810.0.0.0 / 8 @IP4@IP4

    192.168.0.0/16192.168.0.0/16 @IP4@IP4

    172.17.0.0/16172.17.0.0/16 @IP4@IP4

    0.0.0.0 / 00.0.0.0 / 0 @IP9@IP9

    Complete the routing tables of the various routers to get access to all destinations.

  • 8/22/2019 IP advanced.pdf

    27/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 27

    27

    1- OverviewDynamic routing principle

    Routers advertise the networks

    they can reach

    Routers calculate the routes from

    advertisementsadvertisements

  • 8/22/2019 IP advanced.pdf

    28/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 28

    28

    1- OverviewVarious routing protocols algorithms

    Algorithm of routing

    Distance VectorDistance Vector Link StateLink State

    RIP

    BGP

    IGRP (CISCO)DECnet (Phase IV)

    OSPF

    IS-IS

    DECnet (Phase V)

    RIP : Routing Information Protocol

    IS-IS : Intermediate System to Intermediate System

    OSPF : Open Shortest Path First

    IGRP: Internet Gateway Routing Protocol

    BGP: Border Gateway Protocol

    The automatic discovery of routes can use a number of currently available dynamic routing protocols. Thedifference between these protocols is the way they discover and calculate new routes to destination networks.They can be classified into three broad categories:

    - Distance vector protocols

    - Link state protocols

  • 8/22/2019 IP advanced.pdf

    29/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 29

    29

    1- OverviewDistance vector : principle

    NetworkNetwork11 NetworkNetwork

    55

    NetworkNetwork44R1R1

    R2R2 R3R3

    R4R4

    NetworkNetwork22

    NetworkNetwork33

    Network 2Network 2

    Network

    2

    Network

    2(1hop,R

    3)

    Network 3Network 3Network 3Network 3 (1 hop, R4)

    Network 4Network 4

    Network4Network4(0hop,e0)

    Network 5Network 5

    Network5

    Network5(0hop,e2)

    Routers based onRouters based on

    number of hopsnumber of hops

    (D, V)

    (Alternative routes are not kept.)

    Netw

    ork1

    Netw

    ork1(0hop

    ,e1)

    Network 1Network 1

    R1R1View of R1

    e0

    e2e1

    Distance vector algorithms

    they allow each device in the network to automatically build and maintain a local IP routing table. The principlebehind distance vector routing is simple.

    Each router in the internetwork maintains the distance orcostfrom itself to every known destination. This valuerepresents the overall desirability of the path. Paths associated with a smaller cost value are more attractive to usethan paths associated with a larger value. The path represented by the smallest cost becomes the preferred pathto reach the destination. This information is maintained in a distance vector table.

    The table is periodically advertised to each neighboring router. Each router processes these advertisements todetermine the best paths through the network.

  • 8/22/2019 IP advanced.pdf

    30/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 30

    30

    (no optimal route)

    1- OverviewDistance vector : cost problem

    NetworkNetwork11

    R1R1

    R2R2

    R3R3

    NetworkNetwork22

    NetworkNetwork33

    High throughput

    High throughput

    Low throughput

    Network 3Network 3 (1 hop, R3)

    Network 2Network 2 (0 hop, e1)

    Network 1Network 1 (0 hop, e0)

    R1R1

    e0

    e1

  • 8/22/2019 IP advanced.pdf

    31/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 31

    31

    1- OverviewLink state

    NetworkNetwork11 NetworkNetwork

    55

    NetworkNetwork44R1R1

    R2R2 R3R3

    R4R4

    NetworkNetwork22

    NetworkNetwork33

    NetworkNetwork11

    R4R4

    R3R3R2R2

    NetworkNetwork

    44

    NetworkNetwork33

    NetworkNetwork22

    Network

    Network55

    Each router makes the network

    topology

    R1R1View of R1

    Link state routing

    The growth in the size and complexity of networks in recent years has necessitated the development of morerobust routing algorithms. These algorithms address the shortcoming observed in distance vector protocols. Thesealgorithms use the principle of a link state to determine network topology. A link state is the description of aninterface on a router (for example, IP address, subnet mask, type of network) and its relationship to neighboringrouters. The collection of these link states forms a link state database. The process used by link state algorithmsto determine network topology is straightforward:

    Each router identifies all other routing devices on the directly connected networks.

    Each router advertises a list of all directly connected network links and the associated cost of each link. This isperformed through the exchange of link state advertisements (LSAs) with other routers in the network.

    Using these advertisements, each router creates a database detailing the current network topology. Thetopology database in each router is identical.

    Each router uses the information in the topology database to compute the most desirable routes to eachdestination network. This information is used to update the IP routing table.

  • 8/22/2019 IP advanced.pdf

    32/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 32

    32

    2 classes of protocols:2 classes of protocols:

    INTERNETINTERNET

    1- OverviewVarious routing protocol classes

    SprintSprintDFNDFN

    RenaterRenater

    Autonomous

    system

    IInteriornterior GGatewayateway PProtocolrotocol (RIP, IGRP, OSPF, )

    EExteriorxterior GGatewayateway PProtocolrotocol (EGP, BGP, IS-IS, )

    Autonomous

    system

    SphinxSphinx

    JanetJanet

    BGPBGP

    (OSPF)

    (RIP)

    (OSPF)

    (EIGRP)

    (IGRP)

    An AS is defined as a logical portion of a larger IP network. An AS is normally comprised of an internetwork withinan organization. It is administered by a single management authority.

    Some routing protocols are used to determine routing paths within an AS. Others are used to interconnect a set ofautonomous systems:

    Interior Gateway Protocols (IGPs): Interior gateway protocols allow routers to exchange informationwithin an AS. Examples of these protocols are Open Short Path First (OSPF) and Routing InformationProtocol (RIP).

    Exterior Gateway Protocols (EGPs): Exterior gateway protocols allow the exchange of summaryinformation between autonomous systems. An example of this type of routing protocol is Border GatewayProtocol (BGP).

    The interior protocols used to maintain routing information within each AS. The figure also shows the exteriorprotocols maintaining the routing information between autonomous systems.

    Within an AS, multiple interior routing processes may be used. When this occurs, the AS must appear to otherautonomous systems as having a single, coherent interior routing plan. The AS must present a consistent view of

    the internal destinations

  • 8/22/2019 IP advanced.pdf

    33/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 33

    Alcatel University - 8AS 90200 1140 VT ZZA Ed.0133

    Routing

    2 RIP protocol

    RFC 1058 and 1723

    Routing Information Protocol (RIP)

    RIP is an example of an interior gateway protocol designed for use within small autonomous systems.

    In mid-1988, the IETF issued RFC 1058, which describes the standard operations of a RIP system. However, the RFCwas issued after many RIP implementations had been completed. For this reason, some RIP systems do not supportthe entire set of enhancements to the basic distance vector algorithm (for example, poison reverse and triggeredupdates).

  • 8/22/2019 IP advanced.pdf

    34/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 34

    34

  • 8/22/2019 IP advanced.pdf

    35/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 35

    35

    RIP: router start-up

    A B

    C

    D E

    N1N1 N2N2

    N6N6

    N5N5

    N3N3 N4N4

    12

    2

    1

    2

    2

    2

    1

    1

    1

    1

    2

    N1 11

    0N3 3

    20

    Net HopCost

    N1 12

    0

    N2 21

    0N4 4

    10

    Net HopCost

    N3 31

    0

    N6 62

    0

    Net HopCost

    N5 51

    0

    N2 22

    0

    Net HopCost

    N5 52

    0

    N6 61

    0N4 4

    20

    Net HopCost

    The distance vector table describes each destination network. The entries in

    this table contain the following information:

    The destination network (vector) described by this entry in the table.

    The associated cost (distance) of the most attractive path to reach this destination. This provides theability to differentiate between multiple paths to a destination. In this context, the terms distance and costcan be misleading. They have no direct relationship to physical distance or monetary cost.

    The IP address of the next-hop device used to reach the destination network.

    At router initialization, each device contains a distance vector table listing each directly attached networks andconfigured cost. Typically, each network is assigned a cost of 1.

  • 8/22/2019 IP advanced.pdf

    36/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 36

    36

    IP@src

    :3.2IP@

    dest:broadcast

    IP@src

    :1.11.1IP@

    dest:broadcast

    N1 1

    N3 1

    RIP : Update of the routing tables (1)

    N1 11

    0

    N3 32

    0N1 1

    20

    N2 21

    0

    A B

    C

    D E

    N1N1

    N2N2

    N6N6 N5N5

    N3N3 N4N4

    12

    2

    1

    2

    2

    2

    1

    1

    1

    1

    2

    N4 41

    0

    N5 52

    0

    N6 61

    0N4 4

    20

    N3 31

    0

    N6 62

    0

    N5 51

    0

    N2 22

    0

    Net HopCost Net HopCost

    Net HopCost

    Net HopCost

    Net HopCost

    N3 11

    +1+1

    N1 1

    N1 1N3 1

    1111

    32

    RIP packet types

    The RIP protocol specifies two packet types. These packets may be sent by any device running the RIP protocol:

    Request packets: A request packet queries neighboring RIP devices to obtain their distance vector table.The request indicates if the neighbor should return either a specific subset or the entire contents of thetable.

    Response packets: A response packet is sent by a device to advertise the information maintained in itslocal distance vector table.

    - The table is automatically sent every 30 seconds.

    - The table is sent as a response to a request packet generated by another RIP node.

    When a response packet is received by a device, the information contained in the update is compared against thelocal distance vector table. If the update contains a lower cost route to a destination, the table is updated to reflectthe new path.

  • 8/22/2019 IP advanced.pdf

    37/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 37

    37

    RIP : Update of the routing tables(2)

    N1 11

    0

    N3 32

    0N1 1

    20

    N2 21

    0

    A B

    C

    D E

    N1N1

    N2N2

    N6N6 N5N5

    N3N3 N4N4

    12

    2

    1

    2

    2

    2

    1

    1

    1

    1

    2

    N4 41

    0

    N5 52

    0

    N6 61

    0N4 4

    20

    N3 31

    0

    N6 62

    0

    N5 51

    0

    N2 22

    0

    Net HopCost Net HopCost

    Net HopCost

    Net HopCost

    Net HopCost

    N3 1111

    11

    N1 32

    1

    N3 1

    N6 1N1 2

    +1

    N3 62

    1

    N1 62

    2

    N3 1N6 1N1 2

    +1

    N6 31

    1

  • 8/22/2019 IP advanced.pdf

    38/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 38

    38

    RIP : Update of the routing tables(3)

    N1 11

    0

    N3 32

    0N1 1

    20

    N2 21

    0

    A B

    C

    D E

    N1N1

    N2N2

    N6N6 N5N5

    N3N3 N4N4

    12

    2

    1

    2

    2

    2

    1

    1

    1

    1

    2

    N4 41

    0

    N5 52

    0

    N6 61

    0N4 4

    20

    N3 31

    0

    N6 62

    0

    N5 51

    0

    N2 22

    0

    Net HopCost Net HopCost

    Net HopCost

    Net HopCost

    Net HopCost

    N3 1111

    11

    N1 32

    1

    N3 62

    1

    N1 62

    2

    N1 1

    N2 1

    N4 1N3 22

    +1

    N1 41

    1

    N2 41

    1

    N1 1N2 1N4 1

    N3 22

    N1 21

    1N4 2

    11

    N3 2211

    22

    +1N6 3

    11

  • 8/22/2019 IP advanced.pdf

    39/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 39

    39

    N2 61

    2

    N5 42

    1

    RIP : Update of the routing tables(4)

    N1 11

    0

    N3 32

    0N1 1

    20

    N2 21

    0

    A B

    C

    D E

    N1N1

    N2N2

    N6N6 N5N5

    N3N3 N4N4

    12

    2

    1

    2

    2

    2

    1

    1

    1

    1

    2

    N4 41

    0

    N5 52

    0

    N6 61

    0N4 4

    20

    N3 31

    0

    N6 62

    0

    N5 51

    0

    N2 22

    0

    Net HopCost Net HopCost

    Net HopCost

    Net HopCost

    Net HopCost

    N3 1111

    11

    N1 32

    1

    N3 62

    1

    N1 41

    1

    N2 41

    1

    N5 1

    N6 1N4 1N3 2

    N1 2N2 2

    N1 21

    1N4 2

    11

    N3 2211

    22

    N6 52

    1

    +1

    N5 1N6 1N4 1N3 2N1 2N2 2

    +1

    N6 31

    1

    N5 1N6 1N4 1N3 2N1 2N2 2

    N5 61

    1

    N4 61

    1

    +1

    N6 42 1

  • 8/22/2019 IP advanced.pdf

    40/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 40

    40

    N2 61

    2

    N5 42

    1

    RIP : Update of the routing tables(5)

    N1 11

    0N3 3

    20

    N1 12

    0

    N2 21

    0

    A B

    C

    D E

    N1N1

    N2N2

    N6N6 N5N5

    N3N3 N4N4

    12

    2

    1

    2

    2

    2

    1

    1

    1

    1

    2

    N4 41

    0

    N5 52

    0

    N6 61

    0N4 4

    20

    N3 31

    0

    N6 62

    0

    N5 51

    0

    N2 22

    0

    Net HopCost Net HopCost

    Net HopCost

    Net HopCost

    Net HopCost

    N3 1111

    11

    N1 32

    1

    N3 62

    1

    N1 61

    2N1 41

    1

    N2 41

    1

    N1 21

    1N4 2

    11

    N3 2211

    22

    N6 52

    1

    N6 31

    1

    N5 61

    1

    N4 61

    1

    N6 42 1

    N5 2

    N1 1N2 1

    N4 1N3 22

    N6 2

    +1

    N5 2

    N1 1

    N2 1N4 1N3 22

    N6 2

    +1

    N5 12 2

    N2 12

    1N4 1

    21

    N5 2

    N1 1N2 1N4 1N3 22

    N6 2

    +1

  • 8/22/2019 IP advanced.pdf

    41/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 41

    41

    N2 61

    2

    N5 42

    1

    RIP : Update of the routing tables(6)

    N1 11

    0N3 3

    20

    N1 12

    0

    N2 21

    0

    A B

    C

    D E

    N1N1

    N2N2

    N6N6 N5N5

    N3N3 N4N4

    12

    2

    1

    2

    2

    2

    1

    1

    1

    1

    2

    N4 41

    0

    N5 52

    0

    N6 61

    0N4 4

    20

    N3 31

    0

    N6 62

    0

    N5 51

    0

    N2 22

    0

    Net HopCost Net HopCost

    Net HopCost

    Net HopCost

    Net HopCost

    N3 1111

    11

    N1 32

    1

    N3 62

    1

    N1 61

    2N1 41

    1

    N2 41

    1

    N1 21

    1N4 2

    11

    N3 2211

    22

    N6 52

    1

    N6 31

    1

    N5 61

    1

    N4 61

    1

    N6 42 1N5 12 2

    N2 12

    1N4 1

    21

    N1 1

    N3 1N6 2

    N5 3

    N2 2N4 2

    N1 1

    N3 1N6 2

    N5 3

    N2 2N4 2

    +1

    +1

  • 8/22/2019 IP advanced.pdf

    42/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 42

    42

    N2 61

    2

    N5 42

    1

    RIP : Update of the routing tables(7)

    N1 12

    0

    N2 21

    0

    A B

    C

    D E

    N1N1

    N2N2

    N6N6 N5N5

    N3N3 N4N4

    12

    2

    1

    2

    2

    2

    1

    1

    1

    1

    2

    N4 41

    0

    N5 52

    0

    N6 61

    0N4 4

    20

    N3 31

    0

    N6 62

    0

    Net HopCost

    Net HopCost Net HopCost

    N3 1111

    11

    N1 32

    1

    N3 62

    1

    N1 61

    2N1 41

    1

    N2 41

    1

    N5 61

    1

    N4 61

    1

    N6 42 1+1

    N5 1N2 1

    N1 2

    N4 2

    N3 33N6 2

    N5 1N2 1

    N1 2N4 2N3 33

    N6 2

    +1

    N1 11

    0N3 3

    20

    Net HopCost

    N6 31

    1

    N5 12 2

    N2 12

    1N4 1

    21

    N5 51

    0

    N2 22

    0

    Net HopCost

    N1 21

    1N4 2

    11

    N3 2211

    22

    N6 52

    1

    During an adverse condition, the length of time for every device in the network to produce an accurate routingtable is called the convergence time.

  • 8/22/2019 IP advanced.pdf

    43/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 43

    43

    RIP: slow convergence

    B CAN1N1

    30s

    N1;N1;costcost=1=1

    advertisementadvertisement

    30s

    N1;N1;costcost=2=2

    advertisementadvertisement

    In RIP the time convergence could be very long:

  • 8/22/2019 IP advanced.pdf

    44/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 44

    44

    The route selected by RIP is not the fastest

    RIP: metric = hop count

    A

    B

    C

    2Mb/s2Mb/s

    64kb/s64kb/s

    2Mb/s2Mb/sN5N5

    N4N4

    N1N1 1

    2

    E1

    Solution : Assign a minimum cost to a route

    N2N2

    N3N3

    2

    N6N6

    1

    21

    N1 11

    0

    N2 21

    0N3 3

    10

    Net HopCost

    N4 22

    1

    N5 32

    1

    N6 22 1

  • 8/22/2019 IP advanced.pdf

    45/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 45

    45

    N2 61

    2

    N5 42

    1

    RIP: Failure in the network (1)

    N1 12

    0

    N2 21

    0

    A B

    C

    D E

    N1N1

    N2N2

    N6N6 N5N5

    N3N3 N4N4

    12

    2

    1

    2

    2

    2

    1

    1

    1

    1

    2

    N4 41

    0

    N5 52

    0

    N6 61

    0N4 4

    20

    N3 31

    0

    N6 62

    0

    N5 51

    0

    N2 22

    0

    Net HopCost

    Net HopCost

    Net HopCost

    Net HopCost

    N3 1111

    11

    N1 32

    1

    N3 62

    1

    N1 61

    2N1 41

    1

    N2 41

    1

    N1 21

    1N4 2

    11

    N3 2211

    22

    N6 52

    1

    N5 61

    1

    N4 61

    1

    N6 42 1

    N1 11

    0N3 3

    20

    Net HopCost

    N6 31

    1

    N5 12 2

    N2 12

    1N4 1

    21

    N3 1N6 2

    N5 2

    N2 1

    N4 1

    N6 2

    N5 2

    N2 1N4 1

    N6 2

    +1

    +1

    +1

    While the routing tables are converging, networks are susceptible to inconsistent routing behaviour. This cancause routing loops or other types of unstable packet forwarding.

  • 8/22/2019 IP advanced.pdf

    46/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 46

    46

    N2 61

    2

    N5 42

    1

    RIP: Failure in the network(2)

    N1 12

    0

    N2 21

    0

    A B

    C

    D E

    N1N1

    N2N2

    N6N6 N5N5

    N3N3 N4N4

    12

    2

    1

    2

    2

    2

    1

    1

    1

    1

    2

    N4 41

    0

    N5 52

    0

    N6 61

    0N4 4

    20

    N3 31

    0

    N6 62

    0

    N5 51

    0

    N2 22

    0

    Net HopCost

    Net HopCost

    Net HopCost

    Net HopCost

    N3 1111

    11

    N1 32

    1

    N3 62

    1

    N1 61

    2N1 41

    1

    N2 41

    1

    N1 21

    1N4 2

    11

    N3 2211

    22

    N6 52

    1

    N5 61

    1

    N4 61

    1

    N6 42 1

    N1 11

    N3 32

    0

    Net HopCost

    N6 31

    1

    N5 12

    N2 12

    N4 12

    N2 3

    N3 1

    N6 1

    N5 2N4 2

    +1

    N2 3

    N3 1N6 1

    N5 2

    N4 2

    +1

    231

    331

    231

  • 8/22/2019 IP advanced.pdf

    47/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 47

    47

    N2 61

    2

    N5 42

    1

    RIP: Failure in the network(3)

    N1 12

    0

    N2 21

    0

    A B

    C

    D E

    N1N1

    N2N2

    N6N6 N5N5

    N3N3 N4N4

    12

    2

    1

    2

    2

    2

    1

    1

    1

    1

    2

    N4 41

    0

    N5 52

    0

    N6 61

    0N4 4

    20

    N3 31

    0

    N6 62

    0

    N5 51

    0

    N2 22

    0

    Net HopCost

    Net HopCost

    Net HopCost

    Net HopCost

    N3 1111

    N1 32

    1

    N3 62

    1

    N1 61

    2N1 41

    1

    N2 41

    1

    N1 21

    1N4 2

    11

    N3 2211

    N6 52

    1

    N5 61

    1

    N4 61

    1

    N6 42 1

    N1 11

    N3 32

    0

    Net HopCost

    N6 31

    1

    N5 31

    N2 31

    N4 31

    2

    2

    3

    N5 1N6 1N4 1N3 2

    N1N2 2

    N5 1

    N6 1N4 1N3 2

    N1N2 2

    N5 1N6 1N4 1N3 2N1N1N2 2

    +1

    +1

    224422

    225522

    +1

  • 8/22/2019 IP advanced.pdf

    48/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 48

    48

    Counting to infinity (1)

    BA

    N1N1 N2N2 N3N3

    N1 11

    N2 22

    0

    Net HopCost

    N3 21

    1

    0

    112 2

    N1 22

    N2 21

    0

    Net HopCost

    N3 32

    0

    1

    30s

    30sRouting table broacasting

    Routing table broacasting

    Routing table broacasting

    Routing table broacasting

  • 8/22/2019 IP advanced.pdf

    49/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 49

    49

    2.1broadcast

    2.2broadcast

    2.1broadcast

    Counting to infinity(2)

    BA

    N1N1 N2N2 N3N3

    112 2

    t0

    30s

    N1 11N2 2

    20

    Net Hop Cost

    N3 21

    1

    0 N1 22

    N2 21

    0Net HopCost

    N3 32

    0

    1

    30s

    30s

    N1 11N2 2

    20

    Net Hop Cost

    N3 21 1

    0

    N1N2 1N3 1

    2+1N1 1

    1

    N2 22 0

    Net Hop Cost

    N3 21 1

    2

    N1 22

    N2 21

    0

    Net HopCost

    N3 32

    0

    13N1N2 1N3 2

    3

    N1N2 1N3 1

    4+1N1 21

    N2 22 0

    Net Hop Cost

    N3 21 1

    24

    21

    +1

    Convergence and counting to infinity

    Given sufficient time, this algorithm will correctly calculate the distance vector table on each device. However,during this convergence time, erroneous routes may propagate through the network.

    The manner in which the costs in the distance vector table increment gives rise to the term counting to infinity. Thecosts continues to increment, theoretically to infinity. To minimize this exposure, whenever a network isunavailable, the incrementing of metrics through routing updates must be halted as soon as it is practical to do so.In a RIP environment, costs continue to increment until they reach a maximum value of 16. This limit is definedin the RFC.

    A side effect of the metric limit is that it also limits the number of hops a packet can traverse from source networkto destination network. In a RIP environment, any path exceeding 15 hops is considered invalid. The routingalgorithm will discard these paths.

  • 8/22/2019 IP advanced.pdf

    50/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 50

    50

    2.1broadcast

    Split horizon

    BA

    N1N1 N2N2 N3N3

    112 2

    t0

    30s

    N1 11N2 2

    20

    Net Hop Cost

    N3 21

    1

    0 N1 22

    N2 21

    0Net HopCost

    N3 32

    0

    1

    30s

    30s

    N1 11N2 2

    20

    Net Hop Cost

    N3 21 1

    0

    N3 1 +1N1 11N2 22 0

    Net Hop Cost

    N3 21 1

    N1 22

    N2 21

    0

    Net HopCost

    N3 32

    0

    1

    N1 22N2 22 0

    Net Hop Cost

    N3 21 1

    2.2

    broadcast

    N1 1+1

    2.1broadcast

    N3 1 +1

    2.2

    broadcast+1

    There are two enhancements to the basic distance vector algorithm that can minimize the counting to infinityproblem:

    Split horizon with poison reverse

    Triggered updates

    These enhancements do not impact the maximum metric limit.

    Split horizon

    The excessive convergence time caused by counting to infinity may be reduced with the use of split horizon. Thisrule dictates that routing information is prevented from exiting the router on an interface through which theinformation was received.

    The convergence occurs considerably faster using the split horizon rule. The limitation to this rule is that eachnode must wait for the route to the unreachable destination to time out before the route is removed from thedistance vector table. In RIP environments, this timeout is at least three minutes after the initial outage. During thattime, the device continues to provide erroneous information to other nodes about the unreachable destination.This propagates routing loops and other routing anomalies.

  • 8/22/2019 IP advanced.pdf

    51/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 51

    51

    Poison Reverse

    BA

    N1N1 N2N2 N3N3

    112 2

    t0

    N1 11N2 2

    20

    Net Hop Cost

    N3 21 1

    0

    N1 22

    N2 21

    0

    Net HopCost

    N3 32

    0

    1

    N1 11N2 22 0

    Net Hop Cost

    N3 21 1

    0N1

    Poison reversePoison reverse

    Split horizonSplit horizon

    N1 22

    N2 21

    0

    Net HopCost

    N3 32

    0

    1-

    N3 1 +1N1 11N2 22 0

    Net Hop Cost

    N3 21 1

    0

    30s

    30s

    N1 1

    30s

    30s

    +1

    Poison reverse

    Poison reverse is an enhancement to the standard split horizon implementation. It is supported in RFC 1058. Withpoison reverse, all known networks are advertised in each routing update. However, those networks learnedthrough a specific interface are advertised as unreachable in the routing announcements sent out to that interface.

    This drastically improves convergence time in complex, highly-redundant environments. With poison reverse,when a routing update indicates that a network is unreachable, routes are immediately removed from the routingtable. This breaks erroneous, looping routes before they can propagate through the network. This approach differsfrom the basic split horizon rule where routes are eliminated through timeouts.

    Triggered updates

    Like split horizon with poison reverse, algorithms implementing triggered updates are designed to reduce networkconvergence time. With triggered updates, whenever a router changes the cost of a route, it immediately sendsthe modified distance vector table to neighboring devices. This mechanism ensures that topology changenotifications are propagated quickly, rather than at the normal periodic interval.

  • 8/22/2019 IP advanced.pdf

    52/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 52

    52

    Hold-Down

    BAN1N1 N2N2 N3N3

    1

    12 2

    N1 11N2 2

    20

    Net Hop Cost

    N3 21 1

    N1 22N2 21

    0

    Net HopCost

    N3 32

    0

    N1N1

    1

    /0

    C1

    N1N2 1

    Net Cost

    N3 2

    1

    N1N2 1

    NetCost

    N3 1

    2

    30s

    N1N2 1

    Net Cost

    N3 2

    1

    N1N2 1

    NetCost

    N3 2

    1

    30s

    66 Th.Th.

    advertisementadvertisement

    30s

    N1N2 1

    Net Cost

    N3 1

    2

    N1N2

    Net

    N31

    Cost

    1

    2

    N1 22

    N2 21

    0

    Net HopCost

    N3 32

    0

    /11

    N1 32N2 32

    1

    Net HopCost

    N3 31

    0

    N1 32

    N2 32

    1

    Net HopCost

    N3 31

    0

    /22

    End of failureEnd of failure

    N1 22

    N2 21

    0

    Net HopCost

    N3 32

    0

    /1N1 3

    2

    N2 32

    1

    Net HopCost

    N3 31

    0

    /2

    N1 11

    N2 22

    0

    Net Hop Cost

    N3 21 1

    /00

    N1 11

    N2 22

    0

    Net Hop Cost

    N3 21

    1

    /0

    N1 22

    N2 21

    0

    Net HopCost

    N3 32

    0

    /1

    N1 32

    N2 32

    1

    Net HopCost

    N3 31

    0

    /2

    Hold-down is the amount of time the router will wait before sending flashes about RIP changes. RIP has a 3-minute hold-down timer.

  • 8/22/2019 IP advanced.pdf

    53/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 53

    53

    Format of the RIP 1 message

    0 8 16 24 31

    Command Version

    Address Family Id

    Network 1 IP address

    Metric (Distance to network 1)

    1 : Request

    2 : Response

    Value 1 to 15Value 1 to 15

    Version =1

    2 for IP2 for IP

    Address Family Id

    Network 2 IP address

    Metric (Distance to network 2)

    RIP packet types

    The RIP protocol specifies two packet types. These packets may be sent by any device running the RIP protocol: Request packets: A request packet queries neighboring RIP devices to obtain their distance vector table.

    The request indicates if the neighbor should return either a specific subset or the entire contents of thetable.

    Response packets: A response packet is sent by a device to advertise the information maintained in itslocal distance vector table.

    RIPv1 does not manage subnet mask

  • 8/22/2019 IP advanced.pdf

    54/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 54

    54

    Encapsulation of the RIPv1 messages

    Version Headerlength

    Type OfService Datagram length

    Identification Flag Datagram Offset

    TTL Protocol: 1717 Checksum

    Source IP address

    Destination IPDestination IP addressaddress::

    IPheader

    UDPheader

    UDP source port UDP destination port :

    UDP message length Checksum UDP

    RIP messageRIP message(25 routes maxi)(25 routes maxi)

    512 bytesmax

    UDPUDP

    RIPRIP520520

    BroadcastBroadcast255.255.255.255255.255.255.255

    MAC src :--.--.--.--.--.--

    MAC dest: ffff..ffff..ffff..ffff..ffff..ffff

  • 8/22/2019 IP advanced.pdf

    55/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 55

    55

    Advantages / disadvantages of RIPv1

    Easy to implement,Easy to implement,

    Easy to configure, to maintain, to useEasy to configure, to maintain, to use

    Very useful in small networksVery useful in small networks

    Vulnerable while convergence timeVulnerable while convergence time,,

    Slow convergenceSlow convergence

    Large bandwidth used by the protocolLarge bandwidth used by the protocol

    Metric difficult to interpretMetric difficult to interpret

    no multiple pathsno multiple paths

    Arbitrary External route costsArbitrary External route costs

    No managing of subnetsNo managing of subnets

    No authentication of routing messagesNo authentication of routing messages

    The main advantage of distance vector algorithms is that they are typically easy to implement and debug. Theyare very useful in small networks with limited redundancy.

    RIP limitations

    There are a number of limitations observed in RIP environments:

    Path cost limits: The resolution to the counting to infinity problem enforces a maximum cost for a network path.This places an upper limit on the maximum network diameter. Networks requiring paths greater than 15 hops mustuse an alternate routing protocol.

    Network-intensive table updates: Periodic broadcasting of the distance vector table can result in increasedutilization of network resources. This can be a concern in reduced-capacity segments.

    Relatively slow convergence: RIP, like other distance vector protocols, is relatively slow to converge. Thealgorithms rely on timers to initiate routing table advertisements.

    No support for variable length subnet masking: Route advertisements in a RIP environment do not includesubnet masking information. This makes it impossible for RIP networks to deploy variable length subnet masks.

  • 8/22/2019 IP advanced.pdf

    56/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 56

    56

    RIPv2

    Allows subnet routingAllows subnet routing

    Authentication of the routing messagesAuthentication of the routing messages

    Multicast transmissionMulticast transmission

    Advantages of RIPv2 compared with RIPv1 :Advantages of RIPv2 compared with RIPv1 :

    RIP-2 is described in RFC 1723. The standard was published in late 1994.

  • 8/22/2019 IP advanced.pdf

    57/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 57

    57

    Multicast

    MAC 00.6f.66.32.0b.0800.6f.66.32.0b.08MAC

    00.53.27.32.02.c800.53.27.32.02.c8MAC MAC

    00.18.55.92.a2.0800.18.55.92.a2.08

    00.35.d6.39.00.35.d6.39.cbcb.0a.0a

    DestDest :: 01.00.5e.00.00.09 ..01.00.5e.00.00.09 ..

    00.80.9f.00.02.0300.80.9f.00.02.03MAC 01.00.5e.00.00.0901.00.5e.00.00.09

    01.00.5e.00.00.0901.00.5e.00.00.09

    For each multicast address, there exists a set of zero or more hosts that listen for packets transmitted to theaddress. This set of devices is called a host group.

    224.0.0.9: All RIP2 routers

  • 8/22/2019 IP advanced.pdf

    58/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 58

    58

    Format of the RIP 2 message

    0 8 16 24 31

    Command Version1 : Request

    2 : Response

    Value 1 to 15Value 1 to 15

    Version =2

    Authentic type0: no authentic

    2: Password data

    Authentication data

    2 for IP2 for IP

    Address Family Id

    x FF FF forauthentication entry

    Address Family Id

    Network 1 IP address

    Subnet Mask

    Next Hop

    Metric (Distance to network 1)

    Route tag

    InternalInternal ororexternalexternal routeroute

    RIP-2 is described in RFC 1723 it provides these additional benefits not available in RIP-1:

    Support for CIDR and VLSM: RIP-2 supports supernetting (that is, CIDR) and variable-length subnet masking.This support was the major reason the new standard was developed. This enhancement positions the standard to

    accommodate a degree of addressing complexity not supported in RIP-1.

    Support for multicasting: RIP-2 supports the use of multicasting rather than simple broadcasting of routingannoucements. This reduces the processing load on hosts not listening for RIP-2 messages. To ensureinteroperability with RIP-1 environments, this option is configured on each network interface.

    Support for authentication: RIP-2 supports authentication of any node transmitting route advertisements. Thisprevents fraudulent sources from corrupting the routing table.

    Support for RIP-1: RIP-2 is fully interoperable with RIP-1. This provides backward-compatibility between thetwo standards.

    The first entry in the update contains either a routing entry or an authentication entry.

    - Route Tag: This field is intended to differentiate between internal and external routes. Internal routes arelearned via RIP-2 within the same network or AS.

    - Subnet Mask: This field contains the subnet mask of the referenced network.

    - Next Hop: This field contains a recommendation about the next hop the router should use when sendingdatagrams to the referenced network.

    The RIP-2 standard does not encrypt the authentication password. It is transmitted in clear text. This makes thenetwork vulnerable to attack by anyone with direct physical access to the environment.

  • 8/22/2019 IP advanced.pdf

    59/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 59

    59

    Encapsulation of the RIPv2 messages

    Version Headerlength

    Type OfService Datagramme length

    Identification Flag Datagramme Offset

    TTL Protocol: 1717 Checksum

    Source IP address

    Destination IPDestination IP addressaddress::

    IPheader

    UDPheader

    UDP source port UDP destination port :

    UDP message length Checksum UDP

    RIP messageRIP message(25 routes maxi)(25 routes maxi)

    512 bytesmax

    UDPUDP

    RIPRIP520520

    MulticastMulticast224.0.0.9224.0.0.9

    MAC src :--.--.--.--.--.--

    MAC dest: 01.00.5E.00.00.0901.00.5E.00.00.09

    RIP uses a specific packet format to share information about the distances to known network destinations. RIPpackets are transmitted using UDP datagrams. RIP sends and receives datagrams using UDP port 520. RIPdatagrams have a maximum size of 512 octets.

    Updates larger than this size must be advertised in multiple datagrams. In LAN environments, RIP datagrams aresent using the MAC all-stations broadcast address and an IP network broadcast address. In point-to-point or non-broadcast environments, datagrams are specifically addressed to the destination device.

    A 512 byte packet size allows a maximum of 25 routing entries to be included in a single RIP advertisement.

  • 8/22/2019 IP advanced.pdf

    60/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 60

    60

    Relationship between IP and MAC in multicast mode

    MulticastMulticast MACMAC addressaddress

    1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1

    0 0 0 0 0 0 0 11 0 0 0 0 0 0 0 0 1 0 1 1 1 1 0 0 0

    0 1 - 0 0 5 E- - - -

    MulticastMulticast IPIP AddressAddress

    Classe D

    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1

    AddressAddress of groupof group

    0 00 0 0 00 0 0 90 9

    224 . .0 00 0 0 00 0 0 90 9.

    AddressAddress translationtranslation

    Multicast addressing

    Multicast devices use Class D IP addresses to communicate. These addresses are contained in the rangeencompassing 224.0.0.0 through 239.255.255.255.

    The mapping between the IP multicast destination address and the data-link address is not done with ARP.Instead, a static mapping has been defined. In an Ethernet network, multicasting is supported if the high-orderoctet of the data-link address is 0x'01'. The IANA has reserved the range 0x01005E000000' through0x'01005E7FFFFF' for multicast addresses. This range provides 23 usable bits. The 32-bit multicast IP address ismapped to an Ethernet address by placing the low-order 23 bits of the Class D address into the low-order 23 bitsof the IANA reserved address block.

  • 8/22/2019 IP advanced.pdf

    61/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 61

    61

    netid2

    netid1

    netid3netid4

    CISCO : RIP Configuration

    R2#

    R2(config)#

    config terminal

    routerrip

    R2(config-router)#

    Routing protocol

    R2

    R3

    R1

    netid5

    R2(config-router)#version 2 RIPv2

    network

    R2(config-router)# network

    R2(config-router)# network

    RIP routing updates will be sent and

    received only through interfaces on

    these networks

    router rip : Enable a RIP routing process

    network network-number :Associate a network with a RIP routing process. RIP routing updates will be sent and received onlythrough interfaces on this network. RIP sends updates to the interfaces in the specified networks. Also, if an interfaces network isnot specified, it will not be advertised in any RIP update.

    version 2 : RIP v2 supports authentication, key management, route summarization, classless interdomain routing (CIDR), andvariable-length subnet masks (VLSMs).

    no auto-summary Disable automatic summarization. RIP Version 2 supports automatic route summarization by default. Thesoftware summarizes subprefixes to the classful network boundary when crossing classful network boundaries. If you havedisconnected subnets, disable automatic route summarization to advertise the subnets.

    Static routes that point to an interface will be advertised via RIP, IGRP, and other dynamic routing protocols, regardless of whetherredistribute static router configuration commands were specified for those routing protocols. These static routes are advertisedbecause static routes that point to an interface are considered in the routing table to be connected and hence lose their staticnature. However, if you define a static route to an interface that is not one of the networks defined in a network command, nodynamic routing protocols will advertise the route unless a redistribute static command is specified for these protocols.

  • 8/22/2019 IP advanced.pdf

    62/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 62

    62

    Interface configuration

    OnlyOnly one router onone router on thisthis LANLAN((broadcastingbroadcasting of RIPof RIP

    messages notmessages not requiredrequired))

    RIPRIP should be implementedshould be implemented ininthisthis hosthost havinghaving 2 interfaces in2 interfaces inorderorder to selectto select thethe best routebest route

    OnlyOnly one routerone routeronon thisthis LAN but,LAN but,

    Passive-interface

    PSTN

    static route

    Example: (config)# router rip

    (config-router)# network network-to-be-advertised

    (config-router)# network network-to-be- advertised

    (config-router)# passive-interface interface

    RIP modes of operation

    RIP hosts have two modes of operation:

    Active mode: Devices operating in active mode advertise their distance vector table and also receive routingupdates from neighboring RIP hosts. Routing devices are typically configured to operate in active mode.

    Passive (or silent) mode: Devices operating in this mode simply receive routing updates from neighboring RIPdevices. They do not advertise their distance vector table. End stations are typically configured to operate inpassive mode.

  • 8/22/2019 IP advanced.pdf

    63/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 63

    63

    CISCO : Show RIP protocol

    #show ip protocolsRouting Protocol is "rip"

    Sending updates every 30 seconds, next due in 13 seconds

    Invalid after 180 seconds, hold down 180, flushed after 240

    Outgoing update filter list for all interfaces is

    Incoming update filter list for all interfaces is

    Redistributing: rip

    Default version control: send version 1, receive any version

    Interface Send Recv Key-chain

    Ethernet0 1 1 2

    Ethernet1 1 1 2

    Routing for Networks:

    172.16.0.0

    Routing Information Sources:

    Gateway Distance Last Update

    172.16.200.4 120 00:00:22

    172.16.200.1 120 00:00:12

    172.16.200.3 120 00:00:07

    172.16.200.200 120 00:00:05

    Distance: (default is 120)

    Weight added to the original metric which is function

    of routing protocol : RIP120, OSPF110, IGRP100, ...

    Next routing table transmissionRouting table

    broadcastedevery 30

    Route becomesinvalid after 180

    without information

    After the end offailure, the routekept invalid 180

    When a route becomesinvalid (metric=16),router keeps it in

    memory during 240

    Administrative distance is the feature used by routers to select the best path when there are two or more different routes to thesame destination from two different routing protocols. Administrative distance defines the reliability of a routing protocol. Each

    routing protocol is prioritized in order of most to least reliable (believable) using an administrative distance value. Administrative distance is the first criterion that a router uses to determine which routing protocol to use. The smaller the

    administrative distance value, the more reliable the protocol.

    If two protocols provide route information for the same destination.When several routing protocols are implemented in CISCOrouter, it adds a distance (weight) to the original metric, RIP: 120, OSPF:110, IGRP:100. If there are two routes with the samemetric to a destination, example: one got by Rip and another by Ospf, the router will select the ospf route,

    The Cisco IOS software sends routing information updates every 30 seconds; this process is termed advertising.

    If a router does not receive an update from another router for 180 seconds or more, it marks the routes served by the nonupdatingrouter as being unusable.

    If there is still no update after 240 seconds, the router removes all routing table entries for the nonupdating router.

  • 8/22/2019 IP advanced.pdf

    64/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 64

    64

    r202#

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

    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 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 default

    U - per-user static route, o - ODR

    T - traffic engineered route

    Gateway of last resort is not set

    172.16.0.0/24 is subnetted, 14 subnets

    R 172.16.204.0 [120/1] via 172.16.200.4, 00:00:00, Ethernet0

    C 172.16.200.0 is directly connected, Ethernet0R 172.16.201.0 [120/1] via 172.16.200.1, 00:00:20, Ethernet0

    C 172.16.202.0 is directly connected, Ethernet1

    R 172.16.203.0 [120/1] via 172.16.200.3, 00:00:14, Ethernet0

    R 172.16.1.0 [120/1] via 172.16.200.200, 00:00:14, Ethernet0

    show ip route

    CISCO : show IP route

    If two protocols provide route information for the same destination.When several routing protocols are implemented in CISCOrouter, it adds a administrative distance (weight) to the original metric, RIP: 120, OSPF:110, IGRP:100. If there are two routes withthe same metric to a destination, example: one got by Rip and another by Ospf, the router will select the ospf route,

    Connected interface 0

    Static route 1

    Enhanced Interior Gateway Routing Protocol (EIGRP) summary route 5

    External Border Gateway Protocol (BGP) 20

    Internal EIGRP 90

    IGRP 100

    OSPF 110

    Intermediate System-to-Intermediate System (IS-IS) 115

    Routing Information Protocol (RIP) 120

    Exterior Gateway Protocol (EGP) 140

    On Demand Routing (ODR) 160

    External EIGRP 170

    Internal BGP 200

    Unknown* 255

  • 8/22/2019 IP advanced.pdf

    65/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 65

    65

    CISCO : Debug RIP events

    r202#deb ip rip events

    RIP event debugging is on

    r202#

    00:45:46: RIP: received v1 update from 172.16.200.4 on Ethernet0

    00:45:46: RIP: Update contains 1 routes00:45:52: RIP: sending v1 update to 255.255.255.255 via Ethernet0 (172.16.200.2)

    00:45:52: RIP: Update contains 1 routes

    00:45:52: RIP: Update queued

    00:45:52: RIP: sending v1 update to 255.255.255.255 via Ethernet1 (172.16.202.1)

    00:45:52: RIP: Update sent via Ethernet0

    00:45:52: RIP: Update contains 13 routes

    00:45:52: RIP: Update queued

    00:45:52: RIP: Update sent via Ethernet1

    00:45:57: RIP: received v1 update from 172.16.200.1 on Ethernet0

    00:45:57: RIP: Update contains 1 routes

    00:46:02: RIP: received v1 update from 172.16.200.200 on Ethernet0

    00:46:02: RIP: Update contains 9 routes

    00:46:05: RIP: received v1 update from 172.16.200.3 on Ethernet000:46:05: RIP: Update contains 1 routes

    r202#u all

  • 8/22/2019 IP advanced.pdf

    66/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 66

    66

    CISCO : Debug RIP

    r202#deb ip ripRIP protocol debugging is onr202#00:46:24: RIP: received v1 update from 172.16.200.1 on Ethernet000:46:24: 172.16.201.0 in 1 hops00:46:31: RIP: received v1 update from 172.16.200.200 on Ethernet000:46:31: 172.16.1.0 in 1 hops00:46:31: 172.16.2.0 in 1 hops

    00:46:31: 172.16.104.0 in 3 hops00:46:31: 172.16.105.0 in 3 hops00:46:31: 172.16.106.0 in 3 hops00:46:31: 172.16.100.0 in 2 hops00:46:31: 172.16.101.0 in 3 hops00:46:31: 172.16.102.0 in 3 hops00:46:31: 172.16.103.0 in 3 hops00:46:34: RIP: received v1 update from 172.16.200.3 on Ethernet000:46:34: 172.16.203.0 in 1 hops00:46:43: RIP: received v1 update from 172.16.200.4 on Ethernet000:46:43: 172.16.204.0 in 1 hops00:46:46: RIP: sending v1 update to 255.255.255.255 via Ethernet0 (172.16.200.2)00:46:46: subnet 172.16.202.0, metric 100:46:46: RIP: sending v1 update to 255.255.255.255 via Ethernet1 (172.16.202.1)00:46:46: subnet 172.16.204.0, metric 200:46:46: subnet 172.16.200.0, metric 100:46:46: subnet 172.16.201.0, metric 200:46:46: subnet 172.16.203.0, metric 200:46:46: subnet 172.16.1.0, metric 2

    00:46:46: subnet 172.16.2.0, metric 200:46:46: subnet 172.16.104.0, metric 400:46:46: subnet 172.16.105.0, metric 400:46:46: subnet 172.16.106.0, metric 400:46:46: subnet 172.16.100.0, metric 300:46:46: subnet 172.16.101.0, metric 400:46:46: subnet 172.16.102.0, metric 400:46:46: subnet 172.16.103.0, metric 400:46:52: RIP: received v1 update from 172.16.200.1 on Ethernet000:46:52: 172.16.201.0 in 1 hops

  • 8/22/2019 IP advanced.pdf

    67/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 67

    Alcatel University - 8AS 90200 1140 VT ZZA Ed.0167

    Routing

    3. OSPF protocol

    Open Shortest Path First (OSPF)

    The Open Shortest Path First (OSPF) protocol is another example of an interior gateway protocol. It was developed as a non-proprietary routing alternative to address the limitations of RIP. Initial development started in 1988 and was finalized in 1991.Subsequent updates to the protocol continue to be published. The current version of the standard is documented in RFC 2328.

    OSPF provides a number of features not found in distance vector protocols. Support for these features has made OSPF a widely-deployed routing protocol in large networking environments. In fact, RFC 1812 Requirements for IPv4 Routers, lists OSPF as theonly required dynamic routing protocol.

    Equal cost load balancing: The simultaneous use of multiple paths may provide more efficient utilization of network resources.

    Logical partitioning of the network: This reduces the propagation of outage information during adverse conditions. It also provides theability to aggregate routing announcements that limit the advertisement of unnecessary subnet information.

    Support for authentication: OSPF supports the authentication of any node transmitting route advertisements. This prevents fraudulentsources from corrupting the routing tables.

    Faster convergence time: OSPF provides instantaneous propagation of routing changes. This expedites the convergence timerequired to update network topologies.

    Support for CIDR and VLSM: This allows the network administrator to efficiently allocate IP address resources.

  • 8/22/2019 IP advanced.pdf

    68/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 68

    68

    NetworkNetwork

    222.211.10222.211.10.00

    NetworkNetwork

    192.213.11192.213.11.00

    Network : 128.213Network : 128.213.0.0.0.0

    Shortest path tree

    RbRb

    RdRd

    RcRc

    Each router makes a tree-representation of the network

    RaRa (view of R1)RaRa

    NetworkNetwork

    128.213128.213.0.0.0.0

    LinkLink--costcost= 100 000 000 / bandwidthbps

    55

    55

    1010

    RbRb

    1010

    RcRc

    1010

    1010

    NetworkNetwork

    192.213.11192.213.11.00

    55

    NetworkNetwork222.211.10222.211.10.00

    RdRd

    55

    55

    1010

    costcost

    00

    costcost

    The SPF algorithm is used to process the information in the topology database. It provides a tree-representation of the network.The device running the SPF algorithm is the root of the tree. The output of the algorithm is the list of shortest-paths to each

    destination network. Because each router is processing the same set of LSAs, each router creates an identical link state database. However,

    because each device occupies a different place in the network topology, application of the SPF algorithm produces a differenttree for each router.

    cost= 100 000 000 / bandwidthbps

    Example :

    Cost of 10Mb/s Ethernet link : 108 / 107 = 10

    Cost of link T1 1,544Mb/s: 108 / 1544x103 = 64

  • 8/22/2019 IP advanced.pdf

    69/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 69

    69

    From To L CostFrom To L Cost

    From To L Cost

    SPF database (Initialisation)

    RbRb

    RdRd

    RcRc

    RaRa

    Net: 3Net: 3

    Net: 2Net: 2

    Net: 1Net: 1

    11

    11

    11

    22

    22

    22

    33

    AA B 1B 111 33AA C 1C 111 33

    From To L Cost

    C3

    C1

    C1

    C3

    C2

    C3

    C4

    Toutes les Databases sont identiques

    AA NN11 1111 33

    CC A 1A 133 22CC B 1B 133 22

    CC NN11 1133 22CC NN33 3322 11

    CC D 3D 322 11

    DD B 2B 222 44DD C 3C 311 33

    DD NN33 3311 33

    BB A 1A 122 11

    BB D 2D 211 33

    BB NN11 1122 11BB NN22 2211 33

    BB C 1C 122 11

    DD NN22 2222 44

    Link state database

    The link state database is also called the topology database. It contains the set of link state advertisements describing theOSPF network and any external connections.

  • 8/22/2019 IP advanced.pdf

    70/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 70

    70

    From To L Cost

    From To L Cost

    SPF database (Updating)

    RbRb

    RdRd

    RcRc

    RaRa

    Net: 3Net: 3

    Net: 2Net: 2

    Net: 1Net: 1

    11

    11

    11

    22

    22

    22

    33

    AA B 1B 111 33AA C 1C 111 33

    From To L Cost

    C3

    C1

    C1

    C3

    C2

    C3

    C4

    All the Databases are identical

    AA NN11 1111 33

    From To L Cost

    CC A 1A 133 22CC B 1B 133 22

    CC NN11 1133 22CC NN33 3322 11

    CC D 3D 322 11

    BB A 1A 122 11

    BB D 2D 211 33CC NN11 1133 22

    DD B 2B 222 44DD C 3C 311 33

    CC A 1A 133 22

    DD NN33 3311 33

    BB NN11 1122 11BB NN22 2211 33

    CC D 3D 322 11CC NN33 3322 11

    DD NN22 2222 44

    CC B 1B 133 22

    BB C 1C 122 11

    DD B 2B 222 44DD C 3C 311 33

    DD NN33 3311 33

    BB A 1A 122 11BB C 1C 122 11

    BB NN11 1122 11BB NN22 2211 33

    BB D 2D 211 33

    CC A 1A 133 22CC B 1B 133 22

    CC NN11 1133 22CC NN33 3322 11

    AA B 1B 111 33AA C 1C 111 33

    AA NN11 1111 33CC D 3D 322 11

    BB A 1A 122 11

    BB D 2D 211 33

    BB NN11 1122 11BB NN22 2211 33

    BB C 1C 122 11

    AA B 1B 111 33AA C 1C 111 33

    AA NN11 1111 33

    CC NN11 1133 22

    DD B 2B 222 44DD C 3C 311 33

    CC A 1A 133 22

    DD NN33 3311 33

    CC D 3D 322 11CC NN33 3322 11

    DD NN22 2222 44

    CC B 1B 133 22

    DD NN22 2222 44

    DD B 2B 222 44DD C 3C 311 33

    BB A 1A 122 11BB C 1C 122 11

    AA B 1B 111 33AA C 1C 111 33

    AA NN11 1111 33

    DD NN33 3311 33

    BB NN11 1122 11BB NN22 2211 33

    BB D 2D 211 33

    DD NN22 2222 44

    Each router within the area maintains an identical copy of the link state database.

  • 8/22/2019 IP advanced.pdf

    71/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 71

    71CC

    AA BB CC DD

    AA BB CC DD

    BB

    CC

    DD

    AA

    BB

    AA BB CC DD

    BB CC DD

    Route

    A to

    Route

    Route

    SPF calculation

    From To L Cost

    RaRaAA B 1B 111 33AA C 1C 111 33

    AA NN11 1111 33

    BB A 1A 122 11

    BB D 2D 211 33CC NN11 1133 22

    DD B 2B 222 44DD C 3C 311 33

    CC A 1A 133 22

    DD NN33 3311 33

    BB NN11 1122 11BB NN22 2211 33

    CC D 3D 322 11CC NN33 3322 11

    DD NN22 2222 44

    CC B 1B 133 22

    BB

    C 1C 122 11

    33 3300

    00 1111 33

    112222

    44 33

    00

    00

    3+3+00 3+3+113+3+11 3+3+33

    A,B

    C=3

    A,C

    C=3

    A,B,DC=6

    3+3+113+3+223+3+22 3+3+00

    A,C,DC=4

    +3+3+3+3

    RbRb

    RdRd

    RcRc

    Net: 3Net: 3

    Net: 2Net: 2

    Net: 1Net: 1

    11

    11

    11

    22

    22

    22

    33

    C3

    C1

    C1

    C3

    C2

    C3

    C4

    primaryprimary

    secondarysecondary

    There are two algorithms for computing a routing table from a link table. These are:

    the forward search algorithm (Also known as Dijkstra's Algorithm) and,

    the backward search algorithm (Also known as the Bellman-Ford Algorithm)

  • 8/22/2019 IP advanced.pdf

    72/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 72

    72

    SPF example : Network topology

    slipslip

    11

    E12E12

    E15E15

    N3N3

    E12E12 E13E13 E14E14N1N1

    N2N2 N4N4

    N9N9

    N12N12

    N11N11

    N8N8

    N7N7

    R1R1

    R2R2 R3R3

    R4R4 R5R5

    R9R9

    R12R12

    N10N10

    R11R11

    R7R7

    R8R8

    R6R6

    N6N6R10R10

    8888

    88 88 88

    77

    6688

    11

    33

    11

    11

    11

    101022

    11 2211

    11

    44

    55

    77

    66

    66

    22

    99

    22

    33

    33

    1133

    11

    11

    66

    Inter networks example:

  • 8/22/2019 IP advanced.pdf

    73/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 73

    73

    SPF example : Init

    E12E12 E13E13 E14E14

    8888

    88 88 88

    77

    88

    11

    1010

    22

    11 2211

    11

    44

    E12E12

    E15E15

    55

    77

    66

    66

    22

    99

    22

    33

    R1R1

    R2R2 R3R3

    R4R4 R5R5

    R9R9

    R12R12R11R11

    R7R7

    R8R8

    R6R6

    N6N61133 R10R10

    11

    11

    66

    N3N3

    N2N2

    33N1N1

    33 N11N11

    N9N9

    N10N10 N12N12

    N8N8

    N4N4

    11

    11

    11

    Dest Cost

    R6R6R10R10 77R6R6R3R3 66R6R6R5R5 66

    N7N7

    66

    Dest Cost

    R3R3R6R6 88R3R3N4N4 22R3R3N3N3 11

    Dest Cost

    R4R4

    R5R5 88R4R4N3N3 11

    Dest Cost

    R1R1N1N1 33R1R1N3N3 11

    Dest Cost

    R2R2N2N2 33R2R2N3N3 11

    Dest Cost

    R9R9N11N11 33R9R9N9N9 11

    Dest Cost

    R12R12N9N9 11

    R12R12N10N10 22R12R12N12N12 1010

    Dest Cost

    R11R11N9N9 11R11R11N8N8 22

    Dest Cost

    R10R10R6R6 55R10R10N6N6 11R10R10N8N8 33

    Dest Cost

    R8R8N6N6 11R8R8N7N7 44

    Dest Cost

    R7R7R5R5 66

    R7R7N6N6 11R7R7E12E12 22R7R7E16E16 99

    Dest Cost

    R5R5R4R4 88R5R5R6R6 77R5R5R7R7 66R5R5E12E12 88R5R5E13E13 88R5R5E14E14 88

    Each node knows the directly connected links as well as the adjacent routers.

  • 8/22/2019 IP advanced.pdf

    74/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 74

    74

    SPF example : Database exchange

    E12E12 E13E13 E14E14

    8888

    88 88 88

    77

    88

    11

    1010

    22

    11 2211

    11

    44

    E12E12

    E15E15

    55

    77

    66

    66

    22

    99

    22

    33

    R1R1

    R2R2 R3R3

    R4R4 R5R5

    R9R9

    R12R12R11R11

    R7R7

    R8R8

    R6R6

    N6N61133 R10R10

    11

    11

    66

    N3N3

    N2N2

    33N1N1

    33 N11N11

    N9N9

    N10N10 N12N12

    N8N8

    N4N4

    11

    11

    11

    N7N7

    66

    R6R6Dest Cost

    R6R6R10R10 77R6R6R3R3 66R6R6R5R5 66R3R3R6R6 88R3R3N4N4 22

    R3R3N3N3 11R2R2N2N2 33R2R2N3N3 11R1R1N1N1 33R1R1N3N3 11R4R4R5R5 88R4R4N3N3 11R9R9N11N11 33R9R9N9N9 11R12R12N9N9 11R12R12N10N10 22R12R12N12N12 1010R11R11N9N9 11R11R11N8N8 22R10R10R6R6 55R10R10N6N6 11R10R10N8N8 33R8R8N6N6 11

    R8R8N7N7 44R7R7R5R5 66R7R7N6N6 11R7R7E12E12 22R7R7E15E15 99R5R5R4R4 88R5R5R6R6 77R5R5R7R7 66R5R5E12E12 88R5R5E13E13 88R5R5E14E14 88

    After exchanges between routers, each router within the area maintains an identical copy of the link state database.

  • 8/22/2019 IP advanced.pdf

    75/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 75

    75

    SPF example : Graph

    E12E12 E13E13 E14E1488 88 88

    E12E12

    E15E15

    22

    99

    R1R1

    R2R2 R3R3

    R4R4 R5R5

    R9R9

    R12R12R11R11

    R7R7

    R8R8

    R6R6

    N6N6R10R10

    N3N3

    N2N2

    N1N1

    N11N11

    N9N9

    N10N10 N12N12

    N8N8

    N4N4

    N7N7

    88

    66

    11

    11

    22 22

    11

    1133

    33

    11

    11

    33

    33 11

    1188

    88

    66

    66

    557733

    33

    1111

    11

    11

    11

    11

    1010

    101022

    22

    22

    22

    33

    33

    11

    11

    1111

    4444

    1111

    7766

    R6R6Dest Cost

    R6R6R10R10 77R6R6R3R3 66R6R6R5R5 66R3R3R6R6 88R3R3N4N4 22

    R3R3N3N3 11R2R2N2N2 33R2R2N3N3 11R1R1N1N1 33R1R1N3N3 11R4R4R5R5 88R4R4N3N3 11R9R9N11N11 33R9R9N9N9 11R12R12N9N9 11R12R12N10N10 22R12R12N12N12 1010R11R11N9N9 11R11R11N8N8 22R10R10R6R6 55R10R10N6N6 11R10R10N8N8 33R8R8N6N6 11

    R8R8N7N7 44R7R7R5R5 66R7R7N6N6 11R7R7E12E12 22R7R7E15E15 99R5R5R4R4 88R5R5R6R6 77R5R5R7R7 66R5R5E12E12 88R5R5E13E13 88R5R5E14E14 88

    From its topology database, any router can know the network topology.

  • 8/22/2019 IP advanced.pdf

    76/306

  • 8/22/2019 IP advanced.pdf

    77/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 77

    77

    SPF example : Routing table of R6

    E13E13 E14E14

    88 88

    E12E12E15E15

    99

    R1R1

    R2R2R3R3

    R4R4R5R5

    R9R9

    R12R12

    R11R11

    R7R7

    R8R8

    R6R6

    N6N6R10R10

    N3N3

    N2N2

    N1N1

    N11N11

    N9N9

    N10N10 N12N12

    N8N8

    N4N4

    N7N7

    11

    11

    66

    33

    33

    6622

    77

    33

    33

    11

    11

    1010

    22

    11

    44

    22

    Dest. Next Costhop

    N1 R3 10

    N2 R3 10

    N3 R3 7

    N4 R3 8N6 R10 8

    N7 R10 12

    N8 R10 10

    N9 R10 11

    N10 R10 13

    N11 R10 14

    N12 R10 21

    RT5 R5 6

    RT7 R10 8

    E12 R10 10

    E13 R5 14

    N14 R5 14

    N15 R10 17

    22

    11

    11

    1111

    11

    Routing tables are constructed by examining a link table whose entries detail the cost of each link in the network.

  • 8/22/2019 IP advanced.pdf

    78/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 78

    78

    SPF example : Tree seen by R6

    E13E13 E14E14

    E12E12 E15E15

    R1R1 R2R2

    R3R3

    R4R4

    R5R5

    R9R9 R12R12

    R11R11 R7R7R8R8

    R6R6

    N6N6

    R10R10

    N3N3

    N2N2N1N1

    N11N11

    N9N9

    N10N10 N12N12

    N8N8

    N4N4 N7N7

    Each router can see the network as a tree.

  • 8/22/2019 IP advanced.pdf

    79/306

    Alcatel University - 8AS 90200 1140 VH ZZA Ed.01 Page 79

    79

    OSPF: Router Identifier

    IP@= 3.3.3.3IP@= 3.3.3.3

    IP@=1.1.1.1IP@=1.1.1.1

    IP@=2.2.2.2IP@=2.2.2.2

    LoopbackLoopback

    IP@= 5.5.5.5IP@= 5.5.5.5

    LoopbackLoopbackIP@= 7.7.7.7IP@= 7.7.7.7

    IP@= 9.9.9.9IP@= 9.9.9.9

    IP@=4.4.4.4IP@=4.4.4.4

    RID=RID=

    if no loopback,

    RID=RID=

    RID= (Router ID) highest loopback IP@,

    the highest interface IP@.

    7.7.7.77.7.7.7

    3.3.3.33.3.3.3

    In OSPF, an unique identifier is assigned to each node : RID (Router Identity)

    The RID is the highest IP address on the box or the loopback interface, calculated at boot time or whenever the OSPF processis restarted.

  • 8/2