path-to-pig.py Verified current stable Not installed? Networking

Path To Pig.py / Print Lease Info Neighbor Scan Release

Print Lease Info Neighbor Scan Release

Transmits ARP requests to discover neighbors and prints lease information.

$
Terminal
sudo <path/to>/pig.py -n -r -o <eth1>

When To Use

When troubleshooting network issues related to IP allocations or inspecting DHCP lease records.

Pro Tip

Use in conjunction with network scanning tools to confirm devices are reachable post-ARP query.

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
$ sudo path/to/pig.py --neighbors-scan-arp --neighbors-attack-release eth1
Scanning neighbors on eth1...

Neighbor Table:
+----------------+----------------+----------------+
| IP Address     | MAC Address     | Lease Status    |
+----------------+----------------+----------------+
| 192.168.1.10   | 00:1A:2B:3C:4D:5E| Active          |
| 192.168.1.20   | 00:1A:2B:3C:4D:5F| Inactive        |
+----------------+----------------+----------------+
Releasing lease for 192.168.1.10...
Lease released successfully.

Anatomy of Output

Understanding the result

sudo path-to-pig.py --neighbors-scan-arp --neighbors-attack-release --show-options eth1 Command Executed

Executes ARP scan and performs release using specified options.

[INFO] Discovering neighbors on eth1... Process Notification

Indicates initiation of the ARP discovery process.

[LEASE] IP: 192.168.1.10, MAC: 00:11:22:33:44:55 Lease Information

Displays active DHCP leases for discovered devices.

Troubleshooting

Common pitfalls

bash: path-to-pig.py: No such file or directory

Solution: Check the full path to the script for accuracy.

[ERROR] Insufficient permissions for ARP operations

Solution: Run command with sudo or ensure user permissions.

Error: Interface eth1 cannot receive packets

Solution: Check that eth1 is configured correctly and operational.

Command Breakdown

What each part is doing

sudo
Base Command
The executable that performs this operation. Here it runs Path To Pig.py before the shell applies any redirect operators.
<path/to>
path to
The value supplied for path to.
-n
n| neighbors scan arp
The value supplied for n| neighbors scan arp.
-r
r| neighbors attack release
The value supplied for r| neighbors attack release.
-o
o| show options
The value supplied for o| show options.
<eth1>
eth1
The value supplied for eth1.
-n
Command Option
Tool-specific option used by this command invocation.
-r
Command Option
Tool-specific option used by this command invocation.
-o
Command Option
Tool-specific option used by this command invocation.

How To Run

Execution path

  1. Step 1

    Run the command with sudo privileges.

  2. Step 2

    Specify the interface (e.g., eth1) for scanning.

  3. Step 3

    Review the output for lease information.

Alternative Approaches

Comparable commands in other tools

Alternative networking tools for the same job.