Hi again,
I have another basic question. I just want to set up a static IP address for my Pi to work with a router I have limited access to. (I'm allowed to use 192.168.1.7) I followed the directions on this page:
https://wiki.archlinux.org/index.php/Network_Configuration
under the section entitled Manual connection at boot using systemd. That seemed to be exactly what I wanted to do so I followed it step by step. Initially it seems to work. But on subsequent reboots it looks like it *sometimes* gets assigned another IP address (the next available one handed out by the router).
Here is exactly what I entered:
$this->bbcode_second_pass_code('', '
systemctl disable dhcpcd@eth0.service
systemctl status dhcpcd.service
(verify that it's disabled)
nano /etc/conf.d/network@eth0
(with the following content)
address=192.168.1.7
netmask=24
broadcast=192.168.1.255
gateway=192.168.1.1
(and saved)
nano /etc/systemd/system/network@.service
(with the following content)
[Unit]
Description=Network connectivity (%i)
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device
[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/conf.d/network@%i
ExecStart=/usr/bin/ip link set dev %i up
ExecStart=/usr/bin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev %i
ExecStart=/usr/bin/ip route add default via ${gateway}
ExecStop=/usr/bin/ip addr flush dev %i
ExecStop=/usr/bin/ip link set dev %i down
[Install]
WantedBy=multi-user.target
systemctl enable network@eth0.service
systemctl start network@eth0.service
(and saved)
reboot
')
I'd like to get this systemd method working (assuming that this is indeed the correct, recommended way of doing things). Am I missing anything? This is fresh install of arch - is there something running in the background that attempts to retrieve an IP address from the router? If there is an error being logged somewhere I'm afraid I don't even know where to look. Any help would be appreciated.
Thank you!