linux dhcpv6 客户端,Linux(RedHat6.4)下配置radvd和dhcpv6
时间: 2023-08-24 14:08:34 浏览: 235
在Linux(RedHat6.4)下配置radvd和dhcpv6,可以按照以下步骤进行操作:
1. 安装radvd和dhcpv6客户端
在Linux下使用yum安装radvd和dhcpv6客户端:
```
yum install radvd dhcpv6-client
```
2. 配置radvd
编辑radvd的配置文件/etc/radvd.conf,设置IPv6前缀和路由信息:
```
interface eth0
{
AdvSendAdvert on;
prefix 2001:db8:0:1::/64
{
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
};
```
3. 启动radvd
使用以下命令启动radvd:
```
service radvd start
```
4. 配置dhcpv6客户端
编辑dhcpv6客户端的配置文件/etc/dhcp/dhclient6.conf,设置IPv6地址和DNS服务器信息:
```
interface "eth0" {
send dhcp6.client-id 00:01:00:01:1a:3b:4c:5d:6e:7f;
request dhcp6.domain-name-servers;
request dhcp6.domain-search;
request dhcp6.name-servers;
request dhcp6.sntp-servers;
request dhcp6.server-id;
request dhcp6.nis-servers;
request dhcp6.nis-domain;
request dhcp6.fqdn;
dhcp6.name-servers 2001:db8:0:1::1;
dhcp6.address-preference 8;
dhcp6.domain-search "example.com", "example.org";
}
```
5. 启动dhcpv6客户端
使用以下命令启动dhcpv6客户端:
```
dhclient -6 eth0
```
完成以上步骤后,Linux客户端就可以通过radvd和dhcpv6获取IPv6地址、DNS服务器等信息了。
阅读全文