Friday, 17 July 2015
Configuring OSPF / BGP Authentication within NSX and RouterOS
Monday, 8 June 2015
Configuring BGP between RouterOS and an NSX Edge
Below is the route information from my Mikrotik router:
As you can see OSPF is populating the routes from PA-DLR-01 into PA-Edge-01. Now it's time to configure BGP between PA-Edge-01 and Mikrotik. I'm not going to show you how to configure BGP on the Edge as there are numerous blog articles out there that document this process. To configure BGP on the Mikrotik router log in and navigate to Routing and then BGP and edit the default entry in the Instances tab:
Ensure you have entered a router ID and Redistribute Connected and Redistribute Static options are ticked (Or whatever you want to redistribute via BGP). Navigate to the Peers tab and add a new entry:
Give the new entry a name and then enter the IP address of the Edge, in my case it's 10.201.1.41. Enter the Remote AS number and then set the Default Originate option to Always and click OK. If everything is configured correctly all directly connected routes to the PA-WebTier, PA-AppTier and PA-DBTier should appear in the Mikrotik's route list and any new networks directly connected to the PA-DLR-01 should appear as well:
PA-Edge-01
PA-DLR-01
Mikrotik:
Thanks to Geordy Korte (Blog | Twitter) for the assistance in configuring the Mikrotik router.
Tuesday, 6 January 2015
Replacing Sky's SR102 modem / router
** Please note it is against Sky's policies to use any other router / modem apart from the one supplied **
I recently moved house and was no longer in a Virgin Media area and since I was ordering Sky television I also opted for their Sky Fibre unlimited package as well. I'm a big fan of the MikroTik routers and switches and use a RB751G in my lab as my default router and L3 gateway and obviously wanted to continue using this in my new house.
Sky Fibre unlimited now comes with the combined modem / router called the SR102 which is adequate for home use, but not for my lab:
When researching I found that I simply couldn't replace the SR102 with a standard BT OpenReach modem as Sky use DHCP option 61 as a client authentication as per ITEF:
"
9.14. Client-identifier
This option is used by DHCP clients to specify their unique identifier. DHCP servers use this value to index their database of address bindings. This value is expected to be unique for all clients in an administrative domain.
Identifiers SHOULD be treated as opaque objects by DHCP servers.
The client identifier MAY consist of type-value pairs similar to the 'htype'/'chaddr' fields defined in [3]. For instance, it MAY consist of a hardware type and hardware address. In this case the type field SHOULD be one of the ARP hardware types defined in STD2 [22]. A hardware type of 0 (zero) should be used when the value field contains an identifier other than a hardware address (e.g. a fully qualified domain name).
For correct identification of clients, each client's client-identifier MUST be unique among the client-identifiers used on the subnet to which the client is attached. Vendors and system administrators are responsible for choosing client-identifiers that meet this requirement for uniqueness.
The code for this option is 61, and its minimum length is 2.
Code Len Type Client-Identifier
+-----+-----+-----+-----+-----+---
| 61 | n | t1 | i1 | i2 | ...
+-----+-----+-----+-----+-----+---
"
So, in order to replace the SR102 with an OpenReach modem and MikroTik router you first need to obtain the username and password used to authenticate with Sky's servers. This can be achieved by using wireshark and sniffing the DHCP discover packets when powering on the SR102. This video shows you how to extract the username and password:
Once you have it extracted in the form of MACADDRESS@skydsl|PASSWORD i.e. (00:00:00:00:00:00@skydsl|a34sdre6) you need to convert it from ASCII to HEX using an online converter (This worked for me - http://www.asciitohex.com/)
Once you have the client identifier in HEX format you need to configure option 61 on the DHCP client of your MikroTik router. Log into WinBox and browse to IP and then DHCP Client and in the Option 61 option enter the value as 0xHEXVALUE (You need to put 0x at the front of the value)
Once finished ensure your MikroTik is set to DHCP and not PPPoE or static and you should recieve and IP address from Sky's DHCP servers:
I also configured the WAN port of my MikroTik with the same MAC address as my SR102 as I've read a few articles that say it can potentially take a few hours for the MAC address to time out which means if you need to swap back to the SR102 you potentially have wait before connectivity will be restored.
Friday, 12 April 2013
Configuring DHCP Relays within RouterOS
In a lab environment you may want to mimic a live environment as much as possible. This also includes separating your clients from your servers with the use of VLANs. I currently have my clients on VLAN 9 and servers on VLAN 8. My Domain Controller (Also my DHCP Server) currently resides on VLAN 9 so in order for my clients to obtain an IP address from my DHCP server I need to relay the request from VLAN 9 to VLAN 8 as DHCP uses broadcast traffic to obtain it’s IP address which cannot span VLANs. So, create the required DHCP scopes on your chosen DHCP server:
Log into your MicroTik router via Winbox and then select IP and then DHCP Relay. Enter a name for the Relay and then the Interface you want it to listen on and then finally the IP address of the DHCP server you want to forward the request to:
To test simply connect a client to that VLAN and request an IP address. If you click on the Status tab you can see how many requests and responses the DHCP Relay has dealt with:
Configure VLANs and Layer 3 Routing within RouterOS
I’ve also trunked the ports that connect to my ESXi hosts so all VLANs can pass through. Now, to configure the VLANs within the MicroTik router simple connect up via Winbox and select Interfaces and then the VLAN tab. Create all the VLANs you require and click Apply:
To add layer 3 functionality so you can route between VLANs select IP and then Addresses and simply add IP addresses to each VLAN:
Saturday, 1 September 2012
RouterBOARD – Logging
In order to configure new logging you need to go into System –> Logging. By default the following errors are logged:
Saturday, 25 August 2012
RouterBOARD – Connecting an external antenna
The external antenna can be connected to the RouterBOARD RB751G-2Hnd via the MMCX connector at the front:
The part that you need can be found here. You can either connect the antenna to the MMCX connector and leave it dangling or you can actually fit it into the casing, which is extremely easy to do. To fit it into the casing take the RouterBOARD casing apart with a flat head screwdriver from the bottom. Once apart you will notice the cover which can be peeled off revealing four slots:
Simply choose a hole to connect the antenna to and push out the slot. Carefully put the sticky cover back on and cut out the hole with a knife or screwdriver:
It doesn't need to be neat as the antenna will slide over the edges. Once you have cut the hole in the cover simply feed the antenna cable through hole and back out the antenna slot hole and connect to the MMCX connector. Replace the bottom of casing and ensure the antenna is fitted securely into the slot:
To enable the antenna log into your RouterBOARD and go to Wireless and then the Interfaces tab. Double click your wireless interface and select the HT tab and set the Antenna Mode to be Antenna B:
Friday, 24 August 2012
RouterBOARD – Backup / Restore Config
To backup your RouterBOARD configuration log on via the Winbox and select the Files menu item:
Click the Backup button and then simply drag the file from the GUI onto your desktop. To restore your configuration simply highlight it and click the restore button. You will be asked to confirm and then reboot your device:
If the file you want to restore is not one the device then simply drag it into the files list and it will be copied up to the device.
Wednesday, 22 August 2012
RouterBOARD – Time Configuration
Manual Time Setup
Log into your RouterBOARD and select System and then Clock:
Configure the correct date / time and time zone.
SNTP Client
Log into your RouterBOARD and select System and then SNTP Client:
Enable the service and then select Unicast as the mode. This will allow you to enter a primary and secondary NTP server. Within my settings I have configured it to pick up it’s time from 93.184.71.155 and 213.209.109.45 which are part of the pool.ntp.org servers.
RouterBOARD - Factory Reset
MikroTik RouterBOARD RB751G-2Hnd
After seeing a recent post by Eric Sloof regarding the Mikrotik RouterBOARD RB751G-2Hnd firewall / router / AP it came just in time. I was actually looking for something to trunk my layer2 linksys switch to support VLANs for my home ESXi5 lab and to replace my VirginMedia SuperHub after the reported wireless issues with the latest firmware. After researching I took the plunge and purchase the following from LinITX:
MikroTik RouterBOARD 751G-2HnD (RouterOS L4) with UK Power Supply
2.4-5.8GHz Omnidirectional Swivel Antenna with cable and MMCX connector
I have to give LinITX credit, the order process was nice and simple and the items arrived the very next day. Anyways, I’ve just changed the VirginMedia SuperHub into gateway mode and hooked up my RouterBOARD. So far I’m very impressed with it. There are multitude of options to configure and it’s going to take me a while to get my head around it but so far so good. I’ve only performed a few basic operations to get me started such as setting up wireless, configure NAT for my external services (remote access and VPN) and configured firewall logging but I’m definitely going to get more involved with it when I get time. I’ll be blogging about certain features and setting up the device purely for my knowledge as it’s quite a complex bit of kit.
















