1 |
On Sunday, 4 October 2020 18:31:44 BST Neil Bothwick wrote: |
2 |
> On Sun, 4 Oct 2020 18:30:08 +0100, Neil Bothwick wrote: |
3 |
> > On Sun, 4 Oct 2020 13:03:39 -0400, Walter Dnes wrote: |
4 |
> > > I decided to get a low-end cable-internet account as backup. 10/1 is |
5 |
> > > |
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 |
> > > |
28 |
> > > computers. Here's part of an example /etc/hosts file... |
29 |
> > > |
30 |
> > > 192.168.1.249 i3 |
31 |
> > > 192.168.1.250 i660 |
32 |
> > > 192.168.1.251 d531 |
33 |
> > > 192.168.1.2 thimk |
34 |
> > > |
35 |
> > > If IP addresses are assigned at random, this obviously won't work. |
36 |
> > > |
37 |
> > > Any suggestions? |
38 |
> > |
39 |
> > If you have access to the DHCP server on the existing setup, you could |
40 |
> > ditch static addresses altogether and set up your server to assign the |
41 |
> > addresses you want to use. This avoids any shenanigans when switching |
42 |
> > from one connection to another. |
43 |
> > |
44 |
> > Or you could run your own local DHCP server, such as dsnmasq, which |
45 |
> > gives you full control however you are connected.I used to run dnsmasq |
46 |
> > on my server but this year switched to running Pi-Hole on a Raspberry |
47 |
> > Pi. It provides DNS, DHCP (through dnsmasq) and ad blocking all in one |
48 |
> > place. |
49 |
> |
50 |
> However, I would wait until the new modem arrives as most do allow you to |
51 |
> turn off DHCP for the LAN and the information you have may only apply to |
52 |
> the WAN connection. |
53 |
|
54 |
If I understand correctly what the OP is trying to achieve emerging dhcpcd or |
55 |
renaming /etc/conf.d/net may be unnecessary/avoidable. I suspect the word |
56 |
"modem" is used here to mean the all-in-one modem + router + LAN switch 'white |
57 |
goods', plus potentially a WiFi AP. I am not familiar with TC4400, but in |
58 |
generic terms routers expose some GUI control pages, for users to configure |
59 |
the DHCP tables in order to specify static IP addresses corresponding to the |
60 |
MACs of the devices on the LAN. Even if this modem/router doesn't, you can |
61 |
set static IP addresses on the LAN PCs themselves without dhcpcd. As long as |
62 |
the PCs do not ask for an address from the router's DHCP server, the static IP |
63 |
address they have been configured with should just work. The caveat here is |
64 |
that the subnet for the PCs should be the same as the router's; i.e. |
65 |
192.168.1.0/24. |
66 |
|
67 |
Random (guest) devices connected to the router will still be allocated |
68 |
dynamically some IP address by its dhcp server, typically starting from 2 and |
69 |
incremented from there. Since most of your devices IP addresses start from |
70 |
the top it's unlikely there'll be clash, because any dynamically allocated IP |
71 |
address leases will soon expire. |
72 |
|
73 |
You could of course set your modem+routers to operate in a 'fully-bridged' |
74 |
mode and use a stand alone router to deal with IP address allocation, DNS |
75 |
resolving and firewalling for your LAN, plus PPPoE. |
76 |
|
77 |
You haven't explained if you intend to run a fallback mechanism so the |
78 |
standalone router, or clients, switch from one router-ISP to the other in case |
79 |
of failure, but for a manual set up the above will suffice. |