Dynamic Host Configuration Protocol (DHCP) is an Internet Engineering Task Force (IETF) standard for automating the configuration information of computers that use TCP/IP. This protocol reduces system administration workload, allowing devices to be added to the network with little or no manual intervention. DHCP also enable a device to have a different IP address every time it connects to any DHCP enable network. Many ISPs use dynamic IP addressing for dial-up users. Without DHCP, the IP address must be entered manually at each computer and a new IP address must be entered each time a computer moves to a new location on the network.
The DHCP server manages a pool of IP addresses and information about client configuration parameters such as the default gateway, the domain name, the DNS servers, other servers such as time servers, and so on.
When a DHCP-configured client connects to a network, the DHCP client sends a broadcast query requesting necessary information from a DHCP server. Upon receipt of a valid request the DHCP server will assign the computer an IP address, a lease (the amount of time that the DHCP server grants to the DHCP client permission to use a particular IP address), and other IP configuration parameters, such as the subnet mask and the default gateway. The query is typically initiated immediately after booting and must be completed before the client can initiate IP-based communication with other hosts.
Depending on implementation, the DHCP server may have three methods of allocating IP-addresses.
Dynamic allocation: DHCP assigns an IP address from a pool of addresses for a limited period of time chosen by the server, or until the client tells the DHCP server that it no longer needs the address. The request-and-grant process uses the lease concept with a controllable time periods, allowing the DHCP server to reclaim and then reallocate IP addresses that are not renewed.
Automatic allocation: The DHCP server automatically assigns an IP address permanently to a device, selecting it from a pool of available addresses. This is like dynamic allocation, but the DHCP server keeps a table of past IP address assignments, so that it can preferentially assign to a client the same IP address that the client previously had.
Static or manual allocation: The DHCP server allocates an IP address based on a table with MAC address/IP address pairs, which are manually filled in. This will ensure a computer gets the same IP address all the time. Only requesting clients with a MAC address listed in this table will be allocated an IP address.
More than one of the above methods can be used in managing IP address allocation by DHCP servers. For example, a known host on the network can be assigned an IP address based on its MAC address (static allocation) whereas "guest" computers are allocated a temporary IP address out of a pool compatible with the network to which they're attached (dynamic allocation).
By the way, DHCP, like BOOTP runs over UDP, utilizing ports 67 and 68.
soongiap
Monday, March 30, 2009
Sunday, March 29, 2009
Domain Name System (DNS) for beginner
If you use the Internet to do your work like sending e-mail or browsing the Web, then you use Domain Name Systems (DNS) without even realizing it. The DNS translates human-friendly computer hostnames into IP addresses. For example, chengsoongiap.com translates to 74.220.215.82.
Human readable names like "blog.chengsoongiap.com" are easier to remember than IP addresses such as 74.125.45.100. People take advantage of this when they recite meaningful URLs and e-mail addresses without having to know how the machine will actually locate them.
The DNS system is a database. It forms one of the largest and most active distributed databases on the planet. DNS distributes the responsibility of assigning domain names and mapping those names to IP addresses by designating authoritative name servers for each domain. Authoritative name servers are assigned to be responsible for their particular domains, and in turn can assign other authoritative name servers for their sub-domains. This mechanism has made the DNS distributed, fault tolerant, and helped avoid the need for a single central register to be continually consulted and updated.
A name server would start its search for an IP address by contacting one of the root name servers. The root servers know the IP address for all of the name servers that handle the top-level domains. Every DNS server will have to maintain a root cache file so that they know how to contact the root name server to retrieve information. A sample root cache file is listed below:
In general, the DNS also stores other types of information, such as the list of mail servers that accept email for a given Internet domain. By providing a world-wide, distributed keyword-based redirection service, the DNS is an essential component of the functionality of the Internet.A domain name usually consists of two or more parts (technically labels), which are conventionally written separated by dots, such as blog.chengsoongiap.com.The rightmost label conveys the top-level domain (for example, the address blog.chengsoongiap.com has the top-level domain com).Each label to the left specifies a subdivision, or subdomain of the domain above it. For example: chengsoongiap.com is a subdomain of the com domain, and blog.chengsoongiap.com is a subdomain of the domain chengsoongiap.com. In theory, this subdivision can go down 127 levels.
Human readable names like "blog.chengsoongiap.com" are easier to remember than IP addresses such as 74.125.45.100. People take advantage of this when they recite meaningful URLs and e-mail addresses without having to know how the machine will actually locate them.
The DNS system is a database. It forms one of the largest and most active distributed databases on the planet. DNS distributes the responsibility of assigning domain names and mapping those names to IP addresses by designating authoritative name servers for each domain. Authoritative name servers are assigned to be responsible for their particular domains, and in turn can assign other authoritative name servers for their sub-domains. This mechanism has made the DNS distributed, fault tolerant, and helped avoid the need for a single central register to be continually consulted and updated.
A name server would start its search for an IP address by contacting one of the root name servers. The root servers know the IP address for all of the name servers that handle the top-level domains. Every DNS server will have to maintain a root cache file so that they know how to contact the root name server to retrieve information. A sample root cache file is listed below:
; This file holds the information on root name servers needed to ; initialize cache of Internet domain name servers ; (e.g. reference this file in the "cache ." ; configuration file of BIND domain name servers). ; ; This file is made available by InterNIC ; under anonymous FTP as ; file /domain/named.cache ; on server FTP.INTERNIC.NET ; -OR- RS.INTERNIC.NET ; ; last update: Jun 8, 2011 ; related version of root zone: 2011060800 ; ; formerly NS.INTERNIC.NET ; . 3600000 IN NS A.ROOT-SERVERS.NET. A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4 A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:BA3E::2:30 ; ; FORMERLY NS1.ISI.EDU ; . 3600000 NS B.ROOT-SERVERS.NET. B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201 ; ; FORMERLY C.PSI.NET ; . 3600000 NS C.ROOT-SERVERS.NET. C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12 ; ; FORMERLY TERP.UMD.EDU ; . 3600000 NS D.ROOT-SERVERS.NET. D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90 D.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2D::D ; ; FORMERLY NS.NASA.GOV ; . 3600000 NS E.ROOT-SERVERS.NET. E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10 ; ; FORMERLY NS.ISC.ORG ; . 3600000 NS F.ROOT-SERVERS.NET. F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241 F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2F::F ; ; FORMERLY NS.NIC.DDN.MIL ; . 3600000 NS G.ROOT-SERVERS.NET. G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4 ; ; FORMERLY AOS.ARL.ARMY.MIL ; . 3600000 NS H.ROOT-SERVERS.NET. H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53 H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::803F:235 ; ; FORMERLY NIC.NORDU.NET ; . 3600000 NS I.ROOT-SERVERS.NET. I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17 I.ROOT-SERVERS.NET. 3600000 AAAA 2001:7FE::53 ; ; OPERATED BY VERISIGN, INC. ; . 3600000 NS J.ROOT-SERVERS.NET. J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30 J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:C27::2:30 ; ; OPERATED BY RIPE NCC ; . 3600000 NS K.ROOT-SERVERS.NET. K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129 K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7FD::1 ; ; OPERATED BY ICANN ; . 3600000 NS L.ROOT-SERVERS.NET. L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42 L.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:3::42 ; ; OPERATED BY WIDE ; . 3600000 NS M.ROOT-SERVERS.NET. M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33 M.ROOT-SERVERS.NET. 3600000 AAAA 2001:DC3::35 ; End of File
In general, the DNS also stores other types of information, such as the list of mail servers that accept email for a given Internet domain. By providing a world-wide, distributed keyword-based redirection service, the DNS is an essential component of the functionality of the Internet.A domain name usually consists of two or more parts (technically labels), which are conventionally written separated by dots, such as blog.chengsoongiap.com.The rightmost label conveys the top-level domain (for example, the address blog.chengsoongiap.com has the top-level domain com).Each label to the left specifies a subdivision, or subdomain of the domain above it. For example: chengsoongiap.com is a subdomain of the com domain, and blog.chengsoongiap.com is a subdomain of the domain chengsoongiap.com. In theory, this subdivision can go down 127 levels.
Sunday, March 22, 2009
yum update Red Hat Linux / Fedora
Yum (Yellowdog Updater Modified) is a powerful automatic updater and package installer/remover on RPM-based Linux distributions like Red Hat / Fedora.
Yum automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm.
The main Yum configuration file is /etc/yum.conf. Basic repository listings are located in the /etc/yum.repos.d/ directory. Unless you plan on adding other repositories or have a need to tweak certain configuration settings, these configuration files work as-is. Please refer to yum.conf manual page to find out the various options for this configuration file. You may like to take note about the keepcache option in this file. Set keepcache=1 if you want to keep the downloaded RPM files from erased after they are installed. However, make sure the cachedir directory has enough space to save the downloaded files.
To install a package with Yum, simply running Yum with the install option:
To get full information on a package installed, such as version, architecture, and a description, execute the following command:
To upgrade packages, either specify the package to upgrade with the update option or do not specify any packages to update all packages that have updates available:
Although Yum is designed to use over the network, you may also use it to install packages locally (by inserting a Linux distribution CD/DVD or copying a RPM to a local directory). Simly use the localinstall option to yum will do. For example, if your CD is mounted at /media/disk, you could execute the following command to install the gimp package:
By the way, Yum is written using python.
Yum automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm.
The main Yum configuration file is /etc/yum.conf. Basic repository listings are located in the /etc/yum.repos.d/ directory. Unless you plan on adding other repositories or have a need to tweak certain configuration settings, these configuration files work as-is. Please refer to yum.conf manual page to find out the various options for this configuration file. You may like to take note about the keepcache option in this file. Set keepcache=1 if you want to keep the downloaded RPM files from erased after they are installed. However, make sure the cachedir directory has enough space to save the downloaded files.
To install a package with Yum, simply running Yum with the install option:
# yum install gimpThis will install the GIMP package and any dependencies it may have. You can specify more than one package at a time to install.
To get full information on a package installed, such as version, architecture, and a description, execute the following command:
# yum info [package]If you are not sure what a package is called, you can search the software description in repository metadata using Yum’s search option. For example, the following command search for GIMP in any package description:
# yum search gimpIf you want to list an available package, you can use the list command. This will list all available packages and note which are installed. For example:
# yum list gimpSoftware always comes with bugs. As such, regular software update is important to help patching any potential problem. Yum offers several ways of getting the updates information. To find out if any package has any update available, but without performing any upgrade actions, use yum check-update and a list of available updates will be printed.
To upgrade packages, either specify the package to upgrade with the update option or do not specify any packages to update all packages that have updates available:
# yum updateTo remove a package from the system, use the remove command. This will remove the noted package as well as any requirements for that package that are no longer required by other packages.
Although Yum is designed to use over the network, you may also use it to install packages locally (by inserting a Linux distribution CD/DVD or copying a RPM to a local directory). Simly use the localinstall option to yum will do. For example, if your CD is mounted at /media/disk, you could execute the following command to install the gimp package:
# yum localinstall /media/disk/Fedora/RPMS/gimp-*Overall, Yum is a decent package manager. Most individuals will likely use graphical frontends to Yum, but knowing the Yum commands directly is a great idea in case X is not working or you are working remotely on a server.
By the way, Yum is written using python.
Wednesday, March 18, 2009
How to determine / find CUPS version
Simply execute the following command in your Unix machine to determine what version of CUPS running on your system.
# cups-config --version
cups-config is the CUPS program configuration utility. Some of the option available for this utility include:
--api-version: current API version (major.minor).
--cflags: necessary compiler options.
--datadir: default CUPS data directory.
--help: program usage message.
--ldflags: necessary linker options.
--libs: necessary librarys to link to. The --image option adds the CUPS imaging library to the list. The --static option shows the static libraries instead of the default (shared) libraries.
--serverbin: default CUPS binary directory, where filters and backends are stored.
--serverroot: default CUPS configuration file directory.
--version: full version number of the CUPS installation (major.minor.patch).
# cups-config --version
cups-config is the CUPS program configuration utility. Some of the option available for this utility include:
--api-version: current API version (major.minor).
--cflags: necessary compiler options.
--datadir: default CUPS data directory.
--help: program usage message.
--ldflags: necessary linker options.
--libs: necessary librarys to link to. The --image option adds the CUPS imaging library to the list. The --static option shows the static libraries instead of the default (shared) libraries.
--serverbin: default CUPS binary directory, where filters and backends are stored.
--serverroot: default CUPS configuration file directory.
--version: full version number of the CUPS installation (major.minor.patch).
Friday, February 20, 2009
How to delete printer port in windows
In order to delete TCP/IP printer port in windows systems, follow the following steps:
- Open the printers folder - Start, Setting, Printers
- Remove the related printers using the printer port
- Select "Server Properties" from "File" menu
- Select the Ports tab
- Delete the related port here.
Tuesday, February 17, 2009
Lost PageRank for this site ...
Just discovered today that this site is now now not ranked under Google PageRank - from PR0 to no ranking (Current page is not ranked by Google)...
Just wondering why this happen and how the algorithm of PR is based on. Anyway, will keep monitoring this data.
One thing that is clear - this site was not updated for 1.5 months and the PR0 disappeared. However, my other sites have the PR maintained although not being updated for 1 month. So frequency of updating should be one of the criteria in deciding the PR.
Will continue to monitor the PageRank for this site ...
Just wondering why this happen and how the algorithm of PR is based on. Anyway, will keep monitoring this data.
One thing that is clear - this site was not updated for 1.5 months and the PR0 disappeared. However, my other sites have the PR maintained although not being updated for 1 month. So frequency of updating should be one of the criteria in deciding the PR.
Will continue to monitor the PageRank for this site ...
Saturday, January 3, 2009
Give up Windows Vista to XP
After struggling with Windows Vista for one and half year, I give up Vista and install my PC with XP now.
The main reason was it take very long to boot the system - 10 minutes until everything is stable after login to it. Have tried to stop all unnecessary services running in it but never really improved. It is really frustrated to have a 2GB Memory PC which runs on this performance.
No choice, but I have to go for XP again. After downgrade to XP, so far the performance of my PC is excellent!
I just wondering why I did not do this earlier ...
The main reason was it take very long to boot the system - 10 minutes until everything is stable after login to it. Have tried to stop all unnecessary services running in it but never really improved. It is really frustrated to have a 2GB Memory PC which runs on this performance.
No choice, but I have to go for XP again. After downgrade to XP, so far the performance of my PC is excellent!
I just wondering why I did not do this earlier ...
Friday, January 2, 2009
soongiap.blogspot.com is rank yesterday
Finally this site is now ranked in Google PR as PR0. It take quite long so far in getting it to have rank in Google.
Anyway, although it was not rank officially, it was indexed by Google search engine. This shows that the Google PR is not a dynamic one. Also this experiment shows that Google does not give any priority to site hosted in Blogger. This site take more than 20+ days so far to rank in Google.
Anyway, although it was not rank officially, it was indexed by Google search engine. This shows that the Google PR is not a dynamic one. Also this experiment shows that Google does not give any priority to site hosted in Blogger. This site take more than 20+ days so far to rank in Google.
Saturday, December 20, 2008
How to add read more in Blogger post
After migrating some of my blogs into Blogger platform, one of the disadvantage I found with Blogger is there is no function available for me to add Read More in Blogger post. This feature is available in Wordpress. After searching for a while, I found the following howto from Blogger help.
How can I create expandable post summaries
I have implemented it in some of my blogs and it works so far!
How can I create expandable post summaries
I have implemented it in some of my blogs and it works so far!
Subscribe to:
Posts (Atom)