Open c00kiemon5ter opened 11 years ago
On some machines, we have been using a script akin to:
ip link set eth0 up
ip addr add XXX dev eth0
ip route add default via XXX
ip -6 route add XXX via XXX mtu XXX
exec pause
Not sure anyone still uses the rc.conf variables. But we could ship something like this as an example.
Also, one should set the interface down in a finish
task.
One can use
dhcpcd
to request and get a static ip. Aeth0-static
service would be nice to do that.I have a branch where I tested such a service and works fine.
This would mean that some variables would need to be configured on
/etc/rc.conf
. I guess we'd needINTERFACE
(or unconditionallyeth0
)ADDRESS
NETMASK
GATEWAY
BROADCAST
andNAMESERVER
(?) for such a simple configuration.If not
dhcpcd
,ip
could be used to achieve a static ip configuration, like:ofcourse
ip
would exit once it's done its job, so it's not very suitable here, but it can be used in/etc/rc.local
(for anyone wanting this if this is rejected).So, that's the idea. I am not sure it's worth it. Configuring in
/etc/rc.local
should work fine too.