Friday, July 18, 2008

IP_ImP

1.IP Loopback Address : 127.0.0.1 is the loopback address in IP. Loopback is a test mechanism of network adapters. Messages sent to 127.0.0.1 do not get delivered to the network. Instead, the adapter intercepts all loopback messages and returns them to the sending application. IP applications often use this feature to test the behavior of their network interface.

2.As with broadcast, IP officially reserves the entire range from 127.0.0.0 through 127.255.255.255 for loopback purposes. Nodes should not use this range on the Internet, and it should not be considered part of the normal Class A range.

3.Zero Addresses: As with the loopback range, the address range from 0.0.0.0 through 0.255.255.255 should not be considered part of the normal Class A range. 0.x.x.x addresses serve no particular function in IP, but nodes attempting to use them will be unable to communicate properly on the Internet.

4.Private AddressesThe IP standard defines specific address ranges within Class A, Class B, and Class C reserved for use by private networks (intranets). The table below lists these reserved ranges of the IP address space.
Class
Private start address Private finish address
A 10.0.0.0 10.255.255.255
B 172.16.0.0 172.31.255.255
C 192.168.0.0 192.168.255.255

5.IPv6 Address TypesIPv6 does not use classes. IPv6 supports the following three IP address types: unicast multicast anycast.Multicast addresses in IPv6 start with 'FF' (255) just like IPv4 addresses. Anycast in IPv6 is a variation on multicast. Whereas multicast delivers messages to all nodes in the multicast group, anycast delivers messages to any one node in the multicast group. Anycast is an advanced networking concept designed to support the failover and load balancing needs of applications.

6.
Class Host address range Network address Default mask
A 0.0.0.0 - 127.255.255.255 x.0.0.0 255.0.0.0
B 128.0.0.0 - 191.255.255.255 x.x.0.0 255.255.0.0
C 192.0.0.0 - 223.255.255.255 x.x.x.0 255.255.255.0


7.SUBNETS:a subnetwork, or subnet, is a portion of the network's computers and network devices that have a common, designated IP address routing prefix.e.g., 255.255.255.0 is the subnet mask for the 192.168.1.0 network with a 24-bit routing prefix (192.168.1.0/24). The subnet identifier consists of the remaining bits in a subnet's prefix after the network identifier. In the cited example, 192.168.0.0 is the network identifier (and 255.255.0.0 the network mask) and "1" is the subnet identifier


8. A classful network is a network that has a subnet mask of 255.0.0.0, 255.255.0.0 or 255.255.255.0.

9.Classless Inter-Domain Routing (CIDR) notation: For example, 192.0.2.96/24 indicates an IP address where the first 24 bits are used as network address (same as 255.255.255.0).

Thursday, July 17, 2008

Simple_Shell_Scripting/Help/Command_Usage

1.To create multiple file copies with various links. After this both oldfile newfile refer to the same name.
$ln Page1 Book1
syntax: ln {oldfile} {newfile}

2. $wc //gives word count of the file.

3. grep {word to find} {filename} //finds word in the file

4. sort -r //reverse normal order.
sort -nr //numeric reverse order.
sort -n //numeric order sorting.

5.Printing last/first line of given file.
tail -+ {line number} {filename}
will print the last number of lines of the file
by default will print 10 last lines of file.
you can use head and tail command with -sign to get respectively the top and bottom lines of
the file.

6. To check how many files in the system
$ls /-R wc -l
As it will take a lot of time.. we can run this in background using "&"
Our command becomes now $ ls / -R wc -l &

7. To list all files in directory subdirectory we can do.
$ ls -lR

8. To get info about all running process:
$ ps -ag

9. To stop all process except the shell do:
$kill 0 //zero

10. Take this. u did $ ls
$ echo $?
If it returns 0 on the screen, this denotes successful completion of the command.(here ls).

11. $lsmore One full page of output at a time.

12. $ls -lwc -l prints no of files in current directory.

13. $ tail +20 hlist
here head is the filter which takes its input from tail command and passes this lines to input to head, whose output is redirected to hlist file.

14. if you copy ur shell script to bin.. u can execute it by its name itself.
so if ur script name is "first"
then do : $cp first ~/bin
$ first shud execute now.

15.echo is used to print the thing on console

16. chmod +x give execute rights to all

17. $ls a* will show all files whose name begin with 'a'.
$ls ? searches for file with name of single letter.
$ls /bin/[!a-o] OR $ls /bin/[^a-o] . if the first character following the [is a ! or ^ then any
char not enclosed is matched i.e. do not show us file name that begining with a,b,c ...o.\

18. Operator Meaning
! expression Logical NOT
expression1 -a expression 2 Logical AND
expression 1 -o expression 2 Logical OR