Print

NOIP Dynamic DNS - Ubiquiti Edge Router Lite

Posted in Networking

NOTE: This article is now void as firmware 1.7 for the edgerouter includes the ability to add custom dynamic dns hosts.

I’m a fan of ubiquiti products, great price point with a lot of good features, there’s a fair amount of documentation on the internet regarding their gear too, I had a bit of time over the weekend to look into setting up dynamic DNS on my Edge router lite. I did however run into a few hiccups. The documentation i came across was from 2013 and quite a few router firmware’s ago too. For the original instructions and credit goes to Marty, click here.

Firstly SSH on to your Edge Router **You could use the CLI option on the GUI but it seems a little bit lacking for my taste

We need to edit the dynamic DNS config file, this is located at "/opt/vyatta/sbin/vyatta-dynamic-dns.pl" to do this we also need to run the editor as the root user.

Issue the following command

sudo -u root vi /opt/vyatta/sbin/vyatta-dynamic-dns.pl

Once the vi editor has opened the config file hit 'a' to switch vi to be in edit mode. Then hash out the following line.

## $output .= "use=if, if=$interface\n\n\n";

Then either above or below the newly hashed out line enter the following

$output .= "use=web, web=checkip.dyndns.com/, web-skip='Current IP Address: '\n";

Once you have done this we then need to save the configuration. Do this by pressing ESC key and then typing

:wq

That is now the dynamic dns configuration file edited, we then need to configure the service.

set service dns dynamic interface eth1 service dyndns host-name YOURHOST.DOMAIN.COM
set service dns dynamic interface eth1 service dyndns server dynupdate.noip.com
set service dns dynamic interface eth1 service dyndns login NOIP.COM-USERNAME
set service dns dynamic interface eth1 service dyndns password NOIP.COM-PASSWORD

**Note: The password doesn’t seem to like special characters, so stick to letters and numbers if possible.

Issue the command

show dns dynamic status

Which then should return something similar to this below:

interface   : eth1

ip address   : 123.456.78.9

host-name   : home.google.com

last update : Thu Jan 1 08:00:00 1970

update-status: good

I am not sure why the date is out, but from what I read it is safe to ignore.

Differences from the original instructions;

  • It seems that NOIP has over the years changed their domain from no-ip.com to noip.com which I originally overlooked.
  • Dyndns have changed their check ip page contents from 'IP Address: ' to 'Current IP Address: '
  • With the noip.com domain name change the update server names also need to be changed to reflect this.

Also with my current firmware v1.6 it does have the ability to setup dynamic DNS via the GUI. However due to NOIP not being a provider option in the dynamic dns options it caused big problems with my configuration. I hope this helps someone out.

Print

Setup KRON reload task on Cisco 837

Posted in Networking

I needed to setup a scheduled maintenance window for my router to reboot on a regular basis for various reasons. After doing a bit of research into it, i found that it could be performed quite simply using a kron job.
See commands below:


configure terminal
kron occurrence RTR-MAINT-RELOAD at 03:30 recurring
policy-list RTR-MAINT-RELOAD
exit
!
kron policy-list RTR-MAINT-RELOAD
cli reload
end
write memory
!

These commands will set the router to reload every morning at 3:30am using a kron job that we created called RTR-MAINT-RELOAD. If you issue the command “show kron schedule” it will then display the next kron run time similar to this:
Kron Occurrence Schedule
RTR-MAINT-RELOAD inactive, will run again in 0 days 05:55:56 at 3 :30 on

Print

Locating a Host Port by IP Address

Posted in Networking

Log into a switch and ping the host's IP address, this logs the mac-address in the switches MAC table.

Run the command 'show ip arp 192.168.0.1' replacing 192.168.0.1 with the host's IP address.

This tells us the host's MAC address. To resolve this layer two address to a layer one "address" (i.e. port number), we need to query the MAC table.

locate-host-port-by-ip1

Run the command 'show mac address-table address xxxx.xxxx.xxxx' replacing the x's with the MAC address resolved from the previous command.

This command will show us 1 of 2 things. The first is the port the host is plugged into. The second is the port of the next switch the host could be plugged into. If the host is on another switch, telnet to the next switch and repeat the instructions from the beginning.

locate-host-port-by-ip2

Print

Cisco 3750 Stack SDM Templates

Posted in Networking

To fix issues with an SDM mismatch, issue the following commands to change the SDM templates. This usually happens when the 3750's are in a stack with a 12S as a master switch.

3750G-CORE#sh switch
Switch/Stack Mac Address : 5835.d9ba.4b80
H/W Current
Switch# Role Mac Address Priority Version State
----------------------------------------------------------
*1 Master 5835.d9ba.4b80 1 0 Ready
2 Member e840.40ec.f400 1 0 SDM MISMATCH

3750-CORE(config)# sdm prefer routing desktop
3750-CORE(config)# end
3750-CORE# wr
3750-CORE# reload

Print

Cisco 3750 Stack Switch Re-Numbering

Posted in Networking

Recntly i was required to replace a core with a Cisco 3750 stack. I have dealt with these switches before and never had any issues however i encountered problems today when it came to the switch numbering. I like to go the extra mile when it comes to setting up racks because alot of people don't do it properly in the first place which can cause all sorts of issues down the road. Simple things like changing the switch number to suit the physical order of the switches in a stacking scenario can make all the difference and prevent accidents happening when modifing a switch config.

Ideally you would see this sort of configuration when the switches are stacked:

Cisco3750Stack

However when i booted all my switches up they were all over the place. For example Switch number 1 from my diagram above was set to switch number 3 etc..

Cisco3750StackOutofOrder

To solve this problem i issued the following command

en
!
conf t
!
switch 3 renumber 1
!

The switch will then prompt you to confirm the switch renumber hit enter to confirm and then write the config and reload!