Before you start
This guide sets up two Milesight UG65 gateways as a Gateway Fleet, so the second gateway extends the coverage of the first. Same sensors, one network server
What you need:
- Two UG65 gateways on the same local network (we used firmware 60.0.0.50, region AS923-1)
- UG65 #1 already working with your sensors and Beaver IoT (Milesight Gateway Embedded NS integration)
- Web login for both gateways
- Access to your router or firewall's DHCP settings
Gateway | Role | What it does |
|---|---|---|
UG65 #1 | Controller | Runs the network server. Sensors stay registered here. Sends data to Beaver IoT. |
UG65 #2 | Agent | Listens and forwards to UG65 #1. Its own network server is turned off. |
Objective
- Extend coverage so sensors out of UG65 #1’s range still reach Beaver IoT through UG65 #2.
- Keep data flowing if one agent gateway goes down, provided that the controller gateway is online
How Gateway Fleet works
Gateway Fleet makes one gateway the brain and the other a relay, so a sensor is registered once but heard by both
Step 1: Give UG65 #1 a fixed IP
- Log in to your router or firewall
- Open the DHCP client list and find UG65 #1 (check the MAC address on the gateway's label or on its Status page)
- Create a DHCP reservation for it
- Write down the IP. We'll call it the controller IP from here on
On our FortiGate: Dashboard → Network → DHCP Monitor, right-click UG65 #1, then Create/Edit DHCP Reservation

Step 2: Get UG65 #2's Gateway ID
UG65 only accept the agent gateway through their ID
- Log in to UG65 #2's web page. https://[UG65 IP ADDRESS]/login.html
- Go to Packet Forwarder → General
- Copy the Gateway EUI (16 characters, for example 24E124FFFEF0xxxx)
Step 3: Point UG65 #2 to UG65 #1
- On UG65 #2, go to Packet Forwarder → General
- Under Multi-Destination, click the + to add a destination
Fill it in:
- Enable: on
- Type: Remote Embedded NS
- Server Address: the controller IP from Step 1
- Port: 18883 (Gateway Fleet's port, keep the default)
- Click Save
- In the same list, find the existing Embedded NS entry (the local one) and turn it off
- Click Save & Apply
When you're done, the list should show only one enabled destination: Remote Embedded NS

Step 4: Add UG65 #2 on UG65 #1
- Log in to UG65 #1.
- Go to Network Server → Gateway Fleet.
- Click + to add a gateway.
- Paste the Gateway ID from Step 2 and give it a name (we used UG65-2).
- Click Save & Apply
Step 5: Check that it's connected
- Stay on Network Server → Gateway Fleet on UG65 #1.
- Wait about a minute and refresh.
- UG65 #2 should show as Connected.
You don't need to add the sensors again. They stay registered on UG65 #1, and UG65 #2 just passes their packets along

Step 6: Test coverage
- On UG65 #1, go to Network Server → Packets
- Look at the Gateway ID column. It shows which gateway received each message
- Take a sensor out of UG65 #1's range, near UG65 #2
- Its messages should now come in with UG65 #2's Gateway ID
Step 7: Test failover
- Unplug UG65 #2
- Sensors still in UG65 #1's range keep reporting as normal
- Plug UG65 #2 back in. It reconnects by itself and shows Connected again within a minute or two
Note: this only works one way. If UG65 #1 goes down, data stops, because it's the only network server and controller gateway
Frequently Asked Questions(FAQ)
- UG65 #2 shows Disconnected: check Step 3. Remote Embedded NS must be enabled and the local Embedded NS disabled.
- Messages only ever show UG65 #1's Gateway ID: the sensor is still in UG65 #1's range. Move it further away