diff options
-rw-r--r-- | readme.md | 54 |
1 files changed, 40 insertions, 14 deletions
@@ -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. |