Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
static or dhcp unable to connect to network - weird problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
tayirvadai
n00b
n00b


Joined: 15 Oct 2017
Posts: 13

PostPosted: Wed Mar 27, 2019 11:18 pm    Post subject: static or dhcp unable to connect to network - weird problem Reply with quote

I installed Gentoo via Wireless, but did not add the wpa_supplicant as i was waiting for an ethernet cable. After the install, i wired up the system via ethernet, but it is unable to now detect wireless or unable to obtain dhcp via ethernet cable. i checked the cable and it is working fine on a raspberry pi.

ifconfig shows enp3s0 is UP while ip link shows state DOWN.
The following are the items i have verified and tested to be a failure
1. changed /etc/dhcp.conf to use static with interface enp3s0 values, or default options and all failed.
2. changed /etc/conf.d/net with modules, dhcp and dhcp with --noipv4ll
3. Observed selinux was throwing avc denied and added dhcp in audit2allow. Still seeing other problems with avc denied on other items.

To check if my installation was successful, i used the same usb again and now its not able to obtain the network process. Something is wierd about this problem.

Can you provide a series of commands that i can use to debug this process? i am not familiar with networking, but am willing to change and recompile kernel and set different log settings if needed.

Note
Live USB also fails to get the ip address via dhcpcd.
Live usb used in installation and checking now was as of Mar 21.
ifconfig enp3s0 <static ip> shows the ip being set, but unable to connect to the router.
route add default gw <gw> did not throw error but ip route show command yields enp3s0 link was down.
dhcpcd -S ip_Address=<static ip> -S routers = <gw> -S domain_name_servers = <gw> enp3s0 failed as it says no interface available.
_________________
Thanks
Tayirvadai
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43192
Location: 56N 3W

PostPosted: Mon Apr 01, 2019 3:48 pm    Post subject: Reply with quote

tayirvadai,

If your ethernet port has two LEDs on, is at least one of them lit?

Take both ends of the ethernet cable in your hands and hold the connectors together, so you can see the colours on the individual wires.
The colours should be in the same order both ends. That means you have a 'straight through' cable.
If the order of the colours is different each end, you have a crossover cable.
With most equipment, the two ends will sort it out and in just works. With other equipment, it matters.

If you have several interfaces, the network service is only considered to be up if all interfaces are working.
That's the default and its usually not what you want on a laptop. However each interface has to be working first.

As it fails from your USB stick, lets use that for testing.
Code:
ifconfig -a
will show all the interfaces that the kernel knows about.
There should be lo, enp3s0 and a wifi interface.

Does enp3s0 have an IP address?
Code:
$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.100.20  netmask 255.255.255.0  broadcast 192.168.100.255
...

Your numbers will be different to mine, thats fine.

If there in no IP address, run
Code:
dhcpcd <if_name>
<if_name> may or may not be enp3s0
Does that get an IP address?
IP addresses that begin 169.254. are self assigned link local addresses and indicate that no dhcp server was found.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
tayirvadai
n00b
n00b


Joined: 15 Oct 2017
Posts: 13

PostPosted: Tue Apr 02, 2019 2:19 pm    Post subject: Reply with quote

I will test the commands today. the wires had the same pattern on both ends. i may have missed this part, but this is not for a laptop but a desktop / server.
_________________
Thanks
Tayirvadai
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43192
Location: 56N 3W

PostPosted: Tue Apr 02, 2019 2:23 pm    Post subject: Reply with quote

tayirvadai,

'Straight through' cables are the usual sort these days. I have exactly one crossover cable and I forget why now.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Tue Apr 02, 2019 4:38 pm    Post subject: Reply with quote

check if you have only one ethernet card and that you are using the right connector then
(yeah real story, i had card#2 disable for a while ; and was trying to use its connector == wtf)
Back to top
View user's profile Send private message
tayirvadai
n00b
n00b


Joined: 15 Oct 2017
Posts: 13

PostPosted: Wed Apr 03, 2019 3:03 am    Post subject: Reply with quote

Thanks for the suggestion, but was not successful.
1. enp3s0 and enp4s0 both are showing UP,BROADCASE,MULTICAST.
2. Both are not showing IP address with dhcpcd
3. Command ip link is showing both states as DOWN.
4. verified that the connections are proper. I do get the arp_open: lo: Invalid argument and arp_announce: Invalid argument.
5. tried ifconfig enp3s0 <static IP>, netmask and broadcast and route add default gw <gw ip> and also setting dns name server 8.8.8.8 in /etc/resolv.conf.
This sets the ip address and is shown in command ifconfig and ip addr. But ping google.com mentions temporary failure in name resolution.
again ifconfig shows UP while ip link shows DOWN. This is the wierd part. I removed the cable from a working raspberry pi (ubuntu and connected it to my desktop machine and still says the same problem).
6. disabled ipv6 via sysctl -w net.ipv6.conf.all.disable_ipv6=1 and sysctl -w net.ipv6.conf.default.disable_ipv6=1. DHCPCD still fails and says waiting for carrier.

Any other suggestions are welcome.
_________________
Thanks
Tayirvadai
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7090
Location: Saint Amant, Acadiana

PostPosted: Wed Apr 03, 2019 3:18 am    Post subject: Reply with quote

Does ethtool tell there is physical connection?
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
tayirvadai
n00b
n00b


Joined: 15 Oct 2017
Posts: 13

PostPosted: Wed Apr 03, 2019 5:18 am    Post subject: Reply with quote

I came to realize that there were multiple ethernet ports and the ports were being reassigned. I had to do the following changes
1. Connected to each port and restart dhcpcd for each port. Also changed the cable
2. Changed dhcpcd.conf to assign static ip
3. DNS was not setup by dhcpcd, so added nameserver 8.8.8.8

This resolved the issue. Thanks everyone for your help.
_________________
Thanks
Tayirvadai
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13845

PostPosted: Thu Apr 04, 2019 12:47 am    Post subject: Reply with quote

tayirvadai wrote:
3. DNS was not setup by dhcpcd, so added nameserver 8.8.8.8
How did you make this addition?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum