DHCP option 42 supplies clients with the address of an NTP server. In a wireless LAN, a multilayer switch can provide both DHCP leases and NTP service, allowing LWAPs and wireless clients to learn time-server information automatically. section 21.1.1
Configure option 42 inside each relevant Cisco DHCP pool:
- Management clients receive the switch's management SVI as their NTP server. section 21.1.1
- Internal and Guest clients receive the NTP-server address belonging to their respective subnet. section 21.1.1
- Option 42 identifies an NTP server; option 43 serves a different purpose by identifying a WLC for LWAPs. section 21.1.1
SW1(config)# ntp master #1 SW1(config)# ip dhcp pool Management #2 SW1(dhcp-config)# network 192.168.1.0 255.255.255.0 #2 SW1(dhcp-config)# default-router 192.168.1.1 #3 SW1(dhcp-config)# option 42 ip 192.168.1.1 #4 SW1(dhcp-config)# option 43 ip 192.168.1.100 #5 SW1(dhcp-config)# ip dhcp pool Internal #6 SW1(dhcp-config)# network 10.0.0.0 255.255.255.0 #6 SW1(dhcp-config)# default-router 10.0.0.1 #6 SW1(dhcp-config)# option 42 ip 10.0.0.1 #6 SW1(dhcp-config)# ip dhcp pool Guest #7 SW1(dhcp-config)# network 10.1.0.0 255.255.255.0 #7 SW1(dhcp-config)# default-router 10.1.0.1 #7 SW1(dhcp-config)# option 42 ip 10.1.0.1 #7 #1 Makes SW1 an NTP server #2 Creates a pool for the Management VLAN and assigns its IP range #3 Specifies SW1 as the default gateway #4 Tells DHCP clients to use SW1 as their NTP server #5 Tells DHCP clients (AP1) to use WLC1 as their WLC #6 Configures a pool for the Internal WLAN/VLAN #7 Configures a pool for the Guest WLAN/VLAN
The configuration listing shows NTP service enabled on SW1 and option 42 applied separately to Management, Internal, and Guest DHCP pools. section 21.1.1
