remote-lab.net learn by doing

JunOS interfaces IP addresses DNS records generator

This post is closely related to the previous one where I showed how you can parse the interfaces IP addresses from a curly bracket JunOS config file. The following script will be used to generate A and PTR records for a BIND zone file. Please note that the script needs to be run within the same directory as the Perl parser script and the config file.

JunOS config interfaces IP address parser

In this post I will show how you can obtain an interface IP address out of a JunOS curly brackets configuration file. You may find below the script and also the source configuration file. Please note that in order to run the script both files need to be placed in the same directory.

Linux L2TP ethernet pseudowires

This post describes how you can create L2TP ethernet pseudowires by using Linux kernel’s L2TP drivers and the “ip” utility of iproute2. L2TP is a protocol that tunnels one or more sessions over an IP tunnel. It is commonly used for VPNs (L2TP/IPSec) and by ISPs to tunnel subscriber PPP sessions over an IP network infrastructure. With L2TPv3, it is also useful as a Layer-2 tunneling infrastructure.

CPU benchmark using sysbench

Sysbench allows you to do a quick performance benchmark of several system parameters such as file I/O, CPU, scheduler and others. Below are the results for running a 100000 prime numbers calculation using 4 threads on my Intel Core i5-3427U CPU:

Bash create file by using heredocs

By using the heredocs format you instruct the shell to read input from the current source until a line containing only a certain word is seen. I find this useful for quickly writing or copying script files. You may find below an example of how you can use this kind of redirection: