• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
Xin chào ! Nếu đây là lần đầu tiên bạn đến với diễn đàn, xin vui lòng danh ra một phút bấm vào đây để đăng kí và tham gia thảo luận cùng VnPro.

Announcement

Collapse
No announcement yet.

OSPF củng cố kiến thức lại nào.

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    II. LSA loại 2
    Do router DR phát ra.

    R3#sh ip os database network

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

    Net Link States (Area 0)

    Routing Bit Set on this LSA
    LS age: 34
    Options: (No TOS-capability, DC)
    LS Type: Network Links
    Link State ID: 192.168.1.3 (address of Designated Router) => cổng phát ra gói LSA loại 2
    Advertising Router: 3.3.3.3 => Router ID của DR
    LS Seq Number: 80000002
    Checksum: 0x8D16
    Length: 36
    Network Mask: /24
    Attached Router: 3.3.3.3
    Attached Router: 1.1.1.1
    Attached Router: 2.2.2.2
    [3 dòng attached là số router gắn trực tiếp với nó là R1,R2 và chính nó]

    Routing Bit Set on this LSA
    LS age: 40
    Options: (No TOS-capability, DC)
    LS Type: Network Links
    Link State ID: 192.168.15.2 (address of Designated Router)
    Advertising Router: 5.5.5.5
    LS Seq Number: 80000001
    Checksum: 0xACE2
    Length: 32
    Network Mask: /24
    Attached Router: 5.5.5.5
    Attached Router: 2.2.2.2


    Muốn xem interface nào tham gia và trở thành DR cho segment nào đó thì ta cũng dùng lệnh “show ip ospf interface”
    R5#sh ip os interface
    FastEthernet0/0 is up, line protocol is up
    Internet Address 192.168.15.2/24, Area 0
    Process ID 1, Router ID 5.5.5.5, Network Type BROADCAST, Cost: 1
    Transmit Delay is 1 sec, State DR, Priority 1
    Designated Router (ID) 5.5.5.5, Interface address 192.168.15.2
    Backup Designated router (ID) 2.2.2.2, Interface address 192.168.15.1
    Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:02
    Index 2/2, flood queue length 0
    Next 0x0(0)/0x0(0)
    Last flood scan length is 1, maximum is 1
    Last flood scan time is 0 msec, maximum is 0 msec
    Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 2.2.2.2 (Backup Designated Router)
    Suppress hello for 0 neighbor(s)
    Loopback5 is up, line protocol is up
    Internet Address 5.5.5.5/8, Area 0
    Process ID 1, Router ID 5.5.5.5, Network Type LOOPBACK, Cost: 1
    Loopback interface is treated as a stub Host

    R3# sh ip os interface
    FastEthernet1/1 is up, line protocol is up
    Internet Address 192.168.1.3/24, Area 0
    Process ID 1, Router ID 3.3.3.3, Network Type BROADCAST, Cost: 1
    Transmit Delay is 1 sec, State DR, Priority 1
    Designated Router (ID) 3.3.3.3, Interface address 192.168.1.3
    Backup Designated router (ID) 2.2.2.2, Interface address 192.168.1.2
    Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:03
    Index 2/2, flood queue length 0
    Next 0x0(0)/0x0(0)
    Last flood scan length is 0, maximum is 4
    Last flood scan time is 0 msec, maximum is 0 msec
    Neighbor Count is 2, Adjacent neighbor count is 2
    Adjacent with neighbor 1.1.1.1
    Adjacent with neighbor 2.2.2.2 (Backup Designated Router)
    Suppress hello for 0 neighbor(s)
    Loopback3 is up, line protocol is up
    Internet Address 3.3.3.3/24, Area 0
    Process ID 1, Router ID 3.3.3.3, Network Type LOOPBACK, Cost: 1
    Loopback interface is treated as a stub Host



    R1#sh ip os interface
    FastEthernet0/0 is up, line protocol is up
    Internet Address 192.168.1.1/24, Area 0
    Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
    Transmit Delay is 1 sec, State DROTHER, Priority 1
    Designated Router (ID) 3.3.3.3, Interface address 192.168.1.3
    Backup Designated router (ID) 2.2.2.2, Interface address 192.168.1.2
    Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:01
    Index 3/3, flood queue length 0
    Next 0x0(0)/0x0(0)
    Last flood scan length is 0, maximum is 1
    Last flood scan time is 0 msec, maximum is 0 msec
    Neighbor Count is 2, Adjacent neighbor count is 2
    Adjacent with neighbor 2.2.2.2 (Backup Designated Router)
    Adjacent with neighbor 3.3.3.3 (Designated Router)
    Suppress hello for 0 neighbor(s)
    FastEthernet1/0 is up, line protocol is up
    Internet Address 172.16.1.1/16, Area 0
    Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
    Transmit Delay is 1 sec, State DR, Priority 1
    Designated Router (ID) 1.1.1.1, Interface address 172.16.1.1
    No backup designated router on this network
    Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:00
    Index 2/2, flood queue length 0
    Next 0x0(0)/0x0(0)
    Last flood scan length is 0, maximum is 0
    Last flood scan time is 0 msec, maximum is 0 msec
    Neighbor Count is 0, Adjacent neighbor count is 0
    Suppress hello for 0 neighbor(s)
    Loopback1 is up, line protocol is up
    Internet Address 1.1.1.1/24, Area 0
    Process ID 1, Router ID 1.1.1.1, Network Type LOOPBACK, Cost: 1
    Loopback interface is treated as a stub Host

    Do đó một router có thể là DR cho mạng này nhưng lại có thể là BDR hoặc Drother cho mạng khác.
    R2#sh ip os interface
    FastEthernet0/0 is up, line protocol is up
    Internet Address 192.168.15.1/24, Area 0
    Process ID 1, Router ID 2.2.2.2, Network Type BROADCAST, Cost: 1
    Transmit Delay is 1 sec, State DR, Priority 1
    Designated Router (ID) 2.2.2.2, Interface address 192.168.15.1
    No backup designated router on this network
    Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:00
    Index 4/4, flood queue length 0
    Next 0x0(0)/0x0(0)
    Last flood scan length is 0, maximum is 0
    Last flood scan time is 0 msec, maximum is 0 msec
    Neighbor Count is 0, Adjacent neighbor count is 0
    Suppress hello for 0 neighbor(s)
    FastEthernet1/0 is up, line protocol is up
    Internet Address 192.168.1.2/24, Area 0
    Process ID 1, Router ID 2.2.2.2, Network Type BROADCAST, Cost: 1
    Transmit Delay is 1 sec, State BDR, Priority 1
    Designated Router (ID) 3.3.3.3, Interface address 192.168.1.3
    Backup Designated router (ID) 2.2.2.2, Interface address 192.168.1.2
    Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:00
    Index 3/3, flood queue length 0
    Next 0x0(0)/0x0(0)
    Last flood scan length is 1, maximum is 1
    Last flood scan time is 0 msec, maximum is 0 msec
    Neighbor Count is 2, Adjacent neighbor count is 2
    Adjacent with neighbor 1.1.1.1
    Adjacent with neighbor 3.3.3.3 (Designated Router)
    Suppress hello for 0 neighbor(s)
    Serial2/2 is up, line protocol is down
    Internet Address 192.1.1.1/24, Area 0
    Process ID 1, Router ID 2.2.2.2, Network Type POINT_TO_POINT, Cost: 64
    Transmit Delay is 1 sec, State DOWN,
    Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Loopback1 is up, line protocol is up
    Internet Address 2.2.2.2/8, Area 0
    Process ID 1, Router ID 2.2.2.2, Network Type LOOPBACK, Cost: 1
    Loopback interface is treated as a stub Host
    Phạm Minh Tuấn

    Email : phamminhtuan@vnpro.org
    Yahoo : phamminhtuan_vnpro
    -----------------------------------------------------------------------------------------------
Trung Tâm Tin Học VnPro
149/1D Ung Văn Khiêm P25 Q.Bình thạnh TPHCM
Tel : (08) 35124257 (5 lines)
Fax: (08) 35124314

Home page: http://www.vnpro.vn
Support Forum: http://www.vnpro.org
- Chuyên đào tạo quản trị mạng và hạ tầng Internet
- Phát hành sách chuyên môn
- Tư vấn và tuyển dụng nhân sự IT
- Tư vấn thiết kế và hỗ trợ kỹ thuật hệ thống mạng

Network channel: http://www.dancisco.com
Blog: http://www.vnpro.org/blog

Comment


  • #17
    Ta củng cố kiến thức chút rồi bắt đầu với Types 3,4,5 trong OSPF nào.




    Nhớ là R1 có loopback 1.1.1.1 và R2 có loopback 2.2.2.2 nhưng không cho tham gia định tuyến [để thấy kết quả bên dưới].
    Thường thì khi làm OSPF không cần quảng bá mạng loopback [nó chỉ làm gia tăng bảng định tuyến].

    R2#sh ip os database router

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

    Router Link States (Area 1)

    Routing Bit Set on this LSA
    LS age: 209
    Options: (No TOS-capability, DC)
    LS Type: Router Links
    Link State ID: 1.1.1.1
    Advertising Router: 1.1.1.1
    LS Seq Number: 80000002
    Checksum: 0x86B4
    Length: 36
    Area Border Router
    Number of Links: 1

    Link connected to: a Transit Network
    (Link ID) Designated Router address: 192.168.12.2 => Không phải 2.2.2.2 vì 2.2.2.2 không cho tham gia định tuyến [đây là inter lớn nhất của DR đã tham gia vào định tuyến OSPF]
    (Link Data) Router Interface address: 192.168.12.1 => Interface tham gia vào định tuyến
    Number of TOS metrics: 0
    TOS 0 Metrics: 1


    LS age: 209
    Options: (No TOS-capability, DC)
    LS Type: Router Links
    Link State ID: 2.2.2.2
    Advertising Router: 2.2.2.2
    LS Seq Number: 80000002
    Checksum: 0x45ED
    Length: 36
    Number of Links: 1

    Link connected to: a Transit Network
    (Link ID) Designated Router address: 192.168.12.2
    (Link Data) Router Interface address: 192.168.12.2
    Number of TOS metrics: 0
    TOS 0 Metrics: 1


    R2#sh ip os database network

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

    Net Link States (Area 1)

    Routing Bit Set on this LSA
    LS age: 468
    Options: (No TOS-capability, DC)
    LS Type: Network Links
    Link State ID: 192.168.12.2 (address of Designated Router)
    Advertising Router: 2.2.2.2
    LS Seq Number: 80000001
    Checksum: 0x8F1F
    Length: 32
    Network Mask: /24
    Attached Router: 2.2.2.2
    Attached Router: 1.1.1.1
    Phạm Minh Tuấn

    Email : phamminhtuan@vnpro.org
    Yahoo : phamminhtuan_vnpro
    -----------------------------------------------------------------------------------------------
    Trung Tâm Tin Học VnPro
    149/1D Ung Văn Khiêm P25 Q.Bình thạnh TPHCM
    Tel : (08) 35124257 (5 lines)
    Fax: (08) 35124314

    Home page: http://www.vnpro.vn
    Support Forum: http://www.vnpro.org
    - Chuyên đào tạo quản trị mạng và hạ tầng Internet
    - Phát hành sách chuyên môn
    - Tư vấn và tuyển dụng nhân sự IT
    - Tư vấn thiết kế và hỗ trợ kỹ thuật hệ thống mạng

    Network channel: http://www.dancisco.com
    Blog: http://www.vnpro.org/blog

    Comment


    • #18
      III. LSA3
      Mô tả những routes hoặc những summary route được học từ area khác.

      *Nhớ đừng lẫn lộn thấy nó ghi summary thì là những route được summary, không phải như vậy. Mà là bảng tóm tắt những route học từ area khác và do con nào quảng bá tới. ABR giữa những area khác nhau làm nhiệm vụ giống distance vector nên ta có thể summary những chỗ này.
      Còn trong area linkstate gửi các gói LSA1 và LSA2 ở trạng thái [state] chứ không phải route nên ta không thể summary trong cùng area.




      R2#sh ip route
      Codes: C - connected, S - static, 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
      i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
      ia - IS-IS inter area, * - candidate default, U - per-user static route
      o - ODR, P - periodic downloaded static route

      Gateway of last resort is not set

      C 192.168.12.0/24 is directly connected, FastEthernet0/0
      C 2.0.0.0/8 is directly connected, Loopback2
      C 192.1.1.0/24 is directly connected, Serial2/2
      O IA 192.168.1.0/24 [110/2] via 192.168.12.1, 00:00:03, FastEthernet0/0

      Những route học từ các area khác sẽ có chữ IA [internal area]. Mặc định không summary route.

      R2#sh ip os database summary
      Lúc này show lệnh này sẽ thấy

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

      Summary Net Link States (Area 1)

      Routing Bit Set on this LSA
      LS age: 733
      Options: (No TOS-capability, DC, Upward)
      LS Type: Summary Links(Network)
      Link State ID: 192.168.1.0 (summary Network Number)
      Advertising Router: 1.1.1.1
      LS Seq Number: 80000001
      Checksum: 0xB815
      Length: 28
      Network Mask: /24
      TOS: 0 Metric: 1

      R1#sh ip ospf database summary

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

      Summary Net Link States (Area 0)

      LS age: 294
      Options: (No TOS-capability, DC, Upward)
      LS Type: Summary Links(Network)
      Link State ID: 192.168.12.0 (summary Network Number) [mạng của interface tham gia OSPF]
      Advertising Router: 1.1.1.1
      LS Seq Number: 80000001
      Checksum: 0x3F83
      Length: 28
      Network Mask: /24
      TOS: 0 Metric: 1


      Summary Net Link States (Area 1)

      LS age: 289
      Options: (No TOS-capability, DC, Upward)
      LS Type: Summary Links(Network)
      Link State ID: 192.168.1.0 (summary Network Number)
      Advertising Router: 1.1.1.1
      LS Seq Number: 80000001
      Checksum: 0xB815
      Length: 28
      Network Mask: /24
      TOS: 0 Metric: 1
      Bảng này trên 2 con có khác nhau [vì R2 chỉ có 1 area còn R1 có tới 2 area 1area 0]


      Sau đó thử xóa route có chữ IA bằng cách vào R1
      R1(config)#router ospf 1
      R1(config-router)#no network 192.168.1.0 0.0.0.255 area 0

      Rồi R1#sh ip ospf database summary
      Và thấy không có mô tả gì cả.
      Phạm Minh Tuấn

      Email : phamminhtuan@vnpro.org
      Yahoo : phamminhtuan_vnpro
      -----------------------------------------------------------------------------------------------
      Trung Tâm Tin Học VnPro
      149/1D Ung Văn Khiêm P25 Q.Bình thạnh TPHCM
      Tel : (08) 35124257 (5 lines)
      Fax: (08) 35124314

      Home page: http://www.vnpro.vn
      Support Forum: http://www.vnpro.org
      - Chuyên đào tạo quản trị mạng và hạ tầng Internet
      - Phát hành sách chuyên môn
      - Tư vấn và tuyển dụng nhân sự IT
      - Tư vấn thiết kế và hỗ trợ kỹ thuật hệ thống mạng

      Network channel: http://www.dancisco.com
      Blog: http://www.vnpro.org/blog

      Comment


      • #19
        IV. LSA4

        Là do con ABR để xác định con ASBR
        Với ABR là area border router: con mà có ranh giới giữa nhiều vùng, thường là vùng 0 và các vùng khác.
        ASBR là con nối giữa 2 hoặc nhiều AS: Autonomous system, chẳng hạn như OSPF và các giao thức khác như RIP, EIGRP, …

        *Cisco khuyến cáo chỉ nên dùng 3 area trên một con ABR.







        Khi cấu hình mô hình trên xong ta "show ip ospf database asbr-summary"
        R1#sh ip ospf database asbr-summary

        OSPF Router with ID (1.1.1.1) (Process ID 1)
        R2#sh ip ospf database asbr-summary

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


        Sau đó vào R2 resdistribute rip vào OSPF để R1 học được các route từ RIPv2

        R2(config)#router ospf 1
        R2(config-router)#redistribute rip metric 64 subnets

        R1# sh ip ospf database asbr-summary

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

        Summary ASB Link States (Area 0)

        LS age: 117
        Options: (No TOS-capability, DC, Upward)
        LS Type: Summary Links(AS Boundary Router)
        Link State ID: 2.2.2.2 (AS Boundary Router address)
        Advertising Router: 1.1.1.1
        LS Seq Number: 80000001
        Checksum: 0xB24
        Length: 28
        Network Mask: /0
        TOS: 0 Metric: 1


        R1#sh ip route
        Codes: C - connected, S - static, 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
        i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
        ia - IS-IS inter area, * - candidate default, U - per-user static route
        o - ODR, P - periodic downloaded static route

        Gateway of last resort is not set

        C 192.168.12.0/24 is directly connected, FastEthernet0/0
        C 1.0.0.0/8 is directly connected, Loopback1
        O E2 3.0.0.0/8 [110/64] via 192.168.12.2, 00:07:20, FastEthernet0/0
        O E2 192.1.1.0/24 [110/64] via 192.168.12.2, 00:07:20, FastEthernet0/0
        C 192.168.1.0/24 is directly connected, FastEthernet1/0

        Những route được học từ những vùng bên ngoài sẽ có chữ E [external]
        E1: giá trị cost sẻ cộng dồn khi đi vào sâu trong OSPS, để giúp cho ta xác định chính xác đường nào ngắn hơn nếu có nhiều đường cùng tới môt ASBR.
        E2: giá trị cost sẽ không được cộng dồn khi đi vào trong OSPF, thường dùng khi có một đường tới ASBR
        Phạm Minh Tuấn

        Email : phamminhtuan@vnpro.org
        Yahoo : phamminhtuan_vnpro
        -----------------------------------------------------------------------------------------------
        Trung Tâm Tin Học VnPro
        149/1D Ung Văn Khiêm P25 Q.Bình thạnh TPHCM
        Tel : (08) 35124257 (5 lines)
        Fax: (08) 35124314

        Home page: http://www.vnpro.vn
        Support Forum: http://www.vnpro.org
        - Chuyên đào tạo quản trị mạng và hạ tầng Internet
        - Phát hành sách chuyên môn
        - Tư vấn và tuyển dụng nhân sự IT
        - Tư vấn thiết kế và hỗ trợ kỹ thuật hệ thống mạng

        Network channel: http://www.dancisco.com
        Blog: http://www.vnpro.org/blog

        Comment


        • #20
          V. LSA 5

          Mô tả về những route từ bên ngoài vào trong OSPF.

          Và mặc định là các giao thức linkstate không summary route học từ bên ngoài.


          R1#sh ip ospf database external

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

          Type-5 AS External Link States

          Routing Bit Set on this LSA
          LS age: 927
          Options: (No TOS-capability, DC)
          LS Type: AS External Link
          Link State ID: 3.0.0.0 (External Network Number )
          Advertising Router: 2.2.2.2
          LS Seq Number: 80000001
          Checksum: 0x3E2B
          Length: 36
          Network Mask: /8 => Do RIP quảng bá 3.3.3.3/24 tới R2 qua 192.1.1.0/24 => mạng giá đoạn, nên R2 sẽ học /8 => R1 học /8 luôn. [tự sum về major là do RIPv2 ]
          Metric Type: 2 (Larger than any link state path)
          TOS: 0
          Metric: 64
          Forward Address: 0.0.0.0
          External Route Tag: 0

          Routing Bit Set on this LSA
          LS age: 927
          Options: (No TOS-capability, DC)
          LS Type: AS External Link
          Link State ID: 192.1.1.0 (External Network Number ) [đây là mạng nối giữa R2 và R3 cũng là RIP => bị redistribute ]
          Advertising Router: 2.2.2.2
          LS Seq Number: 80000001
          Checksum: 0x8425
          Length: 36
          Network Mask: /24
          Metric Type: 2 (Larger than any link state path)
          TOS: 0
          Metric: 64
          Forward Address: 0.0.0.0
          External Route Tag: 0
          Phạm Minh Tuấn

          Email : phamminhtuan@vnpro.org
          Yahoo : phamminhtuan_vnpro
          -----------------------------------------------------------------------------------------------
          Trung Tâm Tin Học VnPro
          149/1D Ung Văn Khiêm P25 Q.Bình thạnh TPHCM
          Tel : (08) 35124257 (5 lines)
          Fax: (08) 35124314

          Home page: http://www.vnpro.vn
          Support Forum: http://www.vnpro.org
          - Chuyên đào tạo quản trị mạng và hạ tầng Internet
          - Phát hành sách chuyên môn
          - Tư vấn và tuyển dụng nhân sự IT
          - Tư vấn thiết kế và hỗ trợ kỹ thuật hệ thống mạng

          Network channel: http://www.dancisco.com
          Blog: http://www.vnpro.org/blog

          Comment


          • #21
            Và đây là show run của cả 3 con [router 7200]

            R1#sh run
            Building configuration...

            Current configuration : 1497 bytes
            !
            version 12.3
            service timestamps debug datetime msec
            service timestamps log datetime msec
            no service password-encryption
            !
            hostname R1
            !
            boot-start-marker
            boot-end-marker
            !
            !
            no aaa new-model
            ip subnet-zero
            !
            !
            !
            ip cef
            ip audit po max-events 100
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            interface Loopback1
            ip address 1.1.1.1 255.0.0.0
            !
            interface FastEthernet0/0
            ip address 192.168.12.1 255.255.255.0
            duplex half
            !
            interface FastEthernet1/0
            ip address 192.168.1.1 255.255.255.0
            duplex auto
            speed auto
            no keepalive
            !
            interface FastEthernet1/1
            no ip address
            shutdown
            duplex auto
            speed auto
            !
            interface Serial2/0
            no ip address
            shutdown
            serial restart-delay 0
            !
            interface Serial2/1
            no ip address
            shutdown
            serial restart-delay 0
            !
            interface Serial2/2
            no ip address
            shutdown
            serial restart-delay 0
            !
            interface Serial2/3
            no ip address
            shutdown
            serial restart-delay 0
            !
            interface Serial2/4
            no ip address
            shutdown
            serial restart-delay 0
            !
            interface Serial2/5
            no ip address
            shutdown
            serial restart-delay 0
            !
            interface Serial2/6
            no ip address
            shutdown
            serial restart-delay 0
            !
            interface Serial2/7
            no ip address
            shutdown
            serial restart-delay 0
            !
            router ospf 1
            log-adjacency-changes
            network 192.168.1.0 0.0.0.255 area 0
            network 192.168.12.0 0.0.0.255 area 1
            !
            ip classless
            no ip http server
            no ip http secure-server
            !
            !
            !
            !
            !
            !
            !
            !
            !
            gatekeeper
            shutdown
            !
            !
            line con 0
            exec-timeout 0 0
            logging synchronous
            stopbits 1
            line aux 0
            stopbits 1
            line vty 0 4
            login
            !
            !
            end

            R2#sh run
            Building configuration...

            Current configuration : 1522 bytes
            !
            version 12.3
            service timestamps debug datetime msec
            service timestamps log datetime msec
            no service password-encryption
            !
            hostname R2
            !
            boot-start-marker
            boot-end-marker
            !
            !
            no aaa new-model
            ip subnet-zero
            !
            !
            !
            ip cef
            ip audit po max-events 100
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            interface Loopback2
            ip address 2.2.2.2 255.0.0.0
            !
            interface FastEthernet0/0
            ip address 192.168.12.2 255.255.255.0
            duplex half
            !
            interface FastEthernet1/0
            no ip address
            shutdown
            duplex auto
            speed auto
            !
            interface FastEthernet1/1
            no ip address
            shutdown
            duplex auto
            speed auto
            !
            interface Serial2/0
            no ip address
            shutdown
            serial restart-delay 0
            !
            interface Serial2/1
            no ip address
            shutdown
            serial restart-delay 0
            !
            interface Serial2/2
            ip address 192.1.1.1 255.255.255.0
            serial restart-delay 0
            !
            interface Serial2/3
            no ip address
            shutdown
            serial restart-delay 0
            !
            interface Serial2/4
            no ip address
            shutdown
            serial restart-delay 0
            !
            interface Serial2/5
            no ip address
            shutdown
            serial restart-delay 0
            !
            interface Serial2/6
            no ip address
            shutdown
            serial restart-delay 0
            !
            interface Serial2/7
            no ip address
            shutdown
            serial restart-delay 0
            !
            router ospf 1
            log-adjacency-changes
            redistribute rip metric 64 subnets
            network 192.168.12.0 0.0.0.255 area 1
            !
            router rip
            version 2
            network 192.1.1.0
            !
            ip classless
            no ip http server
            no ip http secure-server
            !
            !
            !
            !
            !
            !
            !
            !
            !
            gatekeeper
            shutdown
            !
            !
            line con 0
            exec-timeout 0 0
            logging synchronous
            stopbits 1
            line aux 0
            stopbits 1
            line vty 0 4
            login
            !
            !
            End


            R3#sh run
            Building configuration...

            Current configuration : 1433 bytes
            !
            version 12.3
            service timestamps debug datetime msec
            service timestamps log datetime msec
            no service password-encryption
            !
            hostname R3
            !
            boot-start-marker
            boot-end-marker
            !
            !
            no aaa new-model
            ip subnet-zero
            !
            !
            !
            ip cef
            ip audit po max-events 100
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            !
            interface Loopback3
            ip address 3.3.3.3 255.255.255.0
            !
            interface FastEthernet0/0
            no ip address
            shutdown
            duplex half
            !
            interface FastEthernet1/0
            no ip address
            shutdown
            duplex auto
            speed auto
            !
            interface FastEthernet1/1
            no ip address
            shutdown
            duplex auto
            speed auto
            !
            interface Serial2/0
            no ip address
            shutdown
            serial restart-delay 0
            !
            interface Serial2/1
            no ip address
            shutdown
            serial restart-delay 0
            !
            interface Serial2/2
            no ip address
            shutdown
            serial restart-delay 0
            !
            interface Serial2/3
            ip address 192.1.1.2 255.255.255.0
            serial restart-delay 0
            clock rate 64000
            !
            interface Serial2/4
            no ip address
            shutdown
            serial restart-delay 0
            !
            interface Serial2/5
            no ip address
            shutdown
            serial restart-delay 0
            !
            interface Serial2/6
            no ip address
            shutdown
            serial restart-delay 0
            !
            interface Serial2/7
            no ip address
            shutdown
            serial restart-delay 0
            !
            router rip
            version 2
            network 3.0.0.0
            network 192.1.1.0
            !
            ip classless
            no ip http server
            no ip http secure-server
            !
            !
            !
            !
            !
            !
            !
            !
            !
            gatekeeper
            shutdown
            !
            !
            line con 0
            exec-timeout 0 0
            logging synchronous
            stopbits 1
            line aux 0
            stopbits 1
            line vty 0 4
            login
            !
            !
            End
            Phạm Minh Tuấn

            Email : phamminhtuan@vnpro.org
            Yahoo : phamminhtuan_vnpro
            -----------------------------------------------------------------------------------------------
            Trung Tâm Tin Học VnPro
            149/1D Ung Văn Khiêm P25 Q.Bình thạnh TPHCM
            Tel : (08) 35124257 (5 lines)
            Fax: (08) 35124314

            Home page: http://www.vnpro.vn
            Support Forum: http://www.vnpro.org
            - Chuyên đào tạo quản trị mạng và hạ tầng Internet
            - Phát hành sách chuyên môn
            - Tư vấn và tuyển dụng nhân sự IT
            - Tư vấn thiết kế và hỗ trợ kỹ thuật hệ thống mạng

            Network channel: http://www.dancisco.com
            Blog: http://www.vnpro.org/blog

            Comment


            • #22
              Còn Nếu muốn bằng tay summary để làm gọn bảng routing thì trong ospf có 2 loại:

              1.Summary các route học từ bên ngoài AS khác vào AS OSPF [làm trên con ASBR]
              R2(config)#router ospf 1
              R2(config-router)#summary-address ip-address mask [not-advertise] [tag tag]

              2. Summary các route từ area khác gửi qua
              R1(config)#router ospf 1

              R1(config-router)#area area-id range address mask [advertise | not-advertise] [cost cost]
              Phạm Minh Tuấn

              Email : phamminhtuan@vnpro.org
              Yahoo : phamminhtuan_vnpro
              -----------------------------------------------------------------------------------------------
              Trung Tâm Tin Học VnPro
              149/1D Ung Văn Khiêm P25 Q.Bình thạnh TPHCM
              Tel : (08) 35124257 (5 lines)
              Fax: (08) 35124314

              Home page: http://www.vnpro.vn
              Support Forum: http://www.vnpro.org
              - Chuyên đào tạo quản trị mạng và hạ tầng Internet
              - Phát hành sách chuyên môn
              - Tư vấn và tuyển dụng nhân sự IT
              - Tư vấn thiết kế và hỗ trợ kỹ thuật hệ thống mạng

              Network channel: http://www.dancisco.com
              Blog: http://www.vnpro.org/blog

              Comment


              • #23
                Mình viết có chỗ nào sai hay thiếu mấy bạn xem rồi sửa giúp mình :54:.
                Phạm Minh Tuấn

                Email : phamminhtuan@vnpro.org
                Yahoo : phamminhtuan_vnpro
                -----------------------------------------------------------------------------------------------
                Trung Tâm Tin Học VnPro
                149/1D Ung Văn Khiêm P25 Q.Bình thạnh TPHCM
                Tel : (08) 35124257 (5 lines)
                Fax: (08) 35124314

                Home page: http://www.vnpro.vn
                Support Forum: http://www.vnpro.org
                - Chuyên đào tạo quản trị mạng và hạ tầng Internet
                - Phát hành sách chuyên môn
                - Tư vấn và tuyển dụng nhân sự IT
                - Tư vấn thiết kế và hỗ trợ kỹ thuật hệ thống mạng

                Network channel: http://www.dancisco.com
                Blog: http://www.vnpro.org/blog

                Comment


                • #24
                  Hôm nay mình post tiếp về Virtual-link

                  Virtual-link trong OSPF chỉ là một giải pháp mang tính tạm thời khi không còn cách nào tốt đẹp hơn để cho các mạng thấy nhau được. Ngoài ra nó còn dùng trong trường hợp backup đường chính [người ta tạo ta đường virtual để dự phòng sẵn khi đường chính down]





                  R1#sh run
                  Building configuration...

                  Current configuration : 1510 bytes
                  !
                  version 12.3
                  service timestamps debug datetime msec
                  service timestamps log datetime msec
                  no service password-encryption
                  !
                  hostname R1
                  !
                  boot-start-marker
                  boot-end-marker
                  !
                  !
                  no aaa new-model
                  ip subnet-zero
                  !
                  !
                  !
                  ip cef
                  ip audit po max-events 100
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  interface Loopback1
                  ip address 1.1.1.1 255.255.255.0
                  !
                  interface FastEthernet0/0
                  ip address 192.168.12.1 255.255.255.0
                  duplex half
                  !
                  interface FastEthernet1/0
                  ip address 192.1.1.1 255.255.255.0
                  duplex auto
                  speed auto
                  !
                  interface FastEthernet1/1
                  no ip address
                  shutdown
                  duplex auto
                  speed auto
                  !
                  interface Serial2/0
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  interface Serial2/1
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  interface Serial2/2
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  interface Serial2/3
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  interface Serial2/4
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  interface Serial2/5
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  interface Serial2/6
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  interface Serial2/7
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  router ospf 1
                  log-adjacency-changes
                  network 1.1.1.0 0.0.0.255 area 1
                  network 192.1.1.0 0.0.0.255 area 0
                  network 192.168.12.0 0.0.0.255 area 1
                  !
                  ip classless
                  no ip http server
                  no ip http secure-server
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  gatekeeper
                  shutdown
                  !
                  !
                  line con 0
                  exec-timeout 0 0
                  logging synchronous
                  stopbits 1
                  line aux 0
                  stopbits 1
                  line vty 0 4
                  !
                  !
                  End

                  R1#sh ip route
                  Codes: C - connected, S - static, 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
                  i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
                  ia - IS-IS inter area, * - candidate default, U - per-user static route
                  o - ODR, P - periodic downloaded static route

                  Gateway of last resort is not set

                  C 192.168.12.0/24 is directly connected, FastEthernet0/0
                  1.0.0.0/24 is subnetted, 1 subnets
                  C 1.1.1.0 is directly connected, Loopback1
                  2.0.0.0/32 is subnetted, 1 subnets
                  O 2.2.2.2 [110/2] via 192.168.12.2, 00:00:58, FastEthernet0/0
                  C 192.1.1.0/24 is directly connected, FastEthernet1/0

                  R2#sh run
                  Building configuration...

                  Current configuration : 1611 bytes
                  !
                  version 12.3
                  service timestamps debug datetime msec
                  service timestamps log datetime msec
                  no service password-encryption
                  !
                  hostname R2
                  !
                  boot-start-marker
                  boot-end-marker
                  !
                  !
                  no aaa new-model
                  ip subnet-zero
                  !
                  !
                  !
                  ip cef
                  ip audit po max-events 100
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  interface Loopback2
                  ip address 2.2.2.2 255.255.0.0
                  !
                  interface Loopback3
                  ip address 23.23.23.23 255.255.255.0
                  !
                  interface FastEthernet0/0
                  ip address 192.168.12.2 255.255.255.0
                  duplex half
                  !
                  interface FastEthernet1/0
                  ip address 192.168.23.1 255.255.255.0
                  duplex auto
                  speed auto
                  !
                  interface FastEthernet1/1
                  no ip address
                  shutdown
                  duplex auto
                  speed auto
                  !
                  interface Serial2/0
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  interface Serial2/1
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  interface Serial2/2
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  interface Serial2/3
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  interface Serial2/4
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  interface Serial2/5
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  interface Serial2/6
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  interface Serial2/7
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  router ospf 1
                  log-adjacency-changes
                  network 2.2.2.0 0.0.0.255 area 1
                  network 23.23.23.0 0.0.0.255 area 2
                  network 192.168.12.0 0.0.0.255 area 1
                  network 192.168.23.0 0.0.0.255 area 2
                  !
                  ip classless
                  no ip http server
                  no ip http secure-server
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  gatekeeper
                  shutdown
                  !
                  !
                  line con 0
                  exec-timeout 0 0
                  logging synchronous
                  stopbits 1
                  line aux 0
                  stopbits 1
                  line vty 0 4
                  !
                  !
                  End
                  R2#sh ip route
                  Codes: C - connected, S - static, 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
                  i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
                  ia - IS-IS inter area, * - candidate default, U - per-user static route
                  o - ODR, P - periodic downloaded static route

                  Gateway of last resort is not set

                  C 192.168.12.0/24 is directly connected, FastEthernet0/0
                  1.0.0.0/32 is subnetted, 1 subnets
                  O 1.1.1.1 [110/2] via 192.168.12.1, 00:01:41, FastEthernet0/0
                  2.0.0.0/16 is subnetted, 1 subnets
                  C 2.2.0.0 is directly connected, Loopback2
                  3.0.0.0/32 is subnetted, 1 subnets
                  O 3.3.3.3 [110/2] via 192.168.23.2, 00:18:27, FastEthernet1/0
                  23.0.0.0/24 is subnetted, 1 subnets
                  C 23.23.23.0 is directly connected, Loopback3
                  C 192.168.23.0/24 is directly connected, FastEthernet1/0
                  O IA 192.1.1.0/24 [110/2] via 192.168.12.1, 00:01:41, FastEthernet0/0



                  R3#sh run
                  Building configuration...

                  Current configuration : 1483 bytes
                  !
                  version 12.3
                  service timestamps debug datetime msec
                  service timestamps log datetime msec
                  no service password-encryption
                  !
                  hostname R3
                  !
                  boot-start-marker
                  boot-end-marker
                  !
                  !
                  no aaa new-model
                  ip subnet-zero
                  !
                  !
                  !
                  ip cef
                  ip audit po max-events 100
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  interface Loopback3
                  ip address 3.3.3.3 255.255.255.0
                  !
                  interface FastEthernet0/0
                  no ip address
                  shutdown
                  duplex half
                  !
                  interface FastEthernet1/0
                  ip address 192.168.23.2 255.255.255.0
                  ip ospf priority 0
                  duplex auto
                  speed auto
                  !
                  interface FastEthernet1/1
                  no ip address
                  shutdown
                  duplex auto
                  speed auto
                  !
                  interface Serial2/0
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  interface Serial2/1
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  interface Serial2/2
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  interface Serial2/3
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  interface Serial2/4
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  interface Serial2/5
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  interface Serial2/6
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  interface Serial2/7
                  no ip address
                  shutdown
                  serial restart-delay 0
                  !
                  router ospf 1
                  log-adjacency-changes
                  network 3.3.3.0 0.0.0.255 area 2
                  network 192.168.23.0 0.0.0.255 area 2
                  !
                  ip classless
                  no ip http server
                  no ip http secure-server
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  !
                  gatekeeper
                  shutdown
                  !
                  !
                  line con 0
                  exec-timeout 0 0
                  logging synchronous
                  stopbits 1
                  line aux 0
                  stopbits 1
                  line vty 0 4
                  !
                  !
                  end

                  R3#sh ip ro
                  R3#sh ip route
                  Codes: C - connected, S - static, 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
                  i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
                  ia - IS-IS inter area, * - candidate default, U - per-user static route
                  o - ODR, P - periodic downloaded static route

                  Gateway of last resort is not set

                  3.0.0.0/24 is subnetted, 1 subnets
                  C 3.3.3.0 is directly connected, Loopback3
                  23.0.0.0/32 is subnetted, 1 subnets
                  O 23.23.23.23 [110/2] via 192.168.23.1, 00:23:24, FastEthernet1/0
                  C 192.168.23.0/24 is directly connected, FastEthernet1/0

                  Lúc này R1 sẽ không thấy routes R3 và R3 không thấy routes R1.
                  Ta cấu hình virtual-link trên R1 và R2 [Lúc này virtual trở thành đường transit để vận chuyển các route của R3 qua vùng 0 [area 0] của R1]

                  R1(config)#router ospf 1
                  R1(config-router)#area 1 virtual-link 23.23.23.23
                  *Nov 18 10:38:34.435: %OSPF-5-ADJCHG: Process 1, Nbr 23.23.23.23 on OSPF_VL0 from LOADING to FULL, Loading Done
                  R2(config)#router ospf 1
                  R2(config-router)#area 1 virtual-link 1.1.1.1
                  *Nov 18 10:38:34.343: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on OSPF_VL0 from LOADING to FULL, Loading Done

                  Cấu trúc lệnh “area area-ID virtual-link Router-ID của neighbor”

                  R2#sh ip os neighbor

                  Neighbor ID Pri State Dead Time Address Interface
                  1.1.1.1 0 FULL/ - - 192.168.12.1 OSPF_VL0
                  1.1.1.1 1 FULL/BDR 00:00:38 192.168.12.1 FastEthernet0/0
                  3.3.3.3 0 FULL/DROTHER 00:00:33 192.168.23.2 FastEthernet1/

                  Lúc này ta vào lại R1
                  R1#sh ip route
                  Codes: C - connected, S - static, 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
                  i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
                  ia - IS-IS inter area, * - candidate default, U - per-user static route
                  o - ODR, P - periodic downloaded static route

                  Gateway of last resort is not set

                  C 192.168.12.0/24 is directly connected, FastEthernet0/0
                  1.0.0.0/24 is subnetted, 1 subnets
                  C 1.1.1.0 is directly connected, Loopback1
                  2.0.0.0/32 is subnetted, 1 subnets
                  O 2.2.2.2 [110/2] via 192.168.12.2, 00:03:57, FastEthernet0/0
                  3.0.0.0/32 is subnetted, 1 subnets
                  O IA 3.3.3.3 [110/3] via 192.168.12.2, 00:03:47, FastEthernet0/0
                  23.0.0.0/32 is subnetted, 1 subnets
                  O IA 23.23.23.23 [110/2] via 192.168.12.2, 00:03:47, FastEthernet0/0
                  O IA 192.168.23.0/24 [110/2] via 192.168.12.2, 00:03:47, FastEthernet0/0
                  C 192.1.1.0/24 is directly connected, FastEthernet1/0

                  Và R3
                  R3#sh ip route
                  Codes: C - connected, S - static, 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
                  i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
                  ia - IS-IS inter area, * - candidate default, U - per-user static route
                  o - ODR, P - periodic downloaded static route

                  Gateway of last resort is not set

                  O IA 192.168.12.0/24 [110/2] via 192.168.23.1, 00:04:53, FastEthernet1/0
                  1.0.0.0/32 is subnetted, 1 subnets
                  O IA 1.1.1.1 [110/3] via 192.168.23.1, 00:04:53, FastEthernet1/0
                  2.0.0.0/32 is subnetted, 1 subnets
                  O IA 2.2.2.2 [110/2] via 192.168.23.1, 00:04:53, FastEthernet1/0
                  3.0.0.0/24 is subnetted, 1 subnets
                  C 3.3.3.0 is directly connected, Loopback3
                  23.0.0.0/32 is subnetted, 1 subnets
                  O 23.23.23.23 [110/2] via 192.168.23.1, 00:04:53, FastEthernet1/0
                  C 192.168.23.0/24 is directly connected, FastEthernet1/0
                  O IA 192.1.1.0/24 [110/3] via 192.168.23.1, 00:04:33, FastEthernet1/0


                  So sánh LSA lúc chưa và sau khi đã thiết lập virtual-link
                  R3#sh ip os database router [Lúc chưa thiết lập virtual-link]

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

                  Router Link States (Area 2)

                  LS age: 906
                  Options: (No TOS-capability, DC)
                  LS Type: Router Links
                  Link State ID: 3.3.3.3
                  Advertising Router: 3.3.3.3
                  LS Seq Number: 80000002
                  Checksum: 0x6692
                  Length: 48
                  Number of Links: 2

                  Link connected to: a Transit Network
                  (Link ID) Designated Router address: 192.168.23.1
                  (Link Data) Router Interface address: 192.168.23.2
                  Number of TOS metrics: 0
                  TOS 0 Metrics: 1

                  Link connected to: a Stub Network
                  (Link ID) Network/subnet number: 3.3.3.3
                  (Link Data) Network Mask: 255.255.255.255
                  Number of TOS metrics: 0
                  TOS 0 Metrics: 1


                  LS age: 24
                  Options: (No TOS-capability, DC)
                  LS Type: Router Links
                  Link State ID: 23.23.23.23
                  Advertising Router: 23.23.23.23
                  LS Seq Number: 80000004
                  Checksum: 0xCC3A
                  Length: 48
                  Number of Links: 2

                  Link connected to: a Transit Network
                  (Link ID) Designated Router address: 192.168.23.1
                  (Link Data) Router Interface address: 192.168.23.1
                  Number of TOS metrics: 0
                  TOS 0 Metrics: 1

                  Link connected to: a Stub Network
                  (Link ID) Network/subnet number: 23.23.23.23
                  (Link Data) Network Mask: 255.255.255.255
                  Number of TOS metrics: 0
                  TOS 0 Metrics: 1


                  R3#sh ip os database router [Lúc đã thiết lập virtual-link]

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

                  Router Link States (Area 2)

                  LS age: 798
                  Options: (No TOS-capability, DC)
                  LS Type: Router Links
                  Link State ID: 3.3.3.3
                  Advertising Router: 3.3.3.3
                  LS Seq Number: 80000002
                  Checksum: 0x6692
                  Length: 48
                  Number of Links: 2

                  Link connected to: a Transit Network
                  (Link ID) Designated Router address: 192.168.23.1
                  (Link Data) Router Interface address: 192.168.23.2
                  Number of TOS metrics: 0
                  TOS 0 Metrics: 1

                  Link connected to: a Stub Network
                  (Link ID) Network/subnet number: 3.3.3.3
                  (Link Data) Network Mask: 255.255.255.255
                  Number of TOS metrics: 0
                  TOS 0 Metrics: 1


                  Routing Bit Set on this LSA
                  LS age: 391
                  Options: (No TOS-capability, DC)
                  LS Type: Router Links
                  Link State ID: 23.23.23.23
                  Advertising Router: 23.23.23.23
                  LS Seq Number: 80000003
                  Checksum: 0xD135
                  Length: 48
                  Area Border Router
                  Number of Links: 2

                  Link connected to: a Transit Network
                  (Link ID) Designated Router address: 192.168.23.1
                  (Link Data) Router Interface address: 192.168.23.1
                  Number of TOS metrics: 0
                  TOS 0 Metrics: 1

                  Link connected to: a Stub Network
                  (Link ID) Network/subnet number: 23.23.23.23
                  (Link Data) Network Mask: 255.255.255.255
                  Number of TOS metrics: 0
                  TOS 0 Metrics: 1


                  Trước khi có virtual-link
                  R3#sh ip os database summary

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

                  Sau khi có virtual-link
                  R3#sh ip os database summary

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

                  Summary Net Link States (Area 2)

                  Routing Bit Set on this LSA
                  LS age: 6
                  Options: (No TOS-capability, DC, Upward)
                  LS Type: Summary Links(Network)
                  Link State ID: 1.1.1.1 (summary Network Number)
                  Advertising Router: 23.23.23.23
                  LS Seq Number: 80000001
                  Checksum: 0xBA20
                  Length: 28
                  Network Mask: /32
                  TOS: 0 Metric: 2

                  Routing Bit Set on this LSA
                  LS age: 6
                  Options: (No TOS-capability, DC, Upward)
                  LS Type: Summary Links(Network)
                  Link State ID: 2.2.2.2 (summary Network Number)
                  Advertising Router: 23.23.23.23
                  LS Seq Number: 80000001
                  Checksum: 0x8255
                  Length: 28
                  Network Mask: /32
                  TOS: 0 Metric: 1

                  Routing Bit Set on this LSA
                  LS age: 6
                  Options: (No TOS-capability, DC, Upward)
                  LS Type: Summary Links(Network)
                  Link State ID: 192.168.12.0 (summary Network Number)
                  Advertising Router: 23.23.23.23
                  LS Seq Number: 80000001
                  Checksum: 0xA8C1
                  Length: 28
                  Network Mask: /24
                  TOS: 0 Metric: 1


                  Ta có thể xem bảng tóm tắt của các loại LSA bằng lệnh
                  R3#sh ip os database

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

                  Router Link States (Area 2)

                  Link ID ADV Router Age Seq# Checksum Link count
                  3.3.3.3 3.3.3.3 1613 0x80000002 0x006692 2
                  23.23.23.23 23.23.23.23 30 0x80000007 0x00C939 2

                  Net Link States (Area 2)

                  Link ID ADV Router Age Seq# Checksum
                  192.168.23.1 23.23.23.23 1614 0x80000001 0x00D81B

                  Summary Net Link States (Area 2)

                  Link ID ADV Router Age Seq# Checksum
                  1.1.1.1 23.23.23.23 30 0x80000001 0x00BA20
                  2.2.2.2 23.23.23.23 30 0x80000001 0x008255
                  192.1.1.0 23.23.23.23 5 0x80000001 0x000814
                  192.168.12.0 23.23.23.23 30 0x80000001 0x00A8C1

                  Màu nâu là các route học được từ bên ngoài


                  R1#sh ip ospf database

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

                  Router Link States (Area 0)

                  Link ID ADV Router Age Seq# Checksum Link count
                  1.1.1.1 1.1.1.1 98 0x80000006 0x00A7D4 2
                  23.23.23.23 23.23.23.23 1 (DNA) 0x80000006 0x0033C3 1

                  Summary Net Link States (Area 0)

                  Link ID ADV Router Age Seq# Checksum
                  1.1.1.1 1.1.1.1 1738 0x80000001 0x0047EC
                  1.1.1.1 23.23.23.23 11 (DNA) 0x80000001 0x00BA20
                  2.2.2.2 1.1.1.1 1683 0x80000001 0x00230C
                  2.2.2.2 23.23.23.23 11 (DNA) 0x80000001 0x008255
                  3.3.3.3 23.23.23.23 11 (DNA) 0x80000001 0x005E74
                  23.23.23.23 23.23.23.23 11 (DNA) 0x80000001 0x00B8CA
                  192.168.12.0 1.1.1.1 1687 0x80000003 0x003B85
                  192.168.12.0 23.23.23.23 11 (DNA) 0x80000001 0x00A8C1
                  192.168.23.0 23.23.23.23 11 (DNA) 0x80000001 0x002F30

                  Router Link States (Area 1)

                  Link ID ADV Router Age Seq# Checksum Link count
                  1.1.1.1 1.1.1.1 1698 0x80000002 0x0066BF 2
                  23.23.23.23 23.23.23.23 110 0x80000007 0x002E3D 2

                  Net Link States (Area 1)

                  Link ID ADV Router Age Seq# Checksum
                  192.168.12.2 23.23.23.23 1699 0x80000001 0x00E322

                  Summary Net Link States (Area 1)

                  Link ID ADV Router Age Seq# Checksum
                  3.3.3.3 1.1.1.1 94 0x80000001 0x00FE2B
                  3.3.3.3 23.23.23.23 110 0x80000001 0x005E74
                  23.23.23.23 1.1.1.1 94 0x80000001 0x005981
                  23.23.23.23 23.23.23.23 110 0x80000001 0x00B8CA
                  192.1.1.0 1.1.1.1 1738 0x80000001 0x0094E0
                  192.1.1.0 23.23.23.23 85 0x80000001 0x000814
                  192.168.23.0 1.1.1.1 94 0x80000001 0x00CFE6
                  192.168.23.0 23.23.23.23 110 0x80000001 0x002F30
                  Phạm Minh Tuấn

                  Email : phamminhtuan@vnpro.org
                  Yahoo : phamminhtuan_vnpro
                  -----------------------------------------------------------------------------------------------
                  Trung Tâm Tin Học VnPro
                  149/1D Ung Văn Khiêm P25 Q.Bình thạnh TPHCM
                  Tel : (08) 35124257 (5 lines)
                  Fax: (08) 35124314

                  Home page: http://www.vnpro.vn
                  Support Forum: http://www.vnpro.org
                  - Chuyên đào tạo quản trị mạng và hạ tầng Internet
                  - Phát hành sách chuyên môn
                  - Tư vấn và tuyển dụng nhân sự IT
                  - Tư vấn thiết kế và hỗ trợ kỹ thuật hệ thống mạng

                  Network channel: http://www.dancisco.com
                  Blog: http://www.vnpro.org/blog

                  Comment


                  • #25
                    Các bạn cho mình hỏi là việc bầu chọn DR,BDR thì có như master/Slaver trong môi trường PPP ko, và việc bầu chọn đó nằm ở trạng thái 2-way hay Extart.

                    Comment


                    • #26
                      @logmein: Đọc mấy cái đầu còn hay, càng về sau thấy càng....3 chấm bác ạ
                      Đã nói là củng cố thì chỉ nói vắn tắt và trọng tâm vào những ý chính thôi. Nhiều cái bác nói lan man quá!!!
                      Nhưng mà bác làm như thế này là cung-fu panda lắm rồi. Khâm phục :d
                      dophin_85: Các bạn cho mình hỏi là việc bầu chọn DR,BDR thì có như master/Slaver trong môi trường PPP ko, và việc bầu chọn đó nằm ở trạng thái 2-way hay Extart.
                      Reply With Quote
                      1. Quá trình bầu chọn DR/BDR cũng diễn ra Master/Slave ở trạng thái Exstart nhằm quyết định Router nào sẽ nắm vai trò chủ đạo trong quá trình đồng bộ hóa database giữa 2 Router.
                      2. Quá trình bầu chọn DR/BDR xảy ra ở trạng thái 2-way. Trạng thái 2-way vừa để thiết lập quan hệ Neighbor vừa bầu chọn DR/BDR. Bạn có thể thấy rõ quá trình từ Down State đến Full qua câu lệnh: Debug ip ospf adj

                      Comment


                      • #27
                        Hi,

                        Thanks logmeinvietnam về hệ thống lại kiến thức OSPF. Còn phần các loại area, cậu là tiếp 1 Tut nữa nhé :)

                        Comment


                        • #28
                          Originally posted by duanvcd View Post
                          Code:
                          nối 2 area khác không vào nhau
                          Mình mới học single are thôi :D
                          Code:
                          Còn con nào bật lên trước thì sẽ là DR, vì cho một ví dụ cụ thể là mạng cha và mạng con nối ở các chi nhánh khác nhau. Mạng cha đang làm DR, không lẽ mạng con cắm một router nào đó hoặc thay đổi RouterID chi nhánh của mình thì nó chi nhánh đó sẽ thành DR sao.
                          OSPF là giao thức không chiếm quyền. Tức là 1 router đã là DR thì 1 router khác mới cài đặt vào dù RouterID của nó cao hơn vẫn chỉ là router bình thường (DROTHERS)
                          Code:
                          1.Tất cả các router tự xem nó là DR và BDR của mạng đó [thỏa dk priority > 0 và twoway]
                          Theo mình nghĩ cái này xảy ra khi mạng chưa có DR và BDR thôi. Khi đó mỗi con Router tự cho nó là DR với ID của nó. Sau khi so sánh ID với các Router khác qua gói Hello LSA thì mới quyết định được Router nào là DR, chứ có DR rồi thì bầu chọn làm chi??
                          Uh thì ở trên tui cũng có ý là nó không thể chiếm quyền khi đã có DR ngoại trừ khi reboot lại, hoặc bằng lệnh "clear ip ospf process" [mà lệnh này ít khí ảnh hưởng được lắm trừ khi con muốn chiếm quyền và con DR cùng làm lệnh này]

                          Còn ở trên là khi không có DR và BDR thì nó mới bầu, tui hết sức tán thành với ông.

                          Comment


                          • #29
                            Trong đợt thực tập chuyên ngành, mình có làm về định tuyến OSPF từ cơ bản tới nâng cao (nhưng chỉ tới CCNP chút thui).
                            Nên trong topic này, mình gửi các bạn tham khảo.

                            1. Phần lý thuyết cụ thể, tổng hợp (vì làm thực tập nên k được quá 70 trang), nên mình làm lý thuyết rất tổng hợp, nên cũng dễ hiểu.( Bao gồm : file word, pp và pdf)http://www.mediafire.com/?qgimd35vod8u8iw

                            2. Phần mềm cài đặt
                            Here :http://www.mediafire.com/?y7oj19bnesgsgs9

                            3. Phần triển khai demo :

                            - - Cấu hình OSPF cơ bản.
                            - - Cấu hình Single-Area và Multi-Area OSPF.
                            - - Cấu hình đường tổng hợp : bên trong và bên ngoài.
                            - - Cấu hình các khu vực đặc biệt : Area 0, Stub area , Total Stubby area , NSSA area.
                            - - Phân biệt các loại gói tin trong OSPF : LSAs loại 1, 2, 3, 4, 5, 7…
                            (Kết hợp cùng với EIGRP)

                            - - Cấu hình loại mạng OSPF : P2P, P2M, NBMA..
                            - - Cấu hình OSPF Frame Relay trong mạng NBMA.
                            - - Cấu hình Virtual – Link trong OSPF.
                            - - Cấu hình xác thực : mật khẩu đơn giản, MD5.
                            Here : http://www.mediafire.com/?jnuqqa9idivxa3p


                            P.s : mình dag dùng 3G, nên mạng hơi yếu, nếu bạn nào cần thêm tài liệu về OSPF,

                            Pm mình , mình gửi link sau :
                            Gmail : nganbnn@gmail.com

                            Comment


                            • #30
                              Kho ebook cực hay cho anh/em download ôn kiến thức mạng - hệ thống!

                              Comment

                              • Working...
                                X