Are you getting a self assigned IP adderss starting with 169
If so, this can be caused by a bug in Leopard that affects a lot of G4s, or from a weak wifi signal, by borrowing a neighbors unsecured wifi.
If it isn't the later, there is a Terminal command that can fix it.
Type the follow command first to access root control:
then hit the return key
It will then prompt you for your password. Enter your password and hit enter.
then it should say something like "sh-3.2#" now type the following command
then hit the return key - it will then ask you 'Are you sure' or something like that. simply hit the Y key. Thats it!
Once you have done that, type in exit then hit the return key to exit out of root.
then close out the terminal program.