• 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 IP source guard và Cấu hình tính năng Dynamic ARP inspection (DAI)

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

  • LAB: Cấu hình tính năng IP source guard và Cấu hình tính năng Dynamic ARP inspection (DAI)

    1 LAB: Cấu hình tính năng IP source guard

    Click image for larger version  Name:	IPsource guard.png Views:	0 Size:	22.5 KB ID:	426451



    Yêu cầu:
    1: Giữ nguyên cấu hình của phần DHCP Snooping
    2: Client 2 sẽ gán địa chỉ static IP như mô hình trên. MAC Address của client2: 00-C0-9F-A5-EF-1A
    3: Cấu hình IP Source Guard trên F0/2(SW1).
    4: Đảm bảo Client 2 ping được Client 1.

    Hướng dẫn:
    1: Xem lại phần cấu hình DHCP Snooping.
    2: Cấu hình địa chỉ IP cho Client2 (không dùng DHCP) 192.168.1.22.
    3: Cấu hình IP Source Guard trên F0/2(SW1):
    SW1(config)# interface fastEthernet f0/2
    SW1(config-if)# ip verify source
    4: Đảm bảo Client2 ping được Client1: vì IP của Client2 được gán tĩnh (static), không lấy qua DHCP nên SW1 không có thông tin của Client2 trong DHCP Snooping database. Nên phải cấu hình để SW1 cho phép Client truy xuất vào mạng:
    SW1(config)# ip source binding 00C0.9FA5.EF1A vlan 10 192.168.1.22 interface fastEthernet 0/2

    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
    !
    interface fastEthernet0/2
    ip verify source
    !
    ip source binding 00c0.9fa5.ef1a vlan 10 192.168.1.22 interface f0/2
    !
    end




    !display ip source binding on switch
    #show ip source binding

    !display ip source guard configuration on switch
    #show ip verify source


    2 LAB: Cấu hình tính năng Dynamic ARP inspection (DAI)

    Click image for larger version  Name:	cấu hình DAI.png Views:	0 Size:	22.6 KB ID:	426452



    Yêu cầu:

    1: Giữ nguyên cấu hình của phần DHCP Snooping

    2: Client 2 sẽ gán địa chỉ static IP như mô hình trên.

    3: Cấu hình DAI trên SW1 để đảm bảo các client chỉ trả lời các ARP request gởi cho chính client đó (ví dụ: khi R1 gởi ARP request tìm MAC Address của Client 1, thì chỉ có ARP reply từ Client 1 gởi cho R1 qua SW1 là được chấp nhận). MAC của client2 là: 00-C0-9F-A5-EF-1A

    4: Đảm bảo Client 1 ping thấy Client 2.



    Hướng dẫn:

    1: Xem lại phần cấu hình DHCP Snooping.

    2: Cấu hình IP cho Client2 là: 192.168.1.22.

    3: Cấu hình Dynamic ARP Inspection (DAI) cho SW, cấu hình DAI trust trên f0/24 kết nối đến DHCP Server R2, mặc định, client2 gán IP không thông qua DHCP, SW1 không có thông tin về client2 trong DHCP Snooping database nên sẽ drop ARP reply từ client2, do đó cần cấu hình DAI access-list để SW1 chấp nhận ARP reply từ client2.

    SW1(config)# ip arp inspection vlan 10

    SW1(config)# interface fastEthernet 0/24

    SW1(config-if)# ip arp inspection trust

    !cấu hình DAI access-list:

    SW1(config)# arp access-list AACL_CLIENT2

    SW1(config-arp-acl)# permit ip host 192.168.1.22 mac host 00C0.9FA5.EF1A

    SW1(config)# ip arp inspection filter AACL_CLIENT2 vlan 10



    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

    !

    ip arp inspection vlan 10

    !

    interface fastEthernet0/24

    ip arp inspection trust

    !

    arp access-list AACL_CLIENT2

    permit ip host 192.168.1.22 mac host 00c0.9fa5.ef1a

    !

    ip arp inspection filter AACL_CLIENT2 vlan 10

    !

    end


    !Kiem tra:

    #show arp access-list

    #show ip arp inspection interface [interface]

    #show ip arp inspection vlan [vlan-range]

    #show ip arp inspection statistics vlan [vlan-range]

    #show ip arp inspection log



    #clear ip arp inspection statistics

    #clear ip arp inspection statistics

    #clear ip arp inspection log
    Last edited by networkdude; 27-06-2022, 10:26 AM.
Working...
X