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

Replies

Subject Author
Re: [gentoo-user] dhcpd versus fixed IP addresses Michael <confabulate@××××××××.com>
Re: [gentoo-user] dhcpd versus fixed IP addresses Walter Dnes <waltdnes@××××××××.org>