Desktop

iwconfig wlan0 mode Ad-Hoc essid james rate 11M channel 6

ifconfig wlan0 192.168.1.10 netmask 255.255.255.0
route add default gw 192.168.1.1 wlan0


Laptop

iwconfig eth0 mode Ad-Hoc essid james rate 11M channel 6

ifconfig eth0 192.168.1.11 netmask 255.255.255.0
route add default gw 192.168.1.1 eth0


When I try to ping each other I get nothing.
Do I need to add IP address to /etc/hosts ?


Please help a dummy, I'd be very grateful.