The duty of support attaches with the legal father. The law presumes that the husband of the pregnant woman is the father, even if he has actual knowlege that the child is not his, provided they are still married when the child is born. Changing the status of the father for child support actions requires a "paternity action" to be filed in state court. To be sucessful, you will have to show evidence (usually scientific, like a blood or DNA test) that the child is biologically the father's, and not the husband's.
NOTE: This answer is not intended to be legal advice and should not be construed in that way. This answer does not create an attorney-client relationship and no such relationship may be created absent a signed retainer agreement. The author is licensed in Illinois only, and his answer is for educational purposes alone.