You are not logged in.

#1 2016-02-01 21:43:57

roysymba
Member
Registered: 2016-01-27
Posts: 8

unable to configure static ip address settings using netctl

Hello,
I am on my university intranet for connecting to internet with following details.
ip addr- 172.20.19.207
subnet- 255.255.252.0
default gateway- 172.200.19.254
dns server- 172.31.1.1, 172.31.1.130
During initial installation
I get an error -network unreachable when i try to ping any machine including my default gateway
i am unable to configure my static ip addr settings using netctl (i am not clear how should my ethernet-static profile look like)
I followed the instructions in beginners guide and copied plus modified the file /etc/netctl/examples/ethernet-static to /etc/netctl/ethernet-static
my ethernet-static file looks like

Description='A basic static ethernet connection'
Interface=enp9s0
Connection=ethernet
IP=static
Address=('172.20.19.207/255.255.252.0')
#Routes=('172.20.19.0/254 via 172.31.1.1')
Gateway='172.20.19.254'
DNS=('172.31.1.1' '172.31.1.130)

my ip link output is following
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp9s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:21:9b:e8:3c:45 brd ff:ff:ff:ff:ff:ff
3: enp0s29f7u4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 00:a1:b0:70:39:ab brd ff:ff:ff:ff:ff:ff

after setting enp9s0 device up when i am performing
#netctl start ethernet-static
i get following error
ob for netctl@ethernet\x2dstatic.service failed because the control process exited with error code. See "systemctl status "netctl@ethernet\\x2dstatic.service"" and "journalctl -xe" for details.

when i use systemctl status "netctl@ethernet\\x2dstatic.service"
i get following
netctl@ethernet\x2dstatic.service - Networking for netctl profile ethernet-static
   Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2016-02-02 02:26:29 UTC; 16s ago
     Docs: man:netctl.profile(5)
  Process: 752 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)
Main PID: 752 (code=exited, status=1/FAILURE)

Feb 02 02:26:29 archiso systemd[1]: Starting Networking for netctl profile ethernet-static...
Feb 02 02:26:29 archiso network[752]: Starting network profile 'ethernet-static'...
Feb 02 02:26:29 archiso network[752]: The interface of network profile 'ethernet-static' is already up
Feb 02 02:26:29 archiso systemd[1]: netctl@ethernet\x2dstatic.service: Main process exited, code=exited, status=1/FAILURE
Feb 02 02:26:29 archiso systemd[1]: Failed to start Networking for netctl profile ethernet-static.
Feb 02 02:26:29 archiso systemd[1]: netctl@ethernet\x2dstatic.service: Unit entered failed state.
Feb 02 02:26:29 archiso systemd[1]: netctl@ethernet\x2dstatic.service: Failed with result 'exit-code'.

i am still unable to ping my default gateway. I feel my ethernet-static file editing needs correction. please help

Last edited by roysymba (2016-02-01 21:44:54)

Offline

#2 2016-02-01 21:48:06

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: unable to configure static ip address settings using netctl

Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Fo … s_and_code


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2016-02-01 21:48:30

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: unable to configure static ip address settings using netctl

Did my suggestion work?


Jin, Jîyan, Azadî

Offline

#4 2016-02-01 22:20:56

roysymba
Member
Registered: 2016-01-27
Posts: 8

Re: unable to configure static ip address settings using netctl

It still didnt work
i ensured the device enp9s0 was down and then used the command
netctl start ethernet-static

got following error

Job for netctl@ethernet\x2dstatic.service failed because the control process exited with error code. See "systemctl status "netctl@ethernet\\x2dstatic.service"" and "journalctl -xe" for details.]
on further investigation on journalctl -xn
[etctl@ethernet\x2static.service
   Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:netctl.profile(5)

Feb 02 03:35:39 archiso systemd[1]: [/usr/lib/systemd/system/netctl@.service:2] Failed to resolve unit specifiers on Networking for netctl profile %I, ignoring: Invalid argumentetctl@ethernet\x2static.service
   Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:netctl.profile(5)

Feb 02 03:35:39 archiso systemd[1]: [/usr/lib/systemd/system/netctl@.service:2] Failed to resolve unit specifiers on Networking for netctl profile %I, ignoring: Invalid argument]
[-- Logs begin at Tue 2016-02-02 03:27:48 UTC, end at Tue 2016-02-02 03:35:39 UTC. --
Feb 02 03:34:29 archiso kernel: sky2 0000:09:00.0 enp9s0: enabling interface
Feb 02 03:34:29 archiso kernel: IPv6: ADDRCONF(NETDEV_UP): enp9s0: link is not ready
Feb 02 03:34:34 archiso network[613]: No connection found on interface 'enp9s0' (timeout)
Feb 02 03:34:34 archiso kernel: sky2 0000:09:00.0 enp9s0: disabling interface
Feb 02 03:34:34 archiso network[613]: Failed to bring the network up for profile 'ethernet-static'
Feb 02 03:34:34 archiso systemd[1]: netctl@ethernet\x2dstatic.service: Main process exited, code=exited, status=1/FAILURE
Feb 02 03:34:34 archiso systemd[1]: Failed to start Networking for netctl profile ethernet-static.
-- Subject: Unit netctl@ethernet\x2dstatic.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit netctl@ethernet\x2dstatic.service has failed.
-- 
-- The result is failed.
Feb 02 03:34:34 archiso systemd[1]: netctl@ethernet\x2dstatic.service: Unit entered failed state.
Feb 02 03:34:34 archiso systemd[1]: netctl@ethernet\x2dstatic.service: Failed with result 'exit-code'.
Feb 02 03:35:39 archiso systemd[1]: [/usr/lib/systemd/system/netctl@.service:2] Failed to resolve unit specifiers on Networking for netctl profile %I, ignoring: Invalid argument

Offline

#5 2016-02-01 22:32:28

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: unable to configure static ip address settings using netctl

Please post the output of:

systemctl list-unit-files|grep enabled

Jin, Jîyan, Azadî

Offline

#6 2016-02-03 00:34:34

roysymba
Member
Registered: 2016-01-27
Posts: 8

Re: unable to configure static ip address settings using netctl

systemctl list-unit-files | grep enabled

 autovt@.service                            enabled 
choose-mirror.service                      enabled 
getty@.service                             enabled 
pacman-init.service                        enabled 
default.target                             enabled 
multi-user.target                          enabled 
remote-fs.target                           enabled 

first i stopped dhcp service then set the enp9s0 down then created the profile ethernet-static
followed by netctl start ethernet-static

Offline

#7 2016-02-03 01:27:32

WFV
Member
From: ☭USSA⛧⭒⭒⭒⭒
Registered: 2013-04-23
Posts: 290

Re: unable to configure static ip address settings using netctl

/etc/netctl/ethernet-static

Description='A basic static ethernet connection'
Interface=enp4s0
Connection=ethernet
IP=static
Address='192.168.1.110/24'
#Routes=('192.168.0.0/24 via 192.168.1.2')
Gateway='192.168.1.1'
DNS=('192.168.1.1')

## For IPv6 autoconfiguration
#IP6=stateless

## For IPv6 static address configuration
#IP6=static
#Address6=('1234:5678:9abc:def::1/64' '1234:3456::123/96')
#Routes6=('abcd::1234')
#Gateway6='1234:0:123::abcd'

this is very basic static ip example without a domain name server however, at the University you might have to set it up for DNS. Save and restart netctl.service. Also in /etc/NetworkManager/system-connections/Wired\ Connection\ 1 you can enter static ISP's, save and restart network manager for hard-wired connection. Far as I know these settings are only good at a fixed location.


∞ hard times make the strong, the strong make good times, good times make the weak, the weak make hard times ∞

Offline

#8 2016-02-03 01:31:45

roysymba
Member
Registered: 2016-01-27
Posts: 8

Re: unable to configure static ip address settings using netctl

i didnt understand the #Routes and Address part
my ip address is 172.20.19.207 and subnet 255.255.252.0, and default gateway- 172.20.19.254 and dns - 172.31.1.1
(above details are given by university)
How should i write Address and #Routes entries

Last edited by roysymba (2016-02-03 01:33:44)

Offline

#9 2016-02-03 07:25:49

WFV
Member
From: ☭USSA⛧⭒⭒⭒⭒
Registered: 2013-04-23
Posts: 290

Re: unable to configure static ip address settings using netctl

Did you try just leaving Routes commented out? I'm not sure that you need Routes unless your using your laptop as a router. The example I sent is exactly how my ethernet-static is configured, it works, but also I'm sitting on my home network haven't tried it on any other network. Try the example with your credentials in the appropriate places. I'm only using IPv4 static, but IPv6 commented out just makes IPv6 auto. For your mask, Address='172.20.19.207/22'. 
22 equates to 255.255.252.0 mask. The commented and informational stuff can be stripped from the config file also. Understand that this setup will only be good at the U. The Wiki explains automatic profile switching if more than one profile is needed for other networks. Another good reference is the Ubuntu Server book, it has a ton of good info on setting up networks, servers, clients. I think its free on-line but i bought an 11.10 hard copy few yrs ago, most of the info still applies to newer stuff.

Last edited by WFV (2016-02-03 07:28:29)


∞ hard times make the strong, the strong make good times, good times make the weak, the weak make hard times ∞

Offline

#10 2016-02-03 17:32:13

loqs
Member
Registered: 2014-03-06
Posts: 19,184

Re: unable to configure static ip address settings using netctl

Does it work with Manual Assignment?  This should remove as many components as possible for testing.
If it fails please include the output of the following commands (as well as the commands you used in trying manual assignment )
`ip link` after bringing the interface up
`ip addr` after assigning the address
`ip route` after assigning the required routes

Offline

#11 2016-02-04 02:11:13

roysymba
Member
Registered: 2016-01-27
Posts: 8

Re: unable to configure static ip address settings using netctl

Firstly i tried manual assignment with following commands

 ip link set enp0s29f7u4 up
ip addr add 172.20.19.207/22 broadcast 172.20.19.255 dev enp0s29f7u4
ip route add default via 172.20.19.254 

## there was no DNS server configuration manually

As a result i was able to ping both default gateway(172.20.19.254) and dns server (172.31.1.1) :-)

So then i restarted my system and tried configuring through netctl (I think the mistake i was doing was in ip addr /22 part)

i kept following as my ethernet1-static file

 Description='A basic static ethernet connection'
Interface=enp0s29f7u4
Connection=ethernet
IP=static
Address=('172.20.19.207/22')
#Routes=('172.20.19.0/254 via 172.20.19.254')
Gateway='172.20.19.254'
DNS=('172.31.1.1')

## For IPv6 autoconfiguration
#IP6=stateless

## For IPv6 static address configuration
#IP6=static
#Address6=('1234:5678:9abc:def::1/64' '1234:3456::123/96')
#Routes6=('abcd::1234')
#Gateway6='1234:0:123::abcd' 

then i got my network interface (enp0s29fu4) down

with the command #netctl start ethernet1-static
i got following error

 Job for netctl@ethernet1\x2dstatic.service failed because the control process exited with error code. See "systemctl status "netctl@ethernet1\\x2dstatic.service"" and "journalctl -xe" for details. 

then i got my network interface up

Now i was able to ping default gateway (172.20.19.254) but not dns server (172.31.1.1)
when i tried to ping dns server it gave me the error network unreachable.

Last edited by roysymba (2016-02-04 02:12:32)

Offline

#12 2016-02-04 03:24:00

loqs
Member
Registered: 2014-03-06
Posts: 19,184

Re: unable to configure static ip address settings using netctl

If you have no preference of network manager and given the issues with netctl I would suggest trying as an alternative Systemd-networkd

Offline

#13 2016-02-04 04:51:35

roysymba
Member
Registered: 2016-01-27
Posts: 8

Re: unable to configure static ip address settings using netctl

hello all.....
after again restarting the system i changed the network profile file name from ethernet1-static to ethernet-static.
rest following the same procedure it has worked for me. (now i am able to connect to internet)
couldnt figure out the reason of failure in previous attempts.
thanks to all your support

Offline

#14 2016-02-04 05:43:17

WFV
Member
From: ☭USSA⛧⭒⭒⭒⭒
Registered: 2013-04-23
Posts: 290

Re: unable to configure static ip address settings using netctl

(I think the mistake i was doing was in ip addr /22 part)

Just curious, did you end up setting it to /22 or /24? 255.255.255.0 ("/24") default mask usually works in most cases.


∞ hard times make the strong, the strong make good times, good times make the weak, the weak make hard times ∞

Offline

#15 2016-02-04 06:15:21

roysymba
Member
Registered: 2016-01-27
Posts: 8

Re: unable to configure static ip address settings using netctl

i have kept it /22 ..... and it worked.... :-)

Offline

Board footer

Powered by FluxBB