On a sunny day (Sat, 23 Jun 2018 17:16:07 +0100) it happened The Natural
Philosopher wrote in :
>On 23/06/18 17:00, Jan Panteltje wrote:
>> On a sunny day (Sat, 23 Jun 2018 16:43:24 +0100) it happened The Natural
>> Philosopher wrote in :
>>
>>> On 23/06/18 10:10, A. Dumas wrote:
>>>> All the modem/routers I used in the last 10(?) years could do this. That
>>>> way you are guaranteed of:
>>>> - no conflicts
>>>> - a one-time setup
>>>> - a central administration
>>> - No way to know waht IP addres the servers are on. Tpday.
>>>
>>>
>>>> Now you only have to know the device's name. And yeah, your first
>>>> argument probably stands, for you.
>>>
>>> Knowing its name don't help by and large since it wont be broadcast
>>> anywhere.
>>
>> It won't be broadcast, but it is in my /etc/hosts at my workstation,
>> and if needed easily copied to other things / computers.
>
>And what guarantee is there that its IP adress will stay te same next
>time it reboots a DHCP request?
There is a howto online how to configure a raspi with a fixed IP address,
but basically (almost verbatim copy):
DHCP for eth0 is enabled in the file /etc/network/interfaces.
Here is what it looks like by default on a Raspberry Pi under the official
version of Raspbian:
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
(Note: there is no actual wlan0 interface unless you attach a wireless USB
network adapter.
The entries that refer to wlan0 are there for when you do ;-) ).
Instead of the line:
iface eth0 inet dhcp
you need lines like this:
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
gateway 192.168.1.254
The above example assigns the address 192.168.1.1 to eth0 with a subnet mask
of 255.255.255.0, and sets the default gateway to 192.168.1.254.
Edit the file /etc/network/interfaces like this:
The second thing you need to do is check that you have a valid DNS server
listed in /etc/resolv.conf.
Edit this file using your text editor and add your DNS server if it is not
already there.
If you are using a broadband router, add the address of your router as the DNS
server.
------------------
I specified the google nameservers in /etc/resolv.conf:
nameserver 8.8.8.8
nameserver 8.8.4.4
You could use your IPSs too.
>I know where my servers are becuse they areon fixed IP addreesses so
>hostr tables work - I could even set up DNS on te network...
>
>DHCP is for client only machines - the smart phone the desktop and the
>laptop. And vistors.
Yes, but for example the desktop, laptops here are not client only.
In fact I had the webserver running on one of the early (Linux) eeePCs many
many earth orbits ago.
It is (in my eeepc) now just a boot option (yes different kernel too).
Same for this machine I am typing on, just point port 80 to it and same server,
this is a big one,
in fact the one where I edit / create the website.
Raspi is cheaper as server, and allows me to mess around with the big one
without having that backup raspi server going offline.
Some other raspies are online 24/7 never go offline normally:
root@raspberrypi:~/compile/pantel/xgpspc# uptime
20:00:21 up 38 days, 12:28, 9 users, load average: 2.58, 2.82, 2.85
Not everything here is visible from the internet unless I want to ;-)
It is all very simple, really.
Once you have dunnit
:-)
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|