Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
network_protocol_programming_lab:2_2_access_general [2022/04/13 16:18] – created fangenoorth | network_protocol_programming_lab:2_2_access_general [2022/04/18 17:37] (current) – [Internet Connection sharing via USB] fangenoorth | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | This page is still being built!! | ||
- | |||
- | |||
====== Accessing the BeagleBone Black ====== | ====== Accessing the BeagleBone Black ====== | ||
- | As already mentioned the default username is **debian** and the default password is **temppwd**. You might want to change these with the '' | + | The default username |
Now we need a way to access our freshly installed Debian OS. There are three possible ways to do so: | Now we need a way to access our freshly installed Debian OS. There are three possible ways to do so: | ||
Line 64: | Line 61: | ||
==== Internet Connection sharing via USB ==== | ==== Internet Connection sharing via USB ==== | ||
+ | |||
+ | It is possible to share the internet connection (e.g. via ethernet or WiFi) with the BeagleBone Black. On Linux this works consistently and also with multiple BeagleBones connected at the same time. On Windows it works a little less consistent and so far we could only make it work with one BeagleBone at a time (you can SSH into both BeagleBones at the same time, but only one of them will be able to access the internet). This setup might be useful for you if you are unable to plug the BeagleBones into a router via ethernet. Note that the connection speed will be rather limited, usually around '' | ||
+ | |||
+ | A tutorial on how to set this up on a Windows host can be found [[https:// | ||
+ | |||
+ | === Connection sharing on a Linux host === | ||
+ | |||
+ | Run the following commands as '' | ||
+ | |||
+ | <code bash> | ||
+ | sysctl net.ipv4.ip_forward=1 | ||
+ | iptables --table nat --append POSTROUTING --out-interface <host interface to be shared> -j MASQUERADE | ||
+ | iptables --append FORWARD --in-interface < | ||
+ | </ | ||
+ | |||
+ | These commands enable forwarding of IP packets between the interfaces, where your host PC does NAT. | ||
+ | |||
+ | Now we need to configure the forwarding on the BeagleBones. So enter the following as '' | ||
+ | |||
+ | <code bash> | ||
+ | ip route add default via 192.168.6.1 | ||
+ | echo " | ||
+ | </ | ||
+ | |||
+ | The first commands sets a default route, so that all outgoing IP packets get sent to the host PC. Note that you might have to change the third octet of the IP address if you have connected multiple BeagleBones via USB and changed their IP addresses earlier. The second command configures a DNS server to enable the BeagleBones to resolve domain names. | ||
+ | |||
+ | Now the BeagleBone(s) should be connected to the internet. You can verify this by executing '' | ||
+ | |||
+ | Note that these settings are not persistent across reboots. You have to enter all commands, on your host as well as on the BeagleBones, | ||
+ |