Sunday, June 12, 2011

Properties of Linux


  • Linux is free:
    As in free beer, they say. If you want to spend absolutely nothing, you don't even have to pay the price of a CD. Linux can be downloaded in its entirety from the Internet completely for free. No registration fees, no costs per user, free updates, and freely available source code in case you want to change the behavior of your system.
    Most of all, Linux is free as in free speech:
    The license commonly used is the GNU Public License (GPL). The license says that anybody who may want to do so, has the right to change Linux and eventually to redistribute a changed version, on the one condition that the code is still available after redistribution. In practice, you are free to grab a kernel image, for instance to add support for teletransportation machines or time travel and sell your new code, as long as your customers can still have a copy of that code. 
  • Linux is portable to any hardware platform:
    A vendor who wants to sell a new type of computer and who doesn't know what kind of OS his new machine will run (say the CPU in your car or washing machine), can take a Linux kernel and make it work on his hardware, because documentation related to this activity is freely available. 
  • Linux was made to keep on running:
    As with UNIX, a Linux system expects to run without rebooting all the time. That is why a lot of tasks are being executed at night or scheduled automatically for other calm moments, resulting in higher availability during busier periods and a more balanced use of the hardware. This property allows for Linux to be applicable also in environments where people don't have the time or the possibility to control their systems night and day. 
  • Linux is secure and versatile:
    The security model used in Linux is based on the UNIX idea of security, which is known to be robust and of proven quality. But Linux is not only fit for use as a fort against enemy attacks from the Internet: it will adapt equally to other situations, utilizing the same high standards for security. Your development machine or control station will be as secure as your firewall. 
  • Linux is scalable:
    From a Palmtop with 2 MB of memory to a petabyte storage cluster with hundreds of nodes: add or remove the appropriate packages and Linux fits all. You don't need a supercomputer anymore, because you can use Linux to do big things using the building blocks provided with the system. If you want to do little things, such as making an operating system for an embedded processor or just recycling your old 486, Linux will do that as well. 
  • The Linux OS and most Linux applications have very short debug-times:
    Because Linux has been developed and tested by thousands of people, both errors and people to fix them are usually found rather quickly. It sometimes happens that there are only a couple of hours between discovery and fixing of a bug.

What is Linux ?


Linux is Registered trademark of Linux Linus Torvalds.
History:
In order to understand the popularity of Linux, we need to travel back in time, about 30 years ago...
Imagine computers as big as houses, even stadiums. While the sizes of those computers posed substantial problems, there was one thing that made this even worse: every computer had a different operating system. Software was always customized to serve a specific purpose, and software for one given system didn't run on another system. Being able to work with one system didn't automatically mean that you could work with another. It was difficult, both for the users and the system administrators.
Computers were extremely expensive then, and sacrifices had to be made even after the original purchase just to get the users to understand how they worked. The total cost per unit of computing power was enormous.
Technologically the world was not quite that advanced, so they had to live with the size for another decade. In 1969, a team of developers in the Bell Labs laboratories started working on a solution for the software problem, to address these compatibility issues. They developed a new operating system, which was
  1. Simple and elegant. 
  2. Written in the C programming language instead of in assembly code. 
  3. Able to recycle code.
The Bell Labs developers named their project "UNIX."
The code recycling features were very important. Until then, all commercially available computer systems were written in a code specifically developed for one system. UNIX on the other hand needed only a small piece of that special code, which is now commonly named the kernel. This kernel is the only piece of code that needs to be adapted for every specific system and forms the base of the UNIX system. The operating system and all other functions were built around this kernel and written in a higher programming language, C. This language was especially developed for creating the UNIX system. Using this new technique, it was much easier to develop an operating system that could run on many different types of hardware.
The software vendors were quick to adapt, since they could sell ten times more software almost effortlessly. Weird new situations came in existence: imagine for instance computers from different vendors communicating in the same network, or users working on different systems without the need for extra education to use another computer. UNIX did a great deal to help users become compatible with different systems.
Throughout the next couple of decades the development of UNIX continued. More things became possible to do and more hardware and software vendors added support for UNIX to their products.
UNIX was initially found only in very large environments with mainframes and minicomputers (note that a PC is a "micro" computer). You had to work at a university, for the government or for large financial corporations in order to get your hands on a UNIX system.
But smaller computers were being developed, and by the end of the 80's, many people had home computers. By that time, there were several versions of UNIX available for the PC architecture, but none of them were truly free and more important: they were all terribly slow, so most people ran MS DOS or Windows 3.1 on their home PCs.


Linus and Linux:


By the beginning of the 90s home PCs were finally powerful enough to run a full blown UNIX. Linus Torvalds, a young man studying computer science at the university of Helsinki, thought it would be a good idea to have some sort of freely available academic version of UNIX, and promptly started to code.
He started to ask questions, looking for answers and solutions that would help him get UNIX on his PC. Below is one of his first posts in comp.os.minix, dating from 1991:

From: torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds)
Newsgroups: comp.os.minix
Subject: Gcc-1.40 and a posix-question
Message-ID: <1991Jul3.100050.9886@klaava.Helsinki.FI>
Date: 3 Jul 91 10:00:50 GMT
Hello netlanders,
Due to a project I'm working on (in minix), I'm interested in the posix
standard definition. Could somebody please point me to a (preferably)
machine-readable format of the latest posix rules? Ftp-sites would be
nice.
From the start, it was Linus' goal to have a free system that was completely compliant with the original UNIX. That is why he asked for POSIX standards, POSIX still being the standard for UNIX.
In those days plug-and-play wasn't invented yet, but so many people were interested in having a UNIX system of their own, that this was only a small obstacle. New drivers became available for all kinds of new hardware, at a continuously rising speed. Almost as soon as a new piece of hardware became available, someone bought it and submitted it to the Linux test, as the system was gradually being called, releasing more free code for an ever wider range of hardware. These coders didn't stop at their PC's; every piece of hardware they could find was useful for Linux.
Back then, those people were called "nerds" or "freaks", but it didn't matter to them, as long as the supported hardware list grew longer and longer. Thanks to these people, Linux is now not only ideal to run on new PC's, but is also the system of choice for old and exotic hardware that would be useless if Linux didn't exist.
Two years after Linus' post, there were 12000 Linux users. The project, popular with hobbyists, grew steadily, all the while staying within the bounds of the POSIX standard. All the features of UNIX were added over the next couple of years, resulting in the mature operating system Linux has become today. Linux is a full UNIX clone, fit for use on workstations as well as on middle-range and high-end servers. Today, a lot of the important players on the hard- and software market each have their team of Linux developers; at your local dealer's you can even buy pre-installed Linux systems with official support - eventhough there is still a lot of hard- and software that is not supported, too.


Current application of Linux systems :
Today Linux has joined the desktop market. Linux developers concentrated on networking and services in the beginning, and office applications have been the last barrier to be taken down. We don't like to admit that Microsoft is ruling this market, so plenty of alternatives have been started over the last couple of years to make Linux an acceptable choice as a workstation, providing an easy user interface and MS compatible office applications like word processors, spreadsheets, presentations and the like.
On the server side, Linux is well-known as a stable and reliable platform, providing database and trading services for companies like Amazon, the well-known online bookshop, US Post Office, the German army and many others. Especially Internet providers and Internet service providers have grown fond of Linux as firewall, proxy- and web server, and you will find a Linux box within reach of every UNIX system administrator who appreciates a comfortable management station. Clusters of Linux machines are used in the creation of movies such as "Titanic""Shrek" and others. In post offices, they are the nerve centers that route mail and in large search engine, clusters are used to perform internet searches.These are only a few of the thousands of heavy-duty jobs that Linux is performing day-to-day across the world.
It is also worth to note that modern Linux not only runs on workstations, mid- and high-end servers, but also on "gadgets" like PDA's, mobiles, a shipload of embedded applications and even on experimental wristwatches. This makes Linux the only operating system in the world covering such a wide range of hardware.


Reference:





 Does Linux have a future:


OPEN SOURCE

The idea behind Open Source software is rather simple: when programmers can read, distribute and change code, the code will mature. People can adapt it, fix it, debug it, and they can do it at a speed that dwarfs the performance of software developers at conventional companies. This software will be more flexible and of a better quality than software that has been developed using the conventional channels, because more people have tested it in more different conditions than the closed software developer ever can.
The Open Source initiative started to make this clear to the commercial world, and very slowly, commercial vendors are starting to see the point. While lots of academics and technical people have already been convinced for 20 years now that this is the way to go, commercial vendors needed applications like the Internet to make them realize they can profit from Open Source. Now Linux has grown past the stage where it was almost exclusively an academic system, useful only to a handful of people with a technical background. Now Linux provides more than the operating system: there is an entire infrastructure supporting the chain of effort of creating an operating system, of making and testing programs for it, of bringing everything to the users, of supplying maintenance, updates and support and customizations, etcetera. Today, Linux is ready to accept the challenge of a fast-changing world.

Types of Processes in linux

xxxxxxxxxxxxxxxxxx Types of Process in Linux xxxxxxxxxxxxxxxxxxxxxxxx

Every application it may be system specific or application daemon specific. It have to started as process
in background or foreground as designed.

Below are the few common process states:

Runnable: Process started and it's running and is in active queue in meantime it may in waiting for CPU resource.

Stopped: Process started and stopped in between but is not fully killed and can run if started again.

Sleeping/Waiting:  Process started and at meantime there are to many request to CPU from some other process or it's is waiting for another process to complete.

Zombie: Process started and started another child process and then parent process gone/died, in such condition that child process doesn't know how to end, so it's hang around but living, such process is known as zombie process.

File Permission Linux

xxxxxxxxxxxxxxxxxxxxxx File Permission xxxxxxxxxxxxxxxxxx

Set user ID, set group ID, sticky bit

- SUID or setuid: Change user ID on execution. If setuid bit is set, when the file will be executed by a user,   the process will have the same rights as the owner of the file being executed.
- SGID or setgid: Change group ID on execution. Same as above, but inherits rights of the group of the owner of the file on execution. For directories it also may mean that when a new file is created in the directory it will inherit the group of the directory (and not of the user who created the file).
- Sticky bit:  It was used to trigger process to "stick" in memory after it is finished, now this usage is obsolete. Currently its use is system dependant and it is mostly used to suppress deletion of the files that belong to other users in the folder where you have "write" access to.
               -->> If the sticky bit is set for a directory, only the owner of that directory or the owner of a file can delete or rename a file within that directory.

SUID bit is set for files ( mainly for scripts ). 
The SUID permission makes a script to run as the user who is the owner of the script, rather than the user who started it.

SGID, it will run with the privileges of the files group owner, instead of the privileges of the person running the program.

-----------------------------------------------------------------------------------
0755 -> setuid, setgid, sticky bits are cleared        000
1755 -> sticky bit is set                                              001
2755 -> setgid bit is set                                             010
3755 -> setgid and sticky bits are set                      011
4755 -> setuid bit is set                                             100
5755 -> setuid and sticky bits are set                      101    
6755 -> setuid and setgid bits are set                     110
7755 -> setuid, setgid, sticky bits are set                111
-----------------------------------------------------------------------------------

Diff ext2 ext3 ext4


xxxxxxxxxxxxxxxxxxxxx Diff ext2 ext3 ext4 xxxxxxxxxxxxxxxxxxxxxxxxx
Extended n file system

ext2 :
- Introduced with kernel 1.0 in 1993
- Flexible can handle upto 4TB
- Support file-name upto 1012 chars
- super block feature increase file system performance
- ext2 reserve 5% of disk space for root
- ext2 is popular on USB and other solid-state devices.
  This is because it does not have a journaling function.
  so it generally makes fewer reads and writes to the drive,
  effectively extending the life of the device .
-  NO journalalizm

ext3 :
- Provide all the feature of ext 2 + journaling and backward compatibility .
- can upgrade ext2 to ext3 without loss of data.
- journaling feature speed up the system to recover the state after power-failure
  or improper mount unmount etc.
- Example: In ext2 in an improper unmount or in-between power-off etc.. so in time
  of receiver it checks whole file system .
  But in ext3 it keeps record of uncommitted file transactions and checks applied
  on on them so system will come back up in faster and quicker .
-

ext4: 
- Introduced with kernel 2.6.28
- Ext4 is a deeper improvement over Ext3
- support  larger filesystem, faster checking, nanosecond timestamps,
  and verification of the journal through checksums.
- It’s backward and forward compatible with versions 2 and 3, so we can
  mount a ext2 or ext3 filesystem as ext4 .
- The main benefits that ext4 has over ext3 are:
  - faster time-stamping
  - faster file system checking
  - journaling check-sums
  - extents (basically automatic space allocation to avoid fragmentation)

What is Journalism in linxu file syatem ?
journaling file system is a file system that keeps track of the changes that will be made in
a journal (usually a circular log in a dedicated area of the file system) before committing them to
the main file system. In the event of a system crash or power failure, such file systems are quicker
to bring back online and less likely to become corrupted.

Saturday, June 11, 2011

The story of storage: hard disk


Hard disk is a kind of storage that uses a concentric stack of disks or "platters" to record data. It is a block device, that says it reads and writes data in fixed-size blocks. Generally, the block size is 512 bytes. So from a software engineer's point of view, a hard disk is just a sequence of continuous blocks of data, and you can visit any of them freely using some kind of address mechanism.


1 MBR

A master boot record (MBR) is the first sector of a hard disk. It serves mainly two functions:
  • Holds a disk's primary partition table.
  • Holds the bootstrapping code. After BIOS initializing the PC, it will load this sector into memory and pass execution to it.
The structure of MBR is as follows:

OffsetDescriptionSize
0x0000Code area440
0x01B8Disk signature4
0x01BCUsually NULL (0x0000)2
0x01BEPrimary partition table (Fore entries, each 16 bytes)64
0x01FEMBR signature (0x55, 0xAA)2

Disk signature is used to uniquely indentify the boot disk by the OS and further by userland processes. But after the introduction of EDDdisk signature can be omitted and code areacan be extended to a length of 446.
By convention, there are exactly four primary partition table entries in the MBR Partition Table scheme. Both the partition length and partition start address are stored as 32-bit quantities. Because the block size is 512 bytes, this implies that neither the maximum size of a partition nor the maximum start address (both in bytes) can exceed 2^32 * 512 bytes, or 2 TiB.
See Partition Table, for more info.


2 CHS

Cylinder-head-sector, also known as CHS, was an early method for giving addresses to each physical block of data on a hard disk drive. Though CHS values no longer have a direct physical relationship to the data stored on disks, pseudo CHS values (which can be translated by disk electronics or software) are still being used by many utility programs.
  • Head: Data is written to or read from a platter of the hard disk by a device called head. Usually, two heads are used to manipulate the data on both surfaces of a platter.
  • Track, Sylinder: A platter surface is composed of concentric circles. They are called tracks. All information stored on a hard disk is recorded in tracks. The tracks are numbered, starting from 0, starting at the outside of the platter and increasing as you go in. All tracks that have the same number and span across each platter surface form a sylinder.
  • Sector: A track is divided into sectors that are the base units managed by a hard disk driver.
So each sector can be addressed by a three-dimensional coordinate system (CHS). The number of sectors a hard disk holds is:
cylinders * heads * sectors
In earlier hard drive designs, the number of sectors per track was fixed and because the outer tracks on a platter have a larger circumference than the inner tracks, space on the outer tracks was wasted. The number of sectors that would fit on the innermost track constrained the number of sectors per track for the entire platter. However, many of today's advanced drives use a formatting technique called Multiple Zone Recording to pack more data onto the surface of the disk. Multiple Zone Recording allows the number of sectors per track to be adjusted so more sectors are stored on the larger, outer tracks. By dividing the outer tracks into more sectors, data can be packed uniformly throughout the surface of a platter, disk surface is used more efficiently, and higher capacities can be achieved with fewer platters. Not only is effective storage capacity increased by as much as 25 percent with Multiple Zone Recording, but the disk-to-buffer transfer rate also is boosted. With more bytes per track data in the outer zones is read at a faster rate.
However, as I metioned before, CHS values no longer have a direct physical relationship to the data stored on disks, the pseudo CHS still uses a uniform schema. The total length of CHS is 24 bits. Below is the detailed limit. See Partition Table.

NameBitsStart FromEnd LimitTotal Number
Cylinder10010231024
Head80254255
Sector616363

So when use the CHS address schema, a hard disk could be no lager than:
(1024 * 255 * 63) * (512) = 8,422,686,720 bytes (about 8.4 GB)


3 LBA

Logical block addressing (LBA) is a common scheme used for specifying the location of blocks of data stored on computer storage devices, generally secondary storage systems such as hard disks. The term LBA can mean either the address or the block to which it refers. Logical blocks in modern computer systems are typically 512 or 1024 bytes each. ISO 9660 CDs (and images of them) use 2048-byte blocks. LBA is a particularly simple addressing scheme; blocks are located by an index, with the first block being LBA=0, the second LBA=1, and so on.
CHS tuples can be converted to LBA addresses using the following formula:
LBA(C,H,S) = ((C * heads_num) + H) * sectors_per_track + S - 1


4 Partition Table

As described before, the partition table in MBR can hold at most four records. Each partion can't exceed 2 TiB. To alleviat this capacity limitation, an new partition schema called GUID Partition Table (GPT) is introduced in industry. See more at UEFI.
Follows is the layout of one 16-byte partition record:

OffsetLengthDescription
0x001status (0x80 = bootable, 0x00 = non-bootable, other = invalid)
0x013CHS address of first sector in partition
0x041partition type
0x053CHS address of last sector in partition
0x084LBA of first sector in the partition
0x0C4number of sectors in partition, in little-endian format

Most of the time, LBA is used to find a partition. But specification says: if a partition's start block or end block or both are under the 8.4 GB limitation, CHS address should also be correctly record. Otherwise, CHS fields have some kind of default values.
Partition type is used to label the file system used on this partition. For example, the code for linux ext2 is 0x83 and linux swap is 0x82. You can see a list of partition types by sfdisk -T. A hard disk can have at most four primary partitions for there are only four entries in the primary partition table. The following figure gives an example of a hard disk holding two primary partitions.


If you ls /dev/sda* or ls /dev/hda*, you may see the results as follows:
/dev/sda /dev/sda1 /dev/sda2   or


/dev/hda /dev/hda1 /dev/hda2
Please note:
  1. The address mode used in figure is LBA. In CHS dialect, it should be Sector 1 - Sector 63.
  2. The first partition normally starts at sector 63 (LBA), that is just after the first track. The first 63 sectors (first track) can be used for other purpose such as holding bootloader code.
  3. Partition can start and end at any places as soon as there are no overlappings. And may not cover all the space on a hard disk.
To get more partitions, we can subpartition a primary partition into several logical partitions. The primary partition used to house the logical partitions is called an extended partition and it has its own file system type (0x05 extended type). See more at Extended partition.

The story of storage: extended partition



Extended Partition

As we mentioned in Hard Disk, a hard disk can have at most four primary partitions. If we want more partitions, we can change one primary partition into an extended one by subdividing it into logic ones and setting the partition type to 0x5 (extended type).
Like Master Boot Record (MBR) describing a hard disk, a Extended Boot Record (EBR) is used for a logic partition. However, there is one EBR for each logic partition and all the logic partitions in a extended partition is linked one by one using two partition table records in MBR.
EBRs have essentially the same structure as the MBR; except only the first two entries of the partition table are supposed to be used.
The structure of EBR is as follows:

OffsetDescriptionSize
0x0000Generally unused446
0x01BEPartition Table's First entry16
0x1CEPartition Table's Second entry16
0x1DEUnused32
0x1FEMBR signature (0x55, 0xAA)2

Follows is the layout of one 16-byte partition record:

OffsetLengthDescription
0x001status (0x80 = bootable, 0x00 = non-bootable, other = invalid)
0x013CHS address of first sector in partition
0x041partition type
0x053CHS address of last sector in partition
0x084Starting Sector
0x0C4Number of sectors in partition, in little-endian format

The first entry of an EBR partition table points to the logical partition belonging to that EBR:
  • Starting Sector = relative offset between this EBR sector and the first sector of the logical partition This will be the same value for each EBR on the same hard disk; usually 63.
  • Number of Sectors = total count of sectors for this logical partition
The second entry of an EBR partition table will contain zero-bytes if it's the last EBR in the extended partition; otherwise, it points to the next EBR in the EBR chain:
  • Starting Sector = relative address of next EBR within extended partition in other words: Starting Sector = LBA address of next EBR minus LBA address of extended partition's first EBR
  • Number of Sectors = total count of sectors for next logical partition, but count starts from the next EBR sector
The following figure gives an example of a hard disk holding an extended partition and a primary partition. There are two logic partitions in the extended partition.

Cassandra-Setup


       http://github.com/ericflo/twissandra                     
              
        
        
        basic one node cluster
        ======================

Requirements
------------
  * Java >= 1.6 (OpenJDK and Sun have been tested)


  * tar -zxvf apache-cassandra-$VERSION.tar.gz
  * cd apache-cassandra-$VERSION
  * sudo mkdir -p /var/log/cassandra
  * sudo chown -R `whoami` /var/log/cassandra
  * sudo mkdir -p /var/lib/cassandra
  * sudo chown -R `whoami` /var/lib/cassandra

Now that we're ready, let's start it up!

  * bin/cassandra -f


Now let's try to read and write some data using the command line client.

  * bin/cassandra-cli --host localhost --port 9160

To Create Tables
----------------

cassandra> set Keyspace1.Standard2['jsmith']['first'] = 'John'
  Value inserted.
  cassandra> set Keyspace1.Standard2['jsmith']['last'] = 'Smith'
  Value inserted.
  cassandra> set Keyspace1.Standard2['jsmith']['age'] = '42'
  Value inserted.
  cassandra> get Keyspace1.Standard2['jsmith']
    (column=age, value=42; timestamp=1249930062801)
    (column=first, value=John; timestamp=1249930053103)
    (column=last, value=Smith; timestamp=1249930058345)
  Returned 3 rows.
  cassandra>


                Configuring a Cassandra Cluster
                ===============================

Here is what I did to create a running Cassandra Cluster.

Stop individual Cassandra instances
Re-created data and log directories (I did this just to ensure a clean slate)
I added to my local hosts file two aliases for my servers (cass01 and cass02). This helped in the following step.
Three changes are needed to the default conf/storage-conf.xml file on my first server.
Change from localhost to cass01
Change from localhost to cass01
Change from 127.0.0.1 to cass01
On my second server I changed the and accordingly to cass02 and made cass01
Started Cassandra servers and tested successfully using the set …/get Keyspace1.Standard1['jsmith'] example. I was able to connect to both hosts via cassandra-cli and see the results created on just one node. I was able to create data on the second node and view on the first node.
A new command is available to describe your cluster.

$ bin/nodeprobe -host cass01 ring
Address       Status     Load          Range                                      Ring
                                       148029780173059661585165369000220362256
192.168.100.4 Up         0 bytes       59303445267720348277007645348152900920     |<--|
192.168.100.5 Up         0 bytes       148029780173059661585165369000220362256    |-->|
Now with my first introduction successful, time to start using and seeing the true power of using Cassandra.


Realtime Example
================

On nk114 [Master]
-----------------
vi  conf/storage-conf.xml

Test Cluster

      nk114
      nk75

nk114ListenAddress>

nk114ThriftAddress>


Steps to run
-------------
 bin/cassandra -f
 bin/cassandra-cli --host nk114 --port 9160

to check the cluster status
 ---------------------------
 bin/nodeprobe -host nk114 ring

On nk75 [Slave]
---------------
vi  conf/storage-conf.xml

Test Cluster

      nk75

nk75ListenAddress>

nk75ThriftAddress>


Steps to run
------------

 bin/cassandra -f
 bin/cassandra-cli --host nk114 --port 9160
                
 to check the cluster status
 ---------------------------
 bin/nodeprobe -host nk114 ring

"clocksource tsc unstable" solution


cat /sys/devices/system/clocksource/clocksource0/available_clocksource

Try these options with grub command line 
clocksource=acpi_pm
clocksource=hpet
acpi=off
noapic
nolapic
notsc

Configure TCP/IP from the Command Prompt Windows

1. To  view your TCP/IP settings

netsh interface ip show config

2. Configure your computer's IP address and other TCP/IP related settings
netsh interface ip set address name="Local Area Connection" static 192.168.0.100 255.255.255.0 192.168.0.1 1

3. Export your current IP settings

netsh -c interface dump > c:'location1.txt

4. Import your IP settings

netsh -f c:'location1.txt

5. Automatically obtain an IP address from a DHCP server:

netsh interface ip set address "Local Area Connection" dhcp

6. Configure DNS and WINS addresses.

netsh interface ip set dns "Local Area Connection" static 192.168.0.200
netsh interface ip set wins "Local Area Connection" static 192.168.0.200

Or, if you want, you can configure your NIC to dynamically obtain it's DNS settings:

netsh interface ip set dns "Local Area Connection" dhcp


7. To setup Static IP Address:

From the command prompt:
1. Type 
C:\Users\Administrator> netsh interface ipv4 show interfaces
Idx  Met   MTU   State        Name
—  —  —–  ———–  ——————-
  1   50 4294967295  connected    Loopback Pseudo-Interface 1
 10   20   1500  connected    Local Area Connection
This should show the Network Connections. We are looking for the name here. On mine, I have one LAN interface and is named as “Local Area Connection”
2. To set a static IP Address type the following command
C:\Users\Administrator>netsh interface ipv4 set address name=”Local Area Connect
ion” source=static address=192.168.0.5 mask=255.255.255.0 gateway=192.168.0.1
The syntax is
netsh interface ipv4 set address name=”” source=static address= mask= gateway=
Where:
ID is the name of the LAN Connection
StaticIP is the static IP address that you are setting
SubnetMask is the subnet mask for the IP address
DefaultGateway is the default gateway
3. Now set the DNS Servers one at a time with the followind command. For each DNS server, increase the index number.
C:\Users\Administrator>netsh interface ipv4 add dnsserver name=”Local Area Conne
ction” address=192.168.0.1 index=1
C:\Users\Administrator>netsh interface ipv4 add dnsserver name=”Local Area Conne
ction” address=192.168.0.10 index=2
The syntax is
netsh interface ipv4 add dnsserver name=”” address=index=1
Where:
ID is the name of the Network Connection
DNSIP is the IP address of your DNS server
This should do. To confirm, do an “ipconfig”
Ethernet adapter Local Area Connection:
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Broadcom 440x 10/100 Integrated Controller
   Physical Address. . . . . . . . . : 00-1D-09-D4-2C-8F
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 192.168.0.5(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.0.1
   DNS Servers . . . . . . . . . . . : 192.168.0.1
                                       192.168.0.10
                                       127.0.0.1
   NetBIOS over Tcpip. . . . . . . . : Enabled
Set IP through DHCP Server
To set the DHCP Server, from the command line
C:\Users\Administrator> netsh interface ipv4 set address name=”Local Area Connection” source=dhcp
Syntax is
netsh interface ipv4 set address name=”ID” source=dhcp
where ID is the name of the Network Connection

Friday, June 10, 2011

Redhat Enterprise Linux Version 6 aka RHEL6 Features

 Recently I attended one presentation from Redhat people on RHEL6 features. Some of the mesmerizing features as below.
  • 85% more packages(Applications/softwares/tools) then RHEL5
  • RHEL6 supports up to 4096 CPU’s
  • RAM supported by RHEL6 is up to16TB.
  • File system up to 100TB with EXT4 file-system.
  • Very much optimized to support many hardware
  • Can control 90000 jobs/min(I believe it’s too good I’m loving it.)
  • SELinux sand-boxing for more SELinux control.
  • KVM for virtualization.
  • 7+3 years of extended support.
  • Lower Power consumption(20% less when compared to RHEL5) — A green initiate.
  • When handling Virtual machines(VM) RHEL6 on RHEL6 is good at performance when compared to RHEL5 vm on RHEL6 server
  • More Reliability, Availability, serviceability(RAS)
  • Rapid file system recovery(up to 10x faster than rhel5).
  • Resource management through Control group(CGroup) sand-boxing the process.