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

Phân biệt Passive interface giữa OSPF & RIP??

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

  • Phân biệt Passive interface giữa OSPF & RIP??

    Mô hình lab:



    Đầu tiên ta cho chạy OSPF. Cấu hình mạng hội tụ.

    Trên R1:

    R1(config)#router ospf 1
    R1(config-router)#netw 192.168.12.0 0.0.0.255 area 0
    R1(config-router)#netw 7.7.7.0 0.0.0.255 area 7
    R1(config-router)#exi

    Trên R2:


    R2(config)#router ospf 1
    R2(config-router)#netw 192.168.12.0 0.0.0.255 area 0
    R2(config-router)#netw 8.8.8.8 0.0.0.255 area 8
    R2(config-router)#end
    R2#


    R1#sh ip ospf neighbor


    Neighbor ID Pri State Dead Time Address Interface
    8.8.8.8 1 FULL/BDR 00:00:39 192.168.12.2 FastEthernet0/0
    R1#

    R1#debug ip ospf packet
    OSPF packet debugging is on
    R1#
    *Mar 1 00:12:01.947: OSPF: rcv. v:2 t:1 l:48 rid:8.8.8.8
    aid:0.0.0.0 chk:3528 aut:0 auk: from FastEthernet0/0
    R1#


    Thực hiện cấu hình passive interface trên cổng f0/0 của R1, xem điều gì xảy ra?



    R1(config)#router ospf 1
    R1(config-router)#passive-interface
    R1(config-router)#passive-interface f0/0
    R1(config-router)#
    *Mar 1 00:12:25.775: %OSPF-5-ADJCHG: Process 1, Nbr 8.8.8.8 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
    R1(config-router)#exi

    Lúc này:

    R1#sh ip ospf neighbor

    R1#


    Ngay lập tức các bản tin ospf (kể cả hello; lsa; lsu...) đều không được gửi ra interface f0/0 và do đó R1 và R2 không thiết lập được quan hệ neighbor (điểm này chính là sự khác biệt trong định nghĩa neighbors của link-state và distance; với link state như ospf thì ngoài việc cùng kết nối vào môi trường truyền vật lí; hai router muốn lên neighbor nếu trong bản tin hello chứa các thông tin khác giống nhau như area id; hello interval; dead interval... còn distance vector thì chỉ cần kết nối vật lí với nhau thì gọi là neighbor; distance vector không trao đổi hello để lập quan hệ neighbor).

    Trường hợp 2: R1 và R2 chạy RIP (Vẫn sử dụng mô hình trên)

    Cấu hình cho mạng hội tụ:

    R1(config)#router rip
    R1(config-router)#netw 192.168.12.0
    R1(config-router)#netw 7.7.7.0
    R1(config-router)#end
    R1#wr
    R1#write
    Building configuration...
    [OK]
    R1#
    *Mar 1 00:20:14.527: %SYS-5-CONFIG_I: Configured from console by console
    R1#sh ip ro
    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
    7.0.0.0/24 is subnetted, 1 subnets
    C 7.7.7.0 is directly connected, Loopback0
    R 8.0.0.0/8 [120/1] via 192.168.12.2, 00:00:21, FastEthernet0/0
    R1#

    Tượng tự cho R2.

    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
    R 7.0.0.0/8 [120/1] via 192.168.12.1, 00:00:17, FastEthernet0/0
    8.0.0.0/24 is subnetted, 1 subnets
    C 8.8.8.0 is directly connected, Loopback0
    R2#

    Thực hiện cấu hình passive interface trên cổng f0/0 của R2, xem điều gì xảy ra?

    R2(config)#router rip
    R2(config-router)#passive-interface f0/0
    R2(config-router)#end

    Thực hiện debug ip rip trên R2, ta thấy:
    R2#
    *Mar 1 00:23:51.991: RIP: sending v1 update to 255.255.255.255 via Loopback0 (8.8.8.8)
    *Mar 1 00:23:51.991: RIP: build update entries
    *Mar 1 00:23:51.991: network 7.0.0.0 metric 2
    *Mar 1 00:23:51.991: network 192.168.12.0 metric 1
    R2#
    *Mar 1 00:24:10.955: RIP: received v1 update from 192.168.12.1 on FastEthernet0/0
    *Mar 1 00:24:10.955: 7.0.0.0 in 1 hops
    R2#
    *Mar 1 00:24:21.923: RIP: sending v1 update to 255.255.255.255 via Loopback0 (8.8.8.8)
    *Mar 1 00:24:21.923: RIP: build update entries
    *Mar 1 00:24:21.923: network 7.0.0.0 metric 2
    *Mar 1 00:24:21.927: network 192.168.12.0 metric 1
    R2#
    *Mar 1 00:24:37.091: RIP: received v1 update from 192.168.12.1 on FastEthernet0/0
    *Mar 1 00:24:37.091: 7.0.0.0 in 1 hops
    R2#
    *Mar 1 00:24:51.499: RIP: sending v1 update to 255.255.255.255 via Loopback0 (8.8.8.8)
    *Mar 1 00:24:51.499: RIP: build update entries
    *Mar 1 00:24:51.499: network 7.0.0.0 metric 2
    *Mar 1 00:24:51.503: network 192.168.12.0 metric 1
    R2#
    *Mar 1 00:25:03.135: RIP: received v1 update from 192.168.12.1 on FastEthernet0/0
    *Mar 1 00:25:03.135: 7.0.0.0 in 1 hops
    R2#

    Kết quả ở trên cho ta thấy, R2 vẫn nhận được bản tin cập nhật từ R1 gửi qua.

    Thử debug ip rip trên R1:

    R1#debug ip rip
    RIP protocol debugging is on
    R1#
    *Mar 1 00:26:23.319: RIP: sending v1 flash update to 255.255.255.255 via FastEthernet0/0 (192.168.12.1)
    *Mar 1 00:26:23.319: RIP: build flash update entries
    *Mar 1 00:26:23.319: network 8.0.0.0 metric 16
    *Mar 1 00:26:23.323: RIP: sending v1 flash update to 255.255.255.255 via Loopback0 (7.7.7.7)
    *Mar 1 00:26:23.323: RIP: build flash update entries
    *Mar 1 00:26:23.323: network 8.0.0.0 metric 16
    R1#
    *Mar 1 00:26:28.011: RIP: sending v1 update to 255.255.255.255 via FastEthernet0/0 (192.168.12.1)
    *Mar 1 00:26:28.011: RIP: build update entries
    *Mar 1 00:26:28.011: network 7.0.0.0 metric 1
    *Mar 1 00:26:28.015: network 8.0.0.0 metric 16
    R1#

    Ta thấy R1 chỉ gửi thông tin (sending) chứ không nhận thông tin về (received).

    Như vậy, qua bài lab nhỏ hi vọng các bạn hiểu hơn về việc kiểu định tuyến khác nhau thì việc áp dụng passive interface là hoàn toàn khác nhau.
    Last edited by hoctrongheo; 29-10-2011, 09:26 AM.

  • #2
    Cảm ơn sự chia sẻ của bạn.

    Comment


    • #3
      Cám ơn bạn đã chia sẽ bài viết của bạn với đầy đủ câu lẽnh debug minh họa .
      Với EIGRP và OSPF , passive interface sẽ ngăn chặn cả gói tin Hello gửi ra . Đây là 2 giao thức đòi hỏi phải có sự thiệt lập neighbour trước khi trao đổi thông tin định tuyến nên cấu hình passive interface trên cổng đồng nghĩa shut down neighbour giữa 2 router . Nếu muốn lọc gói tin gửi ra hoặc nhận vào mà vẫn giữ được neighbour , ta có thể sử dụng distribute list .

      Comment

      Working...
      X