29
05
2007
If you wish to run a PPPoE server, MikroTik RouterOS provides a convenient way to set one up in a few minutes (with built-in traffic shaping feature too!). Previously I used Fedora Core for my PPPoE servers, but I couldn’t find a working solution to keep ghost PPPoE sessions from bogging down my Linux server. I tried MikroTik DOM with RouterOS to replace my Linux-powered PPPoE servers, so far the results are very good.
Below is a mini guide that may be able to help you get your PPPoE server running in a few minutes using RouterOS.
First, make sure that your RouterOS server’s WAN connectivity has been properly configured. Remember that you need at least 2 network interface cards (NICs). This guide assumes that both NICs are ethernet — ether1 and ether2. If you haven’t set anything up on the new system, let me help you with the checklist: (based on my experience, the following issues are the most common)
- Make sure that the Internet-facing NIC has an IP address assigned on it and the default gateway is set (/ip route add gateway=…)
- If NAT is used, ensure that src-nat/masquerade firewall rule has been added (/ip firewall nat …) and it is working properly
Once you have verified the server’s connectivity, create a PPP profile (/ppp profile add name=”pppoe-profile” local-address=10.1.1.1 dns-server=… rate-limit=128k/128k). Every user account that uses this profile will get 128Kbps upload and download limit. If you wish to have different types of accounts (for example some customers pay for 256Kbps), create a new PPP profile (change the rate-limit attribute).
Next, create a user account assigned to the new PPP profile (/ppp secret add name=”andryan” password=”test” service=pppoe profile=”pppoe-profile” remote-address=10.1.1.2). When this user logs in successfully, this user gets assigned 10.1.1.2. To dynamically assign IP addresses, there is an example here.
Finally, create a PPPoE server instance (/interface pppoe-server server add service-name=”pppoe1″ interface=ether2 one-session-per-host=yes default-profile=”pppoe-profile”) and enable it. Now your RouterOS PPPoE server is ready to answer PPPoE requests and authenticate your PPPoE clients. 
Good luck!
References:
http://www.mikrotik.com/testdocs/ros/2.9/interface/pppoe.php
Comments : No Comments »
Categories : MikroTik, Networking, PPPoE, RouterOS, Technical
22
05
2007
This script will create port forwarding rules on port 36xxx to 192.168.1.xxx:36xxx.
Comments : No Comments »
Categories : FTP, Linux, Netfilter, Plesk, Technical
19
05
2007
This is a very useful IP subnet table to ease your VLSM/subnetting job.
Comments : No Comments »
Categories : Technical, VLSM
15
05
2007
I was going to write about ETHTOOL_OPTS a couple of months ago, but unfortunately I’m a forgetful person.
If you use Fedora Core (or some Fedora-driven distributions) which uses ifcfg-DEVNAME files in /etc/sysconfig/network-scripts/ and you wish to alter your ethernet cards’ default configuration, ETHTOOL_OPTS is basically all you need! Look no further, no need to add anything in rc.local or write your own rc scripts just to force your ethernet cards to a certain configuration (be it 100Mbps full duplex or 10Mbps half duplex). Simply add this line to your ifcfg file, e.g. for eth0, edit /etc/sysconfig/network-scripts/ifcfg-eth0 and append:
ETHTOOL_OPTS=”speed 100 duplex full autoneg off”
To put this change into effect, do service network restart.
Use mii-tool to verify whether the ethernet cards apply the new configuration.
References:
http://www.redhat.com/archives/broadcom-list/2003-December/msg00002.html
Comments : No Comments »
Categories : Linux, Networking, Technical
11
05
2007
A couple of weeks ago I started to notice that I couldn’t watch videos served via my Samba server on my MacBook. I first thought it was a problem with Quicktime Player, but later I tried VLC and the problem was still there. I started up Activity Monitor to see how fast was the download speed, it was hardly over 150KB/s. Before, I was able to watch flawlessly on my MacBook with download speed of up to 2MB/s. Initially I thought that this could have something to do with the recent security updates of Mac OS X, but I couldn’t find anyone having the same problem on Google. Later I tried mounting my Windows-powered laptop’s shared folder and initiated a file transfer to my MacBook, it was transferring at normal speed (2MB/s)! So this problem only occurs when the share is served off Samba.
Yesterday I tried my luck on Google once more and finally I found this (sudo sysctl -w net.inet.tcp.delayed_ack=0). Applied the suggested solution and it worked! Case closed.
Comments : No Comments »
Categories : Mac, Samba, Technical
4
05
2007
I have always wanted to learn about BGP. This time I got the honor chance to implement BGP for an ISP. This ISP has its own AS number and a /21 IP address block. This BGP setup is pretty simple because I’m only using 1 PC (with 3 ethernet cards and a MikroTik’s level 4 DOM) to interconnect with an Internet Exchange (IX) — NiCE — and a transit ISP (another transit will be added soon).
In MikroTik RouterOS version 2.9.42, BGP features are available for level 3 and above. You also need to enable routing-test package if you want more flexibility (BGP filtering features). The routing package, as of this version, only allows basic BGP features. I’m sure this will change later when they release RouterOS v3. Once you have enabled routing-test package, you will see new options (Routing - Filters in winbox, or /routing filters on CLI). This is very important when you have to peer with 2 or more ASes (specifically an IX and a transit which is not interested in getting IX’s routes for obvious reasons).
Since I have never configured BGP before, I caused a major problem when routes from each peer goes to another peer when they shouldn’t! I didn’t place any filter for BGP advertisements my BGP router sends to its peers. My transit ISP received the IX’s routes and the IX received full Internet routes feed my BGP router gets from the transit ISP. BGP is an exterior distance-vector routing protocol, it picks its best path by comparing the AS path lengths of every route it has. Advertising the whole Internet BGP feed to the local IX caused other ISPs’ routers participating in the IX to discover a shorter path of international routes going via my BGP router so the routers chose this new shorter path instead and outgoing traffic of these ISPs started to flow via my transit ISP! On the other hand, advertising IX routes to my transit was not a big problem since the path will be farther for their customers anyway, having to go via my BGP router first (that’s one AS further for the transit ISP’s customers to reach the IX routes, so BGP will not select it).
Fortunately I was able to spot the error immediately and placed BGP routing filters to include only my /21 IP block in the advertisements my BGP router sends to both the IX and transit. I also added an incoming BGP filter to discard a default route my transit IP includes in its BGP feed. This default route is not required since I get full BGP feed that is unfiltered.
Useful links:
http://www.mikrotik.com/testdocs/ros/2.9/routing/bgp.php
http://www.mikrotik.com/testdocs/ros/2.9/routing/filter.php
http://wiki.mikrotik.com/wiki/BGP_Case_Studies_1 — Route filters examples
http://wiki.mikrotik.com/wiki/Using_scope_and_target-scope_attributes — Important! Make sure that BGP neighbors are reachable via static routes for dynamic routes to be active (in the case of multihop BGP neighbors)
http://wiki.mikrotik.com/wiki/BGP_soft_reconfiguration_alternatives_in_RouterOS
Cisco’s BGP Reference
Comments : 1 Comment »
Categories : BGP, MikroTik, Networking, RouterOS, Technical
Recent Comments