实验:搭建DHCP服务

前期准备:centos7做服务器,centos6做客户端
7的网段为(一个仅主机,一个自定义vmnet6),6的网段设为桥接(172网段),dhcp发送报文是基于广播机制,所以vmnet6必须是交换机,而不是路由器,使用vmnet6自己的仅主机和教室的上网环境不会冲突,

1、[[email protected] ~]# yum install dhcp
[[email protected] ~]# rpm -ql dhcp
/etc/NetworkManager
/etc/NetworkManager/dispatcher.d
/etc/NetworkManager/dispatcher.d/12-dhcpd
/etc/dhcp/dhcpd.conf
/etc/dhcp/dhcpd6.conf
/etc/dhcp/scripts
/etc/dhcp/scripts/README.scripts
/etc/openldap/schema/dhcp.schema
/etc/sysconfig/dhcpd
/usr/bin/omshell
/usr/lib/systemd/system/dhcpd.service
/usr/lib/systemd/system/dhcpd6.service
/usr/lib/systemd/system/dhcrelay.service
/usr/sbin/dhcpd

2、[[email protected] ~]# vim /etc/dhcp/dhcpd.conf

dhcpd.conf

#

Sample configuration file for ISC dhcpd

#

option definitions common to all supported networks...

option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;

default-lease-time 600;
max-lease-time 7200;

Use this to enble / disable dynamic dns updates globally.

#ddns-update-style none;

If this DHCP server is the official DHCP server for the local

network, the authoritative directive should be uncommented.

#authoritative;

Use this to send dhcp log messages to a different log file (you also

have to hack syslog.conf to complete the redirection).

log-facility local7;

No service will be given on this subnet, but declaring it helps the

DHCP server to understand the network topology.

subnet 10.152.187.0 netmask 255.255.255.0 {
}

3、把7的ens37设置为:
[[email protected] network-scripts]# vim ifcfg-ens37

DEVICE=ens37
NETMASK=255.255.255.0
IPADDR=10.0.0.200
GATEWAY=10.0.0.1
BOOTPROTO=static
DNS1=223.5.5.5
DNS2=223.6.6.6
[[email protected] network-scripts]# systemctl restart network

4、[[email protected] network-scripts]# vim /etc/dhcp/dhcpd.conf
内容会显示参考/usr/share/doc/dhcp-4.2.5/dhcpd.conf.example
cp /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example /etc/dhcp/dhcpd.conf
因为:dhcp是分配地址,也分配dns地址和域名,比如:
[[email protected] ~]# cd .ssh
[[email protected] .ssh]# cat /etc/resolv.conf

Generated by NetworkManager

search localdomain
nameserver 223.5.5.5
nameserver 223.6.6.6
nameserver 114.114.114.114
其中的“ search localdomain ”可以自动补出域名,比如:
[[email protected] .ssh]# ping www
系统会自动tab出所要搜索的域名。
接着编辑[[email protected] network-scripts]# vim /etc/dhcp/dhcpd.conf

#

Sample configuration file for ISC dhcpd

#

option definitions common to all supported networks...

option domain-name "magedu.com";
option domain-name-servers 223.5.5.5,223.6.6.6;

default-lease-time 86400;
max-lease-time 172800;

Use this to enble / disable dynamic dns updates globally.

#ddns-update-style none;

If this DHCP server is the official DHCP server for the local

network, the authoritative directive should be uncommented.

#authoritative;

Use this to send dhcp log messages to a different log file (you also

have to hack syslog.conf to complete the redirection).

log-facility local7;

No service will be given on this subnet, but declaring it helps the

DHCP server to understand the network topology.

subnet 10.0.0.0 netmask 255.255.255.0 {
range 10.0.0.10 10.0.0.100;
option routers 10.0.0.1;
}

This is a very basic subnet declaration.

subnet 10.254.239.0 netmask 255.255.255.224 {
range 10.254.239.10 10.254.239.20;
option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
}
我们需要添加修改的内容有:
option domain-name "magedu.com";
option domain-name-servers 223.5.5.5,223.6.6.6;

default-lease-time 86400;
max-lease-time 172800;

subnet 10.0.0.0 netmask 255.255.255.0 {
range 10.0.0.10 10.0.0.100;
option routers 10.0.0.1;
}

5、开启dhcp服务,并查看状态:
[[email protected] network-scripts]# systemctl restart dhcpd
[[email protected] network-scripts]# systemctl status dhcpd
● dhcpd.service - DHCPv4 Server Daemon
Loaded: loaded (/usr/lib/systemd/system/dhcpd.service; disabled; vendor preset: disabled)
Active: active (running) since Sun 2019-02-03 09:09:46 CST; 21s ago
Docs: man:dhcpd(8)
man:dhcpd.conf(5)
Main PID: 21382 (dhcpd)
Status: "Dispatching packets..."
Tasks: 1
CGroup: /system.slice/dhcpd.service
└─21382 /usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -gro...

Feb 03 09:09:46 centos7.localdomain dhcpd[21382]: Sending on LPF/ens37/00:0c...4
Feb 03 09:09:46 centos7.localdomain dhcpd[21382]: [10B blob data]
Feb 03 09:09:46 centos7.localdomain dhcpd[21382]: No subnet declaration for en....
Feb 03 09:09:46 centos7.localdomain dhcpd[21382]: * Ignoring requests on ens3...t
Feb 03 09:09:46 centos7.localdomain dhcpd[21382]: you want, please write a ...n
Feb 03 09:09:46 centos7.localdomain dhcpd[21382]: in your dhcpd.conf file f...t
Feb 03 09:09:46 centos7.localdomain dhcpd[21382]: to which interface ens33 ...

Feb 03 09:09:46 centos7.localdomain dhcpd[21382]: nt
Feb 03 09:09:46 centos7.localdomain dhcpd[21382]: Sending on Socket/fallback...t
Feb 03 09:09:46 centos7.localdomain systemd[1]: Started DHCPv4 Server Daemon.
Hint: Some lines were ellipsized, use -l to show in full.
其中会有报错:
No subnet declaration for en....
Feb 03 09:09:46 centos7.localdomain dhcpd[21382]: * Ignoring requests on ens3...t
Feb 03 09:09:46 centos7.localdomain dhcpd[21382]: you want, please write a ...n
Feb 03 09:09:46 centos7.localdomain dhcpd[21382]: in your dhcpd.conf file f...t
Feb 03 09:09:46 centos7.localdomain dhcpd[21382]: to which interface ens33 ...

Feb 03 09:09:46 centos7.localdomain dhcpd[21382]: nt
我们在用10网段,所以没必要在意报错信息。

至此,我们的配置文件已编辑成功,已经可以对外提供服务了。

6、接着,我们修改客户端eth0的IP,
valid_lft forever preferred_lft forever
[[email protected] ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="00:0C:29:D1:AC:34"
IPV6INIT="yes"
MTU="1500"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="a99c5d17-c58d-4a43-b9f3-17ce04dcb416"
BOOTPROTO=dhcp
IPADDR=1.1.1.1
PREFIX=24

7、为了方便在xshell上操作,我们另添加一块网卡(仅主机模式),[[email protected] ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:d1:ac:34 brd ff:ff:ff:ff:ff:ff
inet 1.1.1.1/24 brd 1.1.1.255 scope global eth0
inet6 fe80::20c:29ff:fed1:ac34/64 scope link
valid_lft forever preferred_lft forever
此时,inet 1.1.1.1/24 IP已被获取,我们开启专属dhcp的[[email protected] ~]# dhclient 工具:
[[email protected] ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:d1:ac:34 brd ff:ff:ff:ff:ff:ff
inet 1.1.1.1/24 brd 1.1.1.255 scope global eth0
inet 10.0.0.10/24 brd 10.0.0.255 scope global eth0
inet6 fe80::20c:29ff:fed1:ac34/64 scope link
valid_lft forever preferred_lft forever
此时 inet 10.0.0.10/24已被获取,
我们可以验证此IP是否确实是本主机IP获取到的,方法如下:
[[email protected] ~]# cd /var/lib/dhclient/
[[email protected] dhclient]# ls
dhclient-eth0.leases dhclient.leases
[[email protected] dhclient]# cat dhclient.leases
lease {
interface "eth0";
fixed-address 10.0.0.10;
option subnet-mask 255.255.255.0;
option routers 10.0.0.1;
option dhcp-lease-time 86400;
option dhcp-message-type 5;
option domain-name-servers 223.5.5.5,223.6.6.6;
option dhcp-server-identifier 10.0.0.200;
option domain-name "magedu.com";
renew 6 2019/02/02 11:33:15;
rebind 6 2019/02/02 21:06:05;
expire 0 2019/02/03 00:06:05;
}
以上内容清清楚楚的显示出全部信息!!!

此时我们应该把centos6客户端的eth0网卡设置为“ bootpreto=dhcp ”
[[email protected] dhclient]# service network restart
Shutting down interface eth0: [ OK ]
Shutting down interface eth1: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0:
Determining IP information for eth0... done.
[ OK ]
Bringing up interface eth1: Determining if ip address 192.168.141.100 is already in use for device eth1...
[ OK ]
[[email protected] dhclient]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:d1:ac:34 brd ff:ff:ff:ff:ff:ff
inet 10.0.0.10/24 brd 10.0.0.255 scope global eth0
inet6 fe80::20c:29ff:fed1:ac34/64 scope link
valid_lft forever preferred_lft forever
系统会追求稳定,IP还是10.0.0.10/24,

此刻,我们的dhcp服务已经搭建完成,可以去查看一下,

[[email protected] ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.141.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 eth1
0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 eth0
[[email protected] ~]# cat /etc/re
readahead.conf redhat-release resolv.conf
[[email protected] ~]# cat /etc/resolv.conf
; generated by /sbin/dhclient-script
search magedu.com
nameserver 223.5.5.5
nameserver 223.6.6.6
路由中有一个0.0.0.0的10.0.0.1的网关,search的是magedu.com 已成功!!

[[email protected] ~]# cd /var/lib/dhcpd/
[[email protected] dhcpd]# ls
dhcpd6.leases dhcpd.leases dhcpd.leases~
[[email protected] dhcpd]# ll
total 8
-rw-r--r-- 1 dhcpd dhcpd 0 May 15 2018 dhcpd6.leases
-rw-r--r-- 1 dhcpd dhcpd 679 Feb 3 09:59 dhcpd.leases
-rw-r--r-- 1 dhcpd dhcpd 125 Feb 2 22:56 dhcpd.leases~
[[email protected] dhcpd]# cat dhcpd.leases

The format of this file is documented in the dhcpd.leases(5) manual page.

This lease file was written by isc-dhcp-4.2.5

server-duid "\000\001\000\001#\350\373\332\000\014)\207s!";

lease 10.0.0.10 {
starts 0 2019/02/03 01:42:21;
ends 1 2019/02/04 01:42:21;
cltt 0 2019/02/03 01:42:21;
binding state active;
next binding state free;
rewind binding state free;
hardware ethernet 00:0c:29:d1:ac:34;
}
这地方可以查看eth0 的MAC 地址:

如果我们想实现固定的地址,比如,若是张三来的请求,我们想给他一个固定的IP地址,我们需要把MAC地址和ip绑定在一起,
[[email protected] dhcpd]# vim /etc/dhcp/dhcpd.conf
[[email protected] dhcpd]# vim /etc/dhcp/dhcpd.conf

Fixed IP addresses can also be specified for hosts. These addresses

should not also be listed as being available for dynamic assignment.

Hosts for which fixed IP addresses have been specified can boot using

BOOTP or DHCP. Hosts for which no fixed address is specified can only

be booted with DHCP, unless there is an address range on the subnet

to which a BOOTP client is connected which has the dynamic-bootp flag

set.

host fantasia {
hardware ethernet 08:00:07:26:c0:a5;
fixed-address fantasia.fugue.com;
}
host centos6 {
hardware ethern[[email protected] dhcpd]# vim /etc/dhcp/dhcpd.conf

Fixed IP addresses can also be specified for hosts. These addresses

should not also be listed as being available for dynamic assignment.

Hosts for which fixed IP addresses have been specified can boot using

BOOTP or DHCP. Hosts for which no fixed address is specified can only

be booted with DHCP, unless there is an address range on the subnet

to which a BOOTP client is connected which has the dynamic-bootp flag

set.

host fantasia {
hardware ethernet 08:00:07:26:c0:a5;
fixed-address fantasia.fugue.com;
}
host centos6 {
hardware ethernet 00:0c:29:d1:ac:34;
fixed-address 10.0.0.123;
}

You can declare a class of clients and then do address allocation

based on that. The example below shows a case where all clients

in a certain class get addresses on the 10.17.224/24 subnet, and all

other clients get addresses on the 10.0.29/24 subnet.

class "foo" {
match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
}

shared-network 224-29 {
subnet 10.17.224.0 netmask 255.255.255.0 {
option routers rtr-224.example.org;
"/etc/dhcp/dhcpd.conf" 110L, 3400C et 00:0c:29:d1:ac:34;
fixed-address 10.0.0.123;
}

You can declare a class of clients and then do address allocation

based on that. The example below shows a case where all clients

in a certain class get addresses on the 10.17.224/24 subnet, and all

other clients get addresses on the 10.0.29/24 subnet.

class "foo" {
match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
}

shared-network 224-29 {
subnet 10.17.224.0 netmask 255.255.255.0 {
option routers rtr-224.example.org;
"/etc/dhcp/dhcpd.conf" 110L, 3400C
我们将“ host centos6 {
hardware ethernet 00:0c:29:d1:ac:34;
fixed-address 10.0.0.123;
} ” 添加进来即可!!
[[email protected] dhcpd]# systemctl restart dhcpd

此时,我们在客户端查看:
[[email protected] ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:d1:ac:34 brd ff:ff:ff:ff:ff:ff
inet 10.0.0.10/24 brd 10.0.0.255 scope global eth0
inet6 fe80::20c:29ff:fed1:ac34/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:d1:ac:3e brd ff:ff:ff:ff:ff:ff
inet 192.168.141.100/24 brd 192.168.141.255 scope global eth1
inet6 fe80::20c:29ff:fed1:ac3e/64 scope link
valid_lft forever preferred_lft forever
[[email protected] ~]# service network restart
Shutting down interface eth0: [ OK ]
Shutting down interface eth1: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0:
Determining IP information for eth0... done.
[ OK ]
Bringing up interface eth1: Determining if ip address 192.168.141.100 is already in use for device eth1...
[ OK ]
[[email protected] ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:d1:ac:34 brd ff:ff:ff:ff:ff:ff
inet 10.0.0.123/24 brd 10.0.0.255 scope global eth0
inet6 fe80::20c:29ff:fed1:ac34/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:d1:ac:3e brd ff:ff:ff:ff:ff:ff
inet 192.168.141.100/24 brd 192.168.141.255 scope global eth1
inet6 fe80::20c:29ff:fed1:ac3e/64 scope link
valid_lft forever preferred_lft forever
可以看到,之前的10.0.0.10/24 重启网卡后变成了10.0.0.123/24,用此方法我们也可以变相的实现静态地址的效果,到此我们的dhcp实验圆满结束!!

(dhcp server是利用udp协议的67端口实现的,dhcp client是利用udp协议的68端口实现的)我们来查看一下:

[[email protected] ~]# ss -nul
State Recv-Q Send-Q Local Address:Port Peer Address:Port
UNCONN 0 0 :68 :
UNCONN 0 0
:68 :
说明是客户端!!
[[email protected] ~]# ss -nul
State Recv-Q Send-Q Local Address:Port Peer Address:Port

UNCONN 0 0 :67 :
UNCONN 0 0
%virbr0:67 :
UNCONN 0 0 :111 :
UNCONN 0 0
:893 :
UNCONN 0 0 :::111 :::
UNCONN 0 0 :::893 :::

说明是服务器!!

注意:想要基于网络实现操作系统的自动化安装,还要配置tftp服务!!

原文地址:http://blog.51cto.com/14128387/2348664

时间: 2024-10-13 17:26:00

实验:搭建DHCP服务的相关文章

搭建DHCP服务实现动态分配IP地址【详解】

搭建DHCP服务实现动态分配IP地址   一:实验内容 DHCP服务器工作原理 使用DHCP为局域网中的机器分配IP地址 使用DHCP为服务器分配固定IP地址   二:实验环境: 服务端:xuegod63  IP:192.168.1.70 客户端:RHEL-6.2-64-71  IP:192.168.1.71 客户端:RHEL-6.2-64-72  IP:192.168.1.72   三:实验步骤 第一块:概述 1:DHCP服务概述: 名称:DHCP  - Dynamic Host Config

Linux服务器上搭建DHCP服务

实验 实验环境: 在虚拟机上搭建两台linux服务器,一台作为DHCP服务器,另一台作为客户机自动获取IP地址: 实验要求: 一, linux服务器作为DHCP服务自动分配IP地址: 二, linux服务器作为客户端获取IP地址: 实验步骤: 一, linux服务器搭建DHCP服务 配置linux服务器静态ip地址: 在/etc/fstab文件里编辑光盘开机自动挂载 用rpm方式安装dhcp服务程序 进入dhcpd.conf配置文件 编辑域名.解析的IP地址.自动分配的IP地址范围 开启dhcp

在RHEL中搭建DHCP服务使得windows系统能自动获取IP地址

实验环境: RHEL6.5版本.Windows7系统各一台RHEL6.5版本的IP地址:192.168.100.222 本实验所使用到的一些命令: cd 切换目录 rpm 添加/删除程序功能 cat 查看文件 cp 复制 vim 编辑文件 service 启动/关闭某个程序 ---------------------------------操作步骤---------------------------------------- 一.检查光驱是否已经挂载在mnt目录下. 二.安装DHCP. 三.到

LINUX系统服务器上搭建DHCP服务,实现两大基本功能:1,自动分配ip;2,手工指定ip

在linux系统服务器上搭建DHCP服务,实现两大基本功能:1,自动分配ip地址:2,手动指定ip地址.首先准备两台虚拟机作为实验对象,一个linux系统作为服务器,一个windows7系统作为客户机,两者使用同一个虚拟网卡vmnet1,并使用仅主机模式.确定服务器上光盘状态为已连接,使用命令查看并挂载光盘检查dhcp软件包是否安装,若没有则使用rpm进行安装.复制dhcp配置文件的模板,并修改编辑dhcp的配置文件,进行相关设定并保存退出=" alt="LINUX系统服务器上搭建DH

在Linux6.5系统中搭建DHCP服务和中继代理

在Linux6.5系统中搭建DHCP服务和中继代理 在C3(linux6.5)上搭建dhcp服务1) 安装DHCP环境软件包,如下图所示(如找不到/mnt/Packages,说明yum仓库没有搭建,请先搭建yum仓库详情请见http://blog.51cto.com/13842738/2135806)2) 对dhcp配置文件进行更改提示配置模板所在位置配置完成进入末行模式,wq保存并退出至此dhcp服务搭建完成service dhcpd start打开服务器,显示OK表示搭建成功,如下图所示 对

Ubuntu-16.04搭建DHCP服务

Ubuntu-16.04搭建DHCP服务 一.什么是DHCP DHCP(Dynamic Host Configuration Protocol,动态主机配置协议)通常被应用在大型的局域网络环境中,主要作用是集中的管理.分配IP地址,使网络环境中的主机动态的获得IP地址.Gateway地址.DNS服务器地址等信息,并能够提升地址的使用率. 二.安装DHCP服务软件 安装isc-dhcp-server: sudo apt-get install isc-dhcp-server 三.配置DHCP服务

Linux / CentOs 7搭建DHCP服务

在前面介绍了怎么在Windows server 2016中搭建DHCP服务, 我们今天介绍如何在Linux / CentOS 7操作系统中搭建DHCP服务?跟在Windows server 2016中差不多,接下来我们一步一步来1.打开CentOS7 的服务器,首先确定IP地址,通过"ifconfig"查询本机的IP地址通过查询只发现Mac地址,并未发现IP地址2.我们通过更改配置文件/etc/sysconfig/network-scripts/ifcfg-ens33来修改IP地址,使

linux redhat6.5中 搭建DHCP服务

DHCP(Dynamic Host Configuration Protocol,动态主机配置协议)通常被应用在大型的局域网络环境中,主要作用是集中的管理.分配IP地址,使网络环境中的主机动态的获得IP地址.Gateway地址.DNS服务器地址等信息,并能够提升地址的使用率.实验目标:C3中搭建DHCP 使C1 和C2自动获取IP1:配置二层交换机SW2 添加vlan 10 20 100 并分别将f1/1 f1/2 f1/3加入vlan10 vlan20 vlan100f1/0接口做trunk链

搭建DHCP服务实现动态分配IP地址

服务介绍 DHCP服务概述: 名称:DHCP  - DynamicHost Configuration Protocol  动态主机配置协议 功能:DHCP(Dynamic Host Configuration Protocol,动态主机配置协议)是一个局域网的网络协议,使用UDP协议工作,主要有两个用途: 1.给内部网络或网络服务供应商自动分配IP地址,主机名,DNS服务器,域名 2.配和其它服务,实现集成化管理功能.如:无人执守安装服务器 3.特点: C/S 模式   客户端/服务端 DHC