13 ospf rouitng

download 13 ospf rouitng

of 27

Transcript of 13 ospf rouitng

  • 8/11/2019 13 ospf rouitng

    1/27

    aveen Patel

  • 8/11/2019 13 ospf rouitng

    2/27

    aveen Patel

    Open standard protocol

    Successor of RIP

    Classless routing protocol

    Uses Shortest Path First (SPF) Algorithm

    Updates are sent through Multicast IP address

    224.0.0.5

    Administrative distance is 110

    Metric = Cost =108/Bandwidth in bps (CISCO)

    Open Shortest Path First

  • 8/11/2019 13 ospf rouitng

    3/27

    aveen Patel

    Hello packets are sent every 10 seconds

    Faster Convergence

    Hierarchical design with Multiple Areas

    Area 0 is called the backbone area

    Router ID

    The highest IP address of the active physical interface

    of the router is elected as Router ID.

    If logical interface is configured, the highest IP

    address of the logical interface is elected as Router ID

    OSPF (contd..)

  • 8/11/2019 13 ospf rouitng

    4/27

    aveen Patel

    It maintains three tables :

    Neighbor Table

    Neighbor table contains information about the directly

    connected OSPF neighbors forming adjacency.

    Database table

    Database table contains information about the entire

    view of the topology with respect to each router.

    Routing information Table

    Routing table contains information about the best path

    calculated by the shortest path first algorithm in the

    database table.

    OSPF Tables

  • 8/11/2019 13 ospf rouitng

    5/27

    aveen Patel

    OSPF - Network Diagram

    LAN - 192.168.1.0/24 LAN 192.168.2.0/24 LAN - 192.168.3.0/24

    AREA 0

    E0192.168.1.1/24

    E0192.168.2.1/24

    E0192.168.3.1/

    10.0.0.1/8S0

    S110.0.0.2/8

    11.0.0.1/8S0

    S111.0.0.2/8

  • 8/11/2019 13 ospf rouitng

    6/27

    aveen Patel

    OSPF Packet Types

    Hello

    DBD (Database Descriptor)

    LSR (Link State Request)

    LSU (Link State Update)

    LSAck (Link State Acknowledge)

  • 8/11/2019 13 ospf rouitng

    7/27

    aveen Patel

    OSPF States

    DOWN

    Init

    2-Way

    Ex-Start

    Exchange

    Loading

    Full

  • 8/11/2019 13 ospf rouitng

    8/27

    aveen Patel

    How OSPF Works

    10.0.0.1/8SO

    10.0.0.2/8

    S1

    DOWN STATE

    I am router ID 192.168.1.1 and I see no one.

    INIT STATE Router HYDNeighbors List

    192.168.1.1/24, int s1I am router ID 172.16.0.1 and I see 192.168.1.1.

    Router CHENeighbors List

    172.16.0.0/16, int s0

    2-way STATE

  • 8/11/2019 13 ospf rouitng

    9/27

    aveen Patel

    10.0.0.1/8SO

    10.0.0.2/8

    S1

    No, I will start exchange because I have a higher router ID

    I will start exchange because I have router ID 172.16.0.1

    Ex-Start STATE

    Here is a summary of my link-state database

    Exchange State

    Here is a summary of my link-state database

    How OSPF Works

  • 8/11/2019 13 ospf rouitng

    10/27

    aveen Patel

    10.0.0.1/8SO

    10.0.0.2/8

    S1

    Thanks for the Information

    Loading State

    I need the complete entry for network 172.16.0.0/16

    Here is the entry for network 172.16.0.0/16

    Thanks for the Information!

    Full State

    How OSPF Works

  • 8/11/2019 13 ospf rouitng

    11/27

    aveen Patel

    Consumes More Memory and CPU processing

    Disadvantages of OSPF

  • 8/11/2019 13 ospf rouitng

    12/27

    aveen Patel

  • 8/11/2019 13 ospf rouitng

    13/27

    aveen Patel

    exityderabad(config-if)#

    Hyderabad(config)#

    telnet 192.168.1.1

    ================================

    Welcome to Hyderabad Router

    ================================

    User Access Verification

    password :

    ****

    ****

    enable

    configure terminal

    interface serial 0

    ip address 10.0.0.1 255.0.0.0

    no shut

    clockrate 64000

    encapsulation hdlc

    Hyderabad>

    password :

    Hyderabad#

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

    Hyderabad(config)#

    Hyderabad(config-if)#

    Hyderabad(config-if)#

    Hyderabad(config-if)#

    Hyderabad(config-if)#

    Microsoft Windows 2000 [Version 5.00.2195]

    (C) Copyright 1985-2000 Microsoft Corp.

    C:\>

    Connecting .....

    Directly Connected Networks onHYDERABAD Router

    192.168.1.0

    10.0.0.0

  • 8/11/2019 13 ospf rouitng

    14/27

    aveen Patel

    Hyderabad(config)#

    router ospf 1

    Hyderabad(config-router)#

    Hyderabad(config-router)# network 192.168.1.0 0.0.0.255 area 0

    Hyderabad(config-router)# network 10.0.0.0 0.255.255.255 area 0

    no ip routingyderabad(config)#

    Hyderabad(config)#

    ip routing

    Configuring OSPF

    Router(config)# router ospf

    Router(config-router)# network area

  • 8/11/2019 13 ospf rouitng

    15/27

    aveen Patel

    show ip routeyderabad#

    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 2

    E1 - 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

    Gateway of last resort is not set

    C 10.0.0.0/8 is directly connected, Serial0

    O 11.0.0.0/8 [110/128] via 10.0.0.2, 00:00:36, Serial0

    C 192.168.1.0/24 is directly connected, Ethernet0

    O 192.168.2.0/24 [110/74] via 10.0.0.2, 00:00:36, Serial0

    O 192.168.3.0/24 [110/138] via 10.0.0.2, 00:00:36, Serial0

    Hyderabad#

    ^

    Z

    O for OSPF routes110 is nothing but

    Administrative Distance

    Metric of OSPF

    Cost

    Hyderabad(config)#

    router ospf 1

    Hyderabad(config-router)#

    Hyderabad(config-router)# network 192.168.1.0 0.0.0.255 area 0

    Hyderabad(config-router)# network 10.0.0.0 0.255.255.255 area 0

    no ip routingyderabad(config)#

    Hyderabad(config)#

    ip routing

  • 8/11/2019 13 ospf rouitng

    16/27

    aveen Patel

    show ip ospf databaseyderabad#

    OSPF Router with ID (192.168.1.1) (Process ID 1)

    Router Link States (Area 0)

    Link ID ADV Router Age Seq# Checksum Link

    192.168.1.1 192.168.1.1 790 0x80000003 0x897B 3

    192.168.2.1 192.168.2.1 234 0x80000005 0x542 5

    192.168.3.1 192.168.3.1 232 0x80000003 0xD328 3

    Hyderabad#

    show ip ospf neighbor

    Neighbor ID Pri State Dead Time Address

    192.168.2.1 1 FULL/ - 00:00:36 10.0.0.2

    Hyderabad#

  • 8/11/2019 13 ospf rouitng

    17/27

    aveen Patel

    Chennai(config-if)#

    Chennai(config-if)#

    ================================

    Welcome to Chennai Router

    ================================

    User Access Verification

    password :

    ****

    ****

    enable

    configure terminal

    ip address 10.0.0.2 255.0.0.0

    no shut

    encapsulation hdlc

    interface serial 0

    Chennai>

    password :

    Chennai#

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

    Chennai(config)#

    Chennai(config-if)#

    Chennai(config-if)#

    Chennai(config-if)#

    Chennai(config-if)#

    Microsoft Windows 2000 [Version 5.00.2195]

    (C) Copyright 1985-2000 Microsoft Corp.

    C:\>

    Connecting .....

    Chennai(config-if)#

    telnet 192.168.2.1

    interface serial 1

    ip address 11.0.0.1 255.0.0.0

    no shut

    encapsulation hdlc

    Directly Connected Networks onCHENNAI Router

    192.168.2.0

    10.0.0.0

    11.0.0.0

  • 8/11/2019 13 ospf rouitng

    18/27

    aveen Patel

    Chennai(config)#

    router ospf 2

    Chennai(config-router)#

    Chennai(config-router)# network 192.168.2.0 0.0.0.255 area 0

    Chennai(config-router)# network 10.0.0.0 0.255.255.255 area 0

    no ip routinghennai(config)#

    Chennai(config)#

    ip routing

    network 11.0.0.0 0.255.255.255 area 0

    Chennai(config-router)#

    Configuring OSPF

    Router(config)# router ospf

    Router(config-router)# network area

  • 8/11/2019 13 ospf rouitng

    19/27

    aveen Patel

    show ip routehennai#

    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 2

    E1 - 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

    Gateway of last resort is not set

    C 10.0.0.0/8 is directly connected, Serial1

    C 11.0.0.0/8 is directly connected, Serial0

    O 192.168.1.0/24 [110/74] via 10.0.0.1, 00:01:33, Serial1

    C 192.168.2.0/24 is directly connected, Ethernet0

    O 192.168.3.0/24 [110/74] via 11.0.0.2, 00:01:33, Serial0

    Chennai#

    ^

    Z

    O for OSPF routes110 is nothing but

    Administrative Distance

    Metric of OSPF

    Cost

    Chennai(config)#

    router ospf 2

    Chennai(config-router)#

    Chennai(config-router)# network 192.168.2.0 0.0.0.255 area 0

    Chennai(config-router)# network 10.0.0.0 0.255.255.255 area 0

    no ip routinghennai(config)#

    Chennai(config)#

    ip routing

    network 11.0.0.0 0.255.255.255 area 0

    Chennai(config-router)#

  • 8/11/2019 13 ospf rouitng

    20/27

    aveen Patel

    show ip ospf databasehennai#

    OSPF Router with ID (192.168.2.1) (Process ID 2)

    Router Link States (Area 0)

    Link ID ADV Router Age Seq# Checksum Link

    192.168.1.1 192.168.1.1 1253 0x80000003 0x897B 3

    192.168.2.1 192.168.2.1 695 0x80000005 0x542 5

    192.168.3.1 192.168.3.1 693 0x80000003 0xD328 3

    Chennai#

    show ip ospf neighbor

    Neighbor ID Pri State Dead Time Address

    192.168.3.1 1 FULL/ - 00:00:35 11.0.0.2

    192.168.1.1 1 FULL/ - 00:00:32 10.0.0.1

    Chennai#

  • 8/11/2019 13 ospf rouitng

    21/27

    aveen Patel

    exitanglore(config-if)#

    Banglore(config)#

    ================================

    Welcome to Banglore Router

    ================================

    User Access Verification

    password :

    ****

    ****

    enable

    configure terminal

    ip address 11.0.0.2 255.0.0.0

    no shut

    clockrate 64000

    encapsulation hdlc

    Banglore>

    password :

    Banglore#

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

    Banglore(config)#

    Banglore(config-if)#

    Banglore(config-if)#

    Banglore(config-if)#

    Banglore(config-if)#

    Microsoft Windows 2000 [Version 5.00.2195]

    (C) Copyright 1985-2000 Microsoft Corp.

    C:\>

    Connecting .....

    telnet 192.168.3.1

    interface serial 1

    Directly Connected Networks onBanglore Router

    192.168.3.0

    11.0.0.0

  • 8/11/2019 13 ospf rouitng

    22/27

    aveen Patel

    Banglore(config)#

    router ospf 1

    Banglore(config-router)#

    Banglore(config-router)# network 192.168.3.0 0.0.0.255 area 0

    Banglore(config-router)#

    no ip routinganglore(config)#

    Banglore(config)#

    ip routing

    network 11.0.0.0 0.255.255.255 area 0

    Configuring OSPF

    Router(config)# router ospf

    Router(config-router)# network area

  • 8/11/2019 13 ospf rouitng

    23/27

    aveen Patel

    show ip routeanglore#

    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 2

    E1 - 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

    Gateway of last resort is not set

    O 10.0.0.0/8 [110/128] via 11.0.0.1, 00:02:09, Serial1

    C 11.0.0.0/8 is directly connected, Serial1

    O 192.168.1.0/24 [110/138] via 11.0.0.1, 00:02:09, Serial1

    O 192.168.2.0/24 [110/74] via 11.0.0.1, 00:02:09, Serial1

    C 192.168.3.0/24 is directly connected, Ethernet0

    Banglore#

    ^

    Z

    O for OSPF routes110 is nothing but

    Administrative Distance

    Metric of OSPF

    Cost

    Banglore(config)#

    router ospf 1

    Banglore(config-router)#

    Banglore(config-router)# network 192.168.3.0 0.0.0.255 area 0

    Banglore(config-router)#

    no ip routinganglore(config)#

    Banglore(config)#

    ip routing

    network 11.0.0.0 0.255.255.255 area 0

  • 8/11/2019 13 ospf rouitng

    24/27

    aveen Patel

    show ip ospf databaseanglore#

    OSPF Router with ID (192.168.3.1) (Process ID 1)

    Router Link States (Area 0)

    Link ID ADV Router Age Seq# Checksum Link

    192.168.1.1 192.168.1.1 1506 0x80000003 0x897B 3

    192.168.2.1 192.168.2.1 948 0x80000005 0x542 5

    192.168.3.1 192.168.3.1 944 0x80000003 0xD328 3

    Banglore#

    show ip ospf neighbor

    Neighbor ID Pri State Dead Time Address

    192.168.2.1 1 FULL/ - 00:00:37 11.0.0.1

    Banglore#

  • 8/11/2019 13 ospf rouitng

    25/27

    aveen Patel

    ping 192.168.3.10yderabad#

    Type escape sequence to abort.

    Sending 5, 100-byte ICMP Echos to 192.168.3.10, timeout is 2 seconds:

    Success rate is 100 percent (5/5), round-trip min/avg/max = 40/43/44 ms

    Hyderabad#ping 192.168.2.10

    Type escape sequence to abort.

    Sending 5, 100-byte ICMP Echos to 192.168.2.10, timeout is 2 seconds:

    Success rate is 100 percent (5/5), round-trip min/avg/max = 40/43/44 ms

    Hyderabad#

  • 8/11/2019 13 ospf rouitng

    26/27

    aveen Patel

    ping 192.168.1.10hennai#

    Type escape sequence to abort.

    Sending 5, 100-byte ICMP Echos to 192.168.1.10, timeout is 2 seconds:

    Success rate is 100 percent (5/5), round-trip min/avg/max = 40/43/44 ms

    Chennai# ping 192.168.3.10

    Type escape sequence to abort.

    Sending 5, 100-byte ICMP Echos to 192.168.3.10, timeout is 2 seconds:

    Success rate is 100 percent (5/5), round-trip min/avg/max = 40/43/44 ms

    Chennai#

  • 8/11/2019 13 ospf rouitng

    27/27

    ping 192.168.1.10anglore#

    Type escape sequence to abort.

    Sending 5, 100-byte ICMP Echos to 192.168.1.10, timeout is 2 seconds:

    Success rate is 100 percent (5/5), round-trip min/avg/max = 40/43/44 ms

    Banglore#ping 192.168.2.10

    Type escape sequence to abort.

    Sending 5, 100-byte ICMP Echos to 192.168.2.10, timeout is 2 seconds:

    Success rate is 100 percent (5/5), round-trip min/avg/max = 40/43/44 ms

    Banglore#