User Guide

Global DNS Lookup

Introduction

You can get domain information from more than 200 countries and different cities. the information is very similar to dig command and it would be much useful for network troubleshooting and for educational purposes. As you can select the different location, you can find out how your domain information is available at different geo location.

global DNS query - dig

Back To Top

Basic

The below shows how you can query for any type of record information in the domain example.com from specific country and city/node.

local> ns
ns> connect country_name
ns/country_name> node city_node
ns/country_name/city_node> dig example.com

The below screenshot shows music.com’s domain information from a name server at United States / Red Wood city. please note you have the name server’s hostname and version information which they will be useful during troubleshooting.

sc-ns-basic

Back To Top

Trace

Introduction

Trace is a network diagnostic tool for displaying the route (path) and measuring transit delays of packets through an Internet Protocol (IP) network. myLG supports the common features of most of the traceroute commands support, plus extra useful information in regard to network providers across the internet, Geo IP information, and real-time trace route information. Trace supports IPv4 and IPv6 with two modes: User Datagram Protocol (UDP) and Internet Control Message Protocol ICMP.

myLG | trace route

Back To Top

Real-time

There are many use cases that you need to see regularly repeated traceroute. myLG trace real-time keeps track of the response times of the hops along the path. there is extra information including:

  • Round trip time statistics
  • AS number and holder
  • Geo IP address: source city/country and destination city/country
  • Distance between source and destination in mile/km
  • Terminal chart: last hop round trip time line chart

trace route realtime

Back To Top

Report

The myLG trace report runs by the below command which sends 10 packets as default to the host. Typically the use case of the report is once you need to capture the result. if you need more than 10 packets you can specify the counter by -c count.

local> trace host/IP-address -r -R

trace realtime report

Back To Top

HTTP Ping

Introduction

myLG probes a given URL and displays relevant statistics. the concept is similar to ping command but instead, it uses HTTP(s) protocol. It supports HEAD, GET, POST methods and it shows the below information per each response.

  • Response time
  • HTTP protocol
  • HTTP status code
  • Round trip time

It supports different parameters to customize your ping also you can select trace option to display more details for each ping.

sc-hping-intro

Back To Top

Basic

You can run the below command to measure the latency of a web server like google.

local> hping google.com

The default method is HEAD in this example and you can change to other methods by -m option.

http ping

Back To Top

Trace

Once the trace option selected then hping shows extra information about the below events:

  • Connection completed
  • Read first byte
local> hping google.com -trace

sc-hping-trace

Back To Top

Export JSON

It supports JSON format so you can wrap the command with JSON option to import hping statistics to your script or application.

#mylg hping www.cisco.com -json

{
  "host": "www.cisco.com",
  "dnslookup": 85.035466,
  "count": 5,
  "min": 33.808664,
  "avg": 34.925493625,
  "max": 38.163978,
  "failure": 0,
  "statuscodes": {
    "200": 100
  }
}

Back To Top

Packet analyzer

Introduction

The dump command allows the user to display TCP/IP packets being transmitted or received over a network. It supports Berkeley Packet Filter (BPF) style to filter the packets to narrow down to a specific issue. It works based on the libpcap library and you can capture the data flow to a file and open with any libpcap compatible software.

Back To Top

Basic

In the simple case, you run the below command to capture 30 packets on the display. The dumped data is including protocol, source/destination IP address, TCP/UDP source/destination port, window size and more.

local> dump -c 30

basic dump

Back To Top

Berkeley Packet Filter

The myLG dump command supports Berkeley packet filter (BPF) syntax to filter packets. for example when you need to see any packets from the specific host 192.168.1.10 you can run the below then It filters all data flow from or to 192.168.1.10 IP address:

local> dump host 192.168.1.10

Please see the important syntaxes below:

host hostname

src host hostname

dst host hostname

and, not, or support in the syntax

tcp, udp, icmp, icmp6, ip, ipv6

For more information, you can visit http://biot.com/capstats/bpf.html

Back To Top

Port Scanner

Introduction

Port scanner tries to probe a server or host for open TCP ports. Actually, it designed to help you middle of a troubleshooting.

Back To Top

LAN Discovery

Introduction

It’s fast and easy to identify all the network technology connected to IP network and creates a list. it shows IP, MAC address, related DNS record, local interface name and vendor / manufacturer name based on the MAC address (organizationally Unique Identifier).

screen-shot-2016-10-10-at-12-49-11-am

 

Back To Top

Quick NMS

Introduction

The quick NMS uses SNMP to acquire port’s information including:

  • Status
  • Description
  • Traffic In / Out
  • Packet In / Out
  • Discard In / Out
  • Error In / Out

As it supports real-time monitoring you can see all port(s) traffic flow real-time.  it can be used to monitor any network device, such as Routers, Switches, Gateway Servers, and so on, that supports SNMP.

sc-nms-report

sc-nms-localhost

Back To Top

Basic

local> nms

nms> connect 192.168.1.10 -c public
Connected: 192.168.1.10

nms/192.168.1.10> show interface
3 interfaces has been found
+-----------+--------+-------------+------------+-------------+------------+-------------+------------+-------------+----------+-----------+
| INTERFACE | STATUS | DESCRIPTION | TRAFFIC IN | TRAFFIC OUT | PACKETS IN | PACKETS OUT | DISCARD IN | DISCARD OUT | ERROR IN | ERROR OUT |
+-----------+--------+-------------+------------+-------------+------------+-------------+------------+-------------+----------+-----------+
| en0       | Up     |             | 5.24 K     | 1.90 K      | 6.80       | 2.70        | 0.00       | 0.00        | 0.00     | 0.00      |
| en1       | Up     |             | 0.00       | 0.00        | 0.00       | 0.00        | 0.00       | 0.00        | 0.00     | 0.00      |
| en2       | Up     |             | 0.00       | 0.00        | 0.00       | 0.00        | 0.00       | 0.00        | 0.00     | 0.00      |
+-----------+--------+-------------+------------+-------------+------------+-------------+------------+-------------+----------+-----------+
* units per seconds

You can configure the SNMP by set command then you don’t need to add them through the connect command.

local> set snmp community public
nms> connect 192.168.1.10
Connected: 192.168.1.10

Back To Top

RIPE NCC queries

Introduction

myLG queries RIPE NCC database to get information about autonomous system number and IP prefixes.

local> whois 577
local> whois 8.8.8.0/24
local> whois 8.8.178.110

sc-ripencc-whois-asn

Back To Top

Peering DB

Introduction

PeeringDB is a database of networks that are interested in peering. all the peering data is available through peeringdb.com but for most of the engineers it will be convenient through the command line. myLG supports query to this database by simple command as below:

local> peering AS-Number

sc-peering-intro

Back To Top

Looking Glass queries

Introduction

The IP Network Looking Glasses provide network routing information on their backbone infrastructure. There are three main probes that they’re common between looking glasses including trace, ping, and BGP.

  • Trace allows a user to follow a packet through their network to a specific destination. It shows the domain, IP address and the round-trip packet times as it traces the route to the destination.
  • Ping can be used to show whether or not a device with a valid Internet address or domain name can return packets sent to it by a specified server.

 

Back To Top

Web dashboard

basic

The web dashboard supports ping and traceroute probes for the time being that they already available at myLG command line. you can see the same result with extra information like latency graphs, jitter through a web browser (Chrome recommended)

You can reach to the web dashboard by run “web” at myLG command line:

local>web

Or you can directly request it at your browser : http://localhost:8080

mylg_web_dashboard

If you’re seeing timeout on all hops the myLG doesn’t have enough permission:

#sudo mylg

or change the mylg permission by chown u+s

Back To Top

options

-n

Do not try to map IP addresses to host names

-c

Set the number of pings sent

-nr

Do not try to map IP addresses to ASN,Holder (RIPE NCC)

-4

Forces the trace command to use IPv4 (target should be hostname)

Back To Top

Configuration

Introduction

myLG allows you to change the default behaviour of the different probes easily per OS user.  to change the configurations you need to type set command like below:

local> set ping timeout 2s

 

Back To Top

Installation

Introduction

myLG is supported by all the Linux flavors, Mac OS X, FreeBSD,ARM architecture like Raspberry PI and Windows 10 (Ubuntu bash).

Back To Top

Ubuntu, Debian

debian-128

Debian and Ubuntu users can install the latest version of myLG using the dpkg package manager. once it installed, open the terminal and execute mylg.

curl -O http://mylg.io/dl/linux/mylg.amd64.deb && dpkg -i mylg.amd64.deb

 

Back To Top

Redhat, CentOS

redhat
centos

 

curl -O http://mylg.io/dl/linux/mylg-0-2.6.x86_64.rpm && rpm -ivh mylg-0-2.6.x86_64.rpm

or

curl -O http://mylg.io/dl/linux/mylg-0-2.6.x86_64.rpm && yum localinstall mylg-0-2.6.x86_64.rpm


Note!
In case you get the libpcap.0.8 dependency issue please try the below:

  • make sure you already have libpcap installed on your system
  • try to create a symbolic link:
    ln -s /path/to/your/current/libpcap.so.x.y /path/to/your/current/libpcap.so.0.8

or download the Linux 64bit binary:

curl -O http://mylg.io/dl/linux/mylg && chmod u+s,+x mylg && mv mylg /usr/bin/

Back To Top