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

Easy VPN kết hợp site-to-site VPN

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

  • Easy VPN kết hợp site-to-site VPN

    Mục đích bài lab:



    Hướng dẫn cấu hình hoàn chỉnh: ADSL, BRAS, VPN server(router), VPN client.
    Ở đây sẽ kết hợp cả VPN site-to-site và VPN client-to-site (easy VPN)

    Last edited by phamminhtuan; 19-09-2010, 12:56 PM.
    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

  • #2
    ủa vậy là sao ^^! Không có hướng dẫn có cái hình thoi ma :P

    Comment


    • #3
      chà bài lab củng được dó thiếu file hướng dẫn thôi!
      hy vọng có trong nay mai nhé!
      thank cố gắng phát huy!

      Comment


      • #4
        Cấu hình ADSL (client 1 và client 2, ở đây do không có modem nên ta giả định router làm ADSL client 2)
        ADSL1

        Code:
        ADSL1#sh run
        
        hostname ADSL1
        !
        
        !
        ip dhcp pool pool172
           import all
           network 172.16.1.0 255.255.255.0
           default-router 172.16.1.254 
        
        !
        interface ATM0/0
         no ip address
         no atm ilmi-keepalive
         dsl operating-mode auto
         pvc 8/35 
          pppoe-client dial-pool-number 1
         !
        !
        interface Ethernet0/0
         ip address 172.16.1.254 255.255.255.0
         ip nat inside
         half-duplex
        !
        interface Dialer1
         ip address negotiated
         ip nat outside
         encapsulation ppp
         dialer pool 1
        !
        ip nat inside source list 1 interface Dialer1 overload
        ip http server
        no ip http secure-server
        ip classless
        ip route 0.0.0.0 0.0.0.0 Dialer1
        !         
        !
        access-list 1 permit 172.16.1.0 0.0.0.255
        !
        
        ADSL1#sh ip route 
        
        
             100.0.0.0/32 is subnetted, 2 subnets
        C       100.0.0.6 is directly connected, Dialer1
        C       100.0.0.1 is directly connected, Dialer1
             172.16.0.0/24 is subnetted, 1 subnets
        C       172.16.1.0 is directly connected, Ethernet0/0
        S*   0.0.0.0/0 is directly connected, Dialer1
        ADSL1#sh ip int br
        Interface                  IP-Address      OK? Method Status                Protocol
        ATM0/0                     unassigned      YES NVRAM  up                    up      
        Ethernet0/0                172.16.1.254    YES NVRAM  up                    up      
        Virtual-Access1            unassigned      YES unset  up                    up      
        Dialer1                    100.0.0.6       YES IPCP   up                    up
        ADSL 2

        Code:
        ADSL2#sh run
        
        hostname ADSL2
        
        ip dhcp pool client
           import all
           network 10.0.0.0 255.255.255.0
           dns-server 10.0.0.254 
           default-router 10.0.0.254 
        !         
        interface ATM0/0
         no ip address
         no atm ilmi-keepalive
         dsl operating-mode auto
         pvc 8/35 
          pppoe-client dial-pool-number 1
        
        !
        interface FastEthernet0/0
         ip address 10.0.0.254 255.255.255.0
         ip nat inside
         duplex auto
         speed auto
        !
        interface Dialer1
         ip address negotiated
         ip nat outside
         encapsulation ppp
         dialer pool 1
        !
        ip nat inside source list 1 interface Dialer1 overload
        !
        ip route 0.0.0.0 0.0.0.0 Dialer1
        !
        !
        access-list 1 permit 10.0.0.0 0.0.0.255
        !
        
        ADSL2#sh ip route 
        
             100.0.0.0/32 is subnetted, 2 subnets
        C       100.0.0.1 is directly connected, Dialer1
        C       100.0.0.3 is directly connected, Dialer1
             10.0.0.0/24 is subnetted, 1 subnets
        C       10.0.0.0 is directly connected, FastEthernet0/0
        S*   0.0.0.0/0 is directly connected, Dialer1
        
        ADSL2#sh ip int br
        Interface                  IP-Address      OK? Method Status                Protocol
        ATM0/0                     unassigned      YES NVRAM  up                    up      
        FastEthernet0/0            10.0.0.254      YES NVRAM  up                    up      
        Virtual-Access1            unassigned      YES unset  up                    up      
        Dialer1                    100.0.0.3       YES IPCP   up                    up
        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


        • #5
          Cấu hình BRAS - Gateway - ISP

          Cấu hình của BRAS

          Code:
          BRAS#sh run
          
          !
          hostname BRAS
          !
          vpdn-group adsl
           accept-dialin
            protocol pppoe
            virtual-template 1
          !
          interface Ethernet0/0
           no ip address
           half-duplex
           pppoe enable
          !
          interface Serial0/0
           ip address 12.0.0.1 255.255.255.0
           no fair-queue
          !
          interface Virtual-Template1
           ip address 100.0.0.1 255.255.255.0
           peer default ip address pool DSL
          !
          router ospf 1
           router-id 3.3.3.3
           log-adjacency-changes
           network 12.0.0.1 0.0.0.0 area 0
           network 100.0.0.1 0.0.0.0 area 0
          !
          ip local pool DSL 100.0.0.2 100.0.0.254
          
          
          BRAS# sh ip ro
          BRAS# sh ip route 
          
               102.0.0.0/24 is subnetted, 1 subnets
          O       102.0.0.0 [110/75] via 12.0.0.2, 00:05:30, Serial0/0
               100.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
          C       100.0.0.4/32 is directly connected, Virtual-Access1.3
          C       100.0.0.5/32 is directly connected, Virtual-Access1.4
          C       100.0.0.6/32 is directly connected, Virtual-Access1.5
          C       100.0.0.0/24 is directly connected, Virtual-Access1.1
                               is directly connected, Virtual-Access1.2
                               is directly connected, Virtual-Access1.3
                               is directly connected, Virtual-Access1.4
                               is directly connected, Virtual-Access1.5
          C       100.0.0.2/32 is directly connected, Virtual-Access1.1
          C       100.0.0.3/32 is directly connected, Virtual-Access1.2
               101.0.0.0/24 is subnetted, 1 subnets
          O       101.0.0.0 [110/75] via 12.0.0.2, 00:05:32, Serial0/0
               124.0.0.0/24 is subnetted, 1 subnets
          O       124.0.0.0 [110/74] via 12.0.0.2, 00:05:32, Serial0/0
               12.0.0.0/24 is subnetted, 1 subnets
          C       12.0.0.0 is directly connected, Serial0/0
          BRAS#sh ip os nei
          
          Neighbor ID     Pri   State           Dead Time   Address         Interface
          2.2.2.2           0   FULL/  -        00:00:39    12.0.0.2        Serial0/0
          
          BRAS#sh ip int br
          Interface                  IP-Address      OK? Method Status                Protocol
          Ethernet0/0                unassigned      YES NVRAM  up                    up      
          Serial0/0                  12.0.0.1        YES NVRAM  up                    up      
          Virtual-Access1            unassigned      YES unset  up                    up      
          Virtual-Access1.1          100.0.0.1       YES TFTP   up                    up      
          Virtual-Access1.2          100.0.0.1       YES TFTP   up                    up      
          Virtual-Access1.3          100.0.0.1       YES TFTP   up                    up      
          Virtual-Access1.4          100.0.0.1       YES TFTP   up                    up      
          Virtual-Access1.5          100.0.0.1       YES TFTP   up                    up      
          Virtual-Access1.6          unassigned      YES unset  up                    up      
          Virtual-Template1          100.0.0.1       YES NVRAM  down                  down    
          Virtual-Access2            unassigned      YES unset  down                  down
          
          BRAS#sh ip protocols 
          Routing Protocol is "ospf 1"
            Outgoing update filter list for all interfaces is not set
            Incoming update filter list for all interfaces is not set
            Router ID 3.3.3.3
            Number of areas in this router is 1. 1 normal 0 stub 0 nssa
            Maximum path: 4
            Routing for Networks:
              12.0.0.1 0.0.0.0 area 0
              100.0.0.1 0.0.0.0 area 0
            Routing Information Sources:
              Gateway         Distance      Last Update
              2.2.2.2              110      00:06:58
              1.1.1.1              110      00:06:19
              124.0.0.1            110      00:08:52
              124.0.0.2            110      00:07:49
            Distance: (default is 110)
          Cấu hình Gateway

          Code:
          GateWay#sh run
          !
          interface Ethernet0/0
           ip address 124.0.0.2 255.255.255.0
           ip ospf mtu-ignore
           half-duplex
          !
          interface Serial0/0
           ip address 12.0.0.2 255.255.255.0
           clock rate 64000
           no fair-queue
          !
          router ospf 1
           router-id 2.2.2.2
           log-adjacency-changes
           network 12.0.0.2 0.0.0.0 area 0
           network 124.0.0.2 0.0.0.0 area 0
          
          
          GateWay# sh ip route 
          
               102.0.0.0/24 is subnetted, 1 subnets
          O       102.0.0.0 [110/11] via 124.0.0.1, 00:06:52, Ethernet0/0
               100.0.0.0/24 is subnetted, 1 subnets
          O       100.0.0.0 [110/65] via 12.0.0.1, 00:06:52, Serial0/0
               101.0.0.0/24 is subnetted, 1 subnets
          O       101.0.0.0 [110/11] via 124.0.0.1, 00:06:52, Ethernet0/0
               124.0.0.0/24 is subnetted, 1 subnets
          C       124.0.0.0 is directly connected, Ethernet0/0
               12.0.0.0/24 is subnetted, 1 subnets
          C       12.0.0.0 is directly connected, Serial0/0
          
          GateWay# sh ip os neighbor 
          
          Neighbor ID     Pri   State           Dead Time   Address         Interface
          1.1.1.1           1   FULL/DR         00:00:38    124.0.0.1       Ethernet0/0
          3.3.3.3           0   FULL/  -        00:00:38    12.0.0.1        Serial0/0
          
          GateWay#sh ip int br
          Interface                  IP-Address      OK? Method Status                Protocol
          Ethernet0/0                124.0.0.2       YES NVRAM  up                    up      
          Serial0/0                  12.0.0.2        YES NVRAM  up                    up      
          
          GateWay#sh ip pro
          Routing Protocol is "ospf 1"
            Outgoing update filter list for all interfaces is not set
            Incoming update filter list for all interfaces is not set
            Router ID 2.2.2.2
            Number of areas in this router is 1. 1 normal 0 stub 0 nssa
            Maximum path: 4
            Routing for Networks:
              12.0.0.2 0.0.0.0 area 0
              124.0.0.2 0.0.0.0 area 0
            Routing Information Sources:
              Gateway         Distance      Last Update
              3.3.3.3              110      00:07:17
              1.1.1.1              110      00:07:17
              100.0.0.1            110      00:07:47
              124.0.0.1            110      00:09:50
            Distance: (default is 110)
          Cấu hình của ISP

          Code:
          ISP#sh run
          
          hostname ISP
          
          ip routing
          !
          interface FastEthernet0/1
           no switchport
           ip address 101.0.0.1 255.255.255.0
          !
          interface FastEthernet0/2
           no switchport
           ip address 102.0.0.1 255.255.255.0
          !
          
          interface FastEthernet0/24
           no switchport
           ip address 124.0.0.1 255.255.255.0
           ip ospf mtu-ignore
          
          !
          router ospf 1
           router-id 1.1.1.1
           log-adjacency-changes
           network 96.0.0.0 31.255.255.255 area 0
          
          ISP#sh ip route 
          
          
               102.0.0.0/24 is subnetted, 1 subnets
          C       102.0.0.0 is directly connected, FastEthernet0/2
               100.0.0.0/24 is subnetted, 1 subnets
          O       100.0.0.0 [110/75] via 124.0.0.2, 00:09:58, FastEthernet0/24
               101.0.0.0/24 is subnetted, 1 subnets
          C       101.0.0.0 is directly connected, FastEthernet0/1
               124.0.0.0/24 is subnetted, 1 subnets
          C       124.0.0.0 is directly connected, FastEthernet0/24
               12.0.0.0/24 is subnetted, 1 subnets
          O       12.0.0.0 [110/74] via 124.0.0.2, 00:09:58, FastEthernet0/24
          
          ISP#sh ip os neighbor 
          
          Neighbor ID     Pri   State           Dead Time   Address         Interface
          2.2.2.2           1   FULL/BDR        00:00:33    124.0.0.2       FastEthernet0/24
          
          ISP#sh ip protocols 
          *** IP Routing is NSF aware ***
          
          Routing Protocol is "ospf 1"
            Outgoing update filter list for all interfaces is not set
            Incoming update filter list for all interfaces is not set
            Router ID 1.1.1.1
            Number of areas in this router is 1. 1 normal 0 stub 0 nssa
            Maximum path: 4
            Routing for Networks:
              96.0.0.0 31.255.255.255 area 0
            Routing Information Sources:
              Gateway         Distance      Last Update
              3.3.3.3              110      00:10:06
              2.2.2.2              110      00:10:06
              1.1.1.1              110      00:10:07
              100.0.0.1            110      00:11:37
              124.0.0.1            110      00:12:40
              124.0.0.2            110      00:11:37
            Distance: (default is 110)
          
          ISP#sh ip int br
          Interface              IP-Address      OK? Method Status                Protocol
          Vlan1                  unassigned      YES unset  administratively down down    
          FastEthernet0/1        101.0.0.1       YES manual up                    up      
          FastEthernet0/2        102.0.0.1       YES manual up                    up      
             
          FastEthernet0/24       124.0.0.1       YES manual up                    up      
             
          ISP#
          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


          • #6
            thanks anh! Bài viết này rất có giá trị với em!

            Hiện nay em đang làm 1 đề tài về bảo mật thông tin của VPN và thực hiện 1 demo về nó. Tuy nhiên, vì chỉ mới học xong CCNA nên em ko hiểu cho lắm về cách cấu hình như thế nào. Vì thế, anh có thể chỉ rõ hơn cho em được ko ?
            P/s: như là cách viết file *.net, cấu hình SW layer3 và các router ...

            nếu được, anh có thể gửi mail cho em thì càng tốt: gianghovole89@gmail.com
            Thanks anh!

            Comment


            • #7
              Chào bạn,

              Bài này làm trên thiết bị thật, vì lab ảo chưa giả lập được con DSLAM.

              Còn cấu hình thì mình đã để trong phần show run từng con phía trên rồi.
              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


              • #8
                @Giang :Thực hành lab thì bạn có thể thay con DLAM bằng một con sw lớp hai cũng được .

                Comment


                • #9
                  Nếu thay bằng switch lớp 2 thì cũng được, nhưng lúc này ADSL chỉ dùng chức năng Bridge.
                  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


                  • #10
                    Thanks for all!
                    @ logmeinvietnam: nếu anh có các gói tin bắt được từ mo hình trên thì có thể share để cho em và mọi ng có thể hiểu thêm về các phương thức Cisco áp dụng và cơ chế hoạt động được ko ạ. thanks anh!

                    Comment

                    • Working...
                      X