Windows server dhcp миграция

DHCP Server Migration: Migrating the DHCP Server Role

Applies To: Windows Server 2008, Windows Server 2012 R2, Windows Server 2012

Complete the following procedures to migrate a DHCP Server.

Migrating DHCP Server to the destination server

Membership in Domain Administrators or equivalent is the minimum required to complete these procedures. Review details about how to use the appropriate accounts and group memberships at Run a program with administrative credentials (https://go.microsoft.com/fwlink/?LinkId=131210).

To migrate DHCP Server to the destination server

If it is not already installed, install DHCP Server on the destination server, as previously described in the “Prepare the destination server” section in DHCP Server Migration: Preparing to Migrate.

If it is running, stop the DHCP Server service by running the following command:

If you are unsure whether the service is running, you can check its state by running the following command:

Migrating DHCP Server from the source server

Follow these steps to migrate DHCP Server from the source server.

To migrate DHCP Server from the source server

Open a Windows PowerShell session with elevated user rights. To do this, click Start, click All Programs, click Accessories, open the Windows PowerShell folder, right-click Windows PowerShell, and then click Run as administrator.

Load Windows Server Migration Tools into your session.

If you opened the current session by using the Windows Server Migration Tools shortcut on the Start menu, skip this step, and go to step 3. Only load the Windows Server Migration Tools snap-in in a session that was opened by using some other method, and into which the snap-in has not already been loaded. To load Windows Server Migration Tools, type the following, and then press Enter.

Collect data from the source server by running the Export-SmigServerSetting cmdlet as an administrator. The Export-SmigServerSetting cmdlet parameters can collect all source DHCP server data in a single file (Svrmig.mig). Or, the Export-SmigServerSetting cmdlet can be run multiple times, with each iteration using one or more parameters to collect and store data in multiple Svrmig.mig files. For more information, see DHCP Server Migration: Preparing to Migrate. Before you run this command, review the following:

When you run the command in step 4, you are prompted to provide a password to encrypt the migration store data. You must provide this same password to import from the migration store.

The path parameter can be an empty or nonempty directory. The actual data file in the directory (Svrmig.mig) is created by the Export-SmigServerSetting cmdlet. Therefore, the user does not have to specify a file name.

If the path is not a shared location that the destination server can read from, you must manually copy the migration store to the destination server or a location that the destination server can access.

If a migration store location already exists and you want to rerun the Export-SmigServerSetting cmdlet, you must move the Svrmig.mig file from that location and store it elsewhere, rename or first delete the migration store.

You can perform both IP and DHCP Server migration at the same time from a Windows PowerShell prompt by using the Export-SmigServerSetting cmdlet combined with the IPConfig switch, on a single command line.

Читайте также:  Менеджер сети для линукс

Additional command line parameter information:

-Users and -Group parameters

The -Users parameter must be specified only if the DHCP Administrators group includes local users. Otherwise, you can use the -Group parameter and all members of DHCP administrators will be migrated. Administrator group members can include domain users.

If the source server is a domain controller, but the destination server is not, Domain Local groups are migrated as local groups, and domain users are migrated as local users.

The -IPConfig parameter collects IP information when it is used with the Export-SmigServerSetting cmdlet on the source server; the -IPConfig parameter applies settings when the Import-SmigServerSetting cmdlet is used on the destination server.

If the source DHCP Server has multiple network adapters and the DHCP server service is bound to more than one network adapter and serving IP addresses on different subnets, the destination DHCP Server must also have multiple network adapters so that it can serve the same subnets as the source DHCP Server. For more information, see Migrate IP Configuration to Windows Server 2012. Because IP configuration details will be used later when importing IP configuration settings to the destination server, it is a best practice to save the IP configuration settings by using the following command:

The Import-SmigServerSetting cmdlet requires you to map the source physical address to the destination physical address.

The destination server can be assigned the same static IP address as the source server, unless other roles on the source server must continue to run on it. In that case, the static IP address of the destination server can be any unallocated static IP address in the same subnet as the source server.

On the source server, run the Export-SmigServerSetting cmdlet, where is the path that will contain the Svrmig.mig file after this step is completed. An example of the path is \\fileserver\users\username\dhcpstore.

For more information about how to export IP configuration settings, see Migrate IP Configuration to Windows Server 2012.

On the source server, delete the DHCP authorization for the source DHCP server by running the following command, where Server FQDN is the fully qualified domain name (FQDN) of the DHCP server and Server IPAddress is the IP address of the server. The command parameters are case-sensitive and must appear exactly as shown.

Destination server final migration steps

Return to the destination server and follow these steps to complete the migration.

Before you use the Import-SmigServerSetting cmdlet to import the DHCP server settings, be aware of the following conditions:

You can either use a single command line with all the parameters to import DHCP settings (as when you export data from the source server) or you can use the Import cmdlet multiple times to import data one parameter at a time.

If you decide to run the Import-SmigServerSetting cmdlet separately to import the IP settings, see Migrate IP Configuration to Windows Server 2012. Use the source IPSettings.txt file, referred to in step 3 of the previous procedure. You will map the source physical addresses to the destination physical addresses in step 3 of this procedure.

If you will be importing role and IP settings separately, you should import IP settings first to avoid any IP conflicts. You can then import the DHCP role.

Читайте также:  Acr38u i1 yf linux mint

If the DHCP Administrators group includes local users, then use the -Users parameter combined with the -Group parameter to import local users into the DHCP Administrators group. If it only contains domain users, then use only the -Group parameter.

If the source server is a domain member server, but the destination server is a domain controller, imported local users are elevated to domain users, and imported local groups become Domain Local groups on the destination server.

If the DHCP Server role that you are migrating has not yet been installed on the destination server, the Import-SmigServerSetting cmdlet will install that DHCP Server role and its dependencies, described in the next step. you might have to restart the destination computer to complete the installation after the DHCPВ Server role is installed by the cmdlet. Then, to complete the import operation after you restart the computer you must run the Import-SmigServerSetting cmdlet again along with the -Force parameter..

On the destination server, run the following command, where is the available path that contains the Svrmig.mig file, and are comma-separated lists of the physical addresses of the source network adapter, and and are comma-separated lists of the physical addresses of the destination network adapter:

The -IPConfig switch should be used with the value All in case the user wants to import all source settings. For more information, see Migrate IP Configuration to Windows Server 2012.

If you import the source server IP address to the target server together with the DHCP role without disconnecting or changing the IP address of the source server, an IP address conflict will occur.

Run the following command to start the DHCP service:

Authorize the destination server. Command parameters are case-sensitive and must appear exactly as shown. On the destination server, run the following command where Server FQDN is the FQDN of the DHCP Server and Server IPAddress is the IP address of the server:

After authorization, the Server Manager event log might show event ID 1046. This is a known issue and is expected to occur only once. The event can be safely ignored.

When this migration is finished, client computers on the network server are served by the new x64-based destination server running Windows Server 2012 R2. The migration is complete when the destination server is ready to serve IP addresses to the network.

Linux и Windows: помощь админам и пользователям

Администрируем и настраиваем Windows, Linux.

Пошаговая инструкция по миграции DHCP сервера с Windows server 2003 на Windows server 2008

Данное пособие объясняет как экспортировать базу данных DHCP с сервера Microsoft Windows Server 2003 или Windows Server 2008 для перемещения на другой сервер под управлением Windows Server 2008.

1. Залогиньтесь на оригинальный DHCP сервер используя аккаунт, который является членом группы локальных администраторов.

2. Нажмите Start, Run, введите cmd, и затем нажмите OK.

3. Введите netsh dhcp server export C:\dhcp.txt all , и затем нажмите ENTER.

Замечание : Вы должны иметь права локального админа для экспорта данных.

Настройка DHCP сервера на сервере под управлением Windows Server 2008

1. Нажмите Start, Administrative Tools, Server Manager.

2. В Roles Summary нажмите Add Roles, потом Next, отметьте DHCP сервер, и потом нажмите Next.

Импорт базы DHCP.

1. Залогиньтесь как пользователь из группы локальных администраторов. Аккаунт пользователя, группа которого является участником группы локальных администраторов, не работает. Если аккаунта локального не существует на контроллере домена, перегрузите компьютер в режим Directory Services Restore Mode, и используйте аккаунт администратора для импорт базы, как описано далее в этой статье.

2. Скопируйте экспортированную базу DHCP на локальный диск.

3. Проверьте что DHCP сервис запущен.

4. Нажмите Start, Run, введите cmd, и затем нажмите OK.

5. В командной строке, введите netsh dhcp server import

c:\dhcpdatabase.txt all , и потом нажмите ENTER, где c:\dhcpdatabase.txt это полный путь к эскпортированной базе.

Авторизуйте DHCP сервер

1. Нажмите Start, перейдите в All Programs, далее в Administrative Tools, и нажмите DHCP.

Заметка . Вы должны быть залогинены на сервере, используя аккаунт, входящий в группу локальных администраторов. В домене Active Directory вы должны быть залогинены с правами группы Enterprise Administrators.

2. В консоли DHCP, найдите новый DHCP

сервер. Если напротив сервера красная стрелка, значит сервер ещё не авторизован.

3.Нажмите правой кнопкой на сервер, и кликните Authorize.

4.После некоторого времени нажмите Refresh. Красная стрелка должна смениться зеленой, что означает что DHCP сервер авторизован.

Миграция DHCP сервера на Windows Server 2016

Процедура миграция службы DHCP со всеми настройками со старого сервера на новый под управлением Windows Server 2016 довольно проста. Если старый сервер DHCP работает под управлением Windows Server 2008 / R2 или Windows Server 2012 / R2, вы можете напрямую перенести настройки, зоны и резервации DHCP.

В первую очередь на новом сервере под управлением Windows Server 2016 необходимо установить роль DHCP. Эту роль можно установить с помощью консоли Server Manager, где нужно запустить мастер добавления ролей Manage -> Add Roles and Features и выбрать роль DHCP Server.

Но гораздо проще и быстрее установить данную роль вместе с инструментами для ее управления (консоль DHCP и модуль PowerShell для работы с сервером DHCP) с помощью PowerShell.

Add-WindowsFeature -IncludeManagementTools DHCP

Параметр -IncludeManagementTools нужен, чтобы дополнительно установить MMC консоль управления сервером DHCP (по умолчанию командлет Add-WindowsFeature устанавливает роль DHCP без соответствующей консоли).

Затем нужно создать локальные группы безопасности для управления сервером DHCP (группы DHCP Administrators и DHCP Users):

Чтобы включить параметры безопасности DHCP и связать их с созданными группами безопасности, перезапустите службу DHCP-сервера:

Авторизуйте новый сервер DHCP в домене Active Directory:

Add-DhcpServerInDC host1.contoso.com 192.168.10.35

Однако после установки роли DHCP и выполнения первичных настроек, при попытке подключится к серверу через Server Manager появится предупреждение о том, что требуется дополнительная донастройка роли (хотя по факту мы ее уже сделали). Убрать это предупреждение не поможет даже перезагрузка сервера.

Чтобы исправить эту проблему, нужно изменить ключ в реестре, отвечающий за статус настройки роли:

Set-ItemProperty –Path registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ServerManager\Roles\12 –Name ConfigurationState –Value 2

В Windows Server 2012 появились специальные командлеты PowerShell, позволяющие импортировать / экспортировать любые настройки DHCP-сервера. Microsoft максимально упростила процедуру миграцию, которую можно провести с помощью всего двух команд PowerShell: Export-DhcpServer и Import-Dhcpserver, которые могут быть выполнены удаленно с одного сервера (например, с того, куда планируется выполнить перенос службы):

Создайте каталог c:\dhcp и выполните следующую команду для выполнения экспорта настроек старого сервера DHCP в XML файл с именем OldDHCPConf.xml

new-item c:\dhcp -type directory
Export-DhcpServer -ComputerName «oldDhcp.contoso.com» -Leases -File «C:\DHCP\OldDHCPConf.xml» –Verbose

Теперь можно выполнить импорт настроек из полученного файла на новый сервер

Import-DhcpServer -Leases –File «C:\DHCP\OldDHCPConf.xml» -BackupPath «C:\DHCP\Backup\» –Verbose

Все готово! Откройте консоль DHCP и проверьте, что все зоны DHCP, резервации, арендованные IP адреса были перенесены успешно.

Если вы создаете отказоустойчивую конфигурацию DHCP с использованием DHCP Failover, конфигурацию DHCP-сервера нужно импортировать также и на второй сервер

Import-DhcpServer -Leases –File «C:\DHCP\OldDHCPConf.xml» -ServerConfigOnly -BackupPath «C:\DHCP\Backup\» –Verbose

После завершения миграции сервера DHCP не забудьте повторно настроить агентов DHCP Relay (IP Helper) на сетевых маршрутизаторах и коммутаторах 3 уровня.

Читайте также:  Размер скачиваемой windows 10
Оцените статью
Security Note