项目作者: ggiamarchi

项目描述 :
Utility to find IPv6 link-local address from a MAC address
高级语言: Go
项目地址: git://github.com/ggiamarchi/mac6.git
创建时间: 2018-09-05T21:10:45Z
项目社区:https://github.com/ggiamarchi/mac6

开源协议:MIT License

下载


Mac6

Build Status

mac6 is a simple CLI that compute a link local IPv6 address from a given MAC address.

Usage

  1. Usage: mac6 [ -i=<interface> ] MAC
  2. Compute IPv6 link-local address from MAC address
  3. Arguments:
  4. MAC Mac address
  5. Options:
  6. -i, --interface Out interface to build IPv6 link local string

Examples

  1. Getting the link-local IPv6 address from a MAC address
  1. $ mac6 8b:7a:1b:06:06:75
  2. fe80::897a:1bff:fe06:0675
  1. Getting the link-local IPv6 address from a MAC address with the out interface
  1. $ mac6 -i eth0 8b:7a:1b:06:06:75
  2. fe80::897a:1bff:fe06:0675%eth0

Main use case

The initial idea for this project is to ease connecting to a machine having an IPv6 stack. Today most of the
Linux distribution comes with a dual IP stack. So, even when working on a legacy IPv4 network, it’ possible to
connect to any other machine using it’s IPv6 link-local address. It can be usefull for instance to connected
to a machine that failed its DHCP request.

When you know the machine’s MAC address, you can use mac6 to contact a machine through it’s IPv6 link-local
address.

Examples

  1. $ ping6 $(mac6 -i eth0 8b:7a:1b:06:06:75)

is equivalent to

  1. $ ping6 fe80::897a:1bff:fe06:0675%eth0

And

  1. $ ssh user@$(mac6 -i eth0 8b:7a:1b:06:06:75)

is equivalent to

  1. $ ssh user@fe80::897a:1bff:fe06:0675%eth0

License

Mac6 is licensed under the MIT license.