I think the solution to my problem is simple but still I can't figure it out. Here are my configs:
[root@localhost root]# iwconfig wlan0
wlan0 IEEE 802.11g ESSID:"mynet"
Mode:Managed Frequency:2.437GHz Access Point: xx:xx:xx:xx:xx:xx
Bit Rate:11Mb/s
RTS thr:2347 B Fragment thr:2346 B
Encryption key:"hex key here" Security mode

pen
Power Management

ff
Link Quality:100/100 Signal level:-50 dBm Noise level:-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:5 Missed beacon:0
[root@localhost root]# ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet6 addr: fe80::290:4bff:fe73:7e58/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:2772 (2.7 Kb)
Interrupt:11 Memory:faffc000-faffdfff
[root@localhost root]# iwlist wlan0 scan
wlan0 Scan completed :
Cell 01 - Address: xx:xx:xx:xx:xx:xx
ESSID:"mynet"
Protocol:IEEE 802.11b
Mode:Managed
Frequency:2.437GHz
Quality:0/100 Signal level:-49 dBm Noise level:-256 dBm
Encryption key

n
Bit Rate:1Mb/s
Bit Rate:2Mb/s
Bit Rate:5.5Mb/s
Bit Rate:11Mb/s
Cell 02 - Address: 00:06:25:E5:9B:C1
ESSID:"neighbors net"
Protocol:IEEE 802.11b
Mode:Managed
Frequency:2.462GHz
Quality:0/100 Signal level:-69 dBm Noise level:-256 dBm
Encryption key

n
Bit Rate:1Mb/s
Bit Rate:2Mb/s
Bit Rate:5.5Mb/s
Bit Rate:11Mb/s
[root@localhost root]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
169.254.0.0 * 255.255.0.0 U 0 0 0 lo
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
I tried adding a default route but got error (network unreachable).
I get the following error when I try to enable dhcp.
[root@localhost root]# dhclient wlan0
Internet Systems Consortium DHCP Client V3.0.1rc14
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit
http://www.isc.org/products/DHCP
sit0: unknown hardware address type 776
sit0: unknown hardware address type 776
Listening on LPF/wlan0/xx:xx:xx:xx:xx:xx
Sending on LPF/wlan0/xx:xx:xx:xx:xx:xx
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
My /etc/sysconfig.conf file has nameserver specified. Also, I did not have any errors while installing windows driver using ndiswrapper.
I'm using FC2 kernel 2.6.6. Someone please help me!!!! Also, do I have to change any firewall settings? I have it enabled.