This episode discusses network infrastructure services: configuring a Cisco Router as a DHCP server, DHCP relay with ip helper-address for forwarding broadcast requests between VLANs, time synchronization of all devices with an NTP client, and centralized log collection to a syslog server.

A network that only contains routing and switching is not yet complete. User devices need automatic IP addresses, all routers' clocks must be consistent, and logs must be gathered in one place. All of that is the infrastructure services discussed in episode 18.
We will configure a Cisco router as a DHCP server, build a DHCP relay
between VLANs with ip helper-address, then close with NTP time
synchronization and centralized log collection through syslog. These
services are what make a network feel "alive" to its users.
A Cisco router can hand out IP addresses automatically to entire VLANs. Configuration on R1 for VLAN 10:
configure terminal
ip dhcp excluded-address 192.168.10.1 192.168.10.10
ip dhcp pool LAN_POOL
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
dns-server 8.8.8.8
exitip dhcp excluded-address excludes the range used by the server and gateway,
while ip dhcp pool LAN_POOL defines the pool with network,
default-router, and dns-server. Hosts set to DHCP automatically receive
the IP, gateway, and DNS from this pool.
After a PC in VLAN 10 is set to DHCP, check the address assignment:
R1# show ip dhcp binding
IP address Hardware address Lease expiration Type
192.168.10.11 0050.7966.6800 08:12:35 UTC Automaticshow ip dhcp binding displays the addresses already handed out
along with the client MAC address and lease expiration time.
DHCP discovery is a broadcast. Broadcasts never cross a router, so clients in another VLAN cannot reach a centralized DHCP server. The solution: make the router interface a DHCP relay that converts the broadcast into a unicast toward the server.
On R2, interface g0/0 faces VLAN 20 and the DHCP server is at 192.168.10.1:
configure terminal
interface g0/0
ip helper-address 192.168.10.1
exitip helper-address 192.168.10.1 forwards DHCP requests from VLAN 20
to the central server. A single centralized DHCP server architecture now serves
many VLANs — a very common pattern in enterprise networks.
Logs with inconsistent timestamps cannot be analyzed. NTP (Network Time Protocol) synchronizes the clocks of all devices to a single source. Make the router an NTP client toward a time server:
configure terminal
ntp server 192.168.10.100
ntp update-calendar
exitntp server 192.168.10.100 points to the NTP server, and ntp update-calendar saves the synchronized time to the hardware clock.
Verify the synchronization:
R1# show ntp statusshow ntp status displays the synchronization state and the time
source. When all routers use the same NTP, timestamps across the entire lab
become comparable.
Router logs that only exist locally will be lost at reboot. Point the logs at a centralized syslog server so all events are gathered in one place:
configure terminal
logging host 192.168.10.100
logging trap informational
service timestamps log datetime msec
exitlogging host 192.168.10.100 directs the logs to the syslog server,
logging trap informational sets the level of events sent, and
service timestamps log datetime msec adds precise timestamps to every log
line. With NTP and syslog running together, the entire history of network
events can be sorted and analyzed.
Build one lab containing R1 (DHCP server, NTP, syslog), R2 (relay), and two
PCs in different VLANs. Set the PCs to DHCP: both must receive IPs from the
central pool. Check show ip dhcp binding, then generate a log (for example
by shutting down an interface) and observe the new log lines appear on the
syslog server. The three services running together indicate your lab
infrastructure is healthy.
Key takeaways:
ip dhcp pool defines the network, gateway, and DNS for clients.ip dhcp excluded-address reserves a range for servers and gateways.ip helper-address forwards DHCP broadcasts between VLANs to a central
server.ntp server synchronizes time; show ntp status verifies it.logging host gathers logs to a centralized syslog server.In the next episode, episode 19, we secure and monitor the network: Network Management, SNMP & AAA — the SNMP manager and agent concepts, SNMPv2c community configuration and the advantages of SNMPv3, an introduction to AAA with TACACS+ and RADIUS, and hardening Cisco devices by disabling unused services.