Centos 7 under IPV6 stateful DHCPV6 configuration

Source: Internet
Author: User
Tags nameserver

Yum Source Installation Kea

Yum Install Epel-release

Yum Install Kea



DEMON

PS aux| grep Kea

Rpm-qa Kea


View DHCPv6 default configuration

Cat/etc/kea/kea.conf


Start Kea-dhcpv6 and view the Kea startup process

Systemctl Start KEA-DHCP6

Systemctl Status KEA-DHCP6

Systemctl-l Status KEA-DHCP6


View the server packet interaction process through tcpdump

Tcpdump-i eth0-w Dhcp6.pcap




Shutting down the firewall

Systemctl Stop Firewalld.service

Note: You must turn off the firewall or cause the DHCPv6 assignment address to be issued.


Files used:

/var/lib/kea/kea-leases6.csv by default, the IPv6 address and device information of the terminal can be found, see the domain account MAC address and other information.

/var/log/kea-dhcp6.log I open the debug mode. You can view a log of the DHCP6 running status.



Centos 7 Modify DNS

Modify/etc/networkmanager/networkmanager.conf

[Main]

Plugins=ifcfg-rh

Dns=none

Manual modification/etc/resolv.conf

NameServer 114.114.114.114

NameServer 8.8.8.8


Server nic static IPv6 configuration:


[Email protected] kea]# vi/etc/sysconfig/network-scripts/ifcfg-eno16777736

Type=ethernet

Bootproto=static

Defroute=yes

Peerdns=yes

Peerroutes=yes

Ipv4_failure_fatal=no

Ipv6init=yes

Ipv6_autoconf=no

Ipv6_defroute=yes

Ipv6_peerdns=yes

Ipv6_peerroutes=yes

Ipv6_failure_fatal=no

name=eno16777736

uuid=03b35ca7-4678-48ca-ab46-5782367cd56a

device=eno16777736

Onboot=yes

ipaddr=x.x.x.x

gateway=x.x.x.x

netmask=x.x.x.x

ipvaddr=2001:da8:xxxx:xxxx:24::125

Ipv6_defaultgw=2001:da8:xxxx:xxxx:24::1

Ipv6addr=2001:da8:xxxx:xxxx:24::125/80




Kea-dhcpv6 configuration:


{


"DHCP6":

{

# ADD names of interfaces to listen on.

"Interfaces-config": {

"Interfaces": ["ENO16777736/2001:DA8:XXXX:XXXX:24:AEFD:DDB0:7D02"]

},


"Option-data": [{"Name": "Unicast", "Data": "2001:DA8:XXXX:XXXX:24:AEFD:DDB0:7D02"}],

# Use Memfile lease database backend to store leases in a CSV file.


# Setup reclamation of the expired leases and leases affinity.

# Expired leases'll be reclaimed every seconds. Every 25

# seconds reclaimed leases, which has expired more than 3600

# seconds ago, would be removed. The limits for leases reclamation

# is leases or each MS for a single cycle. A warning message

# would be logged if there is still expired leases in the

# database after 5 consecutive reclamation cycles.

# "Expired-leases-processing": {

# "Reclaim-timer-wait-time": 10,

# "Flush-reclaimed-timer-wait-time": 25,

# "Hold-reclaimed-time": 3600,

# "max-reclaim-leases": 100,

# "Max-reclaim-time": 250,

# "Unwarned-reclaim-cycles": 5

#  },


# Addresses'll be assigned with preferred and valid lifetimes

# Being and 4000, respectively. Client is told to start

# Renewing after seconds. If the server does not respond

# seconds since the lease was granted, client is supposed

# to-Start REBIND procedure (emergency renewal that allows switching

# to a different server).

"Preferred-lifetime": 3000,

"Valid-lifetime": 4000,

"Renew-timer": 1000,

"Rebind-timer": 2000,


# The following list defines subnets. Uncomment to enable them.

"Subnet6": [

{"Subnet": "2001:DA8:XXXX:XXXX:25::/80",

"Pools": [{"Pool": "2001:DA8:XXXX:XXXX:25::/80"}],

"Interface-id": "Vlan25"


},


{"Subnet": "2001:DA8:XXXX:XXXX:26::/80",

"Pools": [{"Pool": "2001:DA8:XXXX:XXXX:26::/80"}],

"Interface-id": "Vlan26"


},

# {"Subnet": "2001:DB8:3::/64",

# "Pools": [{"Pool": "2001:db8:3::/80"}]},

# {"Subnet": "2001:DB8:4::/64",

# "Pools": [{"Pool": "2001:db8:4::/80"}]}

]

},


# DHCP DDNS configuration starts here.


# Logging configuration starts here. It tells KEA servers to store

# All logs messages (on severity INFO or more) in a file.

# debuglevel variable is used on DEBUG level only.

"Logging":

{

"Loggers": [

{

"Name": "KEA-DHCP4",

"Output_options": [

{

"Output": "/var/log/kea-dhcp4.log"

}

],

"Severity": "INFO",

"DebugLevel": 0

},

{

"Name": "Kea-dhcp6",

"Output_options": [

{

"Output": "/var/log/kea-dhcp6.log"

}

],

"Severity": "Debug",/Log on to the DEBUG level, you can view the assigned address information.

"DebugLevel": 99

},

{

"Name": "Kea-dhcp-ddns",

"Output_options": [

{

"Output": "/var/log/kea-ddns.log"

}

],

"Severity": "INFO",

"DebugLevel": 0

}

]

}


}



If you need DHCPv6 service in your network segment, you must open the following:




[Email protected] kea]# cat/etc/kea/kea.conf

# This was a basic configuration for the Kea DHCPv4 and DHCPV6 servers.

# Subnet declarations is commented out and no interfaces is listed.

# Therefore, the servers would not be listen or respond to any queries.

# The basic configuration must is extended to specify interfaces on

# which the servers should listen. Also, subnets and options must be

# declared.

{


# DHCPV4 configuration starts here.

# "DHCP4":

#{

# ADD names of interfaces to listen on.

# "Interfaces-config": {

# "Interfaces": []

#  },


# Use Memfile lease database backend to store leases in a CSV file.

# "Lease-database": {

# "type": "Memfile"

# },


# Setup reclamation of the expired leases and leases affinity.

# Expired leases'll be reclaimed every seconds. Every 25

# seconds reclaimed leases, which has expired more than 3600

# seconds ago, would be removed. The limits for leases reclamation

# is leases or each MS for a single cycle. A warning message

# would be logged if there is still expired leases in the

# database after 5 consecutive reclamation cycles.

# "Expired-leases-processing": {

# "Reclaim-timer-wait-time": 10,

# "Flush-reclaimed-timer-wait-time": 25,

# "Hold-reclaimed-time": 3600,

# "max-reclaim-leases": 100,

# "Max-reclaim-time": 250,

# "Unwarned-reclaim-cycles": 5

#  },


# Global (inherited by all subnets) lease lifetime is mandatory parameter.

# "Valid-lifetime": 4000,


# Below A example of the simple subnet declaration. Uncomment to

# enable it. This was a list, denoted with [], of structure, denoted

# with {}. Each structure describes a, subnet and may

# several parameters. One of those parameters is ' pools ' is

# also a list of structures.

# "SUBNET4": [

# {"Subnet": "192.0.2.0/24",

# "Pools": [{"Pool": "192.0.2.1-192.0.2.200"}]}

#  ]

#},


# DHCPV6 configuration starts here.

"DHCP6":

{

# ADD names of interfaces to listen on.

"Interfaces-config": {

"Interfaces": ["eno16777736/2001:da8:xxxx:xxxx:24::125"]

},


"Option-data": [{"Name": "Unicast", "Data": "2001:da8:xxxx:xxxx:24::125"}],

# Use Memfile lease database backend to store leases in a CSV file.


# Setup reclamation of the expired leases and leases affinity.

# Expired leases'll be reclaimed every seconds. Every 25

# seconds reclaimed leases, which has expired more than 3600

# seconds ago, would be removed. The limits for leases reclamation

# is leases or each MS for a single cycle. A warning message

# would be logged if there is still expired leases in the

# database after 5 consecutive reclamation cycles.

# "Expired-leases-processing": {

# "Reclaim-timer-wait-time": 10,

# "Flush-reclaimed-timer-wait-time": 25,

# "Hold-reclaimed-time": 3600,

# "max-reclaim-leases": 100,

# "Max-reclaim-time": 250,

# "Unwarned-reclaim-cycles": 5

#  },


# Addresses'll be assigned with preferred and valid lifetimes

# Being and 4000, respectively. Client is told to start

# Renewing after seconds. If the server does not respond

# seconds since the lease was granted, client is supposed

# to-Start REBIND procedure (emergency renewal that allows switching

# to a different server).

"Preferred-lifetime": 3000,

"Valid-lifetime": 4000,

"Renew-timer": 1000,

"Rebind-timer": 2000,


# The following list defines subnets. Uncomment to enable them.

"Subnet6": [

{"Subnet": "2001:DA8:XXXX:XXXX:25::/80",

"Pools": [{"Pool": "2001:DA8:XXXX:XXXX:25::/80"}],

"Interface-id": "Vlan25"


},


{"Subnet": "2001:DA8:XXXX:XXXX:24::/80",

"Pools": [{"Pool": "2001:DA8:XXXX:XXXX:24::/80"}],

"Interface": "eno16777736"


},

{"Subnet": "2001:DA8:XXXX:XXXX:26::/80",

"Pools": [{"Pool": "2001:DA8:XXXX:XXXX:26::/80"}],

"Interface-id": "Vlan26"


},

# {"Subnet": "2001:DB8:3::/64",

# "Pools": [{"Pool": "2001:db8:3::/80"}]},

# {"Subnet": "2001:DB8:4::/64",

# "Pools": [{"Pool": "2001:db8:4::/80"}]}

]

},


# DHCP DDNS configuration starts here.


# Logging configuration starts here. It tells KEA servers to store

# All logs messages (on severity INFO or more) in a file.

# debuglevel variable is used on DEBUG level only.

"Logging":

{

"Loggers": [

{

"Name": "KEA-DHCP4",

"Output_options": [

{

"Output": "/var/log/kea-dhcp4.log"

}

],

"Severity": "INFO",

"DebugLevel": 0

},

{

"Name": "Kea-dhcp6",

"Output_options": [

{

"Output": "/var/log/kea-dhcp6.log"

}

],

"Severity": "DEBUG",

"DebugLevel": 99

},

{

"Name": "Kea-dhcp-ddns",

"Output_options": [

{

"Output": "/var/log/kea-ddns.log"

}

],

"Severity": "INFO",

"DebugLevel": 0

}

]

}


}


This article is from the "It is not a thing" blog, please make sure to keep this source http://imccie.blog.51cto.com/4710872/1878466

Centos 7 under IPV6 stateful DHCPV6 configuration

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.