Extreme switch에 dhcp servcer 설정하기
사용한 스위치는 x430-48t 이며, 현재 VLAN은 아래와 같다.
* X430-48t.13 # show vlan ----------------------------------------------------------------------------------------------- Name VID Protocol Addr Flags Proto Ports Virtual Active router /Total ----------------------------------------------------------------------------------------------- Default 1 ------------------------------------------------- ANY 0 /0 VR-Default dhcp_test 100 172.16.100.1 /24 ----------------------------- ANY 0 /12 VR-Default Mgmt 4095 ------------------------------------------------- ANY 0 /1 VR-Mgmt ----------------------------------------------------------------------------------------------- Flags : (B) BFD Enabled, (c) 802.1ad customer VLAN, (C) EAPS Control VLAN, (d) Dynamically created VLAN, (D) VLAN Admin Disabled, (e) CES Configured, (E) ESRP Enabled, (f) IP Forwarding Enabled, (F) Learning Disabled, (h) TRILL Enabled, (i) ISIS Enabled, (I) Inter-Switch Connection VLAN for MLAG, (k) PTP Configured, (l) MPLS Enabled, (L) Loopback Enabled, (m) IPmc Forwarding Enabled, (M) Translation Member VLAN or Subscriber VLAN, (n) IP Multinetting Enabled, (N) Network Login VLAN, (o) OSPF Enabled, (O) Flooding Disabled, (p) PIM Enabled, (P) EAPS protected VLAN, (r) RIP Enabled, (R) Sub-VLAN IP Range Configured, (s) Sub-VLAN, (S) Super-VLAN, (t) Translation VLAN or Network VLAN, (T) Member of STP Domain, (v) VRRP Enabled, (V) VPLS Enabled, (W) VPWS Enabled, (Z) OpenFlow Enabled Total number of VLAN(s) : 3
dhcp_test vlan에 dhcp 서버를 설정한다.
주의 사항: VLAN 이름을 사용하지 않고 VLAN ID를 사용하면 dhcp 설정을 할 수 없다.
1. DHCP를 적용할 포트, VLAN을 설정한다.
* X430-48t.14 # enable dhcp ports 1-12 vlan "dhcp_test"
2. DHCP 에서 사용할 IP 주소 범위 설정
* X430-48t.15 # configure vlan "dhcp_test" dhcp-address-range 172.16.100.11 - 172.16.100.250
3. 디폴트 게이트웨이와 DNS 서버 설정.
* X430-48t.17 # configure vlan "dhcp_test" dhcp-option default-gateway 172.16.100.1 * X430-48t.18 # configure vlan "dhcp_test" dhcp-options dns-server primary 8.8.8.8 * X430-48t.19 #
4. DHCP서버 설정 확인.
* X430-48t.19 # show dhcp-server VLAN "dhcp_test": DHCP Address Range : 172.16.100.11->172.16.100.250 Netlogin Lease Timer : Not configured (Default = 10 seconds) DHCP Lease Timer : Not configured (Default = 7200 seconds) Default Gateway : 172.16.100.1 Primary DNS Server : 8.8.8.8 Ports DHCP Enabled : 1-12
5. dhcp lease 타이머와, net login lease 타이머는 설정하지 않았다.
DHCP lease 시간을 1일로 하려면, 아래처럼 초단위로 설정해 두면 된다.
* X430-48t.20 # configure vlan "dhcp_test" dhcp-lease-timer 86400
설정확인.
* X430-48t.21 # show dhcp-server VLAN "dhcp_test": DHCP Address Range : 172.16.100.11->172.16.100.250 Netlogin Lease Timer : Not configured (Default = 10 seconds) DHCP Lease Timer : 86400 seconds Default Gateway : 172.16.100.1 Primary DNS Server : 8.8.8.8 Ports DHCP Enabled : 1-12
6.클라이언트가 연결되면 아래처럼 ip 주소가 할당 된것을 확인 할 수 있다.
* X430-48t.22 # show dhcp-server VLAN "dhcp_test": DHCP Address Range : 172.16.100.11->172.16.100.250 Netlogin Lease Timer : Not configured (Default = 10 seconds) DHCP Lease Timer : 86400 seconds Default Gateway : 172.16.100.1 Primary DNS Server : 8.8.8.8 Ports DHCP Enabled : 1-12 =========================================================================== IP MAC State Lease Time Left =========================================================================== 172.16.100.11 00:e0:4c:36:6b:96 Assigned 0023:59:52
7. dhcp 서버에서 할당된 ip 주소 항목을 삭제하려면, clear 명령을 이용하면 된다.
* X430-48t.23 # clear vlan "dhcp_test" dhcp-address-allocation all
위 명령으로 모든 항목을 삭제하고 확인해 보면,
* X430-48t.25 # show dhcp-server VLAN "dhcp_test": DHCP Address Range : 172.16.100.11->172.16.100.250 Netlogin Lease Timer : Not configured (Default = 10 seconds) DHCP Lease Timer : 86400 seconds Default Gateway : 172.16.100.1 Primary DNS Server : 8.8.8.8 Ports DHCP Enabled : 1-12
8. VLAN에서 dhcp-server 설정만 제거(VLAN은 존재함).
* X430-48t.34 # unconfigure vlan "dhcp_test" dhcp * X430-48t.35 # sh dhcp-server
* 참고문서 : https://documentation.extremenetworks.com/exos_32.2/GUID-42AAB18D-F340-4DC1-B4F7-0FDBE0E422D6.shtml