You are not logged in.

#1 2016-10-12 12:37:52

bertez
Member
Registered: 2016-10-12
Posts: 9

[SOLVED] Network fails with Static IP, using DHCP works fine

Hi, I'm trying to set up static ip address on my machine, the steps I follow are:

List my devices:

➜  ~ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp10s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 40:8d:5c:5a:19:69 brd ff:ff:ff:ff:ff:ff
3: enp0s31f6: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 40:8d:5c:58:66:a4 brd ff:ff:ff:ff:ff:ff

ok, then disable DHCPD on my device (enp10s0):

➜  ~ sudo systemctl stop dhcpcd@enp10s0.service
➜  ~ sudo systemctl disable dhcpcd@enp10s0.service

then, create a netctl profile:

➜  ~ cat /etc/netctl/static
Description='Router movistar'
Interface=enp10s0
Connection=ethernet
IP=static
Address=('192.168.1.200/24')
#Routes=('192.168.0.0/24 via 192.168.1.2')
Gateway='192.168.1.1'
DNS=('192.168.1.1' '8.8.8.8' '8.8.4.4')

... and enable the profile:

➜  ~  sudo netctl enable static
➜  ~  sudo netctl start static

Ok, at this point I got the correct ip address (192.168.1.200), but the connection stops randomly for a minute or two and when it is failing I cannot even reach the router, after that time the connection starts working again for a minute and then fails again, and so on...
I use DHCPD it works perfectly.

Any ideas? Thanks for your help in advance.

Last edited by bertez (2016-10-13 07:58:32)

Offline

#2 2016-10-12 14:03:19

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: [SOLVED] Network fails with Static IP, using DHCP works fine

What is the output of systemctl list-unit-files --state=enabled   ?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Online

#3 2016-10-12 15:17:35

bertez
Member
Registered: 2016-10-12
Posts: 9

Re: [SOLVED] Network fails with Static IP, using DHCP works fine

Hi, thanks for your reply.

➜  ~ systemctl list-unit-files --state=enabled
UNIT FILE                 STATE  
autovt@.service           enabled
getty@.service            enabled
ntpd.service              enabled
systemd-timesyncd.service enabled
remote-fs.target          enabled

5 unit files listed.

Offline

#4 2016-10-12 20:32:40

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [SOLVED] Network fails with Static IP, using DHCP works fine

Is anything written to the systemd journal during the signal drop when static IPs are used?

bertez wrote:

I use DHCPD it works perfectly.

Why not define static IPs using that program then?

https://wiki.archlinux.org/index.php/Dh … ic_profile

Offline

#5 2016-10-13 07:57:37

bertez
Member
Registered: 2016-10-12
Posts: 9

Re: [SOLVED] Network fails with Static IP, using DHCP works fine

Thank you all for your help.

Actually is was a router problem, silly me.

roll

Offline

Board footer

Powered by FluxBB