Your machine is supposed to have an IP address that is not already taken on the network. In this case, it appears your Cube has the same IP address as the router, so it in fact does not know where to send the network data.
If you open the TCP/IP control panel on the PowerMac G4 in Mac OS 9, what IP address does that Mac have? Also, are you using DHCP or statically assigned addresses on both machines?
The G4 cube like the early iBooks and Powerbooks had AirPort card (802.11b). With newer routers 802.11g/n is necessary and it will not work even though it appears to connect. I solved this problem on mu 1999iBook with a Newer Tech USB adapter.
See this thread for the source and a successful outcome.