From Fedora Project Wiki
Line 1: Line 1:
=== Using automatic link-local addresses (IPv6-only) ===
=== Using automatic link-local addresses (IPv6-only) ===
Link-local addresses on Ethernet work without any configuration tools
except that you have to activate the interface first.
<pre>
# device=eth1
#
# ip link set $device up
</pre>
Kernel automatically assigns a MAC-derived link-local address to any
active Ethernet interface.
<pre>
# ip address show dev $device
</pre>
If you know another link-local address on the network, you should be able
to test it with the <code>ping</code> command.
<pre>
# ping .....
</pre>
Oh, wait, <code>ping</code> doesn't work. Use <code>ping6</code>.
<pre>
# ping6 .....
</pre>
Failed again. Now we're getting to the point. Link-local addresses use the same
network prefix on every interface. We need to specify the local network interface
to be used to contact the particular link-local address.
<pre>
# ping6 ....%eth0
</pre>


=== Static runtime configuration (iproute2) ===
=== Static runtime configuration (iproute2) ===

Revision as of 07:57, 21 November 2012

Using automatic link-local addresses (IPv6-only)

Link-local addresses on Ethernet work without any configuration tools except that you have to activate the interface first.

# device=eth1
#
# ip link set $device up

Kernel automatically assigns a MAC-derived link-local address to any active Ethernet interface.

# ip address show dev $device

If you know another link-local address on the network, you should be able to test it with the ping command.

# ping .....

Oh, wait, ping doesn't work. Use ping6.

# ping6 .....

Failed again. Now we're getting to the point. Link-local addresses use the same network prefix on every interface. We need to specify the local network interface to be used to contact the particular link-local address.

# ping6 ....%eth0

Static runtime configuration (iproute2)

ip address add 192.168.1.1/24 dev eth0
ip address add 2001:db8:1:2::1 dev eth0