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

Thực hiện dự phòng với SLA

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

  • Thực hiện dự phòng với SLA

    Bùi Nguyễn Hoàng Long

    VnPro



    Thực hiện dự phòng với SLA
    I. Mô tả:
    Thực hiện tính năng dự phòng với SLA, với việc thực hiện giám sát sự tồn tại của đối tượng thông qua icmp request kết hợp với tuyến tĩnh, khi đối tượng không reply, tuyến tĩnh sẽ không còn trong bảng định tuyến. Khi đối tượng có thể tiếp tục reply, tuyến tĩnh lại tục thêm vào bảng định tuyến. Đối tương có thể là địa chỉ của cổng, của PC..., đảm bảo icmp request có thể được xử lý bởi đối tượng này.
    Khi luồng dữ liệu ra Internet ASA sẽ chọn GATEWAY_1 (PRIMARY)
    Khi việc giám sát đối tượng trên tuyến PRIMARY thất bại, tuyến BACKUP (GATEWAY_2) sẽ được chọn.

    II.Cấu hình
    Cấu hình tham số cho tiến trình SLA
    ASA(config)# sla monitor 1

    Xác định giao thức thực hiện giám sát (ICMP) , trong đó 203.162.4.190 sẽ là đối tượng được giám sát (tracked object ) , và cổng sẽ thực hiện gởi ICMP
    ASA(config-sla-monitor)# type echo protocol ipIcmpEcho 203.162.4.190 interface outside_1

    Xác định thời điểm thực hiện giám sát đối tượng
    ASA(config)# sla monitor schedule 1 start-time now life forever

    Kết hợp tuyến tĩnh được giám sát với tiến trình SLA
    ASA(config)# track 100 rtr 1 reachability

    Cấu hình tiến trình giám sát cho tuyến Primary
    ASA(config)# route outside_1 0 0 192.168.2.2 track 100

    Đảm bảo cho tuyến Backup có AD lớn hơn tuyến Primary
    ASA(config)# route outside_2 0 0 192.168.3.2 10

    ASA(config)# no nat-control

    Cấu hình DHCP trên ASA
    ASA(config)# dhcpd address 192.168.1.2-192.168.1.254 inside
    ASA(config)# dhcpd enable inside
    III. Cấu hình đầy đủ

    ASA

    ASA Version 8.0(2)
    !
    hostname ASA
    enable password 8Ry2YjIyt7RRXU24 encrypted
    names
    !
    interface Ethernet0/0
    nameif inside
    security-level 100
    ip address 192.168.1.1 255.255.255.0
    !
    interface Ethernet0/1
    nameif outside_1
    security-level 0
    ip address 192.168.2.1 255.255.255.0
    !
    interface Ethernet0/2
    nameif outside_2
    security-level 0
    ip address 192.168.3.1 255.255.255.0
    !
    interface Ethernet0/3
    shutdown
    no nameif
    no security-level
    no ip address
    !
    interface Management0/0
    shutdown
    no nameif
    no security-level
    no ip address
    management-only
    !
    passwd 2KFQnbNIdI.2KYOU encrypted
    ftp mode passive
    access-list ICMP extended permit icmp any any
    access-group ICMP in interface outside_1
    access-group ICMP in interface outside_2

    route outside_1 0.0.0.0 0.0.0.0 192.168.2.2 1 track 100
    route outside_2 0.0.0.0 0.0.0.0 192.168.3.2 10

    sla monitor 1
    type echo protocol ipIcmpEcho 203.162.4.190 interface outside_1
    sla monitor schedule 1 life forever start-time now
    no crypto isakmp nat-traversal
    !
    track 100 rtr 1 reachability
    telnet timeout 5
    ssh timeout 5
    console timeout 0
    dhcpd address 192.168.1.2-192.168.1.254 inside
    dhcpd enable inside
    !
    class-map inspection_default
    match default-inspection-traffic
    !
    !
    policy-map type inspect dns preset_dns_map
    parameters
    message-length maximum 512
    policy-map global_policy
    class inspection_default
    inspect dns preset_dns_map
    inspect ftp
    inspect h323 h225
    inspect h323 ras
    inspect rsh
    inspect rtsp
    inspect esmtp
    inspect sqlnet
    inspect skinny
    inspect sunrpc
    inspect xdmcp
    inspect sip
    inspect netbios
    inspect tftp
    !
    service-policy global_policy global
    prompt hostname context
    Cryptochecksum:5c95986550b4487314e418bb01c2f180
    : end

    GATEWAY_1
    Building configuration...

    Current configuration : 1181 bytes

    !
    hostname GATEWAY_1
    !
    no crypto isakmp ccm
    !
    interface FastEthernet0/0
    ip address 192.168.2.2 255.255.255.0
    ip nat inside
    ip virtual-reassembly
    duplex auto
    speed auto
    !
    interface FastEthernet0/1
    ip address dhcp
    ip nat outside
    ip virtual-reassembly
    duplex auto
    speed auto
    !
    ip classless
    ip route 192.168.1.0 255.255.255.0 192.168.2.1
    !
    ip http server
    no ip http secure-server
    ip nat inside source list 1 interface FastEthernet0/1 overload
    !
    access-list 1 permit 192.168.1.0 0.0.0.255
    access-list 1 permit 192.168.2.0 0.0.0.255
    !

    GATEWAY_2
    Building configuration...

    Current configuration : 1128 bytes
    !
    hostname GATEWAY_2
    !
    !
    interface FastEthernet0/0
    ip address 192.168.3.2 255.255.255.0
    ip nat inside
    ip virtual-reassembly
    duplex auto
    speed auto
    !
    interface FastEthernet0/1
    ip address dhcp
    ip nat outside
    ip virtual-reassembly
    duplex auto
    speed auto
    !
    ip classless
    ip route 192.168.1.0 255.255.255.0 192.168.3.1

    !
    ip http server
    no ip http secure-server
    ip nat inside source list 1 interface FastEthernet0/1 overload
    !
    access-list 1 permit 192.168.1.0 0.0.0.255
    access-list 1 permit 192.168.2.0 0.0.0.255
    !
    IV. Kiểm tra

    Địa chỉ được nhận từ DHCP
    GATEWAY_1#sh ip interface brief fa0/1
    Interface IP-Address OK? Method Status Protocol
    FastEthernet0/1 10.215.219.98 YES DHCP up up

    GATEWAY_2#sh ip interface brief fa0/1
    Interface IP-Address OK? Method Status Protocol
    FastEthernet0/1 10.215.219.96 YES DHCP up up

    Thông tin tuyến tĩnh
    GATEWAY_1#sh ip route static
    S 192.168.1.0/24 [1/0] via 192.168.2.1
    S* 0.0.0.0/0 [254/0] via 10.215.219.254

    GATEWAY_2#sh ip route static
    S 192.168.1.0/24 [1/0] via 192.168.3.1
    S* 0.0.0.0/0 [254/0] via 10.215.219.254

    Thông tin DHCP
    ASA(config)# sh dhcpd binding

    IP address Hardware address Lease expiration Type

    192.168.1.2 0100.1c25.7a1d.48 3438 seconds Automatic



    Tuyến Primary được thêm vào bảng định tuyến
    ASA(config)# sh route

    Gateway of last resort is 192.168.2.2 to network 0.0.0.0

    C 192.168.1.0 255.255.255.0 is directly connected, inside
    C 192.168.2.0 255.255.255.0 is directly connected, outside_1
    C 192.168.3.0 255.255.255.0 is directly connected, outside_2
    S* 0.0.0.0 0.0.0.0 [1/0] via 192.168.2.2, outside_1



    Shutdown cổng fa0/1 trên GATEWAY_1
    GATEWAY_1(config)#interface fa0/1
    GATEWAY_1(config-if)#shut
    Khi tiến trình kiểm tra từ ASA đến địa chỉ 203.162.4.190 bằng ICMP không nhận được reply, tuyến Backup sẽ thay tuyến Primary

    ASA(config)# sh route

    Gateway of last resort is 192.168.3.2 to network 0.0.0.0

    C 192.168.1.0 255.255.255.0 is directly connected, inside
    C 192.168.2.0 255.255.255.0 is directly connected, outside_1
    C 192.168.3.0 255.255.255.0 is directly connected, outside_2
    S* 0.0.0.0 0.0.0.0 [10/0] via 192.168.3.2, outside_2



    Thực hiện no shut trên cổng GATEWAY_1, tuyến PRIMARY sẽ được đặt lại bảng định tuyến
    GATEWAY_1(config)#interface fa0/1
    GATEWAY_1(config-if)#no shut
    Last edited by phamminhtuan; 13-05-2011, 12:51 AM.
    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
    Thanks bác! Đang tìm đúng cái này
    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


    • #3
      thanks bác, bửa trước làm lab vướn cái này

      Comment


      • #4
        cho minh xin lai cai hinh topo voi.

        Thanks bai viet dung ngay cai em can tim.

        Comment


        • #5
          Bài viết của anh hay quá!!! Mà em giả lập ASA5520 trên GNS3,nhưng nó không hỗ trợ tính năng này! Anh có IOS con ASA nào mà nó hỗ trợ giúp em với!

          Comment


          • #6
            A chủ topic ơi, topo tèo rồi, up lại đi.
            Thank anh!
            CSCO 11618725

            Comment


            • #7
              IP 203.162.4.190 nằm ở đâu trên sơ đồ vậy mấy bác ?

              Comment


              • #8
                đó là IP public, có thể là ip gateway của RT Gateway 01

                Comment


                • #9
                  bác ơi hình topo và mấy hình bên dưới lỗi rồi...upload lại cho em xem với....thanks bác nhiều

                  Comment

                  • Working...
                    X