This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
dhcp [2024/03/14 22:05] 114.119.155.78 old revision restored (2022/09/11 17:01) |
dhcp [2024/05/05 02:05] (current) 216.244.66.196 old revision restored (2023/12/30 16:47) |
||
---|---|---|---|
Line 1: | Line 1: | ||
=====DHCP===== | =====DHCP===== | ||
+ | Use DHCP to address automatic IP assignment within a network. | ||
+ | |||
====Configuration==== | ====Configuration==== | ||
Below is the configuration for DHCP in Cisco' | Below is the configuration for DHCP in Cisco' | ||
< | < | ||
- | R1(dhcp-config)#do sh run | s dhcp | + | R1#sh run | s dhcp |
- | no ip dhcp use vrf connected | + | ip dhcp excluded-address 192.168.0.1 192.168.0.49 |
- | ip dhcp excluded-address 192.168.1.1 192.168.1.49 # exclude range START STOP | + | ip dhcp pool MYNETWORK |
- | ip dhcp excluded-address 172.16.0.1 | + | |
- | ip dhcp pool LAN # Define a pool | + | |
- | | + | R1# |
- | | + | |
- | | + | |
- | dns-server 192.168.1.1 | + | |
- | lease 0 23 59 # Lease DAYS HRS MINS | + | |
</ | </ | ||
====DHCP Relay==== | ====DHCP Relay==== | ||
Relays are configured with **'' | Relays are configured with **'' | ||
- | |||
- | The helper address is configured on the interface connected to the subnet which does not contain the DHCP server. | ||
- | < | ||
- | interface FastEthernet0/ | ||
- | ip address 172.16.0.1 255.255.255.0 | ||
- | ip helper-address 192.168.1.1 | ||
- | | ||
- | speed auto | ||
- | end | ||
- | |||
- | </ | ||
====Show Commands==== | ====Show Commands==== | ||
Line 77: | Line 64: | ||
===Pool Stats=== | ===Pool Stats=== | ||
- | Note that '' | ||
< | < | ||
R1#sh ip dhcp pool | R1#sh ip dhcp pool |