From 1ecf76025f2ac8453f16e120e26e5b06f5811529 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E5=8A=9B=E8=B1=AA?= <2900882185@qq.com> Date: Thu, 24 Apr 2025 14:47:41 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E2=80=9C0424=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...CP\346\234\215\345\212\241\345\231\250.md" | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 "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" 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 0000000..d3f2846 --- /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,45 @@ +### 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 +``` + -- Gitee From 829e9dae72c49f71cb113cfec1ce6d3417841a7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E5=8A=9B=E8=B1=AA?= <2900882185@qq.com> Date: Thu, 24 Apr 2025 18:28:14 +0800 Subject: [PATCH 2/3] 0424 --- ...\250--DHCP\346\234\215\345\212\241\345\231\250.md" | 11 +++++++++++ 1 file changed, 11 insertions(+) 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" index d3f2846..b71664f 100644 --- "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" @@ -43,3 +43,14 @@ ip helper-address 10.1.1.1 ``` +#### 四、测试 + +![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) -- Gitee From e882db9c04688f780733728efadcf1e1f3c424a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E5=8A=9B=E8=B1=AA?= <2900882185@qq.com> Date: Fri, 25 Apr 2025 19:19:49 +0800 Subject: [PATCH 3/3] 0425 --- ...5\231\250--DHCP\346\234\215\345\212\241\345\231\250.md" | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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" index b71664f..8c4ed45 100644 --- "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" @@ -43,7 +43,12 @@ 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) -- Gitee