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

Securing Switch Access - phần 3

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

  • Securing Switch Access - phần 3

    LAB: Port Security

    Yêu cầu :
    1. Cấu hình Port Security trên SW1
    2. Client trong mô hình trên có MAC là: 00-90-4B-F1-40-62 đảm bảo SW1 cho phép client kết nối vào port F0/1
    3. Cho phép tối đa 3 pc kết nối vào port F0/1 trên SW1, nếu vượt quá 3 pc sẽ shutdown port.
    4. Nếu không vi phạm (số PC <= 3) port sẽ tự động phục hồi khỏi trạng thái lỗi sau mỗi 30’
    5. Đảm bảo SW1 chỉ cho phép 2 PC đầu tiên kết nối vào SW trên F0/1.


    Hướng dẫn:
    1: Enable port security:
    SW1(config)# interface f0/1
    SW1(config-if)# switchport mode access
    SW1(config-if)# switchport port-security
    2: Cho phép pc có MAC: 0090.4BF1.4062 truy cập vào f0/1:
    SW1(config)# interface f0/1
    SW1(config-if)# switchport port-security mac-address 0090.4BF1.4062
    3: Cho phép tối đa 3 pc kết nối vào port f0/1, vượt quá 3 pc sẽ shutdown port:
    SW1(config)# interface f0/1
    SW1(config-if)# switchport port-security violation shutdown
    4: Tự động phục hồi lại port nếu không còn lỗi:
    SW1(config)# errdisable recovery cause all
    SW1(config)# errdisable recovery interval 30
    5: Cấu hình sticky MAC trên F0/1:
    SW1(config)# interface fastEthernet 0/1
    SW1(config-if)# switchport port-security mac-address sticky

    Cấu hình đầy đủ:

    !SW1:
    !
    configure terminal
    !
    interface fastEthernet0/1
    switchport mode access
    switchport port-security
    switchport port-security mac-address 0090.4bf1.4062
    switchport port-security violation shutdown
    switchport port-security mac-addresss sticky
    !
    errdisable recovery cause all
    errdisable recovery interval 30
    !
    end
    !Kiem tra:
    #show interface switchport
    #show port-security interface
    #show port-security interface fastEthernet0/0 address
    #show port-security interface fastEthernet0/0 vlan
    LAB: Port-base authentication (802.1x)


    Yêu cầu:
    1: Đảm bảo xóa toàn bộ cấu hình và Vlan của SW1
    2: Client và Radius Server thuộc Vlan 10.
    3: Cấu hình IP cho các thiết bị như mô hình trên, đảm bảo Client, SW1, Radius Server ping thấy nhau.
    4: Cấu hình dot1x để Client có thể truy cập vào Port F0/1 trên SW1 với username: VNPRO, pass: CISCO. Password truy cập vào radius server là RCISCO.


    Hướng dẫn:
    1: xóa toàn bộ cấu hình và VLAN database:
    SW1(config)# erase startup-config
    SW1(config)# delete flash:vlan.dat
    2: gán port fastEthernet 0/1 và fastEthernet 0/24 vào vlan 10:
    SW1(config)# interface range f0/1 , f0/24
    SW1(config-if-range)# switchport mode access
    SW1(config-if-range)# switchport access vlan 10
    3: đặt IP cho client, server, cấu hình IP trên interface vlan 10 cho switch:
    SW1(config)# interface vlan 10
    SW1(config-if)# ip add 192.168.1.1 255.255.255.0
    4: cấu hình radius server trên Server, key là: RCISCO, tạo account với username: VNPRO, password: CISCO. Cấu hình dot1x trên SW1:
    !Cấu hình AAA và radius server
    SW1(config)# aaa new-model
    SW1(config)# radius-server host 192.168.1.254
    SW1(config)# radius-server key RCISCO
    !Cấu hình chứng thực cho dot1x
    SW1(config)# aaa authentication dot1x default
    SW1(config)# dot1x system-auth-control
    SW1(config)# interface fastEthernet 0/1
    SW1(config-if)# switchport mode access
    SW1(config-if)# dot1x port-control auto

    Cấu hình đầy đủ:

    !SW1:
    !
    configure terminal
    !
    interface range fastEthernet0/1 , fastEthernet0/24
    switchport mode access
    switchport access vlan 10
    !
    interface vlan 10
    ip address 192.168.1.1 255.255.255.0
    !
    aaa new-model
    !
    radius-server host 192.168.1.254
    radius-server key RCISCO
    !
    aaa authentication dot1x default group radius
    !
    dot1x system-auth-control
    !
    int f0/1
    switchport mode access
    dot1x port-control auto
    !
    end
    !Kiem tra:
    #show dot1x all statistics
    #show dot1x statictisc interface f0/0
    (còn tiếp)
    VnPro
    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
Working...
X