Linux настройка ipv6 dhcp

Linux настройка ipv6 dhcp

DHCPv6 can be used for stateful configurations. The daemon itself need not necessary run on the Linux default IPv6 gateway router.

You can specify more information than by using radvd. The are most similar to IPv4 DHCP server.

After a proper configuration, the daemon reacts on received ICMPv6 multicast packets sent by a client to address ff02::1:2

5.1.�Configuration of the DHCPv6 server (dhcp6s)

5.1.1.�Simple configuration

dhcp6s’s config file is normally /etc/dhcp6s.conf. An simple example looks like following:

5.2.�Configuration of the DHCPv6 client (dhcp6c)

5.2.1.�Simple configuration

dhcp6c’s config file is normally /etc/dhcp6c.conf. An simple example looks like following:

5.3.�Usage

5.3.1.�dhcpv6_server

5.3.2.�dhcpv6_client

Start client in foreground, e.g.

5.4.�Debugging

5.4.1.�dhcpv6_server

The server has one foreground and two debug toggles (both should be used for debugging), here is an example:

5.4.2.�dhcpv6_client

As general debugging for test whether the IPv6 DHCP server is reable on the link use an IPv6 ping to the DHCP multicast address:

The client has one foreground and two debug toggles, here is an example:

# dhcp6c -d -f eth0 Oct/03/2005 17:18:16 dhcpv6 doesn't support hardware type 776 Oct/03/2005 17:18:16 doesn't support sit0 address family 0 Oct/03/2005 17:18:16 netlink_recv_rtgenmsg error Oct/03/2005 17:18:16 netlink_recv_rtgenmsg error Oct/03/2005 17:18:17 status code for this address is: success Oct/03/2005 17:18:17 status code: success Oct/03/2005 17:18:17 netlink_recv_rtgenmsg error Oct/03/2005 17:18:17 netlink_recv_rtgenmsg error Oct/03/2005 17:18:17 assigned address 2001:db8:0:f101::1002 prefix len is not � in any RAs prefix length using 64 bit instead Oct/03/2005 17:18:17 renew time 60, rebind time 9

Note that the netlink error messages have no impact.

Читайте также:  Почему мы выбираем linux

Источник

Настройка DHCPv6 для виртуальных машин Linux

Для некоторых образов виртуальных машин Linux в Azure Marketplace по умолчанию не настроен протокол динамической конфигурации узла версии 6 (DHCPv6). Для поддержки IPv6 необходимо настроить DHCPv6 в используемом дистрибутиве ОС Linux. Различные дистрибутивы Linux настраивают DHCPv6 различными способами, так как используют разные пакеты.

В недавно выпущенных образах SUSE Linux и CoreOS в Azure Marketplace протокол DHCPv6 предварительно настроен. При использовании этих образов дополнительные изменения не требуются.

В этом документе описывается, как включить DHCPv6, чтобы виртуальная машина Linux получила IPv6-адрес.

Неправильное изменение файлов конфигурации сети может привести к тому, что виртуальная машина утратит доступ к сети. Рекомендуется сначала протестировать изменения конфигурации на нерабочих системах. Приведенные в этой статье инструкции были протестированы на последних версиях образов Linux в Azure Marketplace. Подробные инструкции см. в документации к своей версии Linux.

Для RHEL, CentOS и Oracle Linux версии 7.4 или более поздней выполните следующие действия.

    Измените файл /etc/sysconfig/network, добавив следующий параметр:

sudo ifdown eth0 && sudo ifup eth0 

Последние образы SUSE Linux Enterprise Server (SLES) и openSUSE в Azure предварительно настроены с использованием DHCPv6. При использовании этих образов другие изменения не требуются. Если у вас есть виртуальная машина, основанная на более старом или пользовательском образе SUSE, используйте одну из следующих процедур для настройки DHCPv6.

OpenSuSE 13 и SLES 11

sudo zypper install dhcp-client 
sudo ifdown eth0 && sudo ifup eth0 

OpenSUSE Leap и SLES 12

Для openSUSE Leap и SLES 12 выполните следующие действия.

    Измените файл /etc/sysconfig/network/ifcfg-eth0 и замените параметр #BOOTPROTO=’dhcp4′ следующим значением:

sudo ifdown eth0 && sudo ifup eth0 

Для Ubuntu версии 17.10 или более поздней выполните следующие действия.

Читайте также:  Starwind v2v converter linux

    Измените /etc/dhcp/dhclient.conf файл и добавьте следующую строку:

 network: version: 2 ethernets: eth0: dhcp4: true dhcp6: true match: driver: hv_netvsc set-name: eth0 
sudo apt update sudo apt install net-tools 

Снимок экрана: ifconfig с IP-адресом IPv6.

    Измените файл /etc/dhcp/dhclient6.conf и добавьте следующую строку:
    iface eth0 inet6 auto up sleep 5 up dhclient -1 -6 -cf /etc/dhcp/dhclient6.conf -lf /var/lib/dhcp/dhclient6.eth0.leases -v eth0 || true 
    sudo ifdown eth0 && sudo ifup eth0 

    Последние образы CoreOS в Azure предварительно настроены с помощью DHCPv6. При использовании этих образов другие изменения не требуются. Если у вас есть виртуальная машина на основе более старого или настраиваемого образа CoreOS, выполните следующие действия.

      Измените файл /etc/systemd/network/10_dhcp.network:

    [Match] eth0 [Network] DHCP=ipv6 
    sudo systemctl restart systemd-networkd 

    Источник

    IPv6 DHCP (DHCPv6) Server & Client Explained

    PALLAS DIGITAL

    The Dynamic Host Configuration Protocol (DHCP) in Version 6 was created to support automatic IPv6 addressing using DHCP, like it was common with IPv4. Back in the day in the IPv4 World, we did not have automatic configuration of addresses like we do with SLAAC now.

    You have learned before, that there also was no possibility to tell a client the router’s IP address (default gateway) nor the address of the DNS servers.

    All this can be done using our built-in ICMPv6 toolkit, which I find absolutely great. For some implementations and some networks it might make sense to implement another solution: DHCPv6

    DHCPv6 is the stateful alternative to SLAAC. Remember, the S in SLAAC comes from stateless. Stateless means, the state is not recorded, so the address generated by a client is not essentially known to the infrastructure and is not essentially the same every time. In large deployments, engineers might want to do stateful address assignment and keep record which client received which IPv6 address at which time. This can also help fulfill strict security requirements in larger companies.

    To the rescue comes DHCPv6!

    DHCPv6 has been defined in many RFCs, the most recent one being RFC8415. It can provide SLAAC hosts with additional information which is not commonly provided by SLAAC, such as DNS servers.

    Yes, I told you before, DNS can be supplied inside a Router Advertisement message (RA). There is RFC6106 for announcing DNS servers with RA, but this was mostly not implemented by the networking vendors and thus could not be used in production very well. RFC6106 was since obsoleted by a new RFC8106.

    DHCPv6 also supports IPv6 Prefix Delegation which is common with DSL routers and some Internet service providers, to receive not only the public IP address (upstream prefix), but also a globally routed prefix for use in the local network (downstream prefix) from the provider.

    Watch my video where I explain DHCPv6:

    IPv6 Address Planning

    IPv6 Fundamentals

    DNS & Bind on IPv6

    This concludes IPv6 Foundation Part 6: IPv6 DHCP (DHCPv6) of the original IPv6 Foundation Master Class.

    Источник

Оцените статью
Adblock
detector