Saturday, October 14, 2006

Booting Thin Client Diskless Workstation

Bootp, shorts for Bootstrap Protocol, is an UDP network protocol which is originally defined in RFC 951 to assign IP address for network clients. Bootp is well suitable to apply in diskless workstation, workstation without operating system installed, or simply called thin client.

Bootp is not DHCP! Although both of these two protocols sound similar at first thought, but they are technically different and could be co-exists in the same server or network segment.

Hospitality management system giant, Micros System Inc, makes good use of bootp in its high rank Point-Of-Sale system called Micros 8700 HMS.

When the diskless Micros PC Workstation power on, the bootp enabled network interface card will broadcast its MAC address to the network. When the bootp daemon running on the Micros host receives the broadcast packets, it will assign a valid IP address follow by transferring a DOS operating system image to the PC Workstation according to the MAC-IP-Image mapping maintained in the bootpd configuration file.

Once the image transferring (via tftp protocol) completed, the diskless PC Workstation starts to boot up with the OS image parking in memory segment that act as RAM-DISK. When the boot up completed, the Micros diskless PC workstation functions as if it is a normal desktop PC pre-installed with DOS OS.
Bootpd server and clients could be reside on different network segment by deploying bootp relay agent. To make thing simple or get it up and running right during initial roll out, put both bootpd server and client on the same network segment.

Checklist when thin client unable getting IP address:

  1. Replace a known good unit of thin client to rule out possibilities of

    • Faulty boot ROM embedded in NIC that is bootp enabled
    • Faulty Ethernet patch cable
    • faulty network access point or LAN point

  2. Bootp daemon is not running. In Linux/Unix, execute

    ps -ef | grep bootpd
                or
    lsof -i | grep 67

    to confirm bootp daemon is running and listening to legacy port number (as shown in /etc/services file)

  3. Incorrect MAC address to IP address mapping maintained in /etc/bootptab bootpd configuration file

  4. ARP cache conflict at bootpd server. Executing the command

    arp -a

    to list the bootpd server arp cache. Confirm that there is no ARP cache conflict. To delete the conflict, for example conflict on IP address 192.168.1.3, execute command

    arp -d 192.168.1.3

  5. Use cross-over patch cable or straight Ethernet cable and a hub to directly link up the bootpd server and client to form an simple isolate network. If it works in this simple network infrastructure, then get network experts sit in for assistant. There might be firewalls or routers that have blocked the UDP packets from reaching to bootpd server.
Related information:
  • Tftp protocol in brief

    • Host A sends an read request (RRQ) or write request (WRQ) packet to host B. The packet containing the filename and transfer mode.
    • Host B replies with an acknowledgement packet (ACK) to WRQ or directly with a DATA packet in case of RRQ. The reply also serves to inform host A of which port on host B the remaining packets should be sent to.
    • The source host sends numbered DATA packets to the destination host, all but the last containing a full-sized block of data. The destination host replies with numbered ACK packets for all DATA packets.
    • The final DATA packet must contain less than a full-sized block of data to signal that it is the last. If the size of the transferred file is an exact multiple of the block-size, the source sends a final DATA packet containing 0 bytes of data.

  • Search more related info with Google Search engine built-in

Wednesday, October 11, 2006

lsof Identify Resource Locked Process

Samba server comes with a handy utility called smbstatus to report users who are holding the shared resources.

Utilities used to find out processes that are locking system resources are among the most wanted system utilities for experienced users and system administrators. The lsof being one of such excellent utility that used to identify process or user that is locking system resource such as file or network socket.

For example, a system administrator could use the lsof -i to easily understand how the IBM MQ server communicate over the TCP/IP network with IBM Informix server. The lsof output, as in the diagram below, shows that the Informix oninit is listening to a user defined mnemonic port name stp which the IBM MQ server communicate with. The /etc/services system files is usually used to map a numeric port number to a descriptive port name defined by user.

The Linux lsof utility used to find out process or user that locks a system resource such as file or network socket

  1. Execute lsof -i TCP to report all processes that are accessing the TCP sockets found on the system

  2. Execute lsof -i tcp:8080 to find out what process is holding TCP port 8080.

  3. Execute lsof without any command options to list system wide resources that are using by processes running in the system.

  4. Execute lsof -p 456 to show all resources that are being held by process id 456

  5. Some programs might running on the Linux system by more than one instance. In this case, type lsof -c ProgramName instead of lsof -p PID to get a broader scope of view. For example, lsof -c squid to find out what are the resources held by all squid processes running on the system.

  6. Execute lsof -u keith to confirm resources that are being held by user id keith

  7. Execute lsof /home/keith/secretfile to find out what are the processes that are locking the specify file /home/keith/secretfile
Related information:
  • Another utility called fuser has similar features as of lsof utility. Executing fuser -m /media/cdrom will report all process id that are holding the specify resource.

    Each of the process id suffix with an ASCII character code which represent the resource access type. These resource access type codes are not standardize among various Linux distributions. To be safe and accurate, always consult the fuser man page to confirm the code definitions.

    To check out what process ID is using TCP port 8080, execute the fuser as fuser -n tcp 8080 or fuser 8080/tcp

  • The native network related Linux command netstat is a good tool to find out what program or command is binding to a TCP and UDP port. For example, there are Bind, Djbdns, etc, used to bind with port 53 for DNS protocol. By executing netstat command as

    netstat -tulap

    will shows both the program and process id that bind to the network port. The diagram below shows the commands output of lsof vs netstat.

    netstat vs lsof

    Both of the commands displaying pseudo port name instead of numeric port number, where the mapping of pseudo port name and numeric port number is defined in /etc/services file.

    The netstat command, however, able to display numeric port and IP address with -n option switch. For example, rewrite the command as netstat -tulapn

    Note! Both netstat -tulap and lsof -i MUST be executed with root user account privileges, else nothing as those in the diagram above will be seen.

  • Search more related info with Google Search engine built-in

Tuesday, October 10, 2006

Sending Windows Console Message

Windows Me or 9x comes with one handy network chatting program called Winpopup. Simple GUI allows user at one computer to chat over the network with counterparts sitting at another networked Windows.

However, there is not similar Winpopup replacement for Windows 2000 and above. There are two ways to send a message, better known as console message or Windows Alerts, to networked system running Windows 2000 and above.

  1. Via the Computer Management window

    1. Right-click on the My Computer icon on Desktop
    2. Click on the Manage option from the pop up context menu
    3. Click on the Action menu of Computer Management window
    4. Goto All Tasks option
    5. Click on the Send Console Message... option to call up Send Console Message window.

      Sending console message or Windows Alerts via the Send Console Message GUI.

  2. Via Command Prompt

    1. Click on the Start button
    2. Click on the Program menu
    3. Click on the Accessories menu
    4. Click on the Command Prompt application
    5. At the Command Prompt window, type

      net send 192.168.1.2 "testing messages"

      to send a messages "testing messages" to PC with 192.168.1.2 IP address.

      It is possible to replace IP address with DNS name or domain name to send console message to all workstations of the said domain.
    6. Type net help send for more syntax and usage information.

Related information:
  • Search more related info with Google Search engine built-in

Restart VNC Remotely

Opsss! Can't VNC over to remote hosts!

Might need to restart the VNC server, but how?

  • Restart Windows-based (Windows 2000 and above) VNC server

    1. Right-click the My Computer icon on Desktop

    2. Click the Manage option from the pop up context menu

    3. Click the Action menu of the Computer Management windows

    4. Click the Connect to another computer... option

    5. Type the IP address or DNS name of the target PC running the VNC server

    6. Enter the login authentication info when prompt

    7. After connect successfully, click the Services and Applications on the left panel.

    8. Click the Services option

    9. Search for VNC Server service on the right panel, right-click on it, and click Restart option to restart the VNC server.

  • Restart Linux-base VNC daemon

    1. Telnet or ssh over to target host that running the VNC daemon

    2. Type the command vncserver -kill:1 to kill the VNC daemon running on DISPLAY:1, for example.

    3. Type vncserver :1 to bring up the VNC daemon running on DISPLAY:1 again.

    4. To ensure VNC daemon startup listening for connection, type

      netstat -ant | grep 5901

      where 5901 is the legacy VNC daemon listening port of DISPLAY:1 in the previous step. If the port is open and listening means that VNC daemon is up and running successfully.
Related information:

Monday, September 25, 2006

System And Network Monitoring Freeware

Nagios is the answer!

Nagios is the a GNU GPL software that could used to monitor diverse servers and networking devices. Although the Nagios server running only in Linux and UNIX variants there are Windows based Nagios client that could used to monitor Windows server as well.
It is licensed under the terms of the GNU General Public License Version 2 as published by the Free Software Foundation.

Nagios is a powerful system and network monitoring application. It monitors hosts and services specified, alerting administrators when threshold triggered, and when they recover to healthy state.

Nagios is only available in Linux or UNIX variants. Although, it could helps to monitor Windows servers as well via the Windows version of Nagios client.

Nagios features:

  1. Monitors network services such as SMTP, POP3, HTTP, NNTP, PING, etc.
  2. Monitors server resources such as processor load, disk usage, etc.
  3. Simple plugin design that allows users to easily customize own service checks.
  4. Parallelized service checks.
  5. Ability to define network devices hierarchy using "parent" hosts, allowing detection of and distinction between network devices that are down and those that are unreachable.
  6. Notifications to contacts of email, pager, or user-defined method, when service or host status change.
  7. Ability to define event handlers to be run during service or host events for proactive problem resolution.
  8. Automatic log file rotation.
  9. Support for implementing redundant monitoring hosts.
  10. Optional web interface for viewing current network status, notification and problem history, log file, etc.
Related information:

Internet Explorer Turns FTP Browser

FTP is a legacy file transfer protocol that has been widely used since the day of networked computing.

Other than using the serious typing of command line FTP client, such as the standard FTP client offers by all Windows system, Internet Explorer able to serve as GUI FTP browser too!

Follow these simple steps to turn IE into a graphical FTP client:

  1. Click the Tools menu from Internet Explorer,
  2. Click on Internet Options,
  3. Click the Advanced tab,
  4. Check the check box labeled as "Enable Folder View For FTP Sites",
  5. Check the check box labeled as "Use Passive FTP". Set this option only if the PC is behind a firewall.
  6. Click OK button to complete the setting.
  7. Now, IE is ready to serve as graphical FTP browser. For example, type ftp://keith@188.8.1.10 in the IE address bar and press ENTER to instruct IE connect to FTP server 188.8.1.10 using FTP user account keith. Enter the password when prompt.
  8. Click OK and wait. After successful authentication, an interface similar to Windows Explorer shown. Copy files or folders as usual!
Related information:
  • Search more related info with Google Search engine built-in

Sunday, September 10, 2006

Sharing Big File With File Splitter

Email a big file of few megabytes as attachment is never a good idea as it will likely to hang up the email server. Because of that, most email servers are likely configured to not relay or process email with non friendly attachment too. If it is really need to email such attachment,

  • Split the file into pieces of smaller size with file splitter such as File Chopper.
  • Compress the file to highest possible compression ratio and creating span disk (support by most zip utilities such as WinRar & Power Archiver)
  • Upload the file to public file server such as upload.com and rapidshare.de that offers file sharing services.
    CAUTION! It is better to zip the files with strong encryption before uploading to any public file sharing providers. Zip the files with encryption helps to reduce file size as well as protect sensitive data from the eyes of non expected readers!
  • Combination of the three method - split the file, compress it with password encryption, and host the split-compressed file to public file server.

    File splitter is preferable than span disk feature of zip utilities as file split could be rejoined with Windows built-in command whereas "span disk" require the receiving end to have similar zip program installed.
Related information:
  • File Chopper is a tiny file splitter program that able to chop a file into arbitrary file size and automatically generate a MS-DOS batch file used to rejoin the pieces of file back to its original file. The batch file is using Windows built in DOS copy command to do the job. For example, typing
    copy /b File.1 + File.2 WholeFile.exe
    to rejoin split files called File.1 and File.2 back to its original and workable file called WholeFile.exe
  • Uploading.com only allow unlimited download at certain countries or registered users only. Downloading speed is quite fast as at time of writing.
  • Rapidshare.de works similar to uploading.com
  • Using Lycos Mail account. The redesign of Lycos Mail upgraded to allow unlimited attachment size as claimed in its official site, provided not exceeding the default 3GB email storage space allocated to each email account. Although, the recipient's email system might not accepting such emails with huge attachment size. So, use Lycos Mail to send email with unlimited attachment size only to recipient's Lycos Mail email account! Perhaps, this is the Lycos Mail's intention to get more users to attach with Lycos Mail and not the others like Yahoo! Mail or Gmail!
  • Search more related info with Google Search engine built-in

Using VNC And Redhat Linux

VNC shorts for Virtual Network Computing which is based on Remote Frame Buffer (RFB) protocol. VNC enable any VNC compatible clients running on any platform to access remotely, in graphical mode, to any VNC compatible server running on any platform!

For example, a VNC client running on Windows XP able to remote access to the Redhat Linux X windows via VNC daemon running on Redhat Linux, or the Redhat Linux VNC client able to access to Windows XP and run the Windows program in Windows XP via the VNC session.

The term daemon is normally refers to Linux/Unix-based server application/process. So as here. And the term "server" is then refers to a Windows-based server application/process.
VNC provides not only GUI remote access but also persistent desktop where the long running program or unfinished editing works could be kept running while VNC session is closed. User could reconnect back later at some other places and straight away continue to work on the incomplete tasks.

However, there is a different in handling convention VNC session between Linux to Windows and Windows to Linux. When access from Linux VNC client to Windows VNC server, the screen seen in Linux VNC client is the same as one see in front of the real physical GUI console. When a Windows VNC client connects to Linux VNC daemon such as VNC Server, the screen seen in Windows VNC client is different from the real physical GUI console. This happens because the Linux X windows use the default :0 display (X server screen number) on startup and the port is not sharable with other sessions. The work around is by using x11vnc or the Redhat bundled Vino as VNC daemon.

Vino allow legacy VNC client access directly to the :0 display. For example, Redhat Enterprise Linux ES 4 comes with vino RPM package. Once installed, the Vino is called Remote Desktop and normally grouped under Preference menu. Its simple GUI configuration make it easier to startup the Vino's VNC daemon!

VNC Server is bundled with all Redhat Linux distribution. Once installed, start the VNC Server by typing vncserver at command prompt. The vncserver command, is actually a shell scripts file, bring up the first VNC Server daemon listening to TCP port 5801 & 5901 by default. To bring up second VNC Server daemon, specify a port number other than the default. For example, type vncserver :2 to bring second daemon listening to TCP port 5802 & 5902. Port number starting from 5801 is meant for Java-enabled web browser connection, while port number starting from 5901 is meant for legacy VNC client connection. Although VNC Server could not directly connecting to :0 display by default as Vino or x11vnc do, this feature could be enabled by using VNC loadable module for the X Window system or upgrade to VNC Server version 4.x.

x11vnc works like Vino but has much more features bundled such as built-in SSL encryption/authentication, file transfer, etc. x11vnc is written in plain C language and uses only standard libraries. So, there is no compatibility and performance issues by using x11vnc as VNC daemon, indeed!

Connecting from VNC client of any platform to Windows VNC server is quite straightforward. Just type the IP address of the Windows VNC server in VNC client will do. However, a combination of IP address and display port is used to connecting VNC client of any platform to Linux VNC daemon. The display port number is taken from the last 2 digits of Linux VNC daemon listening port number (ignore leading zero if any). For example, type http://10.170.46.111:5801 at any Java-enable web browser in order to connect to a Linux VNC daemon that listening to port 5801 or type 10.170.46.8:1 at any legacy VNC client in order to connect to Linux VNC daemon listening to port 5901.

Related information: