On Tue, Nov 5, 2019 at 8:19 AM Ben Koenig <[email protected]> wrote:
> Since he's running slackware, IP addresses are set by 1 of 3 functions: > 1) /etc/rc.d/rc.inet1 runs at boot time and manually configures network > interfaces > 2) The system has been configured to run NetworkManager (meaning that > /etc/rc.d/rc.inet1.conf is left at defaults) > 3) WICD has been installed and is being used as a drop in replacement for > NetworkManager > > The only other option is to manually run ifconfig/ip/dhcpcd/dhclient > commands when you want to connect to your network. Nobody does this anymore > since we run shell scripts that run the commands for us (e.g. rc.inet1). > This process is not hugely different from any other distro, so to be Frank > here, any other methods being used to configure IP addresses and subnets > are probably incorrect and should replaced with one of the options above. > Of course, there are fringe use cases where the word "incorrect" becomes > very subjective. > > > On Tue, Nov 5, 2019 at 7:24 AM Michael Barnes <[email protected]> > wrote: > > > On Tue, Nov 5, 2019 at 5:51 AM Rich Shepard <[email protected]> > > wrote: > > > > > On Mon, 4 Nov 2019, John Jason Jordan wrote: > > > > > > > In all my years of printing from computers to printers over a > network, > > > > I've never run into a printer whose IP address could not be changed > > > > from the printer's control panel. > > > > > > John, > > > > > > My experiences over the past couple of decades is the opposite: I've > > never > > > had a printer with a built-in IP address. Of course, the Okidata > > dot-matrix > > > printer wasn't network-enabled, but the laser and inkjet printers all > > > were/are and the IP address is set in /etc/hosts, not on the printer. > > Then > > > again, my printers have been HP (and a Brother which I gave to a new > > home). > > > > > > Rich > > > > > > > I'm getting really confused here. The /etc/hosts file is not for setting > IP > > addresses on devices. It is to translate domain names to IP addresses > (DNS > > function), usually for local testing. For example, if I want to test a > web > > page at foo.bar, I would make an entry in my /etc/hosts file like: > > > > 172.16.2.10 foo.bar > > > > Then I could go to my browser and point it to foo.bar and it would take > me > > to the host at 172.16.2.10 and display the web page there. Or I could > > connect to the host with ssh foo.bar instead of remembering to ssh > > 172.16.2.10. > > > > You could also use it to give names to your devices: > > 172.16.2.30 Printer1 > > 172.16.2.31 Printer2 > > 172.16.2.32 Camera5 > > 172.16.2.33 Refrigerator > > > > This means that these devices must have static addresses for this to > work. > > If they had dynamic addresses and their lease changed to give them a new > > address, then your /etc/hosts file is toast. > > > > Static addresses are set one of two ways. The device itself (printer, > > computer, refrigerator, whatever) is programmed in its own configuration > > for its IP address. Or, the address is assigned by the DHCP server in its > > config file by MAC address, so any time that MAC address comes on line > > requesting an address, it is always given the same one. > > > > Again, it has been a while since I set up networking. If any of this has > > changed, some one please educate me. > > > > Michael > > ________________ > Ben, I believe you are talking about option 1 in my description. Static IP addresses in the network are normally configured one of two ways. Either in the device itself, or "permanently" assigned by the DHCP server based on MAC address. Your description is for the device (his computer in your referenced case). This all depends on the device. In Rich's situation, he is discussing his printer. His options are to set the IP address statically from the control panel of the printer (although it may be possible to set it from the web interface, I don't know on that particular printer) or to configure his DHCP server (used to be via dhcp.conf, IIRC, but may be different in recent versions of dhcpd, or via the admin interface of his router, wherever his DHCP is being served from) to assign a dedicated IP address based on the MAC address of his printer when it asks the network for an address. To my knowledge (admittedly limited), you do not use rc.inet to configure the IP address of peripheral equipment not physically part of that computer. Please do correct me if I am wrong. Michael _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
