Sabtu, 05 Februari 2011

Basic Mikrotik Configuration with PPPoE Server

clip_image003

To begin with, we need to set up the Mikrotik with an IP address. All Mikrotik

routerboards have a serial port attached to them. Attach a serial cable from your PC to the Board, and open the widows program Hyperterminal.

The name is irrelevant, so you may type whatever you’d like, and click “ok”

clip_image005

Next, be sure to select COM1 as the used port and click “Ok”

clip_image007

Next thing is configure the baud rate for the terminal. The Bits per second should be set to 9600, and the Flow control set to none. Click “Apply” and “Ok”

clip_image009

You may now plug power into your unit and you should be able to see the unit booting up, and eventually you find yourself at a login screen as above. The Login User name is “admin” and the password is left blank.

clip_image011

You will now be in the command interface of the Mikrotik Router. What we are going to do now, is give the router’s Ethernet port an IP address. You will only need to give one interface an IP address here, as the others can be configured later in a much easier
fashion. Type “setup” and push enter.

clip_image013

Push “a”

clip_image015

Press “a” again

clip_image017

Type “ether1” to assign an IP address to that interface.

clip_image019

Next, assign an IP address of 192.168.1.1 and a Subnet of /24

clip_image021

Press “x”

clip_image023

Press “x” again and let the changes take place.

clip_image025

Now you may open your Internet Explorer and browse to the IP address of the Router

(192.168.1.1) and you will be taken to the above screen. Under the Winbox section, click “Download it” and save the Winbox utility to your desktop. After you have saved the utility, close Internet Explorer.

clip_image027

Open the Winbox utility and type in the related address and user name. Click “Connect” This will open Winbox and allow you to configure the Router.

clip_image029

You should now be in the Winbox utility. The first thing we are going to do is configure
our WLAN (wireless card) to be an access point, so as to allow clients to connect to the
Router.

clip_image030

Step 1 is to enable the card. To do this, select wlan1 and click the blue tick at the top of
the interface list. Now the card is enabled, we need to access it. To do this, double click
wlan1.

clip_image032

You should now see a wlan configuration window. Click the “wireless” tab.

clip_image034

The first thing to do in this window is set the “Mode” to “ap bridge”, as this tells the

Router that wlan1 is an Access Point. Next, set the band to which frequency you will be using and set the SSID to a name of your choice. For this document, I will leave the SSID as MikroTik. Click “Apply” and “Ok”

clip_image036

Close the Interfaces window. Now that we have set up the wireless card as an Access Point, we need to give it an IP address. In the menu on the left, click “IP” and
“Addresses”. Here you will see out previously configured address for the Ether1 port. Click the + icon to add a new address.

clip_image038

In the Address field, type 192.168.2.1/24 and in the Interface box, select “wlan1”. Click “Apply” and “Ok”

clip_image040

Your wlan card/Access Point now has an IP address. Please note that each interface on a Mikrotik Router has to have an IP address on a different range in order for the Router to work properly.

Now we have an access point set up with a configured Ethernet port, we need to have some sort of connection to the internet. To accomplish this, we need to set up a basic form of routing.

clip_image042

The first thing we need to do is set up a default gateway for the internet. Let’s assume

there is an ADSL Modem connected to ether1, and the modems IP address is 192.168.1.2 we will need to add a default route (gateway) to this IP address. Click “IP” and “Routes” and click the + to add a new route.

clip_image044

Leave the “Destination” as 0.0.0.0/0 and change the “Gateway” to the IP address of the ADSL Modem (192.168.1.2). Click “Apply” and “Ok”

Now we have a default gateway to the internet, we can set up a PPPoE Server.

First of all we will discuss exactly what a PPPoE connection is. You may have dealt with
an ISP (Internet Service Provider) at some stage and have had to have a User name, and a
Password to access their service. This exact setup is a PPPoE connection. In other words,
instead of configuring client IP addresses and Gateways etc, all you have to do is type in
your user name and password, and it all gets done for you. Services such as ADSL and
Sentech make use of this utility because, as you can imagine, it becomes a lot easier to
manage client accounts via a user name and password than static IP addresses.

Another feature of the PPPoE feature, especially in regard to Mikrotik, is bandwidth management. You can limit users’ download speeds and monitor their activity on the internet while connected.

clip_image046

Click the “PPP” button on the left hand menu to open up the PPP configuration window.

clip_image048

Next, in the center of this window, there is a “PPPoE Server” button which you need to
click. This will bring up the PPPoE server list. Click the + icon to add a new PPPoE
sever.

clip_image050

Set the “Service Name” to a name of your choice or leave it blank. For this document I shall call it “Mikrotik”. Next set the interface you would like to use. Due to our clients accessing the router via wireless, set the interface to wlan1. The last setting is the
“Authentication”, this should be set to “pap” only. Click “Apply” and “Ok”

The next thing we are going to configure is an IP Pool. An IP Pool is a pool of IP

addresses that the Router is allowed to give to clients once they have dialed up to the Mikrotik. In simpler terms, it very much like a DHCP server.

clip_image052

In the left hand menu, click “IP” and then “Pool” and click the + icon to add a new Pool.

clip_image054

Give the Pool a name of your choice. Then add the IP range that the Mikrotik Router is allowed to distribute to clients. The range given here is 192.168.2.10-192.168.2.200 Click “Apply” and “Ok”

clip_image056

Go back to the PPP configuration window and go to Profiles. This is where we add a

bandwidth management profile and limit certain clients on their speed. Click the + icon to add a new profile.

clip_image058

In the “General” tab of the New PPP Profile, name the profile according to the speed

limit that you would like to set. For this document I have named it “64KB”

The “Local Address” and “Remote Address” fields will have pool1 selected (The IP Pool we created earlier). Next click the “Limits” tab.

clip_image060

In the “Limits” tab, we will limit the actual bandwidth to 64KB by typing 64000 in the “Rate Limit” field. This stands for 64000 bits (64KB). Click “Apply” and “Ok”

clip_image062

Next, go to the “Secrets” tab and click the + icon to add a new user.

clip_image064

Add the user name and password according to your specifications. Set the “Service” to use “PPPoE” and in the “Profile” box, select our newly created 64KB profile. Click “Apply” and “Ok”

That is the PPPoE server set up and ready to go. What needs to be configured now, is the
client side of the network. We need to create a PPPoE dial up account on the client
computer.

clip_image066

On your desktop in Windows XP, right click on “My Network Places” and go to “Properties”

clip_image068

Next, click on “Create a new connection” in the left hand window.

clip_image070

Click “Next”

clip_image072

Select “Connect to the Internet” and click “Next”

clip_image074

Select “Set up my connection manually” and click “Next”

clip_image076

Select “Connect using a broadband connection” and click “Next”

clip_image078

Enter a name for the connection e.g., Mikrotik and click “Next”

clip_image080

Enter in your user name and password according to the account you created in Mikrotik, and click “Next” then click “Finish”

clip_image082

You can now connect to the Mikrotik router and the internet via your user name and password, and the connection will be limited to 64KB.

Tidak ada komentar:

Posting Komentar