Search This Blog

Monday, 3 October 2016

Changing a Different Service Provider and Keeping Your Existing Network Setup

I've got a friend who is having some difficulties keeping his existing network setup with minimal changes in configuration when he switched to a new Internet Service Provider (ISP).

Here is what I suggest to be done.



1. Use your own Router instead of the the provided by the ISP.


ISPs typically will provide a modem that has a built in function of a router. Most of the time, to keep costs down, these modem/routers are rather basic or has limited functions or has rather poor WiFi capabilities.


When you set up your network in this manner, you Router is the one that maintains the internal network and because you can keep it running regardless of the ISP that you change to, your internal network remains the same.

That means you don't need to reconfigure all your Printers, your Network Access Storage, your Apple TVs, etc. every time you change a different ISP.

In this setup, if you have an outgoing VPN connection, you can keep using it without changing or setting up anything else.



In most cases, this is all that needs to be done! Just set your Modem to Bridge mode if it has the function and if not, just set the DHCP Server to ON and you can carry on using your home internet with minimum fuss and without the need to change anything else.


HOWEVER.....


If you are running a Network Access Storage i.e. your own cloud at home, you will want to be able to access your data when you are roaming the earth. In this setup, your own Router will not be able to see your External IP address (unless it comes with a built in function for that), but see that its external IP address is what the Modem has issued it.



2. Configure your ISP Modem to pass through to your Router


Bridge Mode

In most cases, the modems that the ISP has provided should have a "Bridge" function. This means that the modem is configured into nothing more than a conversion of its incoming connection, into the Ethernet Cable that provides the Internet Service into your home. E.g. Fibre Optic to Ethernet, ADSL to Ethernet.




In the Bridge mode, the External IP address should also be passed onto your own Router which then makes it easy for you to set up a DDNS Service which allows you to access your home network without the need to keep knowing the exact IP address you are currently having. If you don't know what a DDNS service is, please scroll down.




Port Forwarding

If your ISP modem doesn't have Bridge mode, then what you will need to do is to forward incoming traffic that is looking for a VPN service to your own Router (I'm assuming you already have a VPN Server setup on your existing Router, since this post is about setting up existing network with different ISPs).


Here are the ports you need to forward over from your ISP Modem to your Router:

1. PPTP          : TCP 1723
2. L2TP          : UDP 500 and UDP 4500
3. SSTP          : TCP 443
4. OpenVPN  : UDP 1194


You don't need to forward everything. Just what you need to get your VPN Server working.

If you are using FTP, you will also need to forward:

1. FTP            : TCP 21 and TCP 20


FTP is a little tricky as other ports might also be used for the Passive mode. That would be an entire chapter on its own.





Setting up the correct ports for Port Forwarding should solve most of your VPN Server problems.


IF AND ONLY IF......

After setting this relevant ports and you STILL have issues... then you need to weigh between security and functionality. When ALL ELSE FAILS....

You can set the ENTIRE Port Range to your own Router. This passes the whole security firewall to your router. Not really advisable but well... if you think about it, a Bridge Mode does pretty much the same thing.


So, the Port Range would be 1:65535



Once again, I wouldn't recommend it, but well... if you are desperate....




3. Using a DDNS

A DDNS Service is very convenient. Most ISPs require extra $$ for Static IPs. Usually used for businesses, or if your ISP provider is hiding you behind another layer of IP addresses (of which case, you can skip this entire section altogether, coz you have no other choice then to purchase a Static IP from your ISP). For Home Users, we usually do Dynamic IPs. What this means is that the ISPs will decide for you what IP you get every time you turn on the Modem, or when the lease time is up.

So, you switch on your modem and it might get an IP address of 12.254.12.223 from your ISP. Turn it off, and turn it on again, and it might change to 12.254.12.226. Most of the time, this doesn't affect anything. But if you are using a VPN Server at home for you to access your NAS, then it is rather a pickle.

What you need is a DDNS service to which you convert the IP address of 12.254.12.223 into something easier to remember and doesn't change, e.g. iamahunk.dyn.com

Some Router makers like Dlink and Asus have their own DDNS service that they provide for free. But if you are using none of them, there are also plenty of FREE DDNS services available on the Internet. Sign up for one of these.


On your ISP Modem (if the function is available), key in your login details on the DDNS page.




What this does, is that it will update the actual IP address to your Modem given by the ISP, to the domain name iamahunk.dyndns.org everytime it changes. So you never need to remember or find out your IP address, but just access your network through iamahunk.dyndns.org.


IF your ISP modem is a piece of crap that doesn't have a DDNS function, then you will need to update the DDNS on your Router end. Now, this becomes tricky.

If your ISP Modem has a Bridge Function.... then great... no big deal since your external IP is passed on to your Router. Just do the above on your Router and it will work fine.

If your ISP Modem doesn't have a Bridge Function and you are doing the Port Forwarding, then your own Router needs to have a the ability to update the external IP address. This is a little tricky as not all routers, even high end ones, have the ability to extract your external IP address via a 3rd party website.

Most good Routers will be able to pull the IP address from your router's WAN connection and use that IP address to update the DDNS service. Works great with a Bridged Modem. But it doesn't work when you are Port Forwarding from your ISP Modem.




What you need is the ability to do an External IP Check and the DD-WRT routers are great for that. The External IP check function will be able to determine your external IP using external websites which report your IP address as seen from the Internet, and update that into your DDNS service.

You might also want to check to see if your NAS has a DDNS function that allows it to update the external IP on its own. If so, great! Problem solved. But if not, then you might have to consider getting a used/old router that is lying somewhere in the house and flash its firmware with the DD-WRT firmware just for the purpose of updating the DDNS automatically. Please take note that this is a Serious BlackBelt Tech Procedure. Doing it wrong might turn your old router into a brick. But hey, its lying somewhere collecting dust anyhow right?

One more option you can have if you have an Andriod TV Streaming Box around, is to use Duck DNS (https://www.duckdns.org). They have an app in Google Play that you can use to update the IP address. If you use this, then you don't need to flash a DD-WRT router to get the job done, but you will still need to forward the relevant ports for VPN access into your home network.

Take note that if you are connecting a seperate old router into the network just only to pull the DDNS function, then you need to set it up like a secondary router with the DHCP function disabled. Follow this guide to set up the secondary router properly (http://hometech101.blogspot.sg/2016/08/setting-up-secondary-router.html).


I hope this helps...  Have fun!




Tuesday, 30 August 2016

Setting up the Secondary Router

In my previous post titled, Setting Up Internet at Home and at (Small) Office, I discussed on the basic of setting up a home or small office network, and how to make the most of it.

I also mentioned that the best way to cover all the blind spots in your house is using a second Access Point (AP) which can be in the form of a secondary router that is configured as a Wifi AP.

Let me elaborate more on how to set this up.


There are a few things you need to take note of when you are using a second router as an AP.

1. Disable the DHCP on the second router

There can only be 1 DHCP server in the entire network. A DHCP server is the one that decides who gets what IP address. So you will need to arrange it such that only 1 of the routers is the BOSS. As the ole' saying goes, "Too many cooks spoil the broth". That is true in this situation.






2. Set the second router with a static IP.

This is really only to make life easier when you are trying to sort out problems. By setting the second router with a static IP, you can always get back to it to change any configurations. If this isn't done, it can be tough to find out which IP it has been assigned to by the DHCP when you want to change some settings. It would be good to label your second router with the chosen IP address so that you don't forget it.


The choice of IP address is really up to you. For no reason at all, I would usually set my primary router address as:

192.168.1.1

which is the default for many routers out of the box. As this is the router that connects directly into the modem, it is also the "Gateway". So if you happen to come across any requirements to key in the IP address of a "Gateway", that would be your primary router.

You can choose your secondary router as 192.168.1.2 if you like, or 192.168.1.254. Its really up to you to decide. I usually choose all routers from the front (i.e. 192.168.1.2) and all devices from the back (i.e. 192.168.1.254). No real reason except that it fulfills some Obsessive Compulsive Disorder of mine to have things ordered nicely.

Just to round things off neatly, the "subnet mask" for a home network is usually 255.255.255.0

If you really like to know why, I can give you a 5 mins lecture on it. But I suspect most of you don't really care what it means. But if you think you are going to have more than 253 different devices in your house, then send me a PM because you will need to understand a little more about subnet masks. But I doubt many of you will have more than 253 devices.






3. Connecting the cable to the LAN network.

You will notice that with the secondary router, you have several connection points at the back.




There should 2 sections of connectors, one labelled as the WAN and the other as the LAN.

The WAN (Wide Area Network) is meant for you to connect into the Internet, or when you decide that you want to have a separate network. It is useful when you want to set up a secondary network, typically when you want to have 2 WiFi networks, one of which is a VPN setup.

The LAN (Local Area Network) is as it is written, a network that is local in nature. This is also what you are doing when you are creating a network at home. Its a Local Network. So when you have a secondary router to provide extra WiFi signal, you need to make sure that it is connected into the LAN group of connectors and not the WAN group. This will then set the secondary router to behave within the same network group as your primary router.



4. Configuring the Routers for WiFi

It is important to ensure that both Primary and Secondary routers are using:

a. The same WiFi Protocol (Wireless Mode)

This means that if you are using Wireless-N, you will want to make sure both Routers are configured to Wireless-N.

You *CAN* have different protocols. But what that means, is that you will need to have different WiFi Network names so that they don't interfere with each other.

By having the same protocol (e.g. Wireless-N or Wireless-AC etc), you can choose to have the same SSID, which makes it neater and you have the convenience of not having to change to a different network when you move to a different part of the house.


b. Have the same SSID


Mmmmm..... well, this part works hand in hand with paragraph (a) above. As mentioned, if you want the same SSID with the convenience of seamless handover, its gotta be the same protocol.


c. Have the same WiFi Password (Pre-Shared Key)

It seems a common sense that when you have the same network SSID, you might wanna use the same password. But this common sense escapes people sometimes. Yes, you need to have the same WiFi password configured between the routers if you are using the same SSID. If you are using different SSIDs, then you can use different passwords.


d. Use the Same Encryption and Authentication Protocol

You need to ensure that the WiFi Encryption is using the same method of Encryption. This will then allow the encryption key to be carried over between routers so that your device and the router can understand each other.








That's all to it! Its not so bad, isn't it?

Thursday, 14 July 2016

Setting Up Internet at Home and at (Small) Office


I've been asked to help out with the Internet Setup of their home by friends and family and there are some common issues which I feel is most probably affecting everyone else too. I believe that everyone should get the Internet Speed that they paid for, so here are a few things that I hope will help maximise the bandwidth you have in your home or office.



Basics

Before we get into specific issues, here are some basic mediums to understand:

1. Internet Cable

                                                         

Internet Cabling comes with various specifications. Most common in the market are cables that are classified as CAT5E, CAT6 or CAT6A cables. Now, what is the difference? A whole lot. But the only thing you need to remember, is that:

CAT5E  - Max 1 Gbps in theory (up to 100m)
CAT6    - Max 10 Gbps in theory (up to 55m), Max 1 Gbps in theory (up to 100m)
CAT6A - Max 10 Gbps in theory (up to 100m)

Needless to say, CAT6A cables will be more expensive than CAT5E cables, but unless you are running kilometers of cables, the cost difference isn't huge.



2. WIFI Signals

                                                                

WIFI Signals comes in various shapes and sizes. There are 2 major groups, termed as Protocol and Frequency.




a. Protocol


                                 

In the market today, the most commonly available is the Wireless N and the Wireless AC standard (IEEE 802.11n or ac, for the geeks).


Wireless AC - Approximately 1.3 Gbps in theory (but practically, max about 300Mbps)
Wireless N    - Approximately 450 Mbps in theory (but practically, max about 100Mbps)


b. Frequency

5 GHz      - Supposed to be "quieter"
2.4GHz    - The more commonly used frequency band


The 5 GHz band is supposed to be quieter, but in reality, it was thought to be quieter because 2.4 Ghz is the original wireless band and most devices are built originally for 2.4 Ghz. 5 Ghz is the new kid on the block.

But as more and more people jump into the bandwagon, the 5 GHz band isn't as quiet as it used to be. Nevertheless, it will still run faster than the 2.4 GHz band because of simple physics. But I suspect most people will not be interested in the physics.

Point to note is that the Wireless AC uses 5 Ghz exclusively (hence faster.. Cheat!).




Now, that is most of the basics that you need, and we can get into setup.


Firstly, you need to decide what speed you need for what devices. Fast Fast FAST isn't the way for everything. Typically, you would want to reserve bandwidth speeds for devices that really need them and usually they come at a cost (could be range, could be $). Perhaps, it might be easier to show you what I do for my own system and the considerations for them.



Incoming Internet

The bulk of your Internet surfing speeds is determined by what plan did you pay for from your service provider. However, setting up a network at home also means that you need to consider if this incoming speed into your house will change in the future. Most likely, the answer is yes. The Internet Speed provided into your home will become faster and faster as the years go by. That means that if you setup your home network for a lower speed, then one day, you might have to rip things apart so that you don't bottleneck your internet at home.

My incoming internet speeds from the service provider is at 1 Gbps (fibre optics). And so, my setup will be provided for as such.

(Sidenote: In the current state, 1 Gbps is about as far as one can reasonably push simply because the bottleneck is the connector ports which so far have not gone further than providing for 1 Gbps speed, although the Wifi and Cable have improved significantly)



The Setup


The Wireless Router

Your Service Provider usually gives a modem (whether it converts from Optical Fibre, from Cable or from Telephone Line) to that Internet is provided in the form of a typical Internet Port (RJ45). We would usually get our own Wireless Router to send the Internet signal throughout the house, usually because the Internet Service Provider (henceforth known as ISP) is a cheapskate and give you a modem that is only good for converting the signal and frankly, quite crap thereafter.

So, get a good router. I won't talk brands here, but if you want, you can message me privately or comment and I will help as much as I can.

The connection between the router and the modem is critical. This is also where most people make the mistake. The ISPs will usually give you the CAT5E cable because it is the cheapest. Most Routers will also give you the CAT5E cable packed together in the box. That's because its cheap.

Now remember what I mentioned above. a CAT5E cable maxes out, in theory at 1Gbps. That's in the laboratory. In real life, we have interference and where you put your modem and router, is typically where your TV and all the other gadgets are. They take power which will in turn cause some interference.  So, what you need to do is to replace it with a CAT6 cable. That will ensure that your Internet Speed doesn't bottleneck right at the beginning.

                         


The Infrastructure

I have tried many means to spread the internet signal throughout my house. At the end of the day, nothing beats using the actual cable running through the house.



WiFi boosters, in my opinion, are a scam. Internet Speeds drop significantly over distance with WiFi and putting a booster in the middle, only boosts the signal, but not the speed. A WiFi Booster works by picking up your previous signal and sending another signal. Its like a relay station. So if your Booster is placed at a position where the original is weak, then that means the speed is also very low. So while you may connect into your network, but your browsing and usage will be slow.

                                



Powerline Ethernet (transmitting the Internet Signal through your 3 pin power plug) is only good for when its within the same power loop. That usually means that its only good for transmitting the signal in the same room. Sending the Internet Signal to another room means the signal will have to go through the circuit breaker, and by experience, I've seen the speeds drop 80%. Also, they break down rather easily in my opinion. It could be because of the heat from prolonged usage.

                                             

So, if at all possible, run cables. If you are running the cables within the walls, then invest in better cables. CAT6A if possible, if not at least CAT6. You really don't want to have to knock down the walls just to change out the cable in the future.

There are also flat cables that you can get that are ideal for running below a carpet hidden from sight. Those are rather useful too.


                                          




Sending WiFi through the House

If your house has blind-spots, what you need is two routers (or an access point) to carry the Internet Signal through cables. If you can plan for this on the onset when the house is first constructed, Hurrah! But more often than not, we have to fix the problem rather than prevent it.


One way is to check out the Telephone cabling for your house. Most of us uses the Mobile phone now and the fixed line is really not used much. Sometimes, there is a fixed telephone line network set into the house from the onset to every room. And sometimes, this fixed telephone line is a CAT5E cable. If you have this setup, then you have a very good way out.







Select two rooms that you can do without the fixed phone line, and connect the CAT 5E cables up at the telephone distribution point for the 2 rooms. 









Then change out the wall panel for the telephone point into the data point. This old telephone line then becomes usable to carry data, and you can use it to transmit the Internet signal to another part of the house, and connect another Wireless Router or Access Point to it to further distribute the Wireless signal to the blind-spots in your house.








If this is too tough to do, or if your house doesn't have the CAT5E telephone line available, then the next best option is to run your own cable. If you can hide it then great. If not, you might have to accept the trade-off on aesthetics for speed. As mentioned above, using a flat internet cable might help as they are easily hidden or not so noticeable

If aesthetics is more important, then the next best option is to trade off speed for connectivity. Using the Powerline Ethernet is the next option. You can get the connectivity without giving up the aesthetics. But you're looking at probably 2-5 Mbps of speed left over after going through the Power Distribution Box. Its still good enough for mobile devices or surfing the web. But it is terrible for TV Streaming Devices, or any usage that needs higher speeds.

The good news is that if you use the same protocol (e.g. Wireless N), the same SSID (name of your network), and the same network password through your house, your mobile device will automatically jump to a new access point if the signal gets too weak. Cool right?



Do not even bother with Wifi Boosters.



The Devices

What devices do you have at home that needs the network? How do you use them? These two question will govern your decision on the network setup.



1, Mobile phones and Tablets

Mobile phones and Tablets need range not speed. They don't usually transmit huge data. Typically, anything that gives about 10 Mbps to them is more than sufficient. Mobile phones and tablets also doesn't need consistent speeds, and can live with some sporadic bursts of speed to fulfill their uses. So, that means that we would usually allocate the 2.4 Ghz band to them, which usually means using the Wireless N. Wireless N gives good range at the expense of a lower speed (but still very high for a Mobile phone or a Tablet).

                                                   


2. Laptops/Desktops

If you are just using a laptop for web surfing, then Wireless N is sufficient. They give good range and coverage, and adequate speed. But more often then not, we use the laptop for other stuff like downloading or transferring big files. So, I would recommend using the Wireless AC for laptops.

Desktops should use cable as must as possible since they aren't mobile. If cable is not an option, then Wireless AC should be used too.

                                                     


3. TV Streaming Devices

If you are using such devices (like AndriodBox or AppleTV or Amazon Firestick, or etc etc etc), you might want to allocate the Wireless AC for them, unless you can get a cable in there (even better). I can't stand watching a show and it needs to buffer and I'm left watching a spinning disc in the middle of the screen while the show gets hung up. Typically a CAT5E cable is sufficient for them, but I run a CAT6 to them in my home setup. The AppleTV in my bedroom catches the Wireless AC.

                                                     



4. Network-Attached Storage (NAS)

I love my NAS. And because they are there to keep all your files, large and small, they are best connected by cable, directly to your router. I use the CAT6 for them.

                                                



So, here we are. Proper planning will ensure that your devices do not fight unnecessarily for the network and hopefully, everyone will have great internet at home!

If there are any specific difficulties, please feel free to comment or message me privately and I will do my best to help.