update ip addresses and router generic, not Netgear - online edit of handbook/computing/netconfig.html

This commit is contained in:
Expo on server 2023-07-08 13:01:19 +01:00
parent 182f3092a1
commit 2147e5a11e

View File

@ -88,14 +88,14 @@ there is no IP6 connectivity to the external internet. Sorry. We are dependent o
<ul>
<li><samp>192.168.2.x</samp> The Gasthof wifi network
<li><samp>192.168.200.x</samp> The potato hut wifi network (or <samp>192.168.250.x</samp>)
<li><samp>10.0.1.x</samp> The network on the short bit of cable connecting the netbook with the Netgear box.
<li>The network on the longer length of cable connecting the Netgear box with the <var>expo laptop</var> (and sometimes the printer).
<li><samp>10.0.1.x</samp> The network on the short bit of cable connecting the netbook with the router.
<li>The network on the longer length of cable connecting the router with the <var>expo laptop</var> (and sometimes the printer).
</ul>
We bridge the hut wifi with the hut ethernet cable to the <var>expo laptop</var> so they are both <samp>192.168.200.x</samp>, but this is a matter of choice. This is configured inside the wifi/router using the webpage control panel.
<h4>Where the DNS happens</h4>
<p> DNS is what connects a computer name (such as <var>expo.survex.com</var>) with an internet address (such as <samp>78.129.164.125</samp>). To make the internet work, we need to tell every laptop and phone where to find a DNS nameserver, or what machine to ask in order to get DNS queries forwarded to a DNS nameserver.
<p>The DNS configuration happens in the netbook, using dnsmasq. The Netgear box just forwards DNS queries to the netbook, and tells laptops connected to the hut wifi to use that too.
<p>The DNS configuration happens in the netbook, using dnsmasq. The router just forwards DNS queries to the netbook, and tells laptops connected to the hut wifi to use that too.
<h4>Where the DHCP happens</h4>
<p>DHCP is what decides what the <samp>x</samp> is when the wifi issues an address that a laptop must use when it connects to the wifi as <samp>192.168.200.x</samp>.
@ -104,28 +104,27 @@ We bridge the hut wifi with the hut ethernet cable to the <var>expo laptop</var>
<li>2017-2019 : in the netbook.
<li>2022-2023 : in the router (Netgear or tp-link) box.
</ol>
<p>1. The benefit of doing it in the router box is that you get to play with a graphical web interface not text files. But also you can test that the Netgear box is working separately from everything else.
<p>2. The benefit of doing it in the netbook is that all the configuration is in the same place, and you only have to learn one way of doing things instead of having to use text files <em>and</em> a web interface. Also, by making the Netgear box completely dumb, it is swap-replaceable if it dies with no reconfiguration required.
<p>The DHCP is configured to issue IP addresses with <samp>x</samp> between 50 and 199, i.e. laptops and phones will get IP addresses between <samp>192.168.200.50</samp> and <samp>192.168.200.199</samp>. These may change after 12 hours.
<p>The router itself is <samp>192.168.200.1</samp>
<p>1. The benefit of doing it in the router box is that you get to play with a graphical web interface not text files. But also you can test that the router is working separately from everything else.
<p>2. The benefit of doing it in the netbook is that all the configuration is in the same place, and you only have to learn one way of doing things instead of having to use text files <em>and</em> a web interface. Also, by making the router completely dumb, it is swap-replaceable if it dies with no reconfiguration required.
<p>The DHCP is configured to issue IP addresses with <samp>x</samp> between 50 and 199, i.e. laptops and phones will get IP addresses between <samp>192.168.250.50</samp> and <samp>192.168.250.199</samp>. These may change after 12 hours.
<p>The router itself is <samp>192.168.250.1</samp>
<p>We also have the address <samp>192.168.200.100</samp> reserved for the expo laptop <em>crowley</em> in both routers.
<p>We also have the address <samp>192.168.250.200</samp> reserved for the expo laptop <em>crowley</em> in both routers.
<h4>Interfaces</h4>
<p>The netbook has two network interfaces: the Alfa wifi antenna (which is 'wlan1' and has an address 192.168.2.x issued by the Gasthof wifi system using DHCP)
plugged into a USB socket, and the netbook's ethernet cable socket (eth0) which is configured to have the address <samp>10.0.1.2</samp>.
wlan0 on the netbook is the internal wifi.
<p>The netbook also has a defunct interface 'wlan0' which is the internal wifi which is broken and unused.
However it can cause configuration problems (notably for the first few days of expo 2023). These are the runes to type on the netbook to stop it interfering:
<pre><code>sudo ip addr add 10.0.42.1/24 dev wlan0
sudo ip addr del 10.0.1.1/24 dev wlan0</code></pre>
<p>The Netgear box has its yellow ethernet cable socket set to the address <samp>10.0.1.1</samp>. The four other ethernet sockets are all on the address range <samp>192.168.200.x</samp> and the wifi network interface is set to <samp>192.168.200.1</samp> also in the network <samp>192.168.200.x</samp>.
<p>The router has its WAN (yellow or blue ethernet cable socket) set to the address <samp>10.0.1.1</samp>. The four other ethernet sockets are all on the address range <samp>192.168.250.x</samp> and the wifi network interface is set to <samp>192.168.250.1</samp> also in the network <samp>192.168.250.x</samp>.
<p>So the ethernet cable between the Netgear box and the netbook is <samp>10.0.1.1</samp> at the Netgear end and <samp>10.0.1.2</samp> at the netbook end. Nothing else uses any number like <samp>10.0.1.x</samp>.
<p>So the ethernet cable between the router and the netbook is <samp>10.0.1.1</samp> at the router end and <samp>10.0.1.2</samp> at the netbook end. Nothing else uses any number like <samp>10.0.1.x</samp>.
<p>The line
<pre><code>sudo ip addr del 10.0.1.1/24 dev wlan0</code></pre>
@ -145,8 +144,10 @@ the black WiFi antennae on the small black Alfa box are still upright and have n
<p>Test whether the netbook is actually running and responding by sitting at the <var>expo laptop</var> and logging into the netbook remotely. Do this in a terminal window:
<pre><code>ssh expo@tclaspire3.potatohut</code></pre>
or
<pre><code>ssh tclaspire3</code></pre>
<p>If you get a login prompt, the netbook is running. It is a slow machine so do not expect this to be instant.
<p>If you get a login prompt, the netbook is running. It is a slow machine so do not expect this to be instant. (You are logged in as 'expo' on the expo laptop so it automatically logs you in as 'expo' on the netbook.)
<p>Login to the netbook (as user 'expo' using the cavey:beery password) and type this at a prompt:
<pre><code>/root/fakenet/runfakenet</code></pre>
which will run the script to reconnect. This may take a minute to have the desired effect.