How to add an wireless extender/repeater to your home network if MAC filtering is enabled on router

If you enabled MAC filtering on the router, there is a little bit of extra work needed to be done before you start installing the extender.

  1. Here i am using DAP-1620 Dual band Extender from D-Link
  2. We need Mac address of the device (MAC ID).
    On D-Link extenders, Ethernet port & 2.4 GHz , 5 GHz each has separate MAC address. On the device you will see only Ethernet or 2.4 GHz MAC Address, it is OK if you have single band extender but if it is dual band extender like DAP-1620 or DAP-1860, individual mac address can be found from 192.168.0.50/version.txt
  3. Connect your computer to extender wi-fi network. Once connected, go to the default IP address of extender 192.168.0.50. You don’t have to start doing setup wizard. Instead go to http://192.168.0.50/version.txt
  4. Note down the MAC address, here
    LAN & 2.4 GHz 10:BE:F5:50:C1:A0
    5 GHz 10:BE:F5:50:C1:A2
  5. Wireless extenders usually use something called “Virtual MAC address”, the exact term is “Locally administered MAC address”.
    These MAC addresses can be used by any one locally in the network, similar to private IP’s like 10.0.0.0/8 or 192.168.0.1/16

    These are the usual virtual MAC address
    x2-xx-xx-xx-xx-xx 
    x6-xx-xx-xx-xx-xx
     xA-xx-xx-xx-xx-xx 
    xE-xx-xx-xx-xx-xx

    Warning : Technical stuff

Lets says the real Mac address, here 10:BE:F5 :50:C1:A0

10:BE:F5:50:C1:A0, first 24 bit (first 3 octets) is called OUI (here its D-Link’s)

Take first octet, they are in Hex, convert it to binary

10  > 0001 0000

7 th bit above is called U/L bit, universally administered or locally administered.

Universally administered and locally administered addresses are distinguished by setting the second-least-significant bit of the first octet of the address. This bit is also referred to as the U/L bit, short for Universal/Local, which identifies how the address is administered. If the bit is 0, the address is universally administered. If it is 1, the address is locally administered

we need to change 0 to 1, because the address needs to be locally administered.
In binary it will be : 0001 0010
Convert 0001 0010 back to hex : 12

Now the extenders virtual Mac address will be 12:BE:F5:50:C1:A0. You must enter this MAC address onto your router’s MAC address table.

Alternately, you can also get the MAC address details by logging to extender IP address/version.txt

Actual MAC address Virtual MAC address
LAN & 2.4 GHz 10:BE:F5:50:C1:A0 12:BE:F5:50:C1:A0
5 GHz 10:BE:F5:50:C1:A2 12:BE:F5:50:C1:A2

If you are connecting to your 5 GHz wifi network on the router, use the 5 GHz virtual MAC address in your routers MAC table. I recommend adding both, just to be sure.

Now adding, client devices to the routers MAC table. You MUST calculate virtual MAC address for each device  you wish to connect to extender. In one way, it is an extra layer of protection but i am not sure why. If the original device MAC address is added to the router, there is no reason to add a virtual MAC address to the same device.

Virtual MAC address calculation is very similar to what we did above.

For example, My device MAC is 4C:34:88:53:B8:36

The first 3 octets(in RED), will be changed to 12:BE:F5 (which is first 3 octets of extender’s virtual MAC address. Next 3 Octets (in Green) will remain same same as device MAC.¬†

Now my laptop’s new virtual MAC address will be 12:BE:F5:53:F8:36, add it to your MAC table on the router.

Few examples

Client device Actual MAC address Virtual MAC address
(to be entered in router’s MAC table)
Client 1 D0:03:4B:8A:5C:88 12:BE:F5:8A:5C:88
Client 2 00:21:CC:B6:1E:9D 12:BE:F5:B6:1E:9D

6. Once done, you can go ahead and do the setup wizard. WPS setup may not work if MAC address filtering is enabled on router.

CLICK HERE for Wireless extender setup.

 

 

Installing Let’s Encrypt SSL certificate on Ubuntu 16.04/apache web server

More about Let’s Encrypt¬†¬†and it’s FREE!!!

Make sure a domain is assigned to the server IP address before you begin assigning SSL certificates.

Step 1: Let’s install¬†Let’s Encrypt client from their official repositories.

As usual, root@localhost:~# apt-get update 

root@localhost:~# apt-get install python-letsencrypt-apache

8

Select Y to continue installing client
9

Step 2:

Now the client is installed, lets install the actual SSL certificate. The client will automatically obtain and install a new SSL certificate that is valid for the domains provided as parameters.

root@localhost:~# letsencrypt --apache -d jagadeeshmittapalli.com

9 10 11 12 13 14

LetsEncrypt certificate is now installed. If  you want to extend the certificate to subdomains, here WWW

letsencrypt --apache -d example.com -d www.example.com
15 16

Try accessing your website, you should see https now.

17

Step 3: Auto renewal

LetsEncrypt SSL certificates expire every 90 days. To renew certificates installed on the server root@localhost:~# letsencrypt renew

18

Here, there is no expiring certificates currently, so no renewals were attempted.

You can also automate renewals by creating cron job

Let’s edit the crontab to create a new job that will run the renewal command every week. To edit the crontab for the root user, run:

crontab -e

19

 

You may be prompted to select an editor:

Press Enter to use nano, the default.

Include the following content at the end of the crontab, all in one line:

20 21
Confirmation output :
22

 

Save and exit. This will create a new cron job that will execute the letsencrypt-auto renew command every Monday at 2:15 am.

Installing LAMP on Ubuntu Server 16.04 LTS

Let’s assume you got a VPS or Server on Cloud installed. Here i am trying with Ubuntu 16.04 (setup on other linux distros should be similar).

Before installing remember LAMP (Linux, Apache, MySQL, PHP)

Let’s install mySQL

root@localhost:~# apt-get install mysql-server

root@localhost:~# mysql_secure_installation

1

Select NO if you don’t want to change the root password and for the reset select Y.

2

Let’s install PHP now

We can once again leverage the apt system to install our components. We’re going to include some helper packages as well, so that PHP code can run under the Apache server and talk to our MySQL database:

root@localhost:~# apt-get install php libapache2-mod-php php-mcrypt php-mysql
This should install PHP without any problems. We’ll test this now

In most cases, we’ll want to modify the way that Apache serves files when a directory is requested. Currently, if a user requests a directory from the server, Apache will first look for a file called index.html. We want to tell our web server to prefer PHP files, so we’ll make Apache look for an index.php file first.

To do this, type this command to open the dir.conf file in a text editor with root privileges:

sudo nano /etc/apache2/mods-enabled/dir.conf

For reading text files on ubuntu, use nano. nano is the GNU version of pico and is essentially the same program under a different name.On Debian and Ubuntu Linux systems, nano can be installed with the command: sudo apt-get install nano

4

Move the PHP index file highlighted above to the first position after the DirectoryIndex specification, like this:

5

ctrl+X to close the nano, select Y to save changes and then press ENTER key

Restart the Apache web server in order for our changes to be recognized. You can do this by typing this:
root@localhost:~# systemctl status apache2

6

Let’s test php

We will call this script info.php. In order for Apache to find the file and serve it correctly, it must be saved to a very specific directory, which is called the “web root”.

In Ubuntu 14.04, this directory is located at /var/www/html/. We can create the file at that location by typing:

root@localhost:~# nano /var/www/html/info.php

7

Ctrl+X to close and Y to save and press ENTER to close the nano

Now we can test whether our web server can correctly display content generated by a PHP script. To try this out, we just have to visit this page in our web browser. You’ll need your server’s public IP address again.

The address you want to visit will be:

http://your_server_IP_address/info.php

You should see a PHP page, and details about your php version and other server info

Note: Make sure you remove the php file

root@localhost:~# rm /var/www/html/info.php

Now that the LAMP is installed successfully, we can install wordpress or phpmyadmin, or other software.

To install wordpress :

wget --no-check-certificate wordpress.org/latest.zip  

 

OSPF Basics

Open Shortest Path First, is an IGP used to distribute routing information within a single autonomous system (AS). OSPF is based on link state technology, used shortest path first algorithm developed by Dijkstra.

Few ‚Äė+‚Äô about OSPF:¬†

  • No limitation on hop count
  • Intelligent use of VLSM similar to EIGRP
  • Uses link state updates through an multicast address
  • Allows logical division of networks into areas and overall it’s OPEN SOURCE!!!

Whats a link state ?
OSPF is based on advertising link states. Link is like an router interface, the state of the link is a description of that interface and its relationship to its neighbouring routers.
Description of interference include, IP address, subnet mask of the interface, the type of interface it is connected to etc. The collection of these link states is called an Link-state data base.

SPF Algorithm for OSPF

The OSPF enabled routers on initialization or due to change any routing information, it generates link-state advertisements (LSA). This advertisement represents the collection of all link-states on that router.
All routers exchange link-states by means of flooding. Each router that receives a link state update should store a copy in its link-state database and then propagate the update to other routers.
After the database of each router is completed, the router calculates a shortest path tree to all destinations. The router uses the Dijkstra algorithm in order to calculate the shortest path tree. The destinations, the associated cost and the next hop to reach those destinations form the IP routing table
In case no changes in the OSPF network occur, such as cost of a link or a network being added or deleted. Any changes that occur are communicated through link-state packets and the SPF algorithm is recalculated in order to find the shortest path.

OSPF is hierarchical design, uses areas. Why areas ?

  • To decrease routing overhead
  • To speed up convergence
  • To confine the (in)stability to single areas of the network

OSPF allows us to subdivide the larger internetwork into smaller internetworks called areas.
Area 0 is called backbone area, all areas MUST connect to area 0

The router that connects other areas to the backbone area within an AS is called ABR (Area border Router).
The router that connects multiple autonomous systems (AS) together is called ASBR (Autonomous system Boundary router )

Router ID: It is an IP address used to identify a router or simply its a name of the router.
> highest IP address of all configured loopback interfaces or
> highest IP address out of all active physical interfaces or
> you can assign your own IP address

Neighbor(s): are 2 or more routers that have an interface on a common network, such as two routers connected on a serial link.

To successfully establish a neighbour relationship, these MUST match
> area id
> area type (stub, NSSA) or network type
> Hello or dead interval
> subnet mask
> authentication

Adjacency: is a relationship between two OSPF routers that permits direct exchange of route updates. Not all neighbours become adjacent depedends on type of network and configuration on routers
Examples: In multi-access networks, routers form adjacencies with designated and backup designated routers
In PPP, Point to multipoint, routes form with opposite side routers.

 

D-Link Video recorder – DNR-202L – Installation & Screenshots

Screenshots

DNR-202L is the D-Link’s simple solution to record videos on event or continuously to an attached external hard drive.

Download windows/mac setup from support.dlink.ca. Run the setup file.

screenshot-22 screenshot-23 screenshot-24 screenshot-25 screenshot-26 screenshot-27 screenshot-28
Note down the DNR-202L, IP address we may need it.
screenshot-29

Create a password and confirm the password for DNR-202

screenshot-30 screenshot-31 screenshot-32 screenshot-33

DNR-202 will now search for available cameras in the networks. Make sure the DNR-202L, computer and cameras are in the same network (or connected to the same router)

screenshot-34

Select the camera and enter the password or create a password if there is no password set.

screenshot-35 screenshot-36 screenshot-37 screenshot-38 screenshot-39 screenshot-40

 

 

A bit advanced OSPF

Adjacency Requirements

Once neighbors have been identified, adjacencies must be established so that routing (LSA) information can be exchanged. There are two steps required to change a neighboring OSPF router into an adjacent OSPF router:

  1. Two-way communication (achieved via the Hello protocol)
  2. Database synchronization, which consists of three packet types being exchanged between routers:
  1. Database Description (DD) packets
  2. Link-State Request (LSR) packets
  3. Link-State Update (LSU) packets

Once database synchronization is complete, the two routers are considered adjacent.

It is important to remember that neighbours will not form adjacency if the following do not match

  • Authentication
  • Hello and dead Intervals
  • Subnet
  • Area ID

An ABR is a router that belongs to more than one OSPF area.¬†Maintains information from all directly connected areas in its topology table and doesn’t share the topological details between areas.
It will forward only routing information from one area to another.ABR separates LSA flooding zone, primary point for summarization and maintains LSDB for each area its connected to.
ASBR is an OSPF router with at least one interface connected to external network or different AS.
An ASBR is responsible for injecting route information learned via the external network into OSPF and doesn’t do automatically, but done through route distribution.

Link State Advertisements

Router LSA (Type 1) ‚Äď Contains a list of all links local to the router, and the status and ‚Äúcost‚ÄĚ of those links. Type 1 LSAs are generated by all routers in OSPF, and are flooded to all other routers within the local area.

Network LSA (Type 2) ‚Äď Generated by all Designated Routers in OSPF, and contains a list of all routers attached to the Designated Router.

Network Summary LSA (Type 3) ‚Äď Generated by all ABRs in OSPF, and contains a list of all destination networks within an area. Type 3 LSAs are sent between areas to allow inter-area communication to occur.

ASBR Summary LSA (Type 4) ‚Äď Generated by ABRs in OSPF, and contains a route to any ASBRs in the OSPF system. Type 4 LSAs are sent from an ABR into its local area, so that Internal routers know how to exit the Autonomous System.

External LSA (Type 5) ‚Äď Generated by ASBRs in OSPF, and contain routes to destination networks outside the local Autonomous System. Type 5 LSAs can also take the form of a default route to all networks outside the local AS. Type 5 LSAs are flooded to all areas in the OSPF system

DCS-2530L Screenshots

DCS-2530L Setup 

Setup Advanced Maintenance Status
Setup wizard ICR and IR Admin Device Info
Network Setup HTTPS System Log
Wireless Setup Access List Firmware Upgrade
Dynamic DNS
Image Setup
Audio & Video
Motion Detection
Sound Detection
Time & Date
Event Setup
(Server, Media, Event, Recording)
SD card

Setup > Setup Wizard
screenshot-136

Setup > Network Setup
screenshot-137

Setup > Wireless Setup
screenshot-138

Setup > Dynamic DNS
screenshot-139

Setup > Image Setup
screenshot-140

Setup > Audio & Video
screenshot-141

Setup > Motion Detection
screenshot-142

Setup > Sound Detection
screenshot-143

Setup > Time & Date
screenshot-144

Setup> Event Setup
screenshot-145

Setup>Event Setup>Server
screenshot-146

Setup > Event Setup > Media
screenshot-147

Setup > Event Setup > Event
screenshot-148
screenshot-159

Setup > Event Setup > Recording
screenshot-149

Setup > SD Card
screenshot-150

Advanced > ICR & IR
screenshot-151

Advanced > HTTPS
screenshot-152

Advanced > Access List
screenshot-153

Maintenance> Admin
screenshot-154

Maintenance > System
screenshot-155

Maintenance > Firmware Upgrade
screenshot-156

Status > Device Info
screenshot-157

Status > Log
screenshot-158

Installing D-Link cameras – Android – mydlink lite

DCS-2530

  1. Click on Add a New camera. Select NO/YES for QR Code Setup;select your camera. Select NO for WPS setup.
    screenshot-3screenshot_2016-09-14-11-20-09screenshot_2016-09-14-11-20-35screenshot_2016-09-14-11-20-41
  2. LED on the camera must flash orange and click READY. Select your Wi-Fi network to which the camera needs to connected. Set/Create a password
    for the camera
    screenshot_2016-09-14-11-20-45 screenshot_2016-09-14-11-21-17 screenshot_2016-09-14-11-21-52

3. Time Zone is automatically set based on your phone’s time zone.Create or Add to your existing mydlink account.¬†Setup done, you should see the camera listed under local/remote.
screenshot_2016-09-14-11-22-50 screenshot_2016-09-14-11-23-35 screenshot_2016-09-14-11-23-43

DCS-936L – IP address Screenshots

You can be able to login to DCS-936L camera only through a computer (You cannot access the camera IP from tablet or mobile web browser)

Installing DCS-936L

Setup Maintenance Status
Setup Wizard Admin Device info
Network System Log
Wireless Setup  Firmware Upgrade
Dynamic DNS
Image setup
Audio & Video
Time & Date
Video Clip
Snapshot
IP filter
HTTPS setup
SD Recording
Motion Detection
Sound Detection
SD Management

Setup Wizard
screenshot-104

Setup > Network
screenshot-105 screenshot-106

Setup > Wireless Setup
screenshot-107

Setup > Dynamic DNS
screenshot-108

Setup > Image setup
screenshot-109

Setup > Audio & Video
screenshot-110

Setup > Time & Date
screenshot-112

Setup > Video Clip
screenshot-114

Setup > Snapshot
screenshot-115

Setup > IP Filter
screenshot-116

Setup > HTTPS setup
screenshot-117

Setup > SD Recording
screenshot-118 screenshot-119

Setup > Motion Detection
screenshot-120

Setup > Sound Detection
screenshot-121

Setup > SD Management
screenshot-122

Maintenance > Admin
screenshot-123

Maintenance > System
screenshot-124

Maintenance > Firmware Upgrade
screenshot-125

Status > Device info
status

Status > Log
screenshot-127