Member
Posts: 234
Registered: ‎10-07-2017
Kudos: 87
Solutions: 1

How to add a usg behind an isps modem without bridging

[ Edited ]

My guide is only for those like me who have a provider supplied modem whose LAN ip dhcp range is 192.168.1.x

 

192.168.1.1 is the default IP on a USG, so it conflicts with the providers modem

 
This is a quick write up for others like me, trying to connect and adopt a USG from behind an ISP supplied modem/router, in my case an ADSL wifi modem/router
 
Its especially for people like me who were once counting on being able to bridge the modem and then didnt readjust their cerebral functions when the location changed their requirements and modem bridging was off the cards..
 
I thnk this covers it, if anyone finds an error, please feel free to comment
 
1) With no other cables plugged into USG...
 
2) Connect PC to LAN port of USG
 
3) Connect via SSH into USG - 192.168.1.1 - user/pass: ubnt
 
4) Enter configure
 
5) Enter set interfaces ethernet eth1 address <ip/subnet range outside of modems default>/24 (in other words NOT 192.168.1.1/24 because of youre wanting to remove this and will do so in the next step -  i used 10.0.0.1/24).
 
6) Enter delete interfaces ethernet eth1 address 192.168.1.1/24 (entering the above wont fix it alone, you need to remove the conflicting range)
 
7) Enter commit

8) Wait until the session is disconnected, can take a little while
 
IMPORTANT!! - If you do not edit the default LAN Gateway/Subnet range before informing it will revert the changes made above when provisioning and put your USG in a disconnected state, and you'll have to start over...
 
9) On another PC or device (i used my phone with internet access as im using a cloud hosted controller) open your controller and go to Networks
 
10) Edit the existing default LAN's Gateway/Subnet to the ip/subnet range from Step 5 (as above i used 10.0.0.1/24)
 
11) Save the network settings
 
12) Connect cable from modem/existing router to USG's WAN port
 
13) On the PC connected to the USG, set your network adapter's ipv4 address to an ip in the ip range used in Step 5
 
14) SSH into USG using first ip in range used in Step 5 - user/pass: ubnt
 
15) Enter mca-cli
 
16) Enter set-inform http://<controller address>:8080/inform
 
 17) On the other PC or device (i used my phone with internet access as im using a cloud hosted controller), open the Devices page on the controller
 
18) You should shortly see the USG appear, click Adopt and wait - USG will go dark blue when adopted

19) Back on the PC connected to the USG, in SSH console, again enter set-inform http://<controller address>:8080/inform (this saves the inform address in the USG for good - needs to be successfully adopted before it will save it, hence the second instance of entering it)
 
20) You should now see the USG status change to Connected and your SSH session on the PC connected to the USG will disconnect
 

Please note: Once adopted properly adopted you cannot connect to the USG via SSH with the default ubnt user/pass, you have to use the device authentication user/pass at the bottom of Settings > Site in the controller, this is for security. The only other way to get back in is the papeclip in the reset hole in the USG, which, as you have guessed means doing this guide from the top again...

 
 
 
 
 
 
 
New Member
Posts: 3
Registered: ‎05-19-2017

Re: How to add a usg behind an isps modem without bridging

I tried to follow your  script but failed.

 

Steps 1 to 16 are all OK, with the following differences:

 

  • my existing network addresses are from 10.0.0.1 to 10.0.0.254
  • my ISP router is on 10.0.0.138
  • on steps 5 and 10 I assign IP address 10.0.0.140 to USG
  • my controller is on a Mac on my LAN with IP 10.0.0.100, not a Cloud Key...

On steps 17/18 the USG device never shows on the controller.

 

On the PC connected directly to the LAN port of USG, if I type 'show interfaces' through the SSH connection, I see that eth0 has an IP address the DHCP server assigns to it (a 10.0.0.x address) and eth1 has 10.0.0.140. But using a browser to connect to 10.0.0.140 I can see that it doesn't get internet access.

 

I can't move any forward. Can you help me?

 

Thanks in advance

 

 

Member
Posts: 234
Registered: ‎10-07-2017
Kudos: 87
Solutions: 1

Re: How to add a usg behind an isps modem without bridging

[ Edited ]

@vzmr82wrote:

I tried to follow your  script but failed.

 

Steps 1 to 16 are all OK, with the following differences:

 

  • my existing network addresses are from 10.0.0.1 to 10.0.0.254
  • my ISP router is on 10.0.0.138
  • on steps 5 and 10 I assign IP address 10.0.0.140 to USG
  • my controller is on a Mac on my LAN with IP 10.0.0.100, not a Cloud Key...

On steps 17/18 the USG device never shows on the controller.

 

On the PC connected directly to the LAN port of USG, if I type 'show interfaces' through the SSH connection, I see that eth0 has an IP address the DHCP server assigns to it (a 10.0.0.x address) and eth1 has 10.0.0.140. But using a browser to connect to 10.0.0.140 I can see that it doesn't get internet access.

 

I can't move any forward. Can you help me?

 

Thanks in advance

 

 


Sorry, slightly confused by your post, and well im not well, reformulating reply...please wait...

 

 
 
 
 
New Member
Posts: 3
Registered: ‎05-19-2017

Re: How to add a usg behind an isps modem without bridging

Thanks for all your notes.

My main objective is to assure all devices in my network, either directly connected to ISP router (which is DHCP server) and to USG (DHCP server off) are in the same subnet 10.0.0.x.

I followed your notes and those of https://help.ubnt.com/hc/en-us/articles/236281367-UniFi-How-to-Adopt-a-USG-into-an-Existing-Network .

The main question is that, for some reason, the USG does not connect to internet!
Member
Posts: 234
Registered: ‎10-07-2017
Kudos: 87
Solutions: 1

Re: How to add a usg behind an isps modem without bridging

[ Edited ]

@vzmr82wrote:

I tried to follow your  script but failed.

 

Steps 1 to 16 are all OK, with the following differences:

 

  • my existing network addresses are from 10.0.0.1 to 10.0.0.254
  • my ISP router is on 10.0.0.138
  • on steps 5 and 10 I assign IP address 10.0.0.140 to USG
  • my controller is on a Mac on my LAN with IP 10.0.0.100, not a Cloud Key...

On steps 17/18 the USG device never shows on the controller.

 

On the PC connected directly to the LAN port of USG, if I type 'show interfaces' through the SSH connection, I see that eth0 has an IP address the DHCP server assigns to it (a 10.0.0.x address) and eth1 has 10.0.0.140. But using a browser to connect to 10.0.0.140 I can see that it doesn't get internet access.

 

I can't move any forward. Can you help me?

 

Thanks in advance

 

 


  • on steps 5 and 10 I assign IP address 10.0.0.140 to USG

USG needs to be on a different subnet than router (its designed to replace the current router ideally anyways, and you'll normally be using the DHCP from the USG anyways - if youre trying to do it any other way youre making life far harder than it needs to be), so not 10.0.0.140 . Theoretically you could either:

 

reset the USG to its default and live with the LAN default 192.168.1.x range for your unifi gear behind the USG

 

or

 

if you had your heart set on a 10.x.x.x LAN range on the USG, set the eth1 interface to 10.0.1.1

 

btw "I see that eth0 has an IP address the DHCP server assigns to it (a 10.0.0.x address)" is fine, you just, as mentioned above, need the USG eth1 on anything other than the 10.0.0.x range...unless as ive just seen by your new post, youre trying to have all devices on the same subnet and the dhcp turned off on the USG...in other words maiking life more interesting/harder than it needs to be. Personally i wouldnt do it that way...negates half the reason of having the USG in my view, and more extra config etc

 

As to why you cant get internet, you'll need to set each network you created in the controller to use the external dhcp (& dns?) server, this is outside of my guide, and my guide isnt for people looking to do what you are sorry, thats why its titled How to add a usg behind an isps modem without bridging....and not How to add a usg behind an existing router (and turning off the USG's DHCP and using an external DHCP server), which is why i earlier posted:

 

https://help.ubnt.com/hc/en-us/articles/236281367-UniFi-How-to-Adopt-a-USG-into-an-Existing-Network

 

Yers, while the basic principles are the same, at no point in my guide do i say im turning off the USG's DHCP and using an external DHCP server Man Happy

 
 
 
 
 
New Member
Posts: 3
Registered: ‎05-19-2017

Re: How to add a usg behind an isps modem without bridging

Thanks for your notes and feedback.

 

I will get back to it tomorrow or during next weekend,and post final results.

New Member
Posts: 2
Registered: ‎10-07-2017
Kudos: 1

Re: How to add a usg behind an isps modem without bridging

Your write-up helped me a lot!

 

However, I had some problems getting the adoption to go through. In my first tries, the controller would list the USG and allow me to press "Adopt", but it'd stay on that status for a long time before finally saying status "Disconnected". After going back to the USG to set inform address again, it would show up again as not adopted.

 

My solution was to execute step 19 only some 20 seconds after pressing "Adopt" in the Controller GUI (I use cloud access to a remote site) and doing so 4-5 times with some 20 seconds intervals before the SSH-session finally dropped (indicating update of the SSH-user).

Member
Posts: 234
Registered: ‎10-07-2017
Kudos: 87
Solutions: 1

Re: How to add a usg behind an isps modem without bridging

[ Edited ]

@mdonata wrote:

Your write-up helped me a lot!

 

However, I had some problems getting the adoption to go through. In my first tries, the controller would list the USG and allow me to press "Adopt", but it'd stay on that status for a long time before finally saying status "Disconnected". After going back to the USG to set inform address again, it would show up again as not adopted.

 

My solution was to execute step 19 only some 20 seconds after pressing "Adopt" in the Controller GUI (I use cloud access to a remote site) and doing so 4-5 times with some 20 seconds intervals before the SSH-session finally dropped (indicating update of the SSH-user).


Yup, that second commit can sometimes take a while or several goes to get to stick, sometimes down to your internet conenction, sometimes just becasue its Unifi Man Happy

 

I had a USG fresh out of the box recently that would not save the config with commit...in the end i upgraded it locally before trying again...theres always a little curveball it seems with USG's...noen of the other gear has ever been as finicky

 

Meanwhile the good ness is that we're almost a year down the road running several sites behind unbridged modems and have never had an issue with connectivity....