# ipv6 vs ipv4 - problem [solved]

## sumpi

Hi all!

I just updated by gentoo-boxes a day ago. I have to use a windows dhcp-server at work. Now my system gets another ip-adr. than before the update and the logs on the windows box tell, that I want to request with an ipv6 - adr. So my question is:

how can I force my dhcp-client to request only ipv4 with the "old" MAC-Adr.?

My /etc/conf.d/net looks like:

```

mac_eth0="00:30:05:56:94:0F"

config_eth0=(

                "dhcp"

)

```

I tried to "force" the MAC adr. in the config, but without success. Do I have to remove ipv6 completely or is there another way?

Thanks in advance!

Sumpi

Solution:

You have to emerge net-misc/dhcp and use "dhclient" in your /etc/init.d/net

----------

## pblinux2

I'm having the same problem.

----------

## vaguy02

I removed all kernel support for ipv6 and added a -ipv6 use flag.

Fixed it, bit of overkill, but it works.

----------

## sumpi

I will give it a try.  Does anybody know, what the problem is?

afaik should the ipv4-adr be given depending on the given hardware-address. So why does the definition in my config not fixthe problem?

Bye,

Sumpi

----------

## tobr

 *sumpi wrote:*   

> I just updated by gentoo-boxes a day ago. I have to use a windows dhcp-server at work. Now my system gets another ip-adr. than before the update and the logs on the windows box tell, that I want to request with an ipv6 - adr. So my question is:
> 
> how can I force my dhcp-client to request only ipv4 with the "old" MAC-Adr.?

 

Well, you do not get IPv6 addresses via DHCP! IPv6 configures itself in this regard. Your DHCP client knows nothing about IPv6. There is some kind of DHCP for IPv6 but this is only to transfer information like DNS server IP addresses not to assign IP addresses. So perhaps the DHCP server does something really strange? I’m completely puzzled why your config shouldn’t work (I have something similar and have not disabled IPv6 in any way). Have you tried another DHCP client? dhclient works great for me. Just 

```
emerge net-misc/dhcp
```

 and add 

```
modules=( "dhclient" )
```

 to the top of your /etc/conf.d/net.

HTH

----------

## sumpi

hi tobr!

Yeah, that fixed the problem!

Thanks!

Bye,

Sumpi

----------

## pblinux2

How to correct this problem without switching from dhcpcd to dhclient

https://forums.gentoo.org/viewtopic-t-599228-highlight-.html

----------

