Monday, October 5, 2009

Pilot VS Preamble symbol in Wireless communication

The Preamble
A preamble is used in Digital Communication Systems to train the VCO of the receiver to the incoming signals's clock so as to produce a clocking in the reciver that is synchronized to the received signal, and so a perfect sampling and/or demodulation can be done.

The Pilot symbols
The pilot symbols are used in wireless communication systems for the sake of channel estimation and correction purposes. Where the wireless channel have great effect on the phase and the frequency of the wireless signal and alters them by some value, which have many bad side effects and may affect the process of demodulation. Some of these effects as :Phase rotation, doppler frequency shift, degradation of the amplitude and phase distortion. All of these cause poor SNR,SIR and one important thing is it may alter the place of the frequncy of some subcarriers in an OFDM which may cause the loss of othogonality between them and the OFDM symbol is destructed. So, at the transmitter a well known symbol (its freqency,amplitude and phase) is inserted among the subcarriers to carry the effects of the channel, and at the receiver it demodulated and then all the effects are calculated and the received signal is corrected by those calculated amounts

From :

Thursday, July 23, 2009

Showing OTcl class name from C++ in NS2

Actually, C++ does not have any instruction to display the OTcl name. But if you have observed that each OTcl object has it own address which you can see by enter command "set ns [new Simulator]". The line comes after the command is the address of object ns which.
normally,in the form of "_oxx, xx=number".

You can show the object's class name,in this example $ns, by using two alternatives. "$ns info class" or "_oxx info class" (replaces xx with the number you see after the command "set ns [new Simulator]". From this characteristic, it gives the opportunity to display OTcl name
from C++ (Compiled Hierarchy).

The C++ instruction, "this->name()", gives "_oxx" of the object that pointer "this" inside
So, running this instruction (in C++ function)

tcl.evalf("puts \"OTcl name = [%s info class]\"",this->name());

will gives the OTcl name.

Some warning!!
"this" pointer can be used after the constructor only because it is initialized after running the constructor.

Monday, July 13, 2009

Greek symbol in blogger

The blogger has capability to interpret some html tags. I have test some of Greek symbol below

Alpha a , Beta b symbol.

It's work!!!

Saturday, July 11, 2009

Another bug in GNS3 + Running in Windows Vista

Another bug, I found, occured when I have connect line(fastethernet or serial) to cloud (NIO_UDP) which connect to virtual PC on Ubuntu Jaunty. The GN3 says that it cannot connect to NIO_UDP.

Then I decided to work with GNS3 as Root by invoking GNS3 in commandline in with user root. Everthing is going well until I save the project, the problems which occured to me are
1. GNS3 cannot save the workspace outside root directory (it just process as it saved the project, but actually it is not!!)
2. I cannot open project file (*.net) by double click it (open with default application), I have to open it from commandline (but my friend, same os version, has not!!??).

At last, I decided to work with GNS3 in Windows Vista. But the problem mostly occured in Windows Vista is that it does not provide telnet client at first installation. So I have to install telnet client in Control Panel > Program and Features > (on left pane) Turn windows feature on and off and activate telnet client.

Working with Windows telnet is not a comfortavle way for me, then I install the PuTTY for telnet client. The command that we have to config in Edit > Preferences > General > Terminal command is "start C:\progra~1\PuTTY\putty.exe -telnet %p"

---[ For Windows Vista ]---
1. We have to use address instead of localhost (%h) and %p is the router port number for telnet (console connection)
2. We have to change the path to PuTTY from C:\Program Files\PuTTY\putty.exe to C:\progra~1\PuTTY\putty.exe since it will error (Windows thainks that "C:\Program" is telnet program, ToT)
3. the word "start" is to invoke the commandline application

---[ For Both, Windows Vista and Ubuntu Jaunty ]---
1. The path specifies (both workspace and IOS path) in the project file (*.net) cannot use relative path, we have to enter the absolute path only!!

Friday, July 3, 2009

Bug in GNS3

There is little bug in GNS3 running on Ubuntu Jaunty (9.04). The GNS3 cannot display the workspace which has been configured in *.net file. The GNS3 team said that it is the problem of new vesion of qt library.

To solve the problem, you have to right click on project file *.net and select menu "Open with other application" and browse to gns3 application (If you install through synaptic, it would locate at /usr/bin/gns3) the saved project will show in the workspace.

Thank you to

Thursday, July 2, 2009

Cross platform printer sharing with password protection

After googling many sites, large number of people can setup a share folders,files or printers between Windows and Linux Platform, specifically Ubuntu, without password protection. To limit the access of share folder, pinters, the administrator setups the password for some user account.

In my environment, the Host computer which connect to printers is Windows XP platform and client computer is Ubuntu Jaunty Jackalope (9.04) with samba installed. To access shared printer with password protected, the clients have to follow these step
1. Open printer configuration in Administrator>Printing
2. click on New>Printer
3. On left menu, click on Windows printer via SAMBA
4. click browse to browse to target printer
5. activate Set authentication details now and insert username and password given by administrator (you can test that the printer and password match by click on button verify)
6. click forward
7. browse for target printer's brand and click forward
8. Select model then forward (it would load driver for target printer)
9. activate some options that you'd love to
10. In the last step, it would prompt you to print test page
11. Finish!!

Note :
- you can see the status of printing by clicking on properties of target printer, the status is shown in Printer state : field
- printer sharing works on same subnet only

Playing Warcraft III : Dot A in Ubuntu (9.04) Jaunty

There are several steps for configuration of Wine to make it run Warcraft III
1. Get the latest Wine, here
2. Run command in shell
$ wine "path_tp_warcraft/war3.exe" -opengl
3. to set resolution manually in regedit, you should run command
$ wine regedit
4. In HKEY_CURRENT_USER/Software/Blizzard Entertainment/Warcraft III/video, set reswidth and resheight to your resolution.

Thursday, June 11, 2009

Doxygen in Ubuntu 9.04

Doxygen is a documentation system for C++, C, Java, Objective-C, Python, IDL (Corba and Microsoft flavors), Fortran, VHDL, PHP, C#, and to some extent D.

It can help you in three ways:

  1. It can generate an on-line documentation browser (in HTML) and/or an off-line reference manual (in $\mbox{\LaTeX}$) from a set of documented source files. There is also support for generating output in RTF (MS-Word), PostScript, hyperlinked PDF, compressed HTML, and Unix man pages. The documentation is extracted directly from the sources, which makes it much easier to keep the documentation consistent with the source code.
  2. You can configure doxygen to extract the code structure from undocumented source files. This is very useful to quickly find your way in large source distributions. You can also visualize the relations between the various elements by means of include dependency graphs, inheritance diagrams, and collaboration diagrams, which are all generated automatically.
  3. You can even `abuse' doxygen for creating normal documentation (as I did for this manual).

Doxygen is developed under Linux and Mac OS X, but is set-up to be highly portable. As a result, it runs on most other Unix flavors as well. Furthermore, executables for Windows are available.

Easy step to install Doxygen in Ubuntu 9.04
1. Install package doxygen and doxygen-gui
2. In the terminal, run doxygenwizard
3. Customize the Doxyfile using doxywizard

Note : to show the dependency graph you have to
1. install graphviz package
2. select dot feature in doxywizard
3. specify the dotty path (Normally, in /usr/bin/)

NS2 v2.29 - Doc using Doxygen
1. Download from here
2. To extract, type tar -zxvf "filename.tar.gz" in the terminal
3. open index.html in html folder

Optional 4. copy folder to html folder to web server folder

Note : To enable search engine capability you should install php package

Tuesday, June 9, 2009

Cisco Lab 2 : Spanning-tree

1. Spanning tree protocol (STP)
2. Root bridge and port election
3. Rapid STP (RSTP)

Spanning Tree Protocol (STP)
1. Show STP
switch#show spanning-tree
- Root bridge has lowest bridge ID (bridge priority+MAC address)
- All ports of root bridge is designated port
- Root port is the port with the lowest path cost or lowest port ID (port priority+port number) to the root bridge

Root bridge and port election
1. Changing bridge priority
switch#spanning-tree vlan "vlan number" priority "possible priority number"
switch#spanning-tree vlan "vlan number" root primary --> bridge priority=24586
2. Changing default path cost
switch(config-if)#spanning-tree vlan "vlan number" cost "path cost number"
3. Changing port ID
switch(config-if)#spanning-tree vlan "vlan number" port-priority "port priority number"

Rapid spanning tree (RSTP)
1. Enable RSTP
switch(config)#spanning-tree mode rapid-pvst

Sunday, June 7, 2009

Backup and restore configuration file on Catalyst 2950 and router 1721


Routers often get upgraded or swapped out for a number of reasons. This document provides the user with some basic steps to migrate the configuration from an existing router to a new router.



Before you use the information in this document, make sure that you meet these requirements:

  • Access to a Trivial File Transfer Protocol (TFTP) or File Transfer Protocol (FTP) server.

  • Connectivity - Routers must be able to access the FTP or TFTP server. Use the ping command to verify connectivity.

Components Used

This document is not restricted to specific software and hardware versions.

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.


Refer to Cisco Technical Tips Conventions for more information on document conventions.

Make a Backup of the Configuration

There are several methods to choose from in order to back up and restore a configuration:

Use a TFTP Server to Backup and Restore a Configuration

This is a step-by-step approach to copy a configuration from a router to a TFTP server, and back to another router. Before you proceed with this method, make sure you have a TFTP server on the network to which you have IP connectivity.

  1. At the Router> prompt, issue the enable command, and provide the required password when prompted.

    The prompt changes to Router#, which indicates that the router is now in privileged mode.

  2. Copy the running configuration file to the TFTP server:

    CE_2#copy running-config tftp:
    Address or name of remote host []?
    Destination filename [ce_2-confg]? backup_cfg_for_my_router
    1030 bytes copied in 2.489 secs (395 bytes/sec)
  3. Open the configuration file with a text editor. Search for and remove any line that starts with "AAA".

    Note: This step is to remove any security commands that can lock you out of the router.

  4. Copy the configuration file from the TFTP server to a new router in privileged (enable) mode which has a basic configuration.

    Router#copy tftp: running-config
    Address or name of remote host []?
    Source filename []? backup_cfg_for_my_router
    Destination filename [running-config]?
    Accessing tftp://
    Loading backup_cfg_for_router from (via FastEthernet0/0): !
    [OK - 1030 bytes]

    1030 bytes copied in 9.612 secs (107 bytes/sec)

Use an FTP Server to Backup and Restore a Configuration

In this procedure, an FTP server can be used in place of a TFTP server.

  1. At the Router> prompt, issue the enable command, and provide the required password when prompted.

    The prompt changes to Router#, which indicates that the router is now in privileged mode.

  2. Configure the FTP username and password.

    CE_2#config terminal
    CE_2(config)#ip ftp username cisco
    CE_2(config)#ip ftp password cisco123
  3. Copy the configuration to the FTP server.

    CE_2#copy running-config ftp:
    Address or name of remote host []?
    Destination filename [ce_2-confg]? backup_cfg_for_router
    Writing backup_cfg_for_router !
    1030 bytes copied in 3.341 secs (308 bytes/sec)
  4. Open the configuration file with a text editor. Search for and remove any line that starts with "AAA".

    Note: This step is to remove any security commands that can lock you out of the router.

  5. Copy the configuration file from the FTP server to a router in privileged (enable) mode which has a basic configuration.

    Router#copy ftp: running-config
    Address or name of remote host []?
    Source filename [backup_cfg_for_router]?
    Destination filename [running-config]?
    Loading backup_cfg_for_router !
    [OK - 1030/4096 bytes]
    1030 bytes copied in 13.213 secs (78 bytes/sec)

Use a Terminal Emulation Program to Backup and Restore a Configuration

A terminal emualation program can be used to back up and restore a configuration. This is a description of the procedure using Microsoft Hyperterminal Terminal Emulation software:

  1. If the configuration needs to be copied from another router, connect to that router through the console or Telnet.

  2. At the Router> prompt, issue the enable command, and provide the required password when prompted.

    The prompt changes to Router#, which indicates that the router is now in privileged mode.

  3. Issue the terminal length 0 command in order to force the router to return the entire response at once, rather than one screen at a time.

    This allows you to capture the configuration without extraneous --more-- prompts generated when the router responds one screen at a time.

  4. On the HyperTerminal menu, choose Transfer > Capture Text.

    The Capture Text window appears.

  5. Name this file "config.txt."

  6. Click Start in order to dismiss the Capture Text window and begin the capture.

  7. Issue the show running-config command, and allow time for the router to complete its response. You will see:

    Building configuration...

    followed by the configuration.

  8. On the HyperTerminal menu, choose Transfer > Capture Text > Stop in order to end the screen capture.

  9. Open the config.txt file you created in any text editor, such as Notepad or Wordpad.

  10. Search for and remove any line that starts with "AAA".

    Note: This step is to remove any security commands that could lock you out of the router.

  11. Save the file.

  12. Connect to the router that needs the configuration.

  13. Open the config.txt file.

  14. Highlight the entire contents of the config.txt file.

    You can do this by dragging the cursor from before the first character to after the last character in the file while holding down the left mouse button. Alternatively, if you use Notepad, you can choose Edit > Select All from the menu.

  15. Copy the selected text to the Windows clipboard.

    You can either choose Edit > Copy from the text editor menu, or hold down the CTRL key and simultaneously press the C key in order to perform the copy.

  16. Switch to the HyperTerminal window, and issue the configure terminal command at the Router# prompt. Then press Enter.

  17. Paste the configuration file into the router by selecting Edit > Paste to Host on the HyperTerminal menu.

  18. After the configuration has finished pasting and the router brings you back to the configuration prompt, issue the copy running-config startup-config command in order to write the configuration into memory.

  19. Issue the exit command in order to return to the Router# prompt.

Automatic Backup of Configuration using the Kron Method

In order to get a router to copy the running-config to startup-config, for example every Sunday at 23:00, complete these steps:

  1. Create a kron policy list—This is the script that lists what commands the router should run at the scheduled time.

    Router(config)#kron policy-list SaveConfig

    Router(config-kron-policy)#cli write
    • cli—Specifies EXEC CLI commands within a Command Scheduler policy list.

    • Policy-list—Specifies the policy list associated with a Command Scheduler occurrence.

    Note: The reason why write was used rather than copy running-config startup-config is because kron does not support interactive prompts and the copy running-config startup-config command requires interaction. It is important to remember this when you create commands. Also, note that kron does not support configuration commands.

  2. Create a kron occurrence—This informs the router when and how often the policy should run.

    Router(config)#kron occurrence SaveConfigSchedule
    at 23:00 Sun recurring
    Router(config-kron-occurrence)#policy-list SaveConfig

    • SaveConfigSchedule—This is the name of occurrence. Length of occurrence-name is from 1 to 31 characters. If the occurrence-name is new, an occurrence structure will be created. If the occurrence-name is not new, the existing occurrence will be edited.

    • at—Identifies that the occurrence is to run at a specified calendar date and time.

    • recurring—Identifies that the occurrence is to run on a recurring basis.

  3. Verify the kron configuration by using the show command.

    Router#sh kron schedule
    Kron Occurrence Schedule
    SaveConfigSchedule inactive, will run again in 1 days 12:37:47 at 23:00 on Sun
    • inactive—Means that kron is not running the command(s) at present.

    • Active—Means that kron is running the current command(s).

    Router#show running-configuration
    kron occurrence SaveConfigSchedule at 23:00 Sun recurring
    policy-list SaveConfig
    kron policy-list SaveConfig
    cli write

Backup Configuration to a TFTP Server

This example is to save the running config to a TFTP server ( every Sunday at 23:00:

Router(config)#kron policy-list Backup

Router(config-kron-policy)#cli show run | redirect
Router(config)#kron occurrence Backup at 23:00 Sun recurring
Router(config-kron-occurrence)#policy-list Backup


Use the show running-config command to confirm that the configuration file has been copied to the destination router.

Backup Configuration file
1. Router 1721 : file
2. Catalyst 2950 : file

Cisco Techncal Support

Configuration file for proFTP in Ubuntu

For the one who have problem like me on proFTP. After googling for many many webpages, I've found the config file for anonymous access for proFTP

My modify config file : anonymous can do what ever they want.

Config file

Testing Ubuntu Jaunty Netbook Remix on Aspire One

I just have some time for fun testing Ubuntu netbook remix version of Jaunty. My testing environment is
OS : Ubuntu Jaunty Jackalope (9.04) netbook remix and PC version
Hardware : Acer Aspire one 110
Main Memory : 2GB
Non Volatile memory : Flash memory 8 GB
It is good at the first sight that it can boot on USB flash drive faster than Windows XP (home and professional edition). The interface is very nice and splendid animation. It has no question why I won't install this image into my aspire one. After all installation is complete which takes about 30 mins!!!, I've to wait for installing update about 1 hour ???.However, the new version still has some bugs. After I have change the look from netbook to classic, it cost me very much. The problem that I've face is that it cannot open X window after reboot (it says that the display is not composite or something like that ...). After fixing by using commandline, at last, I decided to newly install ubuntu using Desktop version instead.

The Ubuntu in desktop version costs only 2.3 GB for OS (less WinXP). The speed is , of course, also faster than older OS, Windows XP. Another impression about this Jaunty is that it can run compiz and wobbly effect (WOW!!!) like my laptop and the problem about the X windows is not happened in this version.

So, for the people who interests to install Ubuntu netbook remix version on Acer Aspire one, I recommend that you should not change the look from the default to the classic (as the system tells you) since it can cost you to install all of the thing again and again

Friday, June 5, 2009

Cisco Lab 3 : VLAN

1. Setup and remove VLAN database
2. Static access port assignment in VLAN
3. Static trunk port VLAN setup
4. Virtual trunking protocol (vtp)
5. VTP pruning

Note : Maximum vlan support on Catalyst 2950 = 128

Setup VLAN database
1. Setup self IP address of switch
2. Setup VLAN database
switch#vlan database
3. Setup vlan record
switch(vlan)# vlan "vlan number (0,1,...,128)" name "vlan name"

Remove VLAN database
There are two alternative ways to remove vlan database
1. Remove by individual
switch#vlan database
switch(vlan)#no vlan "vlan number" e.g. #no vlan2
2. Remove all of database
switch#delete flash:vlan.dat

Static access port assignment in VLAN
1. Enter Global configuration mode
switch#conf t
2. port assignment : there are two alternative ways individual or group assignment
First way : individual port assignment
- Enter interface configuation
switch(config)#interface "interface-type" "module"/"number" e.g. #int fa0/1
- Set port access mode
switch(config-if)#switchport mode access
- Assign vlan to port
switch(config-if)#switchport access vlan "vlan number"

Second way : group of port assignment
- Enter group of interface configuation
switch(config)#interface range "interface-type" "module"/"begin number" - "end number" e.g. #int fa0/1 - 24
- Set port access mode
switch(config-if-range)#switchport mode access
- Assign vlan to port
switch(config-if-range)#switchport access vlan "vlan number"

Static trunk port assignment in VLAN
1. Enter interface of trunk port
switch(config)#interface "interface-type" "module"/"number"
2. Change mode to trunk mode
switch(config-if)#switchport mode trunk
3. Verify
switch#show interface status
switch#show interface
"interface-type" "module"/"number"
4. limited vlan to access trunk
switch(config-if)#switchport trunk allow vlan "begin vlan number"-"end vlan number"

Virtual trunking protocol (VTP)
1. Setup vtp domain
switch#vlan database
switch(vlan)#vtp domain "domain name"
2. Set mode of vtp equipment
switch(vlan)#vtp {server / client / transparent}
3. (optional) Set password on vtp
switch(vlan)#vtp password xxxx
4. Verify result
switch#show vtp status

VTP Pruning
1. Enable pruning
switch#vtp pruning

Wednesday, June 3, 2009

Cisco Lab 1 : LAN Switch Catalyst 2950

1. Setup IP address of Ethernet switch
2. Configure telnet interface
3. Test switch features
3.1. Connection
3.2. Speed limit

Setup IP Address of Ethernet switch
1. Set interface of VLAN1 (management VLAN for telnet)
Switch(config) # int vlan1
2. Set IP address for interface VLAN1 (IP address of switch)
Switch(config-if) # ip address "IP_ADDR" "SUBNET_MASK"
3. Enable VLAN1
Switch(config-if) # no shutdown
4. Setting test
4.1. Switch # show running-configuration
4.2. Ping from computer connect from switch LAN interface (using static IP adress)

Configure telnet interface
1. Setup IP address of switch
2. Configure the maximum support sessions for telnet sessions (support to 5 sessions 0...4)
Switch(config) # line vty 0 4
3. Set the password for line vty (line virtual TeleType), we have to set since switch will not allow user to connect via telnet without password protection.
Switch(config-line) # password xxxxx
4. Set switch to prompt user to login
Switch(config-line) # login
5. Exit to Global configuration mode
Switch(config-if) # exit
6. Set up password for priviledge EXEC mode, we have to set for telnet user to configure the switch.
Switch(config) # enable secret xxxxxxxxxxxx

Test switch features
1. Test connection by using two laptops connect via FastEthernet port0/0 and 0/24
- Ping to see that ICMP packet.
- Test shutdown and no shutdown to disable and enable interface
2. Limit the speed 10 Mb or 100 Mb
- Select interface to set speed
Switch(config) # int FastEthernet0/0 ----> interface 0 port 0
Switch(config-if) # speed 100 ----> set speed to 100 Mbps
Switch(config-if) # duplex full ----> set full duplex communication
- See the result in laptop ethernet connection information

Tuesday, June 2, 2009

Cisco console


People who work with Cisco network equipment need to be able to connect to the console port on their devices. In Windows, you can simply fire up HyperTerminal to get basic access to your devices. If you are using Linux, then you need to know how this can be done with an application called Minicom.


First, you are going to need a Cisco console cable, a Cisco device, and a computer. If your computer has a serial port, then you can use the standard console cable that comes with every Cisco device.

If you do not have a serial port (like most new laptops), then you need to purchase a USB to Serial adapter that supports Linux. This device will allow you to use the standard Cisco cable, which has a serial port on one end.

Install Minicom

You can easily install Minicom by using "System > Administration > Synaptic Package Manager". Search for "minicom" and choose to install the package. Click "Apply" and Minicom should be installed within a few seconds.

Find the name of your serial port

Next, you need to find out is which device your serial port is mapped to. The easiest way to do this is to connect the console cable to a running Cisco device. Now open up a Terminal using "Applications > Accessories > Terminal" and type this command:

dmesg | grep tty

The output will look something like this:

Look in this output for words that contain "tty". In this case, it is "ttyS0". That meas the name of the device the corresponds to your serial port is "ttyS0". Now we are ready to configure Minicom to use this information.

Configure Minicom

Open a terminal using "Applications > Accessories > Terminal". Now type this command to enter the configuration menu of Minicom:

sudo minicom -s

Use the keyboard arrow keys to select the menu item labeled "Serial Port Setup" and then hit "Enter". This will open a window that looks similar to the one below:

Change your settings to match the ones in the picture above. Here is what I had to change:

  • Change the line speed (press E) to "9600"
  • Change the hardware flow control (press F) to "No"
  • Change the serial device (press A) to "/dev/ttyS0"
    • Be sure to use the device name that you learned in the previous step

Once your screen looks like mine, you can hit "Escape" to go back to the main menu. Next, you need to select "Save setup as dfl" and hit "Enter" to save these settings to the default profile. Then select "Exit Minicom" to exit Minicom... ;)

To find out if you have configured Minicom correctly, type this command in the terminal:

sudo minicom

After entering your Ubuntu user password, you should be connected to your Cisco device.

Note: You may want to delete the Minicom init string if you see a bunch of gibberish every time you connect to a device. To do this, enter Minicom configuration with:

sudo minicom -s

Then select "Modem and dialing". Press "A" to edit the Init string, and delete all characters so that it becomes empty. Make sure you save this to the default profile with "Save setup as dfl". You should no longer see gibberish when you connect to devices.

Create a desktop launcher

If you want to have quicker access to Minicom, you can create a desktop launcher.

  1. Right-click on the desktop and choose "Create launcher"
  2. Click on "Icon" and choose the picture you want to use
  3. Use the "Type" pull-down menu and select "Application in terminal"
  4. Create a name like "Cisco Console" in the field labeled "Name"
  5. Enter this command into the field labeled "Command"
    • sudo minicom
  6. Hit "OK" and your desktop launcher is ready for you to use.


Using the Cisco console in Linux

Thursday, May 28, 2009

Orthogonal Frequency Division Multiplexing part 1

1. Definition
Orthogonal Frequency Division Multiplexing (OFDM) is a modulation scheme that is especially suited for high-data-rate transmission in delay dispersive environments. It converts a high-rate datastream into a number of low-rate stream that are transmitted over parallel, narrowband channels that can be easily equalized.

2. Concept
In OFDM, The data is divided into several parallel data streams or channels, one for each sub-carrier. Each sub-carrier is modulated with a conventional modulation scheme (such as quadrature amplitude modulation or phase shift keying) at a low symbol rate, maintaining total data rates similar to conventional single-carrier

modulation schemes in the same bandwidth.

3. Signal Generation

3.1. Transmitter
An OFDM carrier signal is the sum of a number of orthogonal sub-carriers, with baseband data on each sub-carrier being independently modulated commonly using some type of quadrature amplitude modulation (QAM) or phase-shift keying (PSK). This composite baseband signal is typically used to modulate a main RF carrier.
s[n] is a serial stream of binary digits. By inverse multiplexing, these are first demultiplexed into N parallel streams, and each one mapped to a (possibly complex) symbol stream using some modulation constellation (QAM, PSK, etc.). Note that the constellations may be different, so some streams may carry a higher bit-rate than others.

An inverse FFT is computed on each set of symbols, giving a set of complex time-domain samples. These samples are then quadrature-mixed to passband in the standard way. The real and imaginary components are first converted to the analogue domain using digital-to-analogue converters (DACs); the analogue signals are then used to modulate cosine and sine waves at the carrier frequency, fc, respectively. These signals are then summed to give the transmission signal, s(t).

3.2. Receiver

The receiver picks up the signal r(t), which is then quadrature-mixed down to baseband using cosine and sine waves at the carrier frequency. This also creates signals centered on 2fc, so low-pass filters are used to reject these. The baseband signals are then sampled and digitised using analogue-to-digital converters (ADCs), and a forward FFT is used to convert back to the frequency domain.

This returns N parallel streams, each of which is converted to a binary stream using an appropriate symbol detector. These streams are then re-combined into a serial stream, {\hat s}[n], which is an estimate of the original binary stream at the transmitter.


Molisch, Andreas F.. Wireless Communications. Sussex: John Wiley & Sons,LTD, October 2007.
[2] Orthogonal frequency division-multiplexing,Wikipedia
Langton, Charan. Ortogonal Frequency Division Multplexing (OFDM) Tutorial

Latex equation editor on webpage

The CodeCogs Equation Editor is an online editor that facilitates the creation and formatting of LaTeX equations. Used in combination with our LaTeX rendering scripts, it creates HTML code to render an equation on any website and some email programs. The editor is open source and can be easily extended and adapted for any particular need. It is compatible with a range of WYSIWYG editors, supports multiple languages and works across all major internet browsers, including IE, FireFox, Safari and Opera.

There are really two distinct problems that we solve:

  1. First is the creation of LaTeX formulas. Few of us remember all the commands and the CodeCogs editor is there to facilitate this.
  2. Second is how to render code into graphical (nice looking) equations. We use a variety of techniques that can be use in isolation or even collectively. If you're familiar with LaTeX then very often you can create equations without ever using the editor.
The equation editor can be found here

Wednesday, May 27, 2009

Cisco router simulation with Graphical Network Simulator (GNS3)

GNS3 is a graphical network simulator that allows simulation of complex networks.

To allow complete simulations, GNS3 is strongly linked with :

  • Dynamips, the core program that allows Cisco IOS emulation.
  • Dynagen, a text-based front-end for Dynamips.
  • Pemu, a Cisco PIX firewall emulator based on Qemu.

GNS3 is an excellent complementary tool to real labs for Cisco network engineers, administrators and people wanting to pass certifications such as CCNA, CCNP, CCIP or CCIE.

It can also be used to experiment features of Cisco IOS or to check configurations that need to be deployed later on real routers.

This project is an open source, free program that may be used on multiple operating systems, including Windows, Linux, and MacOS X.

Features overview

  • Design of high quality and complex network topologies.
  • Emulation of many Cisco router platforms and PIX firewalls.
  • Simulation of simple Ethernet, ATM and Frame Relay switches.
  • Connection of the simulated network to the real world!
  • Packet capture using Wireshark.
Important notice: users have to provide their own Cisco IOS to use with GNS3.

The installation procedure can be found here
GNS3 Tutorial (Thai) can be found here
Cisco Configuration Tutorial can be found here

Sunday, May 24, 2009


The equipment list
1. Cisco router (model : 1721) : link : datasheet : IOS image
2. Cisco switch (model : Catalyst 2950) : link : datasheet : IOS image
3. 3com Wireless ADSL Router (model : 3CRWDR101A-75) : link : Manual
4. D-Link ADSL Router (model : DSL2640T) : link : Manual

Saturday, May 23, 2009

Ubuntu 9.04 keyboard and mouse problem

I just found Ubuntu 9.04 problem (possibly bug) of keyboard and mouse on my hardware (Dell Vostro 1310, Ubuntu 9.04 kernel 2.6.28-11). In the login splash screen, Ubuntu sometimes does not detect or enable my keyboard and touchpad, so I cannot login to my account.

Many ubuntu dell users also complain about this problem too. Some of them think that it is kernel version problem, so they use the older kernel instead. The others try to configure the xwindow using command xfix in recovery mode or power on and off the laptop.

For me, I use the solution given in this dell ubuntu forum.

Solution : just append the word "i8042.reset" after kernel /boot/vmlinuz-2.6.28-12-generic root=UUID=d655bf5b 3061-44bb-a9d8-2d6d9b4afc57 ro quiet splash of "/boot/grub/menu.lst"
title Ubuntu 9.04, kernel 2.6.28-12-generic
uuid d655bf5b-3061-44bb-a9d8-2d6d9b4afc57
kernel /boot/vmlinuz-2.6.28-12-generic root=UUID=d655bf5b 3061-44bb-a9d8-2d6d9b4afc57 ro quiet splash i8042.reset
initrd /boot/initrd.img-2.6.28-12-generic

Wednesday, May 20, 2009

NS-2 Tutorial

NS-2 Installation on Ubuntu 9.04

The procedure for installing NS-2 in Ubuntu 9.04 on Dell Vostro 1310.

1. Download
ns-allinone-2.33.tar from here.
2. Place it in somewhere, e.g. /home/programmer, then extract it.
$ cd /home/programmer
$ tar -xvf ns-allinone-2.33.tar
3. Download & install some packages from repository
$ sudo apt-get install build-essential autoconf automake libxmu-dev
4. Install the ns2
$ cd ns-allinone-2.33
$ ./install
5. Edit some paths
$ gedit ~/.bashrc
Put these lines on that file. Off course, you might change /home/programmer for it depends on where you extract ns-allinone-2.33.tar.



6. Validate it (take very long time compare to install process)
$ cd ns-2.33
$ ./validate
7. (Optionally) Create a symlink, so that ns can be called from everywhere
$ sudo ln -s /home/programmer/ns-allinone-2.33/ns-2.33/ns /usr/bin/ns
8. Let it take effect immediately
$ source ~/.bashrc
9. Try to run it (and pray :)
$ ns
10. If the installation success, you will see % at the command prompt. Type following command to exit
% exit


Testing ns2 Installation
Use the following ns batch command
set ns [new Simulator]
$ns at 1 “puts \“Hello World!\””
$ns at 1.5 “exit”
$ns run
1. Copy the commands above and paste in the text editor
2. Save the file as simple.tcl
3. Type command in command prompt
$ ns simple.tcl
4. It will show Hello World in the line below

Troble Shooting
1. Problem : The system cannot find Tcl or it tells that Tcl does not install correctly
Solution 1 : Check your ns tcl nam ... version, check folder name. If it is not correct, edit the .bashrc
Solution 2 : run ./install again
2. Problem : nam does not work
Solution 1 : In fact, you need to change that particular file in your Linux manually.

Here is what you should do.
--- tk8.4.18-orig/generic/tkBind.c 2006-07-21 08:26:54.000000000 +0200
+++ tk8.4.18/generic/tkBind.c 2008-07-05 12:17:10.000000000 +0200

@@ -586,6 +586,9 @@

/* ColormapNotify */ COLORMAP,

/* ClientMessage */ 0,
/* MappingNotify */ 0,

+#ifdef GenericEvent
+ /* GenericEvent */ 0,

/* VirtualEvent */ VIRTUAL,

/* Activate */ ACTIVATE,

/* Deactivate */ ACTIVATE,

This @@ -586,6 +586,9 @@ indicates exact location of the line that you start to edit, if you are using gedit or other similar editor in Linux.
The + sign indicates what to add, and the - sign indicates what to delete.
Then run $ ./install to compile and install ns2 again

Fedora forum