You are not logged in.

#1 2012-11-05 19:39:27

diederick76
Member
Registered: 2010-02-14
Posts: 169

netcfg askes for wrong ip

Hi,

I want a headless machine always to have ip 192.168.1.100, so as explained at https://wiki.archlinux.org/index.php/Ne … figuration, I copied the example file "ethernet-static" to

/etc/network.d/mynetwork

and changed it into:

CONNECTION='ethernet'
DESCRIPTION='A basic static ethernet connection using iproute'
INTERFACE='eth0'
IP='static'
ADDR='192.168.1.100'
#ROUTES=('192.168.0.0/24 via 192.168.1.2')
GATEWAY='192.168.1.1'
DNS=('192.168.1.1')

However, when I restart the service using 

$ sudo systemctl restart netcfg@mynetwork

syslog reads:

Nov  5 20:07:22 localhost systemd[1]: Stopping Netcfg networking service for profile mynetwork...
Nov  5 20:07:22 localhost dhcpcd[5612]: eth0: removing IP address 192.168.1.105/24
Nov  5 20:07:22 localhost dhcpcd[5612]: eth0: carrier lost
Nov  5 20:07:22 localhost netcfg[8435]: :: mynetwork down [done]
Nov  5 20:07:22 localhost systemd[1]: Starting Netcfg networking service for profile mynetwork...
Nov  5 20:07:22 localhost kernel: [90468.311178] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Nov  5 20:07:24 localhost dhcpcd[5612]: eth0: carrier acquired
Nov  5 20:07:24 localhost kernel: [90469.901311] tg3 0000:05:02.0: eth0: Link is up at 100 Mbps, full duplex
Nov  5 20:07:24 localhost kernel: [90469.901321] tg3 0000:05:02.0: eth0: Flow control is on for TX and on for RX
Nov  5 20:07:24 localhost kernel: [90469.901363] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Nov  5 20:07:24 localhost dhcpcd[5612]: eth0: sending IPv6 Router Solicitation
Nov  5 20:07:24 localhost dhcpcd[5612]: eth0: rebinding lease of 192.168.1.105
Nov  5 20:07:24 localhost netcfg[8473]: :: mynetwork up [done]
Nov  5 20:07:24 localhost dhcpcd[5612]: eth0: acknowledged 192.168.1.105 from 192.168.1.1
Nov  5 20:07:24 localhost systemd[1]: Started Netcfg networking service for profile mynetwork.
Nov  5 20:07:24 localhost dhcpcd[5612]: eth0: checking for 192.168.1.105
Nov  5 20:07:28 localhost dhcpcd[5612]: eth0: sending IPv6 Router Solicitation
Nov  5 20:07:29 localhost dhcpcd[5612]: eth0: leased 192.168.1.105 for 86400 seconds
Nov  5 20:07:32 localhost dhcpcd[5612]: eth0: sending IPv6 Router Solicitation
Nov  5 20:07:36 localhost dhcpcd[5612]: eth0: sending IPv6 Router Solicitation
Nov  5 20:07:36 localhost dhcpcd[5612]: eth0: no IPv6 Routers available

When I ssh from another machine into 192.168.1.105, I actually ssh into this machine, and ifconfig on this machine returns:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.100  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::20e:7fff:fe6a:dc22  prefixlen 64  scopeid 0x20<link>
        ether 00:0e:7f:6a:dc:22  txqueuelen 1000  (Ethernet)
        RX packets 2197  bytes 268334 (262.0 KiB)
        RX errors 0  dropped 113  overruns 0  frame 0
        TX packets 1880  bytes 350995 (342.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  

Could somebody tell me what I'm missing here?

Thanks!

Last edited by diederick76 (2012-11-05 19:58:31)

Offline

#2 2012-11-06 09:47:53

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: netcfg askes for wrong ip

You're running both dhcpcd and netcfg.

Offline

#3 2012-11-06 09:49:46

diederick76
Member
Registered: 2010-02-14
Posts: 169

Re: netcfg askes for wrong ip

Thanks, I'll check it out when I get home from work.

Last edited by diederick76 (2012-11-06 09:49:55)

Offline

Board footer

Powered by FluxBB