What is DHCP?
DHCP is an acronym that stands for “Dynamic Host Configuration Protocol”. DHCP’s purpose is to enable individual computers on an IP network to automatically obtain their network configurations from a server, instead of requiring each PC’s network configuration to be completed manually. The overall purpose of this is to reduce the work necessary to administer a large IP network. DHCP runs over UDP, utilizing ports 67 and 68.
How do I setup DHCP on a RHEL clone like White Box Enterprise Linux (WBEL), CentOS, or TaoLinux?
1. Do the above mentioned minimal install, if required.
2. After updating your linux install, install the programs required for the DHCP server with this command:
yum install dhcp
Important Files:
To configure a DHCP server we will modify the configuration file /etc/dhcpd.conf. DHCP also uses the file /var/lib/dhcp/dhcpd.leases to store the client lease database.
Help for DHCP
Help is available from the following man pages:
man dhcp-eval
man dhcpd.conf
man dhcpd.leases
man dhcpd
man dhcrelay
3. Next we need to configure the DHCP server. First we need to know some information that we are going to assign. We need to know:
a. The range of IP addresses we want to assign to our computers. I normally use the 192.168.x.x networks for my internal LANs. In our example, we will use 192.168.0.0/255.255.255.0 as our network (that is the network that starts with 192.168.0.1 and ends with 192.168.0.254). We will save IPs 192.168.0.1 to 192.168.0.50 for servers and static addresses. We will pick the addresses 192.168.0.51 to 192.168.0.100 to assign to computers via DHCP.
b. The IP address of the DNS server(s) we will use for name lookups for our clients that we assign with DHCP. In my case, I will use the DNS server that I have setup on IP address 192.168.0.2. (You can use your ISP’s DNS server if you don’t have one … see the ISP’s site for details. You can also build your own internal DNS server on this machine or another internal machine by following this guide.
c. The Default Gateway of the computers that we are going to serve. In our example, this will be the IP address 192.168.0.1, which has been setup as the default gateway for our internal network.
d. The length of the lease (default and maximum). This is very subjective. If you have more PCs than IP addresses to give out, you want this to be a short time (600 seconds). If you have more IPs to give out than PCs (most likely the case), you can use a larger number. Microsoft defaults to 3 days (259200 seconds) with their DHCP servers. RedHat recommends 12 hours (43200 seconds). I will go with the RedHat default of 43200 seconds for default length and 86400 seconds for maximum length.
e. If we have a WINS server setup on the network (microsoft or samba only), we would need to know it’s IP address. I have one, it is 192.168.0.2 (on the same machine as my DNS server).
f. We need a domain name to give out as well. If you are using real IP addresses, you can use a real domain name as well … in our case, we are using an internal network (192.168.0.x) behind a single IP address from an ISP, so we will use the fictitious domain name home.local. If you are using an internal IP network, don’t use a real external domain name, or you may not be able to talk to real PCs on that external network.
The DHCP Server configuration file (/etc/dhcpd.conf)
1. Now we have our information, so let’s configure the server by creating a text file named /etc/dhcpd.conf. The first line in the file must be the DNS update scheme. There are 2 choices, but only one that works reliably … so we will use that one smile.gif. Here is the first line:
CODE
ddns-update-style interim;
2. The second line is whether to allow the DHCP to update client info to a Dynamic DNS server. In our example, we are not going to try and update a Dynamic DNS via our DHCP server, so we will not allow client updates. Here is our line 2:
CODE
ignore client-updates;
3. The next section of our file will be the subnet section … we will define the network, and input the info we gathered above (see section 3 {a-f} above). Here is the subnet section:
CODE
subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.0.1; #Default Gateway
option subnet-mask 255.255.255.0;
option domain-name “home.local”;
option domain-name-servers 192.168.0.2;
option netbios-name-servers 192.168.0.2; #WINS Server
range dynamic-bootp 192.168.0.51 192.168.0.100; #DHCP Range to assign
default-lease-time 43200;
max-lease-time 86400;
}
NOTE: Change your IP as per your network.
4. Put all that together and we have the /etc/dhcpd.conf file. Here is a text file containing our example information.
example dhcpd.conf
5. If you have more than one ethernet adapter, you must specify which one to listen on in the file /etc/sysconfig/dhcpd. To listen on eth0, you would use the line:
CODE
DHCPDARGS=eth0
6. To start the dhcp server now for testing, issue the command:
/etc/init.d/dhcpd start
To make the dhcp server restart at boot time, issue the commands:
chkconfig –level 2345 dhcpd on
chkconfig –level 016 dhcpd off
Then check to make sure it is correct with the command:
chkconfig –list dhcpd
the output should be
dhcpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
7. If you are using a software firewall like iptables, you will need to allow all tcp and udp traffic into ports 67 and 68 into this machine.
8. Here are some good references:
DHCP Server Setup (some paths are different, but still good info)
RHEL – Configuring a DHCP Server <–Excellent Reference!
Using DHCP on Linux/FreeBSD <–Info on Dynamic DNS and DHCP
TCP/IP Network Administration – DHCP
wget http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-4.02.zip
make[2]: nasm: Command not found
[root@localhost syslinux-4.02]# yum search nasm
================================================================================================ Matched: nasm ================================================================================================
nasm.i386 : A portable x86 assembler which uses Intel-like syntax.
nasm-doc.i386 : Documentation for NASM.
nasm-rdoff.i386 : Tools for the RDOFF binary format, sometimes used with NASM.
[root@localhost syslinux-4.02]# yum install nasm.i386 nasm-doc.i386 nasm-rdoff.i386
What are futures and options?
Futures and options represent two of the most common form of “Derivatives”. Derivatives are financial instruments that derive their value from an ‘underlying’. The underlying can be a stock issued by a company, a currency, Gold etc., The derivative instrument can be traded independently of the underlying asset.
The value of the derivative instrument changes according to the changes in the value of the underlying.
Derivatives are of two types — exchange traded and over the counter.
Exchange traded derivatives, as the name signifies are traded through organized exchanges around the world. These instruments can be bought and sold through these exchanges, just like the stock market. Some of the common exchange traded derivative instruments are futures and options.
Over the counter (popularly known as OTC) derivatives are not traded through the exchanges. They are not standardized and have varied features. Some of the popular OTC instruments are forwards, swaps, swaptions etc.
Futures
A ‘Future’ is a contract to buy or sell the underlying asset for a specific price at a pre-determined time. If you buy a futures contract, it means that you promise to pay the price of the asset at a specified time. If you sell a future, you effectively make a promise to transfer the asset to the buyer of the future at a specified price at a particular time. Every futures contract has the following features:
* Buyer
* Seller
* Price
* Expiry
Some of the most popular assets on which futures contracts are available are equity stocks, indices, commodities and currency.
The difference between the price of the underlying asset in the spot market and the futures market is called ‘Basis’. (As ‘spot market’ is a market for immediate delivery) The basis is usually negative, which means that the price of the asset in the futures market is more than the price in the spot market. This is because of the interest cost, storage cost, insurance premium etc., That is, if you buy the asset in the spot market, you will be incurring all these expenses, which are not needed if you buy a futures contract. This condition of basis being negative is called as ‘Contango’.
Sometimes it is more profitable to hold the asset in physical form than in the form of futures. For eg: if you hold equity shares in your account you will receive dividends, whereas if you hold equity futures you will not be eligible for any dividend.
When these benefits overshadow the expenses associated with the holding of the asset, the basis becomes positive (i.e., the price of the asset in the spot market is more than in the futures market). This condition is called ‘Backwardation’. Backwardation generally happens if the price of the asset is expected to fall.
It is common that, as the futures contract approaches maturity, the futures price and the spot price tend to close in the gap between them ie., the basis slowly becomes zero.
Options
Options contracts are instruments that give the holder of the instrument the right to buy or sell the underlying asset at a predetermined price. An option can be a ‘call’ option or a ‘put’ option.
A call option gives the buyer, the right to buy the asset at a given price. This ‘given price’ is called ‘strike price’. It should be noted that while the holder of the call option has a right to demand sale of asset from the seller, the seller has only the obligation and not the right. For eg: if the buyer wants to buy the asset, the seller has to sell it. He does not have a right.
Similarly a ‘put’ option gives the buyer a right to sell the asset at the ‘strike price’ to the buyer. Here the buyer has the right to sell and the seller has the obligation to buy.
So in any options contract, the right to exercise the option is vested with the buyer of the contract. The seller of the contract has only the obligation and no right. As the seller of the contract bears the obligation, he is paid a price called as ‘premium’. Therefore the price that is paid for buying an option contract is called as premium.
The buyer of a call option will not exercise his option (to buy) if, on expiry, the price of the asset in the spot market is less than the strike price of the call. For eg: A bought a call at a strike price of Rs 500. On expiry the price of the asset is Rs 450. A will not exercise his call. Because he can buy the same asset from the market at Rs 450, rather than paying Rs 500 to the seller of the option.
The buyer of a put option will not exercise his option (to sell) if, on expiry, the price of the asset in the spot market is more than the strike price of the call. For eg: B bought a put at a strike price of Rs 600. On expiry the price of the asset is Rs 619. A will not exercise his put option. Because he can sell the same asset in the market at Rs 619, rather than giving it to the seller of the put option for Rs 600.
mail store at /var/spool/clientmqueue/*
service sendmail start
see log at tail -f /var/log/maillog
tail -f /var/log/cron
Install sendmail
yum install sendmail sendmail-devel
Dont forget to add the following line to your /etc/hosts.allow file:
sendmail: ALL
To test if the server started up alright, telnet to yourself on port 25 by typing telnet localhost 25 and if it is working you will
see something like this:
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
220 linuxhelp.dynip.com ESMTP Sendmail 8.9.3/8.9.3; Tue, 15 Jun 1999 21:41:46 -0400
mail -s “Hello world” you@youremailid.com
Hit the return key and you will come to a new line. Enter the text “This is a test from my server”.
Follow up the text by hitting the return key again. Then hit the key combination of Control+D to continue.
The command prompt will ask you if you want to mark a copy of the mail to any other address, hit Control+D again. Check your mailbox.
This command will send out a mail to the email id mentioned with the subject, “Hello world”.
Make it auto start service
chkconfig –list | grep on
$infile=’Search file name’;
open INFILE,”$infile” or die ;
while() {
chomp;
$r++ for $_ =~/Searchword/g;
}
print “r $r “;
close INFILE;
Regulation NMS, the National Market System, has been around since 1975. Congress directed the SEC to facilitate the establishment of a national market system (NMS) to link together the individual markets that trade securities. Developing a national market system is in the public interest to protect investors and maintain fair and orderly markets to assure fair competition among exchange markets.
Options exchanges set up a plan in 2000 to comply with Reg NMS. Before 2000, most options were listed only on a single exchange, hence why we did not come up with our own NMS for twenty-five years. In this plan, exchanges agree that the dissemination of locked or crossed markets should be avoided and if members lock or cross a market, they should take action to unlock or uncross these markets. A locked market means a quoted market in which a bid is equal to the offer or vice versa. A crossed market means a quoted market where the bid is higher then the quoted offer or an offer is lower than a quoted bid.
Under the current plan, the OCC, along with all option exchanges, created a “Linkage Hub” that is run by the OCC, Options Clearing Corporation. The Linkage Hub is a centralized data communications network that electronically links the option exchanges to one another and helps participants to route orders to limit trade-throughs.
Come Monday, Aug. 31, 2009, options markets will transition from the linkage hub to direct order routing. That is where the ISO comes in. Let me introduce the ISO. ISO stands for intermarket sweep order which will allow exchanges to route orders to other markets directly instead of having to send them through a central hub. Equity markets have already transitioned to a Reg NMS compliant system that uses ISO orders.
The Intermarket sweep order is an IOC (Immediate or Cancel) order. IOC orders are limit orders that are executed in whole or part as soon as the order is received and any portion not executed will be immediately canceled.
To prevent trade throughs, ISO orders will be routed to exchanges where the “protected bid” is superior to the sell order limit or the “protected offer” is superior to the limit price of a buy order. “Protected bid or offer” means a bid or offer that is displayed by an exchange, disseminated pursuant to the Options Price Reporting Authority (OPRA) and is the Best Bid or Best Offer (BBO) of the exchange.
Clients can send ISO orders to several exchanges simultaneously to fulfill their obligation to prevent trade throughs, or as an alternative, clients can send a non ISO order to one exchange and have the exchange send out ISO orders to clear the away BBOs.
Here’s some technical jargon just in case you are impressed by this sort of thing:
The ISO order type will be indicated in FIX tag 18 with the value “f”.
The ISO order type will be reported to OPRA with a special ISO trade qualifier (Type code “S”).
• And here is how the ISO will work:
o An inbound ISO order type received on NYSE Arca or NYSE Amex
– Will ignore the NBBO.
– Will never route to another exchange
– Will trade vs. the existing depth of book
* Any remaining volume of the ISO order will cancel back to the sending firm.
• Clients can of course still send non ISO orders. If there are better markets away when a non ISO order is received, the ISO order type will also be used by NYSE Arca and NYSE Amex when routing orders to away exchanges.
o Outbound ISO orders will always have a TIF of IOC
o Outbound ISO orders will be sent for the lesser of the ISO order volume or the size of the displayed volume at the away BBO
o Outbound ISO orders will be sent contemporaneously to trade all available top of book size on away exchanges (up to size of the incoming order) regardless of NBBO
o Once the ISO orders have been sent to clear the away BBOs at the time of the order’s receipt, the order will access depth of book, up to the order’s limit price.
Most important to you, NYSE Arca Options and NYSE Amex Options are ready for our Trading Permit Holders who wish to test ISO orders in the CERT environment to do so immediately. Contact our Connectivity Hotline at (888) 689-7739 or email to connectivity@nyx.com. By testing in our CERT environment, you get peace of mind and you can be assured that when the change happens, your firm is ready.
For those readers that would like to see a full copy of the plan, please visit the SEC website here to read all about it: http://www.sec.gov/rules/sro/nms/2009/34-60405.pdf
* Install Virtual box
* Install Centos/RHEL or any
* Install Guest Addition
* Now make share of windows folder that you want to mount.
* Now go to virtual box, right click on share folder icon (That is right bottom of virtual box windows), select browse. locate windows share folder(c:\trunk), give name of share (trunk), make that permanent.
* Create mount point in virtual box (Where you want to mount)
mkdir /root/trunk
* run this command now from virtual box command prompt
[root@nathcorp ~]# mount -t vboxsf trunk /root/trunk/
mount: unknown filesystem type ‘vboxsf’
so here is issue with vboxsf file type.
* verify that this file system is available in /sbin using below
[root@nathcorp ~]# ls /sbin/
there must be a ” mount.vboxsf” file. Other than that lot of other file types available like…
mount.cifs mount.fuse mount.ntfs
mount.ecryptfs mount.nfs mount.ntfs-3g
mount.ecryptfs_private mount.nfs4 mount.vboxsf
* if above ” mount.vboxsf” is not there then please install virtual box guest addition carefully without any fail.
* Once ” mount.vboxsf” shows then use again mount command
[root@nathcorp ~]# [root@nathcorp ~]# /sbin/mount.vboxsf -rw trunk /root/trunk/
This command should run without message.
* Now you are done
* Go to mount point dir (/root/trunk)
* list it (ls -l)
Install unrar command
Under Debian Linux, you need to type apt-get as follows to install unrar program:
# apt-get install unrar
If you are using Fedora core Linux then use yum command as follows (see discussion below):
# yum install unrar
If you are using FreeBSD, use:
# pkg_add -v -r unrar
If any of above, methods is not working for you, download binary package from official rarlab site:
$ cd /tmp
$ wget http://www.rarlab.com/rar/rarlinux-3.6.0.tar.gz
Untar file
$ tar -zxvf rarlinux-3.6.0.tar.gz
Both unrar and rar commands are located in rar sub-directory. Just go to rar directory:
$ cd rar
$ ./unrar
Now copy rar and unrar to /bin directory:
# cp rar unrar /bin
How to use unrar
unrar command supports various options below are common options that you need to use everyday.
Task: To open rar (unpack) file in current directory type command:
$ unrar e file.rar
Please note that replace file.rar filename with your actual filename.
Task: List (l) file inside rar archive:
$ unrar l file.rar
Task: To extract (x) files with full path type command:
$ unrar x file.rar
(D) To test (t) integrity of archive, file type command:
$ unrar t file.ra
The following reports will be modified:
1. The Series Search report currently displays the full series/contract date in YYYY/MMM/DD format. Beginning February 12, 2010 the ticker columns will be removed and replaced with a one column Call/Put indicator.
2. Series Added Today
The Series Added Today report will display the full series/contract date in MM/DD/YYYY format and ticker columns will be replaced with a one byte Call Indicator column and a one byte Put Indicator column. The record size will decrease by two bytes.
3. The Series Download reports will display the full series/contract date in MMMDDYYYY format. Ticker symbols will be removed and replaced by a two byte Call/Put indicator. The record size will increase by two bytes.
4. The Flex Prices Reports will display the full series/contract date in MM/DD/YYYY format.
5. The OCC Volume Query will offer a series/contract lookup field for specific trading symbol(s) and display the series/contract date in a MM/DD/YYYY format. The series/contract date will also be appended to the end of the CSV download file in a MM/DD/YYYY.
6. A new daily trade volume HTTP download file will be available beginning 02/12/2010 that will append the series/contract date in a MM/DD/YYYY format to the end of each record. Please note that the existing OCC Trade Volume HTTP Download report without the series/contract date will remain “as is” and will not be affected by the new report. The new OCC Daily Trade Volume HTTP Download report will be located at the following URL on 02/12/2010:
Current OPRA participants include: AMEX, BSE, CBOE, ISE, NASDAQ, NYSE Arca, and PHLX. The participants act as a policy committee composed of representatives from each participant exchange and they implement and, subject to Commission approval, amend the policies and procedures set forth in the OPRA Plan.
The Options Price Reporting Authority (OPRA) provides, through Market Data Vendors, last sale information and current options quotations from a committee of Participant Exchanges designated as the Options Price Reporting Authority.
For more detail please visit : http://www.opradata.com/