• 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ấu hình Active/Active on Pix 802 (Mô hình 2)

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

  • Cấu hình Active/Active on Pix 802 (Mô hình 2)

    I. Mô tả
    Sơ đồ mạng, phân bố IP và cổng kết nối giữa các thiết bị tương ứng như hình dưới:



    Mục tiêu:
    - Cấu hình Active/Active trên thiết bị FW1, FW2.
    - Sau khi cấu hình xong:
    + FW1: Active với context Admin, standby với context CTX1.
    + FW2: Active với context CTX1, standby với context Admin.
    + PC1 ping thông đến 172.26.26.254 (InternetCloud) thông qua FW1
    + PC2 ping thông đến 172.26.26.254 (InternetCloud) thông qua FW2
    + PC1, PC2 telnet được đến Router (mật khẩu thiết lập là cisco)
    - Tắt thiết bị FW1:
    + FW2: Active với context CTX1, và context Admin
    + PC1, PC2 ping thông đến 172.26.26.254 (InternetCloud) thông qua FW2
    + PC1 vẫn giữ phiên telnet đến Router mà không cần đăng nhập >> stateful là okie

    II. Giả lập
    - GNS3 với IOS Router 3725, IOS Pix Firewall 8.0(2), Virtual PC là vpcs-0.13a


    III. Cấu hình

    FW1:

    Code:
    # Đặt tên cho thiết bị:
    pixfirewall(config)#hostname FW1
    FW1(config)#
    
    #FW1 chuyển từ mode single sang mode multiple:
    FW1(config)# mode multiple
    # sau khi gõ lệnh trên, FW1 sẽ reload lại, lúc đó cần tắt firewall đi rồi bật lại. Có thể kiểm tra    # mode hiện tại của FW1 có phải là multiple hay không như sau:
    
    FW1(config)#show mode 
    Security context mode: multiple 
    FW1(config)#
    
    # Kích hoạt cổng Ethernet0, Ethernet1, Ethernet2, Ethernet3, Ethernet4:
    FW1(config)#interface Ethernet0
    FW1(config-if)#no shut
    FW1(config-if)#interface Ethernet1
    FW1(config-if)#no shut
    FW1(config-if)#interface Ethernet2
    FW1(config-if)#no shut
    FW1(config-if)#interface Ethernet3
    FW1(config-if)#no shut
    FW1(config-if)#interface Ethernet4
    FW1(config-if)#no shut
    FW1(config-if)#exit
    FW1(config)#
    
    # Cấu hình LAN/Stateful Failover interface
    FW1(config)#failover lan unit primary
    FW1(config)#failover lan interface MYFAILOVER Ethernet2
    FW1(config)#failover link MYFAILOVER Ethernet2F
    FW1(config)#failover lan enable
    FW1(config)#failover key cisco123
    FW1(config)#failover interface ip MYFAILOVER 172.17.1.1 255.255.255.0 standby 172.17.1.7
    
    # Thiết lập Failover group:
    FW1(config)#failover group 1
    FW1(config-fover-group)#preempt 10
    FW1(config-fover-group)#failover group 2
    FW1(config-fover-group)#secondary
    FW1(config-fover-group)#preempt
    FW1(config-fover-group)#replication http
    FW1(config-fover-group)#exit
    FW1(config)#
    
    # Tạo context, gán interface, lưu cấu hình mỗi context trên flash, join context vào từng group:
    FW1(config)#admin-context admin
    FW1(config)#context admin
    FW1(config-ctx)#allocate-interface Ethernet0
    FW1(config-ctx)#allocate-interface Ethernet1
    FW1(config-ctx)#config-url flash:/admin.cfg
    FW1(config-ctx)#join-failover-group 1
    FW1(config-ctx)#context CTX1
    FW1(config-ctx)#allocate-interface Ethernet3
    FW1(config-ctx)#allocate-interface Ethernet4 
    FW1(config-ctx)#config-url flash:/CTX1.cfg
    FW1(config-ctx)#join-failover-group 2
    FW1(config-ctx)#exit
    FW1(config)#
    
    # Kích hoạt failover:
    FW1(config)#failover
    
    
    Cấu hình trên context Admin:
    # chuyển đến context Admin:
    FW1(config)#change context Admin
    
    # Đặt tên context:
    FW1/Admin(config)#hostname Admin
    
    # Cấu hình địa chỉ ip hệ thống và standby cho từng interface:
    FW1/Admin(config)#interface Ethernet0
    FW1/Admin(config-subif)#nameif outside
    FW1/Admin(config-subif)#ip address 192.168.1.2 255.255.255.0 standby 192.168.1.7 
    FW1/Admin(config-subif)#interface Ethernet1
    FW1/Admin(config-subif)#nameif inside
    FW1/Admin(config-subif)# ip address 10.0.1.1 255.255.255.0 standby 10.0.1.7 
    FW1/Admin(config-subif)#exit
    FW1/Admin(config)#
    
    # Cấu hình Access List cho phép icmp, tcp đi qua Firewall:
    FW1/Admin(config)#access-list PING permit icmp any any
    FW1/Admin(config)#access-list PING permit ip any any  
    FW1/Admin(config)#access-group PING in interface outside
    
     # NAT tĩnh PC1:   
    FW1/Admin(config)#static (inside,outside) 192.168.1.10 10.0.1.10 netmask 255.255.255.255 
    
    # Định tuyến tĩnh:
    FW1/Admin(config)#route outside 0.0.0.0 0.0.0.0 192.168.1.1
    FW1/Admin(config)#change system
    FW1(config)#
    
    
    Cấu hình trên context CTX1
    # chuyển đến context Admin:
    FW1(config)#change context CTX1
    
    # đặt tên context:
    FW1/CTX1(config)#hostname CTX1
    
    # Cấu hình địa chỉ ip hệ thống và standby cho từng interface:
    FW1/CTX1(config)#interface Ethernet3
    FW1/CTX1(config-subif)#nameif outside
    FW1/CTX1(config-subif)#ip address 192.168.30.2 255.255.255.0 standby 192.168.30.7 
    FW1/CTX1(config-subif)#interface Ethernet4
    FW1/CTX1(config-subif)#nameif inside
    FW1/CTX1(config-subif)#ip address 10.0.30.1 255.255.255.0 standby 10.0.30.7 
    FW1/CTX1(config-subif)#exit
    FW1/CTX1(config)#
    
    # Cấu hình Access List cho phép icmp, tcp đi qua Firewall:
    FW1/CTX1(config)#access-list PING permit icmp any any
    FW1/CTX1(config)#access-list PING permit ip any any  
    FW1/CTX1(config)#access-group PING in interface outside
    
    # NAT tĩnh PC2:   
    FW1/CTX1(config)#static (inside,outside) 192.168.30.10 10.0.30.10 netmask 255.255.255.255 
    
    # Định tuyến tĩnh:
    FW1/CTX1(config)#route outside 0.0.0.0 0.0.0.0 192.168.30.1
    FW2:

    Code:
    # đặt tên cho FW2:
    pixfirewall(config)# hostname FW2
    FW2(config)#
    
    # FW2 chuyển từ mode single sang mode multiple:
    FW2(config)# mode multiple
    # sau khi gõ lệnh trên, FW2 sẽ reload lại, lúc đó cần tắt firewall đi rồi bật lại. Có thể kiểm tra    # mode hiện tại của FW2 có phải là multiple hay không như sau:
    
    
    FW2(config)#show mode 
    Security context mode: multiple 
    FW2(config)#
    
    # K ích hoạt cổng Ethernet0, Ethernet1, Ethernet2, Ethernet3, Ethernet4:
    FW2(config)#interface Ethernet0
    FW2(config-if)#no shut
    FW2(config-if)#interface Ethernet1
    FW2(config-if)# no shut
    FW2(config-if)#interface Ethernet2
    FW2(config-if)# no shut
    FW2(config-if)#interface Ethernet3
    FW2(config-if)# no shut
    FW2(config-if)#interface Ethernet4
    FW2(config-if)# no shut
    FW2(config-if)#exit
    FW2(config)#
    
    # Cấu hình LAN/Stateful Failover interface
    FW2(config)#failover
    FW2(config)#failover lan unit secondary
    FW2(config)#failover lan interface MYFAILOVER Ethernet2
    FW2(config)#failover link MYFAILOVER Ethernet2
    FW2(config)#failover lan enable
    FW2(config)#failover key cisco123
    FW2(config)#failover interface ip MYFAILOVER 172.17.1.1 255.255.255.0 standby 172.17.1.7
    Router1:

    Code:
    # Đặt tên cho Router1:
    router(config)# hostname Router1
    Router1(config)#
    
    # Cấu hình ip cho interface fa0/0, fa0/1 và fa1/0:
    Router1(config)#interface fa 0/0
    Router1(config- if)#ip add 192.168.1.1 255.255.255.0
    Router1(config- if)#no shut
    Router1(config- if)#interface fa 0/1
    Router1(config- if)#ip add 192.168.30.1 255.255.255.0
    Router1(config- if)#no shut
    Router1(config- if)#interface fa 1/0
    Router1(config- if)#ip add 172.26.26.1 255.255.255.0
    Router1(config- if)#no shut
    Router1(config- if)#exit
    Router1(config)#
    Nhiệt tình + Không biết >> Phá hoại

  • #2
    IV. Kết quả
    Đồng bộ cấu hình từ FW1 sang FW2, sau khi kết thúc đồng bộ sẽ hiện ra thông báo như hình dưới:



    Show failover on FW1



    Show failover on FW2



    Show failover on context admin của FW1



    Show failover on context CTX1 của FW1



    PC1 ping, tracert đến địa chỉ 172.26.26.254 (InternetCloud):



    PC2 ping, tracert đến địa chỉ 172.26.26.254 (InternetCloud):



    Sau khi tắt FW1, Show failover trên FW2:



    PC1 vẫn giữ phiên telnet đến Router mà không cần đăng nhập:
    Nhiệt tình + Không biết >> Phá hoại

    Comment


    • #3
      Cám ơn bạn hoangtu_congngheIT nhiều nha!

      Bài viết hay lắm!
      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


    • #4
      Cảm ơn thầy Tuấn đã động viên :)
      Nhiệt tình + Không biết >> Phá hoại

      Comment

      • Working...
        X