Realtek ethernet device not able to ping Laserjet printer with direct connection

If you cannot ping your device - you have a network issue.

No amount of advise otherwise is going to fix that.

Please fix your network setup.