Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] dhcpd versus fixed IP addresses
Date: Sun, 04 Oct 2020 17:30:22
Message-Id: 20201004183008.55bd67b7@digimed.co.uk
In Reply to: [gentoo-user] dhcpd versus fixed IP addresses by Walter Dnes
1 On Sun, 4 Oct 2020 13:03:39 -0400, Walter Dnes wrote:
2
3 > I decided to get a low-end cable-internet account as backup. 10/1 is
4 > easily sufficient for 1080p Youtube or 720p Netflix (the max for Google
5 > Chrome on a PC). I haven't yet received the TC4400 cable modem, but I
6 > understand that it only does dhcp. Let's see if I have this right for
7 > switching switching my desktop back and forth to/from dhcpd/fixed IP...
8 >
9 > emerge dhcpcd (one time only)
10 >
11 > From fixed to dhcpc
12 > ===================
13 > Step 1) Rename /etc/conf.d/net and execute "touch /etc/conf.d/net"
14 > Step 2) Manually start up dhcpcd service
15 > Step 3) /etc/init.d/net.eth0 restart
16 >
17 > From dhcpc to fixed
18 > ===================
19 > Step 1) Restore original /etc/conf.d/net
20 > Step 2) Manually kill dhcpcd service
21 > Step 3) /etc/init.d/net.eth0 restart
22 >
23 > This could cause problems when I want to transfer files between my
24 > computers. Here's part of an example /etc/hosts file...
25 >
26 > 192.168.1.249 i3
27 > 192.168.1.250 i660
28 > 192.168.1.251 d531
29 > 192.168.1.2 thimk
30 >
31 > If IP addresses are assigned at random, this obviously won't work.
32 > Any suggestions?
33
34 If you have access to the DHCP server on the existing setup, you could
35 ditch static addresses altogether and set up your server to assign the
36 addresses you want to use. This avoids any shenanigans when switching
37 from one connection to another.
38
39 Or you could run your own local DHCP server, such as dsnmasq, which
40 gives you full control however you are connected.I used to run dnsmasq on
41 my server but this year switched to running Pi-Hole on a Raspberry Pi. It
42 provides DNS, DHCP (through dnsmasq) and ad blocking all in one place.
43
44
45 --
46 Neil Bothwick
47
48 Earlier, I didn't have time to finish anything. This time I w

Replies

Subject Author
Re: [gentoo-user] dhcpd versus fixed IP addresses Neil Bothwick <neil@××××××××××.uk>