Community discussions

MikroTik App
 
hhoeth
just joined
Topic Author
Posts: 21
Joined: Wed Oct 17, 2018 11:22 am

Trouble connecting u-boot to a RB922

Wed Oct 17, 2018 11:58 am

Hi!

(EDIT: For a work-around, see my answer below. Nevertheless, I still want to understand what's going on here, so if you have any clue, please let me know!)

I've got some trouble with u-boot running on an ARM board connecting to a RB922UAGS-5HPacD, and I'm not sure where I should start digging. Everything works fine if I connect to a CRS125-24G-1S or if there is another switch between the RB922 and my ARM board, but with a straight cable between the two, they refuse to talk to each other. This is my setup:
  • Orange Pi PC Plus (Allwinner H3) with u-boot 2017.11-armbian shall load the Linux kernel using tftp.
    Relevant configuration / commands:
      setenv ipaddr 192.168.3.74
      setenv serverip 192.168.3.73
      tftpboot 0x44000000 some_file.scr
    
  • RB922UAGS-5HPacD relevant configuration:
      /ip address add address=192.168.3.73/24 interface=ether1
      /interface ethernet set [ find default-name=ether1 ] disabled=no
      /ip tftp add ip-addresses=192.168.3.0/24 allow-rollover=yes req-filename=some_file.scr real-filename=some_file.scr read-only=yes
    
If I connect Orange Pi and RB922 with a straight ethernet cable, I can see the link coming up on the RB922 (100M-half), but u-boot can't ping the RB922 and tftp times out.

If I put a switch between the Orange Pi and the RB922, everything works fine. I've tried this with a cheap unmanaged Gbit-switch as well as with my CRS125.

If I connect the Orange Pi directly to the CRS125 and configure tftp on the CRS125, everything works fine, too. Note that the configuration of the CRS125 is not exactly the same as the RB922:
  /interface bridge add admin-mac=XX:XX:XX:XX:XX:XX auto-mac=no fast-forward=no name=bridge-lan
  /interface bridge port add bridge=bridge-lan interface=ether2
  /interface bridge port add bridge=bridge-lan interface=ether3
  /interface bridge port add bridge=bridge-lan interface=ether4   etc.
  /ip address add address=192.168.3.1/24 interface=bridge-lan network=192.168.3.0
  /ip tftp add ip-addresses=192.168.3.0/24 allow-rollover=yes req-filename=some_file.scr real-filename=some_file.scr read-only=yes
  # (yes, I changed "serverip" in u-boot for this test)
Once the Linux kernel is up and running, the straight connection between Orange Pi and RB922 works fine. It's just u-boot, and only with a direct connection to the RB922.

Any clues what I should have a closer look at? Do you need more information?

Thanks a lot,

Hendrik
Last edited by hhoeth on Wed Oct 17, 2018 2:21 pm, edited 1 time in total.
 
hhoeth
just joined
Topic Author
Posts: 21
Joined: Wed Oct 17, 2018 11:22 am

Re: Trouble connecting u-boot to a RB922

Wed Oct 17, 2018 2:19 pm

Update: I've found a work-around, but I'd still like to know what's going on here. If I change the RB922 configuration from
/ip address add address=192.168.3.73/24 interface=ether1
to
/interface bridge add name=bridge-lan
/interface bridge port add bridge=bridge-lan interface=ether1 
/ip address add address=192.168.3.73/24 interface=bridge-lan
everything works fine. So what is happening here?
 
User avatar
pukkita
Trainer
Trainer
Posts: 3051
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: Trouble connecting u-boot to a RB922

Wed Oct 17, 2018 2:21 pm

If I connect Orange Pi and RB922 with a straight ethernet cable, I can see the link coming up on the RB922 (100M-half), but u-boot can't ping the RB922 and tftp times out.
That's the first thing I'll troubleshoot, why half duplex? try issuing some "ip link" commands or whatever appropiate for the OS being used on the Orange to see why is not negotiating full duplex, looks like a autonegotiation issue.

how does it negotiate the port when plugged to the CRS125?

What's the ROS and firmware version of the RB922?
 
User avatar
pukkita
Trainer
Trainer
Posts: 3051
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: Trouble connecting u-boot to a RB922

Wed Oct 17, 2018 2:24 pm

Update: I've found a work-around, but I'd still like to know what's going on here. If I change the RB922 configuration from
/ip address add address=192.168.3.73/24 interface=ether1
to
/interface bridge add name=bridge-lan
/interface bridge port add bridge=bridge-lan interface=ether1 
/ip address add address=192.168.3.73/24 interface=bridge-lan
everything works fine. So what is happening here?
Shouldn't make a difference,
 /ip address add address=192.168.3.73/24 interface=ether1
  /interface ethernet set [ find default-name=ether1 ] disabled=no
  /ip tftp add ip-addresses=192.168.3.0/24 allow-rollover=yes req-filename=some_file.scr real-filename=some_file.scr read-only=yes
Should work too (ether1 being an standalone port not added to any bridge)
 
hhoeth
just joined
Topic Author
Posts: 21
Joined: Wed Oct 17, 2018 11:22 am

Re: Trouble connecting u-boot to a RB922

Wed Oct 17, 2018 2:28 pm

If I connect Orange Pi and RB922 with a straight ethernet cable, I can see the link coming up on the RB922 (100M-half), but u-boot can't ping the RB922 and tftp times out.
That's the first thing I'll troubleshoot, why half duplex? try issuing some "ip link" commands or whatever appropiate for the OS being used on the Orange to see why is not negotiating full duplex, looks like a autonegotiation issue.

how does it negotiate the port when plugged to the CRS125?
u-boot on the Orange Pi negotiates half duplex with both the RB922 and the CRS125. Once the Linux kernel is loaded, this changes to full-duplex. I guess that's a limitation of the network device driver implemented in u-boot (which is just a bootloader, not a full OS). It also negotiates half duplex with the RB922 if I use the bridge configuration described in my second post.
What's the ROS and firmware version of the RB922?
I'm running 6.43.2 on both the RB922 and the CRS125.
 
hhoeth
just joined
Topic Author
Posts: 21
Joined: Wed Oct 17, 2018 11:22 am

Re: Trouble connecting u-boot to a RB922

Wed Oct 17, 2018 2:39 pm

Shouldn't make a difference,
 /ip address add address=192.168.3.73/24 interface=ether1
  /interface ethernet set [ find default-name=ether1 ] disabled=no
  /ip tftp add ip-addresses=192.168.3.0/24 allow-rollover=yes req-filename=some_file.scr real-filename=some_file.scr read-only=yes
Should work too (ether1 being an standalone port not added to any bridge)
That's what I thought. But for some reason it doesn't work with ether1 configured as a stand-alone port and no bridge. If you are interested in more details (e.g. the full configuration setup or any kind of debug log), I'm happy to provide it.

Who is online

Users browsing this forum: gangjeleski and 92 guests