diff --git "a/27\351\203\221\345\212\233\350\261\252/20250424/\350\267\257\347\224\261\345\231\250--DHCP\346\234\215\345\212\241\345\231\250.md" "b/27\351\203\221\345\212\233\350\261\252/20250424/\350\267\257\347\224\261\345\231\250--DHCP\346\234\215\345\212\241\345\231\250.md" new file mode 100644 index 0000000000000000000000000000000000000000..8c4ed45acd92f1c72f848ea0193a1d929b23b1e7 --- /dev/null +++ "b/27\351\203\221\345\212\233\350\261\252/20250424/\350\267\257\347\224\261\345\231\250--DHCP\346\234\215\345\212\241\345\231\250.md" @@ -0,0 +1,61 @@ +### DHCP服务器 + +#### 一、作用 + +1. 自动分配IP +2. 集中管理 +3. 提高效率 + +#### 二、基本配置步骤 + +``` +//1. 创建DHCP地址池 + ip dhcp pool XXXX(命名) +//2. 配置网络地址和子网掩码 + network 192.168.10.0 255.255.255.0 +//3. 配置默认网关 + default-router 192.168.10.254 +//4. 配置DNS服务器 + dns-server 8.8.8.8 +//5. 配置租约时间 + lease 7(可选,默认1天) +//6. 退出DHCP配置模式 + exit +//7. 排除不分配的IP地址范围,如网关 + ip dhcp excluded-address 192.168.10.254 + + +//1. 查看DHCP地址池配置 + show ip dhcp pool +//2. 查看DHCP绑定信息 + show ip dhcp binding +//3. 查看DHCP冲突记录 + show ip dhcp conflict +//4. 清除DHCP绑定 + clear ip dhcp binding * +``` + +#### 三、使用DHCP服务器 + +``` +//配置DHCP中继(当DHCP服务器不在本地网络) + interface g0/0 + ip helper-address 10.1.1.1 +``` + +#### 四、练习与作业 + +1. ![image-20250425191828819](https://gitee.com/h-jeong/jeongpicgo/raw/master/20250425191829104.png) +2. ![image-20250425191854294](https://gitee.com/h-jeong/jeongpicgo/raw/master/20250425191854407.png) + +#### 五、测试 + +![image-20250424182749644](https://gitee.com/h-jeong/jeongpicgo/raw/master/20250424182749676.png) + +![image-20250424182527977](https://gitee.com/h-jeong/jeongpicgo/raw/master/20250424182528040.png) + +![image-20250424182559694](https://gitee.com/h-jeong/jeongpicgo/raw/master/20250424182559859.png) + +![image-20250424182625694](https://gitee.com/h-jeong/jeongpicgo/raw/master/20250424182625788.png) + +![image-20250424182651617](https://gitee.com/h-jeong/jeongpicgo/raw/master/20250424182651720.png)