Re: [gentoo-user] dhcpd versus fixed IP addresses

2020-10-05 Thread Neil Bothwick
On Mon, 05 Oct 2020 19:45:15 +0100, Michael wrote:

> > I have a Virgin cablemodem that I have switched into modem-only mode,
> > so it behaves similarly to your device, and plugged it into the
> > router. It gives a setup like you want, except I chose to use DHCP
> > for simplicity of administration.  
> 
> In the old days virgin modems were simple modems only, not routers.
> They had a GUI with minimal ability to do much, other than check what
> the WAN IP address allocated by the CMTS was.  I suppose these days
> they're all in one + WiFi, with more configuration options.

And the facility for Virgin to access and administer them remotely.


-- 
Neil Bothwick

Energizer Bunny arrested, charged with battery :)


pgpoWy3dGvyZ9.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] dhcpd versus fixed IP addresses

2020-10-05 Thread Michael
On Monday, 5 October 2020 11:39:44 BST Neil Bothwick wrote:
> On Sun, 4 Oct 2020 21:47:53 -0400, Walter Dnes wrote:
> >   On their support board, the ISP's tech support told me...
> > 
> > a) My computer or router needs to be configured to get the IP
> > 
> >automatically by DHCP to get the connection up and running.
> > 
> > b) The TC4400 is a cable modem without any router capabilities, so
> > 
> >there are no wifi antennas on the device. (This was in response
> >to my question about turning off wifi.)
> >   
> >   A Google search turned up a default config webpage and userID and
> > 
> > password for the TC4400.  If that doesn't work, I'll look into getting
> > a NAT-ing router that can get a dhcp IP address.  The plan would be...

If the TC4400 is a modem only, then I expect it will act as a half-bridged 
device.  It will sync with the cable headend (CMTS) to obtain a radio 
frequency range and time slot ("talk-time" or TDMA), then exchange Range-
Requests + Range-Responses to complete the DOCSIS protocol sync and move on to 
the IP layer.

Then it will use dhcp to obtain a WAN IP address, default gateway, time (Time 
of Day) server, and TFTP server addresses.  It will download QoS and other 
configuration information over TFTP from the CMTS server, along with 
encryption keys (BPI), in order to complete its registration and obtain a 
Service IDentifier (SID) from the CMTS.

As I understand it, ISP issued modems come already preconfigured with 
encryption keys and hardcoded MACs and they are the only modems which will be 
allowed to register with the ISP's CMTS.  If this is a 3rd party modem, then 
perhaps its MAC address will be used to register and exchange keys with the 
CMTS, but I would think either this MAC address will need to be communicated 
in advance with the ISP so it can be added to the provisioning servers, or an 
ISP obtained MAC address will need to be configured on the modem.  There may 
be variations in this theme including PPPoE authentication via RADIUS servers 
at the ISP end, but I'm not sure this is common practice.

Either way, the modem operating in a half-bridged mode will pass on the WAN IP 
address to the LAN port transparently.  The PC or router at the LAN port will 
need to either know what this bridged WAN IP address is and have it configured 
as a static IP address on its NIC so it can use it, or use DHCP to obtain it.

The above reflects my loose understanding of how this works, or is meant to 
work with a cable modem without routing capabilities.


> I have a Virgin cablemodem that I have switched into modem-only mode, so
> it behaves similarly to your device, and plugged it into the router. It
> gives a setup like you want, except I chose to use DHCP for simplicity of
> administration.

In the old days virgin modems were simple modems only, not routers.  They had 
a GUI with minimal ability to do much, other than check what the WAN IP 
address allocated by the CMTS was.  I suppose these days they're all in one + 
WiFi, with more configuration options.

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] dhcpd versus fixed IP addresses

2020-10-05 Thread Neil Bothwick
On Sun, 4 Oct 2020 21:47:53 -0400, Walter Dnes wrote:

>   On their support board, the ISP's tech support told me...
> 
> a) My computer or router needs to be configured to get the IP
>automatically by DHCP to get the connection up and running.
> 
> b) The TC4400 is a cable modem without any router capabilities, so
>there are no wifi antennas on the device. (This was in response
>to my question about turning off wifi.)
> 
>   A Google search turned up a default config webpage and userID and
> password for the TC4400.  If that doesn't work, I'll look into getting
> a NAT-ing router that can get a dhcp IP address.  The plan would be...
>   

Just about any router will do that, it's usually the default behaviour.

> * The cable modem would connect to the internet and pass an address
>   via dhcp to the router.
> 
> * The router would treat the dhcp-assigned address from the cable modem
>   as "the internet" and expose 192.168.0.0/16 to my computers, which
>   would allow my home computers to use static IP addresses as before.
>  

I have a Virgin cablemodem that I have switched into modem-only mode, so
it behaves similarly to your device, and plugged it into the router. It
gives a setup like you want, except I chose to use DHCP for simplicity of
administration. 



-- 
Neil Bothwick

The truth shall make you free, but first it shall piss you off.


pgp0YiftDKngx.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] dhcpd versus fixed IP addresses

2020-10-04 Thread Walter Dnes
On Sun, Oct 04, 2020 at 06:31:44PM +0100, Neil Bothwick wrote

> However, I would wait until the new modem arrives as most do allow
> you to turn off DHCP for the LAN and the information you have may
> only apply to the WAN connection.

  On their support board, the ISP's tech support told me...

a) My computer or router needs to be configured to get the IP
   automatically by DHCP to get the connection up and running.

b) The TC4400 is a cable modem without any router capabilities, so
   there are no wifi antennas on the device. (This was in response
   to my question about turning off wifi.)

  A Google search turned up a default config webpage and userID and
password for the TC4400.  If that doesn't work, I'll look into getting
a NAT-ing router that can get a dhcp IP address.  The plan would be...

* The cable modem would connect to the internet and pass an address
  via dhcp to the router.

* The router would treat the dhcp-assigned address from the cable modem
  as "the internet" and expose 192.168.0.0/16 to my computers, which
  would allow my home computers to use static IP addresses as before.

-- 
Walter Dnes 
I don't run "desktop environments"; I run useful applications



Re: [gentoo-user] dhcpd versus fixed IP addresses

2020-10-04 Thread antlists

On 04/10/2020 22:17, Michael wrote:

Random (guest) devices connected to the router will still be allocated
dynamically some IP address by its dhcp server, typically starting from 2 and
incremented from there.  Since most of your devices IP addresses start from
the top it's unlikely there'll be clash, because any dynamically allocated IP
address leases will soon expire.


Some routers can be told "only allocate these addresses" such as 1-100. 
That way you've reserved a block (101-254) that you can assign 
statically knowing the router won't collide with them.


Cheers,
Wol



Re: [gentoo-user] dhcpd versus fixed IP addresses

2020-10-04 Thread Michael
On Sunday, 4 October 2020 18:31:44 BST Neil Bothwick wrote:
> On Sun, 4 Oct 2020 18:30:08 +0100, Neil Bothwick wrote:
> > On Sun, 4 Oct 2020 13:03:39 -0400, Walter Dnes wrote:
> > >   I decided to get a low-end cable-internet account as backup. 10/1 is
> > > 
> > > easily sufficient for 1080p Youtube or 720p Netflix (the max for
> > > Google Chrome on a PC).  I haven't yet received the TC4400 cable
> > > modem, but I understand that it only does dhcp.  Let's see if I have
> > > this right for switching switching my desktop back and forth to/from
> > > dhcpd/fixed IP...
> > > 
> > > emerge dhcpcd (one time only)
> > > 
> > > From fixed to dhcpc
> > > ===
> > > Step 1) Rename /etc/conf.d/net and execute "touch /etc/conf.d/net"
> > > Step 2) Manually start up dhcpcd service
> > > Step 3) /etc/init.d/net.eth0 restart
> > > 
> > > From dhcpc to fixed
> > > ===
> > > Step 1) Restore original /etc/conf.d/net
> > > Step 2) Manually kill dhcpcd service
> > > Step 3) /etc/init.d/net.eth0 restart
> > > 
> > >   This could cause problems when I want to transfer files between my
> > > 
> > > computers.  Here's part of an example /etc/hosts file...
> > > 
> > > 192.168.1.249i3
> > > 192.168.1.250  i660
> > > 192.168.1.251  d531
> > > 192.168.1.2   thimk
> > > 
> > >   If IP addresses are assigned at random, this obviously won't work.
> > > 
> > > Any suggestions?
> > 
> > If you have access to the DHCP server on the existing setup, you could
> > ditch static addresses altogether and set up your server to assign the
> > addresses you want to use. This avoids any shenanigans when switching
> > from one connection to another.
> > 
> > Or you could run your own local DHCP server, such as dsnmasq, which
> > gives you full control however you are connected.I used to run dnsmasq
> > on my server but this year switched to running Pi-Hole on a Raspberry
> > Pi. It provides DNS, DHCP (through dnsmasq) and ad blocking all in one
> > place.
> 
> However, I would wait until the new modem arrives as most do allow you to
> turn off DHCP for the LAN and the information you have may only apply to
> the WAN connection.

If I understand correctly what the OP is trying to achieve emerging dhcpcd or 
renaming /etc/conf.d/net may be unnecessary/avoidable.  I suspect the word 
"modem" is used here to mean the all-in-one modem + router + LAN switch 'white 
goods', plus potentially a WiFi AP.  I am not familiar with TC4400, but in 
generic terms routers expose some GUI control pages, for users to configure 
the DHCP tables in order to specify static IP addresses corresponding to the 
MACs of the devices on the LAN.  Even if this modem/router doesn't, you can 
set static IP addresses on the LAN PCs themselves without dhcpcd.  As long as 
the PCs do not ask for an address from the router's DHCP server, the static IP 
address they have been configured with should just work.  The caveat here is 
that the subnet for the PCs should be the same as the router's; i.e. 
192.168.1.0/24.

Random (guest) devices connected to the router will still be allocated 
dynamically some IP address by its dhcp server, typically starting from 2 and 
incremented from there.  Since most of your devices IP addresses start from 
the top it's unlikely there'll be clash, because any dynamically allocated IP 
address leases will soon expire.

You could of course set your modem+routers to operate in a 'fully-bridged' 
mode and use a stand alone router to deal with IP address allocation, DNS 
resolving and firewalling for your LAN, plus PPPoE.

You haven't explained if you intend to run a fallback mechanism so the 
standalone router, or clients, switch from one router-ISP to the other in case 
of failure, but for a manual set up the above will suffice.

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] dhcpd versus fixed IP addresses

2020-10-04 Thread Neil Bothwick
On Sun, 4 Oct 2020 18:30:08 +0100, Neil Bothwick wrote:

> On Sun, 4 Oct 2020 13:03:39 -0400, Walter Dnes wrote:
> 
> >   I decided to get a low-end cable-internet account as backup. 10/1 is
> > easily sufficient for 1080p Youtube or 720p Netflix (the max for
> > Google Chrome on a PC).  I haven't yet received the TC4400 cable
> > modem, but I understand that it only does dhcp.  Let's see if I have
> > this right for switching switching my desktop back and forth to/from
> > dhcpd/fixed IP...
> > 
> > emerge dhcpcd (one time only)
> > 
> > From fixed to dhcpc
> > ===
> > Step 1) Rename /etc/conf.d/net and execute "touch /etc/conf.d/net"
> > Step 2) Manually start up dhcpcd service
> > Step 3) /etc/init.d/net.eth0 restart
> > 
> > From dhcpc to fixed
> > ===
> > Step 1) Restore original /etc/conf.d/net
> > Step 2) Manually kill dhcpcd service
> > Step 3) /etc/init.d/net.eth0 restart
> > 
> >   This could cause problems when I want to transfer files between my
> > computers.  Here's part of an example /etc/hosts file...
> > 
> > 192.168.1.249i3
> > 192.168.1.250  i660
> > 192.168.1.251  d531
> > 192.168.1.2   thimk
> > 
> >   If IP addresses are assigned at random, this obviously won't work.
> > Any suggestions?  
> 
> If you have access to the DHCP server on the existing setup, you could
> ditch static addresses altogether and set up your server to assign the
> addresses you want to use. This avoids any shenanigans when switching
> from one connection to another.
> 
> Or you could run your own local DHCP server, such as dsnmasq, which
> gives you full control however you are connected.I used to run dnsmasq
> on my server but this year switched to running Pi-Hole on a Raspberry
> Pi. It provides DNS, DHCP (through dnsmasq) and ad blocking all in one
> place.

However, I would wait until the new modem arrives as most do allow you to
turn off DHCP for the LAN and the information you have may only apply to
the WAN connection.


-- 
Neil Bothwick

Why do kamikaze pilots wear helmets?


pgpTBWHSULkbZ.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] dhcpd versus fixed IP addresses

2020-10-04 Thread Neil Bothwick
On Sun, 4 Oct 2020 13:03:39 -0400, Walter Dnes wrote:

>   I decided to get a low-end cable-internet account as backup. 10/1 is
> easily sufficient for 1080p Youtube or 720p Netflix (the max for Google
> Chrome on a PC).  I haven't yet received the TC4400 cable modem, but I
> understand that it only does dhcp.  Let's see if I have this right for
> switching switching my desktop back and forth to/from dhcpd/fixed IP...
> 
> emerge dhcpcd (one time only)
> 
> From fixed to dhcpc
> ===
> Step 1) Rename /etc/conf.d/net and execute "touch /etc/conf.d/net"
> Step 2) Manually start up dhcpcd service
> Step 3) /etc/init.d/net.eth0 restart
> 
> From dhcpc to fixed
> ===
> Step 1) Restore original /etc/conf.d/net
> Step 2) Manually kill dhcpcd service
> Step 3) /etc/init.d/net.eth0 restart
> 
>   This could cause problems when I want to transfer files between my
> computers.  Here's part of an example /etc/hosts file...
> 
> 192.168.1.249i3
> 192.168.1.250  i660
> 192.168.1.251  d531
> 192.168.1.2   thimk
> 
>   If IP addresses are assigned at random, this obviously won't work.
> Any suggestions?

If you have access to the DHCP server on the existing setup, you could
ditch static addresses altogether and set up your server to assign the
addresses you want to use. This avoids any shenanigans when switching
from one connection to another.

Or you could run your own local DHCP server, such as dsnmasq, which
gives you full control however you are connected.I used to run dnsmasq on
my server but this year switched to running Pi-Hole on a Raspberry Pi. It
provides DNS, DHCP (through dnsmasq) and ad blocking all in one place.


-- 
Neil Bothwick

Earlier, I didn't have time to finish anything. This time I w


pgp_qHHfenkb8.pgp
Description: OpenPGP digital signature


[gentoo-user] dhcpd versus fixed IP addresses

2020-10-04 Thread Walter Dnes
  A few days ago there was a short (VDSL) internet outage in my general
area.  I found out to my horror that dialup no longer worked (bit rot or
whatever) for pppconfig and/or pon.  A year ago, I would've taken my
notebook to the local library or Starbuck's or fast-food joint; this
year, not so much.  The connection eventually came back, but this was a
wake-up call.

  I decided to get a low-end cable-internet account as backup. 10/1 is
easily sufficient for 1080p Youtube or 720p Netflix (the max for Google
Chrome on a PC).  I haven't yet received the TC4400 cable modem, but I
understand that it only does dhcp.  Let's see if I have this right for
switching switching my desktop back and forth to/from dhcpd/fixed IP...

emerge dhcpcd (one time only)

>From fixed to dhcpc
===
Step 1) Rename /etc/conf.d/net and execute "touch /etc/conf.d/net"
Step 2) Manually start up dhcpcd service
Step 3) /etc/init.d/net.eth0 restart

>From dhcpc to fixed
===
Step 1) Restore original /etc/conf.d/net
Step 2) Manually kill dhcpcd service
Step 3) /etc/init.d/net.eth0 restart

  This could cause problems when I want to transfer files between my
computers.  Here's part of an example /etc/hosts file...

192.168.1.249i3
192.168.1.250  i660
192.168.1.251  d531
192.168.1.2   thimk

  If IP addresses are assigned at random, this obviously won't work.
Any suggestions?

-- 
Walter Dnes 
I don't run "desktop environments"; I run useful applications