Unable to assign IPv4 address to the network interface

This forum is for topics dealing with problems with software specifically in the ARMv5 repo.

Unable to assign IPv4 address to the network interface

Postby dips0502 » Sun Sep 21, 2014 5:25 am

I dont know when exactly this happened. But I am guessing that it could have been after I ran pacman -Syu.
One fine day I couldn't access the Seagate GoFlex. I made myself a USB pen-drive and tried to boot from it. I used the "ArchLinuxARM-armv5te-latest.tar.gz " image. Still couldnt access the device. Then I did some network capture and found some ICMPv6 router solicitaiton messages and found that the device has an IPv6 address. Thankfully I was able to SSH into it using it's IPv6 address. Here is the ifconfig output:

$this->bbcode_second_pass_code('', '
[root@alarm ~]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::50:43ff:fef5:39b2 prefixlen 64 scopeid 0x20<link>
ether 02:50:43:f5:39:b2 txqueuelen 1000 (Ethernet)
RX packets 85 bytes 13817 (13.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 71 bytes 9702 (9.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 11

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 16436
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 80 bytes 6080 (5.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 80 bytes 6080 (5.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
')

I configured a static profile under /etc/netctl/. Then enabled it. However on reboot, it doesnt have any effect. I still get the same output from ifconfig.
Here is the profile I created for a static IP -
$this->bbcode_second_pass_code('', '
[root@alarm netctl]# cat ethernet-static
Description='A basic static ethernet connection'
Interface=eth0
Connection=ethernet
AutoWired=yes
IP=static
Address=('192.168.1.100/24')
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'
')

However, when I run 'ifconfig eth0 down; netctl start ethernet-static', I get the static Ipv4 address assigned. Changed are lost on reboot.
dips0502
 
Posts: 22
Joined: Sat Jul 26, 2014 5:20 pm

Re: Unable to assign IPv4 address to the network interface

Postby Geoff » Sun Sep 21, 2014 5:30 am

As you're using netctl, make sure systemd-networkd.service didn't also get enabled. You could use either one to do the job; just don't enable both at once.
Geoff
 
Posts: 231
Joined: Wed Mar 09, 2011 5:14 pm

Re: Unable to assign IPv4 address to the network interface

Postby dips0502 » Sun Sep 21, 2014 6:16 am

It was enabled. I stopped and disabled it. However, upon reboot, I still dont get any Ipv4 address.
Output from netctl status ethernet-static says that it failed to start the profile.
$this->bbcode_second_pass_code('', '
[root@alarm ~]# netctl status ethernet-static
* netctl@ethernet\x2dstatic.service - A basic static ethernet connection
Loaded: loaded (/etc/systemd/system/netctl@ethernet\x2dstatic.service; enabled)
Active: failed (Result: exit-code) since Sun 2014-09-21 05:45:57 UTC; 4min 58s ago
Docs: man:netctl.profile(5)
Process: 104 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)
Main PID: 104 (code=exited, status=1/FAILURE)

Sep 21 05:45:57 alarm network[104]: Starting network profile 'ethernet-static'...
Sep 21 05:45:57 alarm network[104]: The interface of network profile 'ethernet-static' is already up
Sep 21 05:45:57 alarm systemd[1]: netctl@ethernet\x2dstatic.service: main process exited, code=exited, status=1/FAILURE
Sep 21 05:45:57 alarm systemd[1]: Failed to start A basic static ethernet connection.
Sep 21 05:45:57 alarm systemd[1]: Unit netctl@ethernet\x2dstatic.service entered failed state.
')
dips0502
 
Posts: 22
Joined: Sat Jul 26, 2014 5:20 pm

Re: Unable to assign IPv4 address to the network interface

Postby dips0502 » Sun Sep 21, 2014 7:18 am

Read on another thread that the default behavior of netctl is to fail if the interafce is up. To override this, needed to use -
ForceConnect='yes'.
Reference - https://bbs.archlinux.org/viewtopic.php?id=162582
dips0502
 
Posts: 22
Joined: Sat Jul 26, 2014 5:20 pm


Return to ARMv5

Who is online

Users browsing this forum: No registered users and 2 guests