How to Set Static IP on CBRIDGE Controller Pi?

519 views
Skip to first unread message

Danno Rizzuto

unread,
Jun 16, 2020, 12:03:16 AM6/16/20
to ClusterHAT
I am trying to set a static IP address on my controller Pi.  I have chosen to use the CBRIDGE image as I want my 4 Zero's to be reachable on my local network.

I have done as I usually do and edited my /etc/dhcpcd.conf file to have:

interface eth0
static ip_address=192.168.1.90/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1

however when I do this and reboot the system, the raspberry Pi is no longer reachable.  When I check my router I see that the raspberry pi is listed at that IP Address, however I am unable to SSH into it or Ping it.  When I tried this with CNAT I was able to change the IP address to static, but there seems to be something with CBRIDGE images preventing me from doing so.  

how can i go about setting a static IP address on my CBRIDGE Controler Pi?

Chris Burton

unread,
Jun 16, 2020, 3:29:32 AM6/16/20
to ClusterHAT
Hi, 
how can i go about setting a static IP address on my CBRIDGE Controler Pi?

When you're using "CBRIDGE" the IP address of the controller Pi should be on the "br0" bridge interface.

In /etc/dhcpcd.conf you can either alter the existing fallback configuration "clusterctrl_fallback_br0" or remove the fallback line and configure the static IP in the "interface br0" section.

Chris.

Danno Rizzuto

unread,
Jun 16, 2020, 11:07:54 PM6/16/20
to ClusterHAT
Thank you Chris, worked a charm!

Danno Rizzuto

unread,
Jul 30, 2020, 10:33:01 AM7/30/20
to ClusterHAT
Hello, So i have done this on my machine and it looks like:

enyinterfaces ethpi* ethupi* ethupi*.10 brint usb0.10 eth0

profile clusterctrl_fallback_usb0
static ip_address=172.19.181.253/24 #ClusterCTRL
static routers=172.19.181.254
static domain_name_servers=8.8.8.8 208.67.222.222

profile clusterctrl_fallback_br0
static ip_address=172.19.181.254/24

interface usb0
fallback clusterctrl_fallback_usb0

interface br0
static ip_address=192.168.1.90/24
static routers=192.168.1.1
statuc domain_name_severs=8.8.8.8 192.168.0.1

I have now flashed image 1 and 2 of the Lite Combined zip file and have turned on the ports for them on cluster hat.  When I ping them from the source raspbberry pi (clusterhat pi) I do not get a response and it just hangs. Is setting a static IP breaking the connection between the main pi and the zeros?

On Tuesday, June 16, 2020 at 2:29:32 AM UTC-5, Chris Burton wrote:

Danno Rizzuto

unread,
Jul 30, 2020, 10:34:24 AM7/30/20
to ClusterHAT
please note:

denyinterfaces ethpi* ethupi* ethupi*.10 brint usb0.10 eth0

profile clusterctrl_fallback_usb0
static ip_address=172.19.181.253/24 #ClusterCTRL
static routers=172.19.181.254
static domain_name_servers=8.8.8.8 208.67.222.222

profile clusterctrl_fallback_br0
static ip_address=172.19.181.254/24

interface usb0
fallback clusterctrl_fallback_usb0

interface br0
static ip_address=192.168.1.90/24
static routers=192.168.1.1
static domain_name_severs=8.8.8.8 192.168.0.1

Chris Burton

unread,
Jul 30, 2020, 3:55:06 PM7/30/20
to ClusterHAT
Hi, 
I have now flashed image 1 and 2 of the Lite Combined zip file and have turned on the ports for them on cluster hat.  When I ping them from the source raspbberry pi (clusterhat pi) I do not get a response and it just hangs. Is setting a static IP breaking the connection between the main pi and the zeros?

For the controller to be able to communicate with the Pi Zeros they'd need to have an IP in the same subnet (192.168.1.0/24) - did you also set a static IP on those too (in /etc/dhcpcd.conf on each Pi Zero) ?

Chris.

Danno Rizzuto

unread,
Jul 30, 2020, 4:01:17 PM7/30/20
to ClusterHAT
I plan to, but have not yet.  I have changed the ip address on the main controller first.  I have no way of setting the IP address on the pi zeros as i cannot ssh into them.

It sounds like to me this is what i need to do:

1) install images on all raspberry pi's

2) enable ssh on all of them via adding ssh in boot for all of them

3) Boot up controller pi and connect via ssh

4) turn on ports for pi zeros

5) SSH into the pi zeros and change their IP addresses to the subnet
*at this point the raspberry pi zeros will not work as they are not in the same subnet of the controller 

6) ssh into the main controller and change the IP address to the subnet
*now that the controller and zeros are on the subnet it should all work with a reboot

Is this the correct workflow to have?  

Chris Burton

unread,
Jul 30, 2020, 5:11:43 PM7/30/20
to ClusterHAT
Hi, 
Is this the correct workflow to have?  

That would work, or you can connect to the Pi Zeros over the USB Gadget Serial with "minicom p1" or "screen /dev/ttypi1 115200" etc. then press enter and wait for a login prompt and update the config files that way.

Chris. 

Danno Rizzuto

unread,
Jul 30, 2020, 8:30:38 PM7/30/20
to ClusterHAT
Hmm, i think i may have a bad understanding of what is going on.  I am trying to set the IP addresses on all of the pis, the controllers and the zeros.  You have helped immensely with the controller pi.  I am unable to connect to the Pi Zeros though.

My understanding is that the CBRIDGE Builds will allow the zeros to get a dynamic IP from my router after I turn them on from my controller pi.  When install the cbrdge images from the zip and turn them on via the controller, they do not show up on my routers device page.  i see the controler pi set with a dynamic IP, but no zeros.

Am I misunderstanding something?  Arent the pi zeros supposed to be given a dynamic IP?

Chris Burton

unread,
Jul 31, 2020, 4:05:50 AM7/31/20
to ClusterHAT
Hi, 
Hmm, i think i may have a bad understanding of what is going on.  I am trying to set the IP addresses on all of the pis, the controllers and the zeros.  You have helped immensely with the controller pi.  I am unable to connect to the Pi Zeros though.

My understanding is that the CBRIDGE Builds will allow the zeros to get a dynamic IP from my router after I turn them on from my controller pi.  When install the cbrdge images from the zip and turn them on via the controller, they do not show up on my routers device page.  i see the controler pi set with a dynamic IP, but no zeros.

From this is sounds like you're installing the cbridge image on the Pi Zeros? You would need to write the p1/p2/p3/p4 images on the Pi Zeros (they work with both CNAT/CBRIDGE) - if you have the cbridge image on the Pi Zeros the USB port would be configured as a host rather than a device so they wouldn't be accessible over USB via serial or ethernet.

But yes, with the CBRIDGE image on the controller and the p1-p4 images on the Pi Zeros and an Ethernet cable plugged into your LAN they will all try to get an IP from the DHCP server on the LAN from your router for ex.

But if you're still having problems it might be worth running through the troubleshooting guide https://8086.support/content/23/115/en/troubleshooting-missing-pi-zeros-in-a-clusterhat.html to make sure everything is connected up OK.

Chris.
Message has been deleted

dgrs...@gmail.com

unread,
Aug 31, 2020, 6:26:40 PM8/31/20
to ClusterHAT
Still unable to get it to work.  The below is configured with all clean installs

Cluster Pi 3 B+ : ClusterCTRL-2020-02-13-lite-1-CBRIDGE
Pi Zero 1 : ClusterCTRL-2020-02-13-lite-1-p1
Pi Zero 2 : ClusterCTRL-2020-02-13-lite-1-p2

When I went through the trouble shooting, I found I do not have any the interfaces listed in sudo ifconfig -a (see attached image).

Unsure why this wont work.  I simply install the images on the 3 sd cards, plug in the sd cards to the correct Pis, and start the cluster pi and look for the Pi Zeros.  I am not finding them.  I am not doing any configuration at this point.  I am jsut trying to power everything on and see if they appear on the network.  No Pi Zeros appear on network.

pi@cbridge:~ $ sudo ifconfig -a
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.16  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::cfb3:2bf:a180:aa77  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:01:4f:8d  txqueuelen 1000  (Ethernet)
        RX packets 849  bytes 226162 (220.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 114  bytes 15617 (15.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

brint: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.19.180.254  netmask 255.255.255.0  broadcast 172.19.180.255
        inet6 fe80::7c46:afff:fea5:98bd  prefixlen 64  scopeid 0x20<link>
        ether 7e:46:af:a5:98:bd  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 39  bytes 4791 (4.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether b8:27:eb:01:4f:8d  txqueuelen 1000  (Ethernet)
        RX packets 871  bytes 240198 (234.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 114  bytes 15617 (15.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether b8:27:eb:54:1a:d8  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0



Chris Burton

unread,
Aug 31, 2020, 7:06:53 PM8/31/20
to ClusterHAT
Hi, 
When I went through the trouble shooting, I found I do not have any the interfaces listed in sudo ifconfig -a (see attached image).

Unsure why this wont work.  I simply install the images on the 3 sd cards, plug in the sd cards to the correct Pis, and start the cluster pi and look for the Pi Zeros.  I am not finding them.  I am not doing any configuration at this point.  I am jsut trying to power everything on and see if they appear on the network.  No Pi Zeros appear on network.

If you went through the troubleshooting steps and you saw the hub on the ClusterHAT in step 3 and the USB devices in step 6, then it points to a problem with the SD card or the image written to it - I'd try downloading and flashing them again (using a different card if you have a spare one).

Chris.

dgrs...@gmail.com

unread,
Sep 4, 2020, 1:19:21 AM9/4/20
to ClusterHAT
I was able to figure out the problem.  I do think switching the cards helped.

Can you advise what value I would need to change on the Pi Zero's to set a static IP address?

Chris Burton

unread,
Sep 4, 2020, 4:35:05 AM9/4/20
to ClusterHAT
Hi,
I was able to figure out the problem.  I do think switching the cards helped.

Great :).
 
Can you advise what value I would need to change on the Pi Zero's to set a static IP address?

On the Pi Zeros the static IP needs to be set on the usb0  interface in /etc/dhcpcd.conf (and on the controller br0 for CBRIDGE and either eth0 or wlan0 for CNAT depending on how you're connecting it).

See the "Static IP address" section in https://www.raspberrypi.org/documentation/configuration/tcpip/ (replacing eth0 with usb0).

So basically in /etc/dhcpcd.conf change

interface usb0
fallback clusterctrl_fallback_usb0

To

interface usb0
#fallback clusterctrl_fallback_usb0
static ip_address=192.168.0.4/24
static routers=192.168.0.254
static domain_name_servers=192.168.0.254 8.8.8.8  

Chris. 

dgrs...@gmail.com

unread,
Oct 1, 2020, 12:36:19 AM10/1/20
to ClusterHAT
Back again, hope you didnt miss me too much.

I thought I had the solution:

Pi Zero Config for p1 and p2

interface usb0
#fallback clusterctrl_fallback_usb0
static ip_address=192.168.1.91/24
static routers=192.168.0.254
static domain_name_servers=192.168.0.254 8.8.8.8

interface usb0
#fallback clusterctrl_fallback_usb0
static ip_address=192.168.1.92/24
static routers=192.168.0.254
static domain_name_servers=192.168.0.254 8.8.8.8

Pi Cbridge Config

interface br0
#fallback clusterctrl_fallback_br0
static ip_address=192.168.1.90
static routers=192.168.1.1
static domain_name_servers=8.8.8.8

It seemed to be working for a little bit, where I was able to SSH into the p1 and p2.  However I came back the next day and now I cannot.  I can login to my Cbridge pi.  When I try to use minicom p1 or minicom p2 to connect from CBridge I get 

minicom: cannot open /dev/ttypi1: No such file or directory

Recap:  i had it working with the above settings, then it stopped working.  I cannot trouble shoot as minicom p1 and minicom p2 does not work.

Message has been deleted

Chris Burton

unread,
Oct 2, 2020, 3:59:47 AM10/2/20
to ClusterHAT
Hi, 
minicom: cannot open /dev/ttypi1: No such file or directory

Recap:  i had it working with the above settings, then it stopped working.  I cannot trouble shoot as minicom p1 and minicom p2 does not work.

If you don't have a /dev/ttypi1 then it can't see the Pi, so it's not a network config issue.


If everything in the guide looks OK what new lines do you get in /var/log/kern.log and /var/log/daemon.log within the first minute or so after powering on one of the Pi Zeros?

Chris.
Reply all
Reply to author
Forward
0 new messages