Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mdlayher/ndp
Package ndp implements the Neighbor Discovery Protocol, as described in RFC 4861. MIT Licensed.
https://github.com/mdlayher/ndp
go golang icmpv6 ipv6 ndp neighbor-discovery-protocol
Last synced: about 4 hours ago
JSON representation
Package ndp implements the Neighbor Discovery Protocol, as described in RFC 4861. MIT Licensed.
- Host: GitHub
- URL: https://github.com/mdlayher/ndp
- Owner: mdlayher
- License: mit
- Created: 2017-12-19T07:40:38.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2024-03-12T14:41:04.000Z (10 months ago)
- Last Synced: 2025-01-04T10:44:48.833Z (7 days ago)
- Topics: go, golang, icmpv6, ipv6, ndp, neighbor-discovery-protocol
- Language: Go
- Homepage: https://tools.ietf.org/html/rfc4861
- Size: 227 KB
- Stars: 223
- Watchers: 9
- Forks: 24
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ndp [![Test Status](https://github.com/mdlayher/ndp/workflows/Test/badge.svg)](https://github.com/mdlayher/ndp/actions) [![Go Reference](https://pkg.go.dev/badge/github.com/mdlayher/ndp.svg)](https://pkg.go.dev/github.com/mdlayher/ndp) [![Go Report Card](https://goreportcard.com/badge/github.com/mdlayher/ndp)](https://goreportcard.com/report/github.com/mdlayher/ndp)
Package `ndp` implements the Neighbor Discovery Protocol, as described in
[RFC 4861](https://tools.ietf.org/html/rfc4861). MIT Licensed.The command `ndp` is a utility for working with the Neighbor Discovery Protocol.
To learn more about NDP, and how to use this package, check out my blog:
[Network Protocol Breakdown: NDP and Go](https://mdlayher.com/blog/network-protocol-breakdown-ndp-and-go/).## Examples
Listen for incoming NDP messages on interface eth0 to one of the interface's
global unicast addresses.```none
$ sudo ndp -i eth0 -a global listen
$ sudo ndp -i eth0 -a 2001:db8::1 listen
````Send router solicitations on interface eth0 from the interface's link-local
address until a router advertisement is received.```none
$ sudo ndp -i eth0 -a linklocal rs
```Send neighbor solicitations on interface eth0 to a neighbor's link-local
address until a neighbor advertisement is received.```none
$ sudo ndp -i eth0 -a linklocal -t fe80::1 ns
```An example of the tool sending a router solicitation and receiving a router
advertisement on the WAN interface of a Ubiquiti router:```none
$ sudo ndp -i eth1 -a linklocal rs
ndp> interface: eth1, link-layer address: 04:18:d6:a1:ce:b8, IPv6 address: fe80::618:d6ff:fea1:ceb8
ndp rs> router solicitation:
- source link-layer address: 04:18:d6:a1:ce:b8ndp rs> router advertisement from: fe80::201:5cff:fe69:f246:
- hop limit: 0
- flags: [MO]
- preference: 0
- router lifetime: 2h30m0s
- reachable time: 1h0m0s
- retransmit timer: 0s
- options:
- prefix information: 2600:6c4a:7002:100::/64, flags: [], valid: 720h0m0s, preferred: 168h0m0s
```