# DHCP doesn't works at start the system.(SOLVED)

## manara39

My ISP seems to have adopted IPv6 and this has led to Gentoo longer connect to the Internet.

In the boot he says that the mentioned protocol is not configured into the kernel (using genkernel).

Dhcp also try to find a ipv4 address and ends up putting the wrong.

Conclusion I'm not connected to the Internet: Could you suggest a solution?

Clarify that Windows and already have tried the IPv4 address that is mentioned there and default gateway and netmask, all according to the Gentoo Handbook.

From now I appreciate any help you can give me.Last edited by manara39 on Sun Jul 12, 2015 9:04 pm; edited 1 time in total

----------

## Keruskerfuerst

You have to add IPv6 support to the kernel.

It is better to configure the kernel manually.

----------

## Tony0945

You can still use genkernel. Just run it as "genkernel --menuconfig". Type a slash '/' then IPV6. That should tell you where to find it (not tested, I'm on a Windows machine right now). Or just scroll through the networking menu. I think it shows up fairly early. While in there, shut off stuff you know you don't use like outre filesystems (I'm assuming) and hardware you definitely don't have.  

No need to tediously copy files, build the initrd and manually edit your grub configuration. Let genkernel do the grunt work.

----------

## Roman_Gruber

zcat /proc/config.gz >> .config

copy that config to your kernel directory and add ipv6

genkernel is nice but its a dead end in the long run.

you will never learn how to configure a kernel and you will never be able to troubleshoot the kernel itself.

? key gives an explanation of the kernel settings when you use make menuconfig

there are other guis also for configuring the kernel ...

genkernel is only good for creating initramfs but those also have sometimes strange issues ... 

and also edit your grub config by hand too

----------

## manara39

I managed to add to the kernel support IPV6, therefore, does not fail, but it takes a wrong direction, as with IPv4.

In conclusion, dhcp does not work despite having support for IPV6.

I tested with the following settings in:

/etc/conf.d/net

```

config_eno1="10.101.0.xxx netmask 255.255.0.0"

routes-eno1="default via 10.101x.x"
```

I think the lack IPV6 address but do not know how to put it.

Thank you very much by your help.

----------

## Keruskerfuerst

You can also get the adress by DHCP.

----------

## Tony0945

Are you using a router? My /etc/init.d/net has a single line:

 *Quote:*   

> config_eth0="dhcp"
> 
> 

 

It does receive a fixed address, but that's because I've instructed the router, vua it's GUI, to always assign 192.168.0.100 to my MAC address.

If you have one of those cable modems with a builtin router controlled by your cable company, I advise you to  buy your own router. It's too important to your security to let strangers provision it.

----------

## Tony0945

Since Windows is working, what does Windows have in Internet Connections -> properties -> Internet Protocol (TCP/IP) -> properties?

----------

## manara39

Enable by DHCP: YES

IPV4 ADRESS 10.101.x.xxx

Netmask: 255.255.0.0

Gateway: 10.101.x.x

DNS IPV4 servers 8.8.8.8

                           8.8.4.4

IPV6 ADRESS Link xxxx::xxxx:xxxx:xxxx:xxxxxx

Gateway DNS IPV6 Server

I use too linux mint and all is all right.

Before using dhcp and all ok until yesterday that I noticed the change.

----------

## Tony0945

Ok, Windows is using DHCP

change your /etc/conf.d/net to look like this:

```
#config_eno1="10.101.0.xxx netmask 255.255.0.0"

#routes-eno1="default via 10.101x.x"

config_en01="dhcp" 
```

Looking at this and thinking that you have that garbage udev persistant names turned on and your device is en01 (note number 0 not letter o).

Confirm that by running "ifconfig -a " On my machine that yields: *Quote:*   

> gentoo ~ # ifconfig -a
> 
> eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
> 
>         inet 192.168.0.102  netmask 255.255.255.0  broadcast 192.168.0.255
> ...

   I think on your machine it will say en01 instead of eth0 (like it SHOULD.  OK, done ranting. If indeed it says en01 then make the file change i showed above  and run "/etc/init.d/net.en01 restart".  You should see messages to the effect that dhcp is assigning addresses. Try "ping www.google.com" if it says it can't find www.google.com try "ping 8.8.8", if that does work that DNS is screwed up. but first things first.

1. run "ifconfig -a"

2. modify your file as above using config_eth0 if ifconfig reports eth0, config_en01 if ifconfig reports en01

3. restart net.eth0 or net.en01 (I hope you're not using systemd)

4. report back if it worked or error messages if it didn't.

----------

## manara39

```
 

/etc/init.d/net.eno1 start

 * Caching service dependencies ...                                                                         [ ok ]

 * Bringing up interface eno1

 *   dhcp ...

 *     Running dhcpcd ...

eno1: adding address fe80::1aca:ea97:bb01:26e7

eno1: waiting for carrier

eno1: carrier acquired

DUID 00:01:00:01:1d:24:9e:36:70:71:bc:83:67:06

eno1: IAID bc:83:67:06

eno1: soliciting a DHCP lease

eno1: soliciting an IPv6 router

eno1: probing for an IPv4LL address

eno1: using IPv4LL address 169.254.101.61

eno1: adding route to 169.254.0.0/16

forked to background, child pid 3501                                                                        [ ok ]

 *     received address 169.254.101.61/16           

 

 ifconfig -a

eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 169.254.101.61  netmask 255.255.0.0  broadcast 169.254.255.255

        inet6 fe80::1aca:ea97:bb01:26e7  prefixlen 64  scopeid 0x20<link>

        ether 70:71:bc:83:67:06  txqueuelen 1000  (Ethernet)

        RX packets 271  bytes 46805 (45.7 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 58  bytes 9654 (9.4 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

        device interrupt 20  memory 0xfb200000-fb220000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 0  (Local Loopback)

        RX packets 8  bytes 616 (616.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 8  bytes 616 (616.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
```

ping 8.8.8 doesnt work.

----------

## manara39

I installed networkmanager removing previously dhcpcd and all ok.

----------

## Tony0945

 *Quote:*   

> ping 8.8.8 doesnt work.

 

My bad. It's four 8's of course.  You should get aresponse from ping www.google.com. if not ping 8.8.8.8  If you get a response from ip address but not not from url, then DNS is bad. If no response from pinging by ip address, ten you are not connected to the internet.

----------

## manara39

```
ping 8.8.8.8

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.

64 bytes from 8.8.8.8: icmp_seq=1 ttl=56 time=18.6 ms

64 bytes from 8.8.8.8: icmp_seq=2 ttl=56 time=28.6 ms

64 bytes from 8.8.8.8: icmp_seq=3 ttl=56 time=19.9 ms

64 bytes from 8.8.8.8: icmp_seq=4 ttl=56 time=36.4 ms

64 bytes from 8.8.8.8: icmp_seq=5 ttl=56 time=18.8 ms

64 bytes from 8.8.8.8: icmp_seq=6 ttl=56 time=53.9 ms

64 bytes from 8.8.8.8: icmp_seq=7 ttl=56 time=26.9 ms

^C

--- 8.8.8.8 ping statistics ---

7 packets transmitted, 7 received, 0% packet loss, time 6009ms

rtt min/avg/max/mdev = 18.635/29.053/53.902/11.779 ms
```

----------

