SSH into a device with ubnt
if not adopted
$ ssh [email protected]
Welcome to EdgeOS
SSH into a device with user
if adopted with user/pass from controller
$ ssh [email protected]
Welcome to EdgeOS
Get device info
$ info
Model: UAP-nanoHD
Version: 5.60.18.13041
MAC Address: b4:fb:e4:29:42:f1
IP Address: 192.168.1.103
Hostname: UAP-nanoHD
Uptime: 2013 seconds
Status: Connected (http://192.168.1.10:8080/inform)
Get device logs
$ tail -f /var/log/messages
Nov 15 16:37:04 ubnt mcad: mcad[1922]: ace_reporter.reporter_fail(): Unable to resolve (http://unifi:8080/inform)
Set inform for adoption
$ set-inform http://192.168.1.10:8080/inform
Adoption request sent to 'http://192.168.1.10:8080/inform'.
Factory reset device AP
$ syswrapper.sh restore-default
The system is going down for reboot NOW!
Factory reset device switch
$ set-default
The system is going down for reboot NOW!
Show BGP peers
$ show ip bgp
Show summary of BGP peers
$ show ip bgp summary
Show BGP peers for a specific neighbor
$ show ip bgp neighbors 192.168.1.10
Setting peers manually
$ configure
# set protocols bgp 64501 parameters router-id 192.168.1.1
# set protocols bgp 64501 neighbor 192.168.1.10 remote-as 64500
# show protocols bgp
# commit
# save
# exit
Setting peers with config.gateway.json
{
"protocols": {
"bgp": {
"64501": {
"neighbor": {
"192.168.1.10": { "remote-as": "64500" }
},
"parameters": {
"router-id": "192.168.1.1"
}
}
}
}
}
Show DHCP leases
$ show dhcp leases
IP address Hardware Address Lease expiration Pool Client Name
---------- ---------------- ---------------- ---- -----------
Clear DHCP leases
$ clear dhcp leases
Stopping DHCP server daemon...
Starting DHCP server daemon...