Sunday, January 31, 2010

Finding Subnet and Broadcast

still remember how to find hosts that can be used, and a broadcast network with a binary? In fact, there is the easy way without having to convert to binary first, by using the formula 256 - subnet values, for example, we can ip 192.168.0.18/29, what network? broadcast? and how many ip that can be used?

ok, let's find, still remember how to find prefix? if you forget, please read here

/ 29 means 255.255.255.248, which note is that the value is not equal to 255, subtract that value by 256

256 to 248 = 8

needs in mind, the reduction is the key, K = 8. well, after it noticed its ip address, 192.168.0.18, key values must be at times the numbers do not exceed the value of the ip, in the example is 18, so 8 * 2 = 16, because 8 * 3 = 24 is higher than ip. 18. is already on to the network, well, to find the ip that can be used first, just add ip network + 1 = 17.After was broadcast live on the search, how, (Key + Network) - 1 = 23, to search for the last ip, live broadcast - 1 = 22.

Subnet Prefix

sometimes a lot of confusion at the sight of this ip 192.168.0.0/22, 22 was what? or sometimes when subscribing to an ISP and have allocation of ip address (eg 192.168.0.0/28), how to set?

/ 22 or / 28 is called a prefix, as we know, ipv4 consisted of 4 octed or 32 bits, if we have 192.168.0.0/28 network, meaningful in a 28-bit binary networks (translated by 1) and rest (4 bits) is the host.

to find what ip that can be used 2n-2 ^ 2 = 4 x 2 = 14 hosts, if the 192.168.0.0/28 ip means that it can be in use is 192.168.0.1 to 192.168.0.14, because the 192.168.0.0 in use as network and 192.168.0.15 used as the broadcast.

well, to find the subnet mask from prefix / 28 was, because there are 28 bits network and host the 4-bit binary in writing as follows:

11111111.11111111.11111111.1111 0000

if translated into a decimal, becomes: 255.255.255.240

Know Linux partition and Directory

/ (Root)
This partition is usually used for storing temporary files, is required before linux can mount the partition / usr.File-file as Boot Linux kernel and image, and all binary files as well as many important log files are also important. This partition is also used for temporary space when the operating system that requires performance, such as building or create a RPM packet from the source RPM files.

/ usr
This partition one partition that requires a large space, since many binary files in need linux, like many software installation, web pages, Squid proxy cache, Samba share files, all the local installation log files and other stored here.
Some local directory / usr:
# / usr / doc
Documentation relating to the installation program.
# / usr / bin
Execute the program is not required when booting or repair is usually only system.Program utility tools .. etc
# / usr / local / src
Source code for application installation

/ home
This partition to use for home directory of each user, is required if you provide a shell account to each of this partition user.

SWAP
Linux provides something called virtual memory, this partition is in accordance with this functuin.Partition made two times larger than the size of physical RAM is available, when the physical memory available RAM is full, SWAP partitions are used to help.

/ var
This partition is used to store variable files, files in / var is dynamic and continuously in writing or there is a change.
Some local directory to / var:
# / Var / spool
File Print Jobs, mail spool etc ..
# / var / log
File that contains the log information
# / var / run
File that contains the process ID, the service is running ..

/ boot
Partitions are used to store the file directory that is required when linux did booting.Like the vmlinux file, and the linux kernel files etc ..

/ etc
Directory that contains the local machine configuration file, save the configuration program in this directory and the file becomes a reference when running the program.

/ mnt
Used to mount the file system temporarily, when the mount cdrom or usb mount point flashdisk.Standar location is located at / mnt / cdrom or / etc .. mnt/sda1

/ proc
Provides information and processes running kernel.Directory information is used as information systems hardware such as RAM, CPU etc. ..