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.

NAT và lỗi Routing..?

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

  • NAT và lỗi Routing..?

    Mình có một topo như hình dưới đây:
    Click image for larger version

Name:	Untitled.jpg
Views:	1
Size:	26.1 KB
ID:	207565
    - Trong Topo này thì mình cho chạy EIGRP ở cổng S0/1 của R2 và toàn bộ R3. Lúc này R2 đã biết được tuyến đường đến mạng L01
    - vấn đề xảy ra là khi mình thực hiện nat overload trên R2 với interface S0/0 là nat inside và interface s0/1 là nat outside thì ngay lập tức một quan hệ neighbor của R2 và R3 gặp vân đề, và lúc show ip route của R2 sẽ ko thấy mạng L01 nữa.
    Cho mình hỏi như thế này:
    1- tại sao lại có hiện tượng trên, lý do là do đâu?
    2- cách sửa là như thế nào?
    Last edited by snowball; 15-08-2011, 09:25 AM. Reason: nham

  • #2
    Bạn có thể gửi file cấu hình của bạn lên để mọi người dễ theo dõi và troubleshoot không?
    Nguyễn Thị Thanh Minh,
    Support Teams

    Email :thanhminh@vnpro.org

    Viet Professionals Co. Ltd. VnPro ®
    ---------------------------------------
    149/1D Ung Văn Khiêm P25 Q.Bình Thạnh TPHCM
    Tel: (08) 35124257
    Fax: (08) 5124314
    Home Page : http://www.vnpro.vn
    Support forum : http://vnpro.org
    LiveChat : http://www.vnpro.vn/support
    Wifi forum : http://wifipro.org
    Blog : http://vnpro.org/blog

    Comment


    • #3
      OK đây là file config của mình:
      Router R1

      !
      version 12.4
      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
      memory-size iomem 5
      ip cef
      !
      no ip domain lookup
      ip auth-proxy max-nodata-conns 3
      ip admission max-nodata-conns 3
      !
      interface FastEthernet0/0
      no ip address
      shutdown
      duplex auto
      speed auto
      !
      interface Serial0/0
      ip address 1.1.1.1 255.255.255.0
      clock rate 2000000
      !
      interface FastEthernet0/1
      no ip address
      shutdown
      duplex auto
      speed auto
      !
      interface Serial0/1
      no ip address
      shutdown
      clock rate 2000000
      !
      ip forward-protocol nd
      !
      no ip http server
      no ip http secure-server
      !
      control-plane
      !
      mgcp behavior g729-variants static-pt
      !
      gatekeeper
      shutdown
      !
      line con 0
      exec-timeout 0 0
      logging synchronous
      line aux 0
      line vty 0 4
      login
      !
      end
      Router R2
      Current configuration : 1153 bytes
      version 12.4
      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
      memory-size iomem 5
      ip cef
      !
      no ip domain lookup
      ip auth-proxy max-nodata-conns 3
      ip admission max-nodata-conns 3
      !
      interface FastEthernet0/0
      no ip address
      shutdown
      duplex auto
      speed auto
      !
      interface Serial0/0
      ip address 1.1.1.2 255.255.255.0
      ip nat inside
      ip virtual-reassembly
      clock rate 2000000
      !
      interface FastEthernet0/1
      no ip address
      shutdown
      duplex auto
      speed auto
      !
      interface Serial0/1
      ip address 1.1.2.1 255.255.255.0
      ip nat outside
      ip virtual-reassembly
      clock rate 2000000
      !
      router eigrp 1
      network 1.1.2.1 0.0.0.0
      no auto-summary
      !
      ip forward-protocol nd
      !
      !
      no ip http server
      no ip http secure-server
      ip nat inside source list 1 interface Serial0/1 overload
      !
      access-list 1 permit any
      !
      !
      !
      control-plane
      !
      mgcp behavior g729-variants static-pt
      !
      gatekeeper
      shutdown
      !
      !
      line con 0
      exec-timeout 0 0
      logging synchronous
      line aux 0
      line vty 0 4
      login
      !
      !
      End
      Router R3

      Current configuration : 1033 bytes
      !
      version 12.4
      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
      memory-size iomem 5
      ip cef
      !
      no ip domain lookup
      ip auth-proxy max-nodata-conns 3
      ip admission max-nodata-conns 3
      !
      interface Loopback1
      ip address 8.8.8.8 255.255.255.0
      !
      interface FastEthernet0/0
      no ip address
      shutdown
      duplex auto
      speed auto
      !
      interface Serial0/0
      ip address 1.1.2.2 255.255.255.0
      clock rate 2000000
      !
      interface FastEthernet0/1
      no ip address
      shutdown
      duplex auto
      speed auto
      !
      interface Serial0/1
      no ip address
      shutdown
      clock rate 2000000
      !
      router eigrp 1
      network 0.0.0.0
      no auto-summary
      !
      ip forward-protocol nd
      !
      no ip http server
      no ip http secure-server
      !
      control-plane
      !
      mgcp behavior g729-variants static-pt
      !
      gatekeeper
      shutdown
      !
      !
      line con 0
      exec-timeout 0 0
      logging synchronous
      line aux 0
      line vty 0 4
      login
      !
      End

      Comment


      • #4
        Originally posted by snowball View Post
        Mình có một topo như hình dưới đây:
        [ATTACH=CONFIG]3586[/ATTACH]
        - Trong Topo này thì mình cho chạy EIGRP ở cổng S0/1 của R2 và toàn bộ R3. Lúc này R2 đã biết được tuyến đường đến mạng L01
        - vấn đề xảy ra là khi mình thực hiện nat overload trên R1 với interface S0/0 là nat inside và interface s0/1 là nat outside thì ngay lập tức một quan hệ neighbor của R2 và R3 gặp vân đề, và lúc show ip route của R2 sẽ ko thấy mạng L01 nữa.
        Cho mình hỏi như thế này:
        1- tại sao lại có hiện tượng trên, lý do là do đâu?
        2- cách sửa là như thế nào?
        Theo file cấu hình là bạn NAT trên R2 chứ không phải R1 .
        Khi Nat bạn nên chỉ thẳng đến Ip next-hop, ko nên dùng outbound interface mặc point to point có thể vẫn ok
        Last edited by huyhoang8344; 15-08-2011, 09:24 AM.

        Comment


        • #5
          Theo file cấu hình là bạn NAT trên R2 chứ không phải R1 .
          Khi Nat bạn nên chỉ thẳng đến Ip next-hop, ko nên dùng outbound interface mặc point to point có thể vẫn ok
          cám ơn anh, em viết nhầm. (:
          vấn đề là nếu như em dùng static nat trên R2 thì vẫn ok, như khi dùng nat overload thì lại gặp vấn đề, em muốn hỏi là tại sao lại như thế, và có cách nào khắc phục được nó không ?

          Comment


          • #6
            Chào bạn, khi thực hiện NAT bạn nên NAT trên con router R1, không nên thực hiện NAT trên R2 vì nó sẽ classtification traffic, ảnh hưởng đến quá trình trao đổi thông tin định tuyến giữa R2 và R3.
            Nguyễn Thị Thanh Minh,
            Support Teams

            Email :thanhminh@vnpro.org

            Viet Professionals Co. Ltd. VnPro ®
            ---------------------------------------
            149/1D Ung Văn Khiêm P25 Q.Bình Thạnh TPHCM
            Tel: (08) 35124257
            Fax: (08) 5124314
            Home Page : http://www.vnpro.vn
            Support forum : http://vnpro.org
            LiveChat : http://www.vnpro.vn/support
            Wifi forum : http://wifipro.org
            Blog : http://vnpro.org/blog

            Comment


            • #7
              classtification traffic
              nghĩa là sao hả bạn?
              Trường hợp này hôm qua mình mới thử, thì thấy nó thế, mình thấy rất lạ và ko giải thích được tại sao.

              Comment


              • #8
                ok, cái NAT trên R1 nhìn topo là thấy bạn nói nhầm rồi :))
                1 - DEBUG PROCESS

                Trên R2:
                #show ip eigrp neighbor ---> Q count #0, và SRTT rất lớn ---> Hello từ R2 có vẻ ko tới đc R3
                Trên R3:
                #debug eigrp packet hello ---> ko thấy nhận đc hello từ R2
                Trên R2:
                #debug eigrp packet hello ---> thấy nhận đc hello từ R3, err: retry limit exceed => gửi Hello sang nhưng R3 ko có phản hồi
                #debug ip nat translate ---> err: NAT translate fail (F), drop packet s= [] d = 224.0.0.10

                --------------------------------------------
                2 - EXPLANATION

                Dưới đây là 1 lý giải:
                R2 drop EIGRP packet của nó vì nó ko có NAT entry cho source đó trong bảng NAT. Khi NAT overload nó sẽ NAT mọi thứ đi ra khỏi interface nat outside đồng thời kiểm tra bảng NAT. Nếu traffic tới từ incoming interface khác, nó sẽ dựa trên ip nat inside để check bảng NAT. Nói như vậy nghĩa là nếu bạn NAT static thì mọi thứ lại đi vào quỹ đạo của nó !

                ---------------
                Test tiếp:
                Có vẻ NAT translation fail với OSPF, EIGRP, nhưng success với RIP ? bạn thử xem ?
                Với cả là ngoài NAT static, thử nghĩ xem còn giải pháp gì nữa ko, vẫn đang nat overload nhé ?

                Comment


                • #9
                  mình có thêm ý kiến thế này nhé, trong phần access-list của mình ấy nếu như mình ko permit any mà chỉ permit một giải địa chỉ nào đó thì ok, mọi thứ diễn ra bình thường.
                  Đúng như Firey nói thì cái này còn gặp vả vấn đề trên OSPF nữa. cách chữa thì dùng static nat la ok.
                  Mà bạn cho mình hỏi tham số SRTT là gỉ hả bạn, và nếu nó lớn thì ảnh hưởng gì đến gói tin hello.

                  Comment


                  • #10
                    SRTT = smooth round trip time là thời gian cho 1 EIGRP hello đc gửi sang neighbor và quay lại. SRTT quá lớn chỉ có ý nghĩa tượng trưng là hello đã đi và ko trở lại :))
                    Q count thể hiện EIGRP update đang chờ ở hàng đợi, Q Count # 0 = Vẫn chưa Adj xong !
                    Đúng như bạn nói, bạn permit 1 dải hoặc exclude cái IP của interface nat outside từ cái ACL permit all thì cũng đều ok, nghĩa là ko NAT cái source đó !
                    EIGRP và OSPF đều dính, nhưng RIP thì ko ?

                    Comment


                    • #11
                      cám ơn firey rất nhiều nhé. :)

                      Comment

                      Working...
                      X