---
name: "sc_prefixscan"
section: "1"
platform: "linux"
package: "scamper"
version: "20211212-1.2+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/sc_prefixscan"
---

# sc\_prefixscan(1)

scamper driver to test if a set of IPv4 links are point-to-point.

## NAME

**sc\_prefixscan** – scamper driver to test if a set of IPv4 links are point-to-point.

## SYNOPSIS

**sc\_prefixscan** \[**-D**\] \[**-i** *infile*\] \[**-o** *outfile*\] \[**-p** *port*\] \[**-l** *logfile*\] \[**-U** *unix-socket*\] \[**-w** *wait*\] \[**-x** *prefixlen*\]

**sc\_prefixscan** \[**-r** *data-file*\] \[**-x** *prefixlen*\]

## DESCRIPTION

The **sc\_prefixscan** utility provides the ability to connect to a running [scamper(1)](/scamper/1.md) instance and use it to collect data to infer if an IPv4 link is likely a point-to-point link using the prefixscan method. An address B is the in-bound interface of a router in a traceroute path if we find an alias A' of the address A returned for the previous hop and A' is a /31 or /30 mate of B, i.e. the link between A and B is a point-to-point link. The prefixscan method infers A and A' are aliases if the IPIDs in responses to five alternating probes sent one second apart monotonically increase and differ by no more than 1,000, or probes to A and A' elicit responses with a common source address. The first technique is a pairwise comparison similar to Ally, and the second is the Mercator technique. The supported options to **sc\_prefixscan** are as follows:

- **-D**

  causes **sc\_prefixscan** to detach and become a daemon.

- **-i** *infile*

  specifies a file containing a list of IPv4 address pairs adjacent in traceroute paths to test if they are point-to-point links.

- **-o** *outfile*

  specifies the name of the output file to be written during the data collection phase.  The output file will use the warts(5) format.

- **-p** *port*

  specifies the port on the local host where [scamper(1)](/scamper/1.md) is accepting control socket connections.

- **-l** *logfile*

  specifies the name of a file to log progress output from **sc\_prefixscan** generated at run time.

- **-r** *data-file*

  specifies the name of the data file to be parsed for point-to-point link inferences that were collected by **sc\_prefixscan** in a previous data collection.

- **-U** *unix-socket*

  specifies the name of a unix domain socket where a local [scamper(1)](/scamper/1.md) instance is accepting control socket connections.

- **-w** *wait*

  specifies the length of time in seconds to wait between probing the same IPv4 address with different methods. By default, **sc\_prefixscan** waits five seconds between methods.

- **-x** *prefixlen*

  specifies the maximum size of prefix to consider. By default, **sc\_prefixscan** considers up to an IPv4 /30 prefix.

## EXAMPLES

Given a traceroute with the following path:

```
traceroute to 192.0.30.64
```

```
1 192.0.2.1
```

```
2 192.0.32.10
```

```
3 192.0.31.8
```

```
4 192.0.30.64
```

then to collect data to infer if the implied IPv4 links are point-to-point, put the links in a file named infile.txt formatted as follows:

```
192.0.2.1 192.0.32.10
```

```
192.0.32.10 192.0.31.8
```

```
192.0.31.8 192.0.30.64
```

and use a [scamper(1)](/scamper/1.md) daemon listening on port 31337 using:

```
sc_prefixscan -i infile.txt -o outfile.warts -p 31337
```

To obtain the inferred point-to-point links from outfile.warts:

```
sc_prefixscan -r outfile.warts
```

## SEE ALSO

[scamper(1)](/scamper/1.md), [sc\_ally(1)](/sc_ally/1.md), [sc\_ipiddump(1)](/sc_ipiddump/1.md), [sc\_wartsdump(1)](/sc_wartsdump/1.md), [sc\_warts2text(1)](/sc_warts2text/1.md), [sc\_warts2json(1)](/sc_warts2json/1.md), M. Luckie and k. claffy, *A Second Look at Detecting Third-party Addresses in Traceroute Traces with the IP Timestamp Option*, Proc. Passive and Active Measurement Conference 2014. R. Govindan and H. Tangmunarunkit, *Heuristics for Internet Map Discovery*, Proc. IEEE INFOCOM 2000. N. Spring, R. Mahajan, and D. Wetherall, *Measuring ISP topologies with Rocketfuel*, Proc. ACM SIGCOMM 2002.

## AUTHORS

**sc\_prefixscan** was written by Matthew Luckie \<mjl@luckie.org.nz\>.
