익스트림 스위치 EXOS 에서 비인가 DHCP(Rogue DHCP) 서버 차단하기.
Rogue DHCP 차단은 cisco 스위치의 rogue dhcp 서버 차단과 같은 dhcp snooping 설정을 하면 된다. 시스코 스위치의 설정은 이전 글 https://blog.boxcorea.com/wp/archives/2258을 참고.
먼저, dhcp snooping 설정을 확인해 본다.
Switch.2 # show ip-security dhcp-snooping vlan V210
Trusted Ports: None
Trusted DHCP Servers: None
Bindings Restoration : Disabled
Bindings Filename :
Bindings File Location :
Primary Server : None
Secondary Server: None
Bindings Write Interval : 30 minutes
------------------------------------
Port Violation-action
------------------------------------
위 결과를 보면, dhcp snooping은 설정되어 있지 않다.
이제, dhcp snooping을 설정한다. snooping 결과로 아래와 같은 조치를 취할 수 있는데, 여기서는 모든 포트에서 rogue dhcp 패킷을 차단하는 설정을 도록 한다.
* Switch.5 # enable ip-security dhcp-snooping vlan V220 ports all violation-action drop-packet ?
<cr> Execute the command
block-mac Block source MAC of rogue DHCP server
block-port Block port
snmp-trap Send SNMP trap
* Switch.5 # enable ip-security dhcp-snooping vlan V210 ports all violation-action drop-packet
* Switch.6 #
* Switch.9 # enable ip-security dhcp-snooping vlan V220 ports all violation-action drop-packet
* Switch.10 # show ip-security dhcp-snooping vlan V220
DHCP Snooping enabled on ports: 1, 2, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27,
28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41,
42, 43, 44, 45, 46, 47, 48
Trusted Ports: None
Trusted DHCP Servers: None
Bindings Restoration : Disabled
Bindings Filename :
Bindings File Location :
Primary Server : None
Secondary Server: None
Bindings Write Interval : 30 minutes
------------------------------------
Port Violation-action
------------------------------------
1 drop-packet
2 drop-packet
3 drop-packet
4 drop-packet
5 drop-packet
6 drop-packet
7 drop-packet
8 drop-packet
9 drop-packet
10 drop-packet
11 drop-packet
12 drop-packet
13 drop-packet
14 drop-packet
15 drop-packet
16 drop-packet
17 drop-packet
18 drop-packet
19 drop-packet
20 drop-packet
21 drop-packet
22 drop-packet
23 drop-packet
24 drop-packet
25 drop-packet
26 drop-packet
27 drop-packet
28 drop-packet
29 drop-packet
30 drop-packet
31 drop-packet
32 drop-packet
33 drop-packet
34 drop-packet
35 drop-packet
36 drop-packet
37 drop-packet
38 drop-packet
39 drop-packet
40 drop-packet
41 drop-packet
42 drop-packet
43 drop-packet
44 drop-packet
45 drop-packet
46 drop-packet
47 drop-packet
48 drop-packet
이제, 5번 포트에 rouge DHCP 서버가 연결 되어 있고, 차단된 것을 확인 할 수 있다. MAC 을 확인해 보면 iptime 공유기임을 알 수 있다.
* Switch.11 # show ip-security dhcp-snooping violations vlan V220 ------------------------------------ Port Violating MAC ------------------------------------ 5 64:e5:99:61:96:b0
5번 포트의 dhcp서버를 사용가능하도록 설정하려면,
* Switch.15 # configure trusted-port 5 trust-for dhcp-server
이렇게 DHCP서버가 사용하는 포트를 trusted 포트로 만들거나, trusted DHCP서버의 IP주소를 설정 해도 된다. 아래는 ip주소 192.168.0.1을 가지는 dhcp 서버를 vlan 220에서 사용가능하도록 허용하는 명령이다.
* Switch.16 # configure trusted-server vlan V220 add server 192.168.0.1 trust-for dhcp-server
이제 15번 포트의 PC가 5번 포트의 DHCP서버로부터 IP 주소 192.168.0.41을 받았음을 볼 수 있다.
* Switch.17 # show ip-security dhcp-snooping entries vlan V220
------------------------------------------------------------------
Vlan: V220
------------------------------------------------------------------
Lease Time Server Client
IP Addr MAC Addr (hh:mm:ss) Port Port
------- -------- ---------- ------ ------
192.168.0.41 00:21:cc:d3:79:2f 02:00:00 5 15
Total number of entries : 1
참고문서: https://gtacknowledge.extremenetworks.com/articles/How_To/How-to-configure-DHCP-Snooping-on-EXOS