Pages

Saturday, December 3, 2011

Add Loopbacks in Ubuntu for GNS3


Running GNS3 on Linux and trying to reach the outside world, you will not be able to use your host PC to telnet to the virtual routers unless you create loopbacks. see related post in GNS3 forum
Below I post the steps for creating loopback on Ubuntu. After that you will be able to use your PC to telnet or ping to the virtual routers. (more details here)

Saturday, October 29, 2011

Add hosts in GNS3 using VPCS on Ubuntu

The Virtual PC Simulator (VPCS) is a program that runs within Windows or Linux. It has limited functionality, but it allows pings and traceroutes. if you want to save memory and CPU cycles , VPCS is the application to go.
The VPCS can simulate up to 9 PCs.

When VPCS starts, it listens the ports from 20000 to 20008 and waits the
dynamips to connect, and sends the packets to the ports from 30000 to 30008.

More info in the GNS3 website here. From the official website go here.

1. Download VPCS 
use this link here


Installing GNS3 0.7.4 on Ubuntu 10.10 maverick

GNS3 is  an excellent tool  for graphical network simulator that allows simulation from simple to complex networks.A complementary tool for network engineers and people wanting to study for certifications such as Cisco as well as Juniper.

It can also emulate many Cisco IOS router platforms , PIX/ASA Firewalls and Juniper JunOS
The program is an open source, free program and  may be used on multiple operating systems, including Windows, Linux, and MacOS X.

 Check GNS3 documentation website for more details.
Check the old tutorial (for basic) and another for more advance users


My machine has Ubuntu 10.10 maverick (32-bit ).


Wednesday, October 5, 2011

Linux secrets

I will be posting here Linux secrets commands that are not very well known


Space Invaders

OpenOffice.org 2.0/OpenOffice.org 3.2.1 
there's an entire game hidden in OpenOffice.org Calc. Open a new worksheet, and in any cell, type in the formula:
=game("StarWars")

and press Enter. You should see a Space Invaders-style arcade game.


Signature in ASCII graphics 

A sample output. ( press CTRL-D after you type the message)

$ boxes -d peek
STELIOS AGAPIOU
check my Blog
myhomelab.blogspot.com


Wednesday, July 6, 2011

How to see your public IP address from command line

Searching around I found few ways to do that while using Linux console. Upon entering the script , the prompt will return the public IP address

~$ wget -qO- whatismyip.org && echo

~$ wget -q -O - whatismyip.org;echo

~$ wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'

Tuesday, June 28, 2011

Calculating Subnets in Linux

Here are some Linux tools that can calculate subnets

 ipcalc
~$ ipcalc 192.168.2.1/28
Address:   192.168.2.1          11000000.10101000.00000010.0000 0001
Netmask:   255.255.255.240 = 28 11111111.11111111.11111111.1111 0000
Wildcard:  0.0.0.15             00000000.00000000.00000000.0000 1111
=>
Network:   192.168.2.0/28       11000000.10101000.00000010.0000 0000
HostMin:   192.168.2.1          11000000.10101000.00000010.0000 0001
HostMax:   192.168.2.14         11000000.10101000.00000010.0000 1110
Broadcast: 192.168.2.15         11000000.10101000.00000010.0000 1111
Hosts/Net: 14                    Class C, Private Internet


sipcalc
~$ sipcalc 192.168.2.1/28
-[ipv4 : 192.168.2.1/28] - 0

[CIDR]
Host address        - 192.168.2.1
Host address (decimal)    - 3232236033
Host address (hex)    - C0A80201
Network address        - 192.168.2.0
Network mask        - 255.255.255.240
Network mask (bits)    - 28
Network mask (hex)    - FFFFFFF0
Broadcast address    - 192.168.2.15
Cisco wildcard        - 0.0.0.15
Addresses in network    - 16
Network range        - 192.168.2.0 - 192.168.2.15
Usable range        - 192.168.2.1 - 192.168.2.14


-

Sunday, June 26, 2011

Measure network performance with Iperf/JPerf

Iperf is open source network performance tool developed by NLANR/DAST. It measures maximum TCP and UDP bandwidth performance and reports bandwidth, delay jitter, datagram loss. (Jperf the graphical front end written in Java). So it can be used to solve speed and throughput issues.

Available for windows and Linux


Setup



Tuesday, June 21, 2011

Conky for system monitoring

I wanted a tool to show system monitoring for my desktop but not to consume a lot of resources. Goggling around I found Conky.
Conky is a free, light-weight system monitor for X, that displays any information on your desktop. Conky can display just about anything, either on your root desktop or in its own window by using scripts and other external programs. Conky has more than 250 built in objects, including support for a plethora of OS stats  Conky can display this info either as text, or using simple progress bars and graph widgets, with different fonts and colours.
Internet is full of examples as well as a wiki page

Below the system monitoring I created based on my needs.




Monday, June 20, 2011

Ethernet card speed and duplex settings

Using ethtool

ethtool is the standard Linux utility for controlling network drivers and hardware, particularly for wired Ethernet devices. Among others it can be used to get identification and diagnostic information, extended device statistics , control speed, duplex, autonegotiation and flow control for Ethernet devices
Check the complete syntax of the commands here

To see some information in Ubuntu of your Ethernet adapter
 ~$ lspci | grep -i eth   
 00:0a.0 Ethernet controller: nVidia Corporation MCP77 Ethernet (rev a2)  
 ~$ ethtool -i eth0  
 driver: forcedeth  
 version: 0.64  
 firmware-version:   
 bus-info: 0000:00:0a.0  
How to determine Ethernet connection speed in Ubuntu

 ~$ sudo ethtool eth0  
 Settings for eth0:  
   Supported ports: [ MII ]  
   Supported link modes:  10baseT/Half 10baseT/Full   
               100baseT/Half 100baseT/Full   
               1000baseT/Full   
   Supports auto-negotiation: Yes  
   Advertised link modes: 10baseT/Half 10baseT/Full   
               100baseT/Half 100baseT/Full   
               1000baseT/Full   
   Advertised pause frame use: No  
   Advertised auto-negotiation: Yes  
   Link partner advertised link modes: Not reported  
   Link partner advertised pause frame use: No  
   Link partner advertised auto-negotiation: No  
   Speed: 100Mb/s  
   Duplex: Full  
   Port: MII  
   PHYAD: 1  
   Transceiver: external  
   Auto-negotiation: on  
   Supports Wake-on: g  
   Wake-on: d  
   Link detected: yes  

 You can filter the output using grep , to show the needed parameter
 sudo ethtool eth0 | grep -i speed  
   Speed: 100Mb/s  


How to change Ethernet card speed and duplex settings  in Ubuntu
To Turn off Auto-Negotiate feature
 sudo ethtool -s eth0 autoneg off  
To setup your Ethernet network card speed 100 and full duplex
 sudo ethtool -s eth0 speed 100 duplex full  
To setup your Ethernet network card speed 10 and half duplex
 sudo ethtool -s eth0 speed 10 duplex half  

For permanent settings see  this page


Using mii-tool 
Deprecated and replaced by the newer ethtool command,
I have tried with mii-tool but my Ethernet card does not support it

 sudo mii-tool eth0  
 SIOCGMIIPHY on 'eth0' failed: Operation not supported  

Friday, June 17, 2011

Wireless throughput from Notebook

Having similar setup as before I decided to check now, how much throughput I can get from my wireless on notebook.

SETUP


RESULTS
It seems that throughput increases when notebook is running on AC, and drops when running on batteries, most probably because of the Power Saving mode.

Monday, June 13, 2011

How to check release version in Ubuntu

There are many ways to check from Ubuntu the release version.

~$ cat /etc/issue.net
Ubuntu 8.04.4 LTS
~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu 8.04.4 LTS"
~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 8.04.4 LTS
Release:        8.04
Codename:       hardy
~$ cat /etc/issue
Ubuntu 8.04.4 LTS \n \l

Sunday, June 12, 2011

Wireless throughput from Sony Ericsson XPERIA X8

I wanted to test the wireless throughput from my mobile device.
One tool that can do this is Iperf.

Setup



Results
Best throughput I could get was 17.4 Mbits/sec.
See the tests carried out in detail below.