aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2024-05-07 16:58:55 +0200
committerlonkaars <loek@pipeframe.xyz>2024-05-07 16:58:55 +0200
commit466e2aad64e39c266d242ef3f17a61b885ed7f59 (patch)
treec99181cf5bceea585694e6fd1e72e0b44429cbc9
parent847e84b6548115ff7f27fd7205b64a6341f0afa5 (diff)
test and improve direct ethernet instructions
-rw-r--r--readme.md54
1 files changed, 40 insertions, 14 deletions
diff --git a/readme.md b/readme.md
index 0a96337..c21b853 100644
--- a/readme.md
+++ b/readme.md
@@ -37,27 +37,53 @@
You can use NetworkManager to both share your computer's existing network
connection and start a DHCP server for assigning IP addresses automatically.
-This allows you to ssh into the BeagleBone, as well as share your internet
-connection over a single direct ethernet connection.
+This allows you to `ssh` into the BeagleBone, as well as share your internet
+connection (even eduroam!) over a single direct ethernet connection.
1. Connect the BeagleBone to your computer using an ethernet cable, and make
sure the BeagleBone is on. The ethernet port's link lights should start
blinking.
-2. Run `nmcli device` on your computer, the shortest device name starting with
- `enp` or `eth` is likely your ethernet port's name:
+2. Run `nmcli device` on your computer, note the name of the **connection** on
+ the ethernet port:
```
$ nmcli device
- DEVICE TYPE STATE CONNECTION
- enp0s25 ethernet connected enp0s25
- wlan0 wifi connected wifi
- lo loopback connected (externally) lo
+ DEVICE TYPE STATE CONNECTION
+ wlan0 wifi connected eduroam
+ enp0s25 ethernet connecting (getting IP configuration) Wired connection 1
+ lo loopback connected (externally) lo
```
- (in my case, the adapter is enp0s25)
-3. Run `nmcli connection modify ADAPTER ipv4.method shared ipv4.addresses
- 192.168.2.2/24` (replace ADAPTER with the ethernet adapter name you found).
-4. Run `nmcli device connect ADAPTER`.
-5. (Optional) run `nmap -sn 192.168.2.0/24` **as root** to find the IP address
- the BeagleBone got.
+ (the automatically generated name `Wired connection 1` is the ethernet
+ connection to the BeagleBone)
+3. Run the following command to enable sharing on this port (replace NAME with
+ the connection name you found).
+
+ ```
+ $ nmcli connection modify NAME ipv4.method shared ipv4.addresses 192.168.2.2/24
+ ```
+
+ This assigns the ip address 192.168.2.2 to your computer, and gives the
+ BeagleBone an address in the 192.168.2.0/24 range (edit this only if it
+ conflicts with another subnet).
+4. Run the following command to to activate the connection.
+
+ ```
+ $ nmcli connection up NAME
+ ```
+
+5. (Optionally) use `nmap -sn 192.168.2.0/24` **as root** to find the IP
+ address the BeagleBone got, or just connect to the BeagleBone using the
+ hostname you configured before (in `/etc/hostname` on the BeagleBone).
+6. Profit
+
+When you're done doing stuff on the BeagleBone, and want to reverse all the
+above changes, simply run:
+
+```
+$ nmcli connection delete NAME
+```
+
+NetworkManager will automatically re-configure the ethernet connection for
+regular use the next time you plug in an ethernet cable.