# [solved] how can I disable ipv6 for particular interface ?

## billmil

hi,

How can I disable ipv6 for  a particular nic (e.g. eth0)?

it's not a huge deal, but a recent gentoo update changed my networking so that eth0 sends up a different "unique identifier" to my company's dhcp router.  I believe it's now sending some IPv6 string instead of the mac address.

The DHCP configuration ties my mac address to a pre-determined IP. With this change, I'm getting a new, random IP.

i believe (perhaps wrongly) that the problem lies with ipv6 enabled for my eth0.

thanks,

billLast edited by billmil on Mon Nov 10, 2008 5:40 pm; edited 1 time in total

----------

## cyrillic

 *billmil wrote:*   

> a recent gentoo update changed my networking so that eth0 sends up a different "unique identifier" to my company's dhcp router. 

 

You can get rid of that feature if you emerge dhcpcd with USE="compat"

----------

## billmil

 *cyrillic wrote:*   

>  *billmil wrote:*   a recent gentoo update changed my networking so that eth0 sends up a different "unique identifier" to my company's dhcp router.  
> 
> You can get rid of that feature if you emerge dhcpcd with USE="compat"

 

Hmm....I already have the 'compat' flag set. 

```

# emerge -pv dhcpcd

Calculating dependencies... done!

[ebuild   R   ] net-misc/dhcpcd-4.0.2  USE="compat zeroconf" 0 kB 

```

I since rebuilt and restarted my eth0. I still get the new ip instead of my old ip. This suggests 'compat' alone won't solve the problem.

```
eth0: dhcpcd 4.0.2 starting

eth0: waiting for carrier

eth0: carrier acquired

eth0: broadcasting for a lease

eth0: offered <<NEW_IP>> from 10.100.1.52

eth0: checking <<NEW_IP>> is available on attached networks

eth0: acknowledged <<NEW_IP>> from 10.100.1.52

eth0: leased <<NEW_IP>> for 691200 seconds     
```

----------

## cyrillic

You may also need to manually delete /etc/dhcpcd.duid or /etc/dhcpcd/dhcpcd.duid

----------

## billmil

This did it.

 *Quote:*   

> You may also need to manually delete /etc/dhcpcd.duid or /etc/dhcpcd/dhcpcd.duid

 

To summarize:

1) rebuilt dhcpcd with the compat use flag

2) deleted the dhcpcd.duid

restarting eth0 got me the "old" (correct) tcp/ip address.

----------

