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

Lab: Cấu hình tính năng dhcp snooping

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

  • Lab: Cấu hình tính năng dhcp snooping

    Click image for larger version

Name:	2-2 HÌNH 1.png
Views:	29
Size:	18.4 KB
ID:	426938

    Yêu cầu:

    1: Đảm bảo xóa toàn bộ cấu hình và VLAN của SW1

    2: R1, R2, Client1, Client2 đều thuộc VLAN 10.

    3: Cấu hình R1, R2 là DHCP Server. Dãy địa chỉ IP mỗi Router sẽ cấp như sau:

    R1:

    IP: 192.168.1.0/24

    Gateway: 192.168.1.253

    R2:

    192.168.1.0/24

    Gateway: 192.168.1.254

    4: Cấu hình Client 1 và Client 2 là DHCP Client

    5: Cấu hình DHCP Snooping trên SW1, đảm bảo các Client sẽ chỉ xin địa chỉ IP từ R2 qua DHCP (kiểm tra default-gateway trên mỗi client phải là IP của R2 192.168.1.254)



    Hướng dẫn:

    1: xóa toàn bộ cấu hình:

    SW1# erase startup-config

    SW1# delete flash:vlan.dat

    2: Cấu hình SW1:

    SW1(config)# interface range f0/1 - 2 , f0/23 - 24

    SW1(config-if-range)# switchport mode access

    SW1(config-if-range)# switchport access vlan 10

    3: Đặt địa chỉ IP cho 2 client và 2 router:

    R1(config)# interface fastEthernet 0/0

    R1(config-if)# ip address 192.168.1.253 255.255.255.0

    R2(config)# interface fastEthernet 0/0

    R2(config-if)# ip address 192.168.1.254 255.255.255.0

    4: Bật DHCP Client trên Client1 và Client2.

    5: Cấu hình DHCP Snooping trên SW1. R1 và R2 là 2 DHCP Server, để đảm bảo client chỉ xin địa chỉ IP từ R2, cấu hình f0/24 (SW1) trust dhcp:

    !Cấu hình DHCP Server cho R1 và R2:

    R1(config)# ip dhcp pool VLAN10

    R1(dhcp-config)# network 192.168.1.0 /24

    R1(dhcp-config)# default-router 192.168.1.253

    R2(config)# ip dhcp pool VLAN10

    R2(dhcp-config)# network 192.168.1.0 /24

    R2(dhcp-config)# default-router 192.168.1.254

    !Cấu hình DHCP Snooping trên SW1:

    SW1(config)# ip dhcp snooping

    SW1(config)# ip dhcp snooping vlan 10

    SW1(config)# no ip dhcp information option

    SW1(config)# interface f0/24

    SW1(config-if)# ip dhcp snooping trust

    SW1(config)# interface f0/23

    SW1(config-if)# no ip dhcp snooping trust



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

    !R1:

    !

    configure terminal

    !

    interface fastEthernet0/0

    ip address 192.168.1.253 255.255.255.0

    no shutdown

    !

    ip dhcp pool VLAN10

    network 192.168.1.0 /24

    default-router 192.168.1.253

    !

    end





    !R2:

    !

    configure terminal

    !

    interface fastEthernet0/0

    ip address 192.168.1.254 255.255.255.0

    no shutdown

    !

    ip dhcp pool VLAN10

    network 192.168.1.0 /24

    default-router 192.168.1.254

    !

    end





    !SW1:

    !

    configure terminal

    !

    interface range fastEthernet0/1 - 2 , fastEthernet0/23 - 24

    switchport mode access

    switchport access vlan 10

    !

    ip dhcp snooping

    !

    ip dhcp snooping vlan 10

    !

    no ip dhcp information option

    !

    interface fastEthernet0/24

    ip dhcp snooping trust

    !

    interface fastEthernet0/23

    no ip dhcp snooping trust

    !

    end





    !Kiem tra:

    #show ip dhcp snooping



    !display only dynamic configured binding

    #show ip dhcp snooping binding



    !display the dhcp snooping binding database status and statistics

    #show ip dhcp snooping database



    !display the dynamic and static configured binding

    #show ip source binding
    Email : vnpro@vnpro.org
    ---------------------------------------------------------------------------------------------------------------
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