• 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.

Cách để các router thiết lập connection với nhau

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cách để các router thiết lập connection với nhau

    Chào các bro,

    Các bước để 2 Router lần đầu tiên thiếp lập connection và trao đổi routing table là gì vậy (vd: dùng giao thức OSPF để routing)

    thanks
    Last edited by Guest; 22-09-2011, 01:11 PM.

  • #2
    dùng giao thức OSPF để static routing
    Giờ mình mới nghe thấy câu này :-). botay

    Comment


    • #3
      Originally posted by kdd View Post
      Chào các bro,

      Các bước để 2 Router lần đầu tiên thiếp lập connection và trao đổi routing table là gì vậy (vd: dùng giao thức OSPF để routing)

      thanks
      2 router dùng giao thức OSPF để định tuyến thì lần đầu tiên thiết lập kết nối chúng sẽ trao đổi các gói tin Hello với nhau để thiết lập neighbor (gói tin Hello này mặc định 10s sẽ gởi 1 lần) và cấu trúc bên trong bản tin Hello của 2 router phải khớp với nhau về các thông số như : area-id, subnet/subnetmask, authentication...
      Khi các router là neighbor của nhau thì chúng bắt đầu trao đổi thông tin bảng định tuyến cho nhau. Vì OSPF là giao thức link-state nên chúng sẽ trao đổi các link-state database (LSDB) cho nhau. Vì database này là của toàn mạng nên dung lượng sẽ là rất lớn và nếu trao đổi nguyên database như vậy sẽ rất dễ dẫn đến nghẽn đường truyền. Do đó các LSDB này được chia nhỏ ra thành các LSA (link-state Advertisement) và LSA này được đóng gói vào trong LSU (link-state Update) để gởi qua cho neighbor.
      Cơ bản là vậy. Còn phân tích sâu hơn nữa thì cũng hơi mệt :) (chúng bầu cử tá lã trong đó I-) )

      Comment


      • #4
        bầu BDR trước bạn ạ

        Comment


        • #5
          Originally posted by itcisco
          Khi router nào có sự thay đổi về link-state trong hệ thống (link up/down), thì nó sẽ gửi thông tin về con router DR và con DR này chịu trách nhiệm thông báo cho các con còn lại trong cùng area thông qua địa chỉ ip Multicast 224.0.0.5 -> quá trình này gọi là bầu cử đó bạn....
          quá trình bạn nói không phải là quá trình bầu cử đâu bạn, mà nó là quá trình cập nhật thông tin định tuyến đó bạn. OSPF là một giao thức link-state, do đó khi có một sự thay đổi nào đó của trạng thái link (up->down, down->up) nó sẽ update sự kiện này (còn được gọi là event-trigger update) cho DR thông qua bản tin LSU (link-state update). DR thu nhận update này mới gởi tới các DRother theo địa chỉ Multicast 224.0.0.5

          Còn quá trình bầu cử thì đương nhiên là nó phải bầu DR xong rồi mới bầu BDR chứ làm gì có vụ bầu BDR trước. Quá trình bầu cử dựa trên các tiêu chí sau :
          - priority : router nào có priority cao nhất sẽ làm DR, cao nhì làm BDR, còn lại là DRother. Nếu như xét tiêu chí này mà vẫn chưa bầu được do các router có priority bằng nhau thì xét đến tiêu chí tiếp theo.
          - router ID : router nào có router ID cao nhất sẽ làm DR, cao nhì làm BDR, còn lại là DRother. Đến đây thì chắc chắn xác định được đâu là DR đâu là BDR vì router ID chính là địa chỉ ip nên không thể nào trùng nhau được.

          Comment


          • #6
            Ban đầu khi mới học thì mình cũng nghĩ là bầu DR trước, nhưng khi bạn nghiên cứu nó sâu hơn bạn sẽ thấy là tại sao lại phải bầu BDR trước, đây là cách giải thích cho việc tại sao bầu BDR trước
            đâu tiên là bạn vào đây để down cái hình này về:
            MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.


            còn đây là những giải thích cho việc bầu đó:

            1- OSPF selects a router at random and examines its list of neighbors; call this Router T. This list of router neighbors consists of all the routers that have begun a bidirectional communication among themselves. This communication is referred to as two-way and is the most advanced state of communication that neighboring routers can achieve without forming an adjacency.

            2 -Router T removes from that list all routers that are ineligible to become the DR. This would consist of routers that have an OSPF-assigned routing priority of 0. The process of altering the default priority is discussed later in this section. Proceed to the next step with the remaining routers on the list.

            3-The BDR, which is chosen first, is determined through calculations on which router has the highest priority. If more than one router has the same priority value, OSPF takes the router with the highest router ID to break the tie.

            4- Priority values can be defined or allowed to default. If a DR already exists, any router is ineligible for election at this point.

            5- If no other router has declared itself to be the DR, assign the newly commissioned BDR to become the DR.

            6- If Router T is now the new DR, the process begins again to identify which router functions as the BDR.For example, if Router T is the DR, it is ineligible for election when Step 3 is repeated. This ensures that no Router declares itself both the DR and the BDR. As a result of these calculations, Router T has become the DR and the router’s OSPF interface state is set accordingly. For example, the DR has a new interface state of DR and the BDR has an interface state of DR other.

            7 -The DR now begins sending Hello packets to begin the process of building the necessary adjacencies with the remainder of the network’s routers.

            Comment


            • #7
              Originally posted by snowball View Post
              Ban đầu khi mới học thì mình cũng nghĩ là bầu DR trước, nhưng khi bạn nghiên cứu nó sâu hơn bạn sẽ thấy là tại sao lại phải bầu BDR trước, đây là cách giải thích cho việc tại sao bầu BDR trước
              đâu tiên là bạn vào đây để down cái hình này về:
              MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.


              còn đây là những giải thích cho việc bầu đó:

              1- OSPF selects a router at random and examines its list of neighbors; call this Router T. This list of router neighbors consists of all the routers that have begun a bidirectional communication among themselves. This communication is referred to as two-way and is the most advanced state of communication that neighboring routers can achieve without forming an adjacency.

              2 -Router T removes from that list all routers that are ineligible to become the DR. This would consist of routers that have an OSPF-assigned routing priority of 0. The process of altering the default priority is discussed later in this section. Proceed to the next step with the remaining routers on the list.

              3-The BDR, which is chosen first, is determined through calculations on which router has the highest priority. If more than one router has the same priority value, OSPF takes the router with the highest router ID to break the tie.

              4- Priority values can be defined or allowed to default. If a DR already exists, any router is ineligible for election at this point.

              5- If no other router has declared itself to be the DR, assign the newly commissioned BDR to become the DR.

              6- If Router T is now the new DR, the process begins again to identify which router functions as the BDR.For example, if Router T is the DR, it is ineligible for election when Step 3 is repeated. This ensures that no Router declares itself both the DR and the BDR. As a result of these calculations, Router T has become the DR and the router’s OSPF interface state is set accordingly. For example, the DR has a new interface state of DR and the BDR has an interface state of DR other.

              7 -The DR now begins sending Hello packets to begin the process of building the necessary adjacencies with the remainder of the network’s routers.
              mình nghĩ bạn hiểu sai vấn đề rồi. cái này nó nói rằng :
              - đầu tiên router T này sẽ kiểm tra trong list các neighbor của nó, nếu có thằng nào priority = 0 thì nó loại ra khỏi cuộc chơi (loại ngay vòng sơ tuyển :) )
              - tiếp theo nó xét đến priority, ai có priority cao nhất là thắng. nếu nhiều thằng có priority bằng nhau thì chơi câu hỏi phụ bằng cách xét tiếp router-id ==>đến đây chỉ có 1 thằng chiến thắng ==> chọn nó làm BDR (là vị trí hiện tại đang xét thôi, còn xét tiếp nữa)
              - kế tiếp nó xem coi có thằng nào làm DR chưa, nếu có rồi thì nó sẽ chính thức làm BDR. Còn chưa có ai làm DR thì nó sẽ chễm trệ lên làm DR (tới đây đã bầu xong DR)
              - cuối cùng là bầu BDR theo giống cách này

              p/s : bạn xem lại bước 5 và bước 6 bạn đã ghi, nó bầu DR trước xong rồi bước 6 nó mới kêu quay lại bước 3 để bầu tiếp BDR.
              Thân,

              Comment


              • #8
                Bạn có thể xem bài viết này, có cả cách để bạn xem qua lab xem bầu cái gì trước bạn nhé, bạn dùng GNS3 sau đó bạn dùng câu lệnh debug lên bạn sẽ thấy rõ được bầu cái gì trước :D
                đây là link bài viết bạn nên tham khảo :

                Comment


                • #9
                  Mình xin bổ sung là ko phải mạng nào cũng bầu BDR và BR cả. Point to point thì không cần thiết phả bầu BDR và DR làm gì cả.
                  Lê Hồng Nam
                  NIIT-iPMAC
                  [ Add: 6rd Floor, 142 Doi Can, Hanoi, Vietnam ]
                  [ CCNA-CCNP-CCIE-MITP-CEH-LINUX Training Program ]
                  [ NIIT-Java-.NET-PHP&MySQL Training Program]
                  Website: www.ipmac.vn

                  NET YOUR WORK!

                  Comment

                  Working...
                  X