You are not logged in.

#1 2019-06-23 21:18:55

keeely
Member
Registered: 2019-06-23
Posts: 8

[SOLVED] How do I give my dummy network interface an IP address?

I've been a long-time Slackware user but am in the process of moving to Arch.  Google and the Arch wiki has helped a lot with translating my system configuration over, but I'm stuck on just one thing.  I want to run these commands on each boot to setup the dummy network device address:

ip link add dummy1 type dummy
ip addr add <ip address> dev dummy1

So what's the equivalent in Arch?  I'd like to do this before dnsmasq starts.

thanks for any help.

Last edited by keeely (2019-06-25 11:12:39)

Offline

#2 2019-06-23 21:33:12

loqs
Member
Registered: 2014-03-06
Posts: 17,307

Re: [SOLVED] How do I give my dummy network interface an IP address?

Welcome to the arch linux forums keely.
If the system is configured for networkd then create a netdevfile and a network files for the interface.
If not I would suggest a systemd service to execute the two commands with a WantedBy of network.target

Offline

#3 2019-06-23 21:58:28

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

Re: [SOLVED] How do I give my dummy network interface an IP address?

But, those ip commands should  just work.  ip is part of netct which is part of base


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

Offline

#4 2019-06-23 22:29:59

seth
Member
Registered: 2012-09-03
Posts: 50,929

Re: [SOLVED] How do I give my dummy network interface an IP address?

$ pacman -Ql netctl | grep ip
netctl /usr/lib/netctl/ip

$ file /usr/lib/netctl/ip
/usr/lib/netctl/ip: ASCII text

$ pacman -Qo ip
/usr/bin/ip is owned by iproute2

$ pacman -Qi iproute2
…
Required By     : dhclient  netctl

Though I think his problem was more "how do I run this automatically and in time" (iproute2 is still in the base group)

Online

#5 2019-06-25 11:01:49

keeely
Member
Registered: 2019-06-23
Posts: 8

Re: [SOLVED] How do I give my dummy network interface an IP address?

Thanks for the replies, I've set this up using the following, all working now:

/etc/systemd/network/dummy.netdev

[NetDev]
Name=dummy1
Kind=dummy

/etc/systemd/network/dummy.network

[Match]
Name=dummy1
[Address]
Address=169.254.0.1/32

Offline

Board footer

Powered by FluxBB