Link local address windows

Link-local address/Windows

Contents

A link-local address is an Internet Protocol address that is intended only for communications within the segment of a local network (a link) or a point-to-point connection that a host is connected to. These activities will show you how to view and test IPv4 link-local addresses in Windows.

Preparation [ edit | edit source ]

To prepare for this activity:

  1. Start Windows.
  2. Log in if necessary.

Activity 1 — Confirm DHCP Address [ edit | edit source ]

  1. Open a command prompt.
  2. Use ipconfig /all to verify that you have a DHCP-assigned IP address. You should see DHCP Enabled Yes and a DHCP Server IP address. If not, just read along with the following activities rather than completing them.

Activity 2 — Test Internet Connectivity [ edit | edit source ]

  1. Use ping 8.8.8.8 to ping an Internet host by IP address.
  2. Observe the results. The ping request should be successful, indicating Internet connectivity.

To obtain a link-local address:

  1. Type ipconfig /release and press Enter to release any DHCP-assigned IP addresses.
  2. Observe that no IPv4 address is assigned.
  3. Wait ten seconds and then type ipconfig and press Enter again. Repeat if necessary. After ten seconds, your computer should obtain a link local IP address in the range 169.254.0.0 — 169.254.255.255 (169.254.0.0/16).
  4. If IPv6 is configured, you should also see a link local IPv6 address starting with fe80::/64.

To test the link-local address:

  1. Use ping 8.8.8.8 to ping an Internet host by IP address.
  2. Observe the results. The ping request should fail, because link-local addresses do not have a default gateway assigned and are not routable to the Internet.

Activity 5 — Restore a DHCP-Assigned Address [ edit | edit source ]

To restore a DHCP-assigned address:

  1. Type ipconfig /renew and press Enter.
  2. Observe the results. An IP address should be assigned from the DHCP server.

IPv6 Link-local and Site-local Addresses

IPv6 link-local and site-local addresses are called scoped addresses. The Windows Sockets (Winsock) API supports the sin6_scope_id member in the sockaddr_in6 structure for use with scoped addresses. For IPv6 link-local addresses (fe80::/10 prefix), the sin6_scope_id member in the sockaddr_in6 structure is the interface number. For IPv6 site-local addresses (fec0::/10 prefix), the sin6_scope_id member in the sockaddr_in6 structure is a site identifier.

An example of a link-local IPv6 address on interface #5 is the following:

The following command is available on WindowsВ XP with Service PackВ 1 (SP1) and later to query and configure IPv6 on a local computer:

Configuration changes made using the Netsh.exe commands are permanent and are not lost when the computer or the IPv6 protocol is restarted.

Prior to WindowsВ XP with Service PackВ 1 (SP1), IPv6 configuration and management used several older command-line tools (Net.exe, Ipv6.exe, and Ipsec6.exe) to configure and manage IPv6. Using these older tools, the IPv6 changes are not permanent and are lost when the computer or the IPv6 protocol was restarted. These older command-line tools are only supported on WindowsВ XP.

Читайте также:  Оригинальные образы mac os dmg

On WindowsВ XP with SP1, the following command will display the list of IPv6 interfaces on a local computer including the interface index, the interface name, and various other interface properties.

netsh interface ipv6 show interface

On WindowsВ XP with SP1, the following command will change the site identifier associated with an interface index.

netsh interface ipv6 set interface siteid=value

On WindowsВ XP, the following older command will also change the site identifier associated with a site-local address to 3.

ipv6 rtu fec0::/10 3

If you are sending or connecting to a scoped address, then the sin6_scope_id member in the sockaddr_in6 structure can be left unspecified (zero) which represents an ambiguous scoped address. For example, the following link-local address is ambiguous:

If you are binding to a scoped address, then the sin6_scope_id member in the sockaddr_in6 structure must contain a nonzero value that specifies a valid interface number for a link-local address or a site identifier for a site-local address.

Ambiguous Scoped Addresses

If you are sending or connecting to a scoped address and have not specified the sin6_scope_id member in the sockaddr_in6 structure, then the scoped address is ambiguous. To resolve this, the IPv6 protocol first determines whether you have bound the socket to a source address. If so, the bound source address resolves the ambiguity by supplying an interface number or site identifier.

If you are sending or connecting to a scoped address and have neither specified the sin6_scope_id member nor bound a source address, then the IPv6 protocol checks the routing table. For example, the following command will display the IPv6 routing table on a local computer:

netsh interface ipv6 show route

This indicates that link-local addresses are treated as on-link to interface #13 and #14 by default.

Ambiguity arises when a local computer has multiple network adapters. For example, the netsh command above indicates there are two network interfaces (Local Area Connection and Wireless Network Connection). When an application specifies a destination link-local address (fe80::10, for example) without a scope ID, it is not clear which adapter to use to send the packet. Only a link-local unicast (fe80::/64) or a link-scope multicast (ff00::/8) IPv6 destination address can suffer from not having a scope ID when sending a packet.

Neighbor Discovery

If you have not specified the sin6_scope_id member in the sockaddr_in6 structure, have not bound a source address, and have not specified a route for link-local addresses, then the IPv6 protocol will try Neighbor Discovery to resolve the destination link-local address. For a given packet being sent, one interface is tried. This first interface that is tried is considered the most preferred interface. If Neighbor Discovery fails to resolve the link-local address on an interface, the packet to be sent is dropped and the system remembers that the destination link-local address is not reachable over that interface. On the next packet to be sent under all of the same conditions, a different interface is tried for Neighbor Discovery. This process continues through each of the interfaces on a local computer for each new packet until Neighbor Discovery responds for the destination link-local address or all of the possible interfaces have been tried and failed. Each time an attempt to resolve the neighbor fails, one interface is eliminated for that neighbor.

Читайте также:  Mirroring display windows 10

If the destination link-local address resolves, then that interface is used to send the current packet. This interface is also used for any subsequent ambiguously-scoped packets that are sent to the same link-local destination address.

If Neighbor Discovery fails to resolve the destination link-local address on all interfaces, the system then tries to send the packet on the most preferred interface (the first interface tried). The network stack keeps trying to resolve the destination link-local address on the most preferred interface. After a period of time after Neighbor Discovery has failed on all interfaces, the network stack will restart the process again and try to resolve the destination link-local address on all of the interfaces. Currently, this time interval when Neighbor Discovery is again tried on all interfaces is 60 seconds. However, this time interval may change on versions of Windows and should not be assumed by an application.

If an application binds the same link-local address to a different interface after Neighbor Discovery has resolved the link-local address, that will not override the interface with the link-local destination address returned by Neighbor Discovery.

For more information on Neighbor Discovery for IP version 6, see RFC4861 published by the IETF.

Понимание адреса IPv6 Link-Local

Параметры загрузки

Об этом переводе

Этот документ был переведен Cisco с помощью машинного перевода, при ограниченном участии переводчика, чтобы сделать материалы и ресурсы поддержки доступными пользователям на их родном языке. Обратите внимание: даже лучший машинный перевод не может быть настолько точным и правильным, как перевод, выполненный профессиональным переводчиком. Компания Cisco Systems, Inc. не несет ответственности за точность этих переводов и рекомендует обращаться к английской версии документа (ссылка предоставлена) для уточнения.

Содержание

Введение

Цель этого документа — обеспечить понимание адреса IPv6 Link-Local в сети. Локальный адрес для канала представляет собой одиночный адрес IPv6, который может быть автоматически настроен на любом интерфейсе посредством префикса локальных адресов для канала FE80::/10 (1111 1110 10) и идентификатора интерфейса в модифицированном формате EUI-64. Адреса Link-Local не обязательно связаны с MAC-адресом (настроенным в формате EUI-64). Адреса Link-Local можно также настроить вручную в формате FE80::/10 с помощью команды ipv6 address link-local.

Эти адреса обращаются только к определенному физическому каналу и используются для адресации на одном канале в таких целях, как автоматическая конфигурация адреса и протокол обнаружения соседей. Адреса Link-local можно использовать для достижения соседних узлов, подключенных к тому же каналу. Для обмена данными между узлами глобально уникальный адрес не требуется. Маршрутизаторы не перенаправляют датаграмму с использованием адресов Link-local. Маршрутизаторы IPv6 не должны перенаправлять пакеты, у которых исходные или целевые адреса Link-local относятся к другим каналам. Все интерфейсы с поддержкой IPv6 имеют одиночный адрес Link-local.

Предварительные условия

Требования

Убедитесь, что вы ознакамливаетесь с Форматами Адреса IPv6 перед попыткой этой конфигурации.

Используемые компоненты

Настоящий документ не имеет жесткой привязки к каким-либо конкретным версиям программного обеспечения и оборудования.

Конфигурации в этом документе основываются на Маршрутизаторе серии Cisco 3700 с Выпуском 12.4 (15) T1 программного обеспечения Cisco IOS.

Условные обозначения

Настройка

В данном примере маршрутизаторы R1, R2 и R3 подключены через последовательный интерфейс, и для них настроены адреса IPv6, как упомянуто в схеме сети. Адреса обратной связи настроены на маршрутизаторах R1 и R3, а для связи друг с другом маршрутизаторы используют OSPFv3. В данном примере используется команда ping для демонстрации возможности подключения между маршрутизаторами с использованием адресов Link-local. Маршрутизаторы R1 и R3 могут пропинговать друг друга с глобальным адресом индивидуальной рассылки IPv6, но не с адресом Link-local. Однако маршрутизатор R2, напрямую подключающийся к R1 и R3, может связываться с обоими маршрутизаторами с их адреса Link-local, поскольку адреса Link-local используются только в той локальной сети, которая относится к конкретному физическому интерфейсу.

Читайте также:  Винрар windows 10 активация

Схема сети

В настоящем документе используется следующая схема сети:

Конфигурации

В этом документе используются следующие конфигурации:

Маршрутизатор М1
Маршрутизатор М2 Маршрутизатор R3

Проверка

Проверка конфигурации OSPF

Этот раздел позволяет убедиться, что конфигурация работает правильно.

show ipv6 route ospf
Маршрутизатор М1 Маршрутизатор R3

Маршрутизаторы могут пропинговать друг друга с глобальным адресом индивидуальной рассылки. Однако при использовании адреса Link-local могут связываться только непосредственно подключенные сети. Например, R1 может пропинговать R3 с помощью глобального адреса индивидуальной рассылки, но эти два маршрутизатора не могут обмениваться данными с помощью адресов Link-local. Это показано с помощью команд ping и debug ipv6 icmp на маршрутизаторах R1 и R3. В этом разделе содержатся сценарии для улучшения понимания адресов Link-local.

Когда маршрутизатор R1 пытается связаться с маршрутизатором R3 с помощью адреса Link-local, маршрутизатор R1 возвращает сообщение о таймауте ICMP, указывающее, что адрес Link-local определен локально и не может связаться с адресами Link-local, находящимися за пределами непосредственно подключенной сети.

Пингование адреса Link-Local R3 с маршрутизатора R1
На маршрутизаторе R1

Для маршрутизатора R2 маршрутизаторы R1 и R3 напрямую подключаются и могут пропинговать адрес Link-local обоих маршрутизаторов R1 и R2 путем упоминания соответствующего интерфейса, подключенного к маршрутизатору. Выходные данные показаны здесь:

Пингование адресов Link-Local R1 с маршрутизатора R2
В маршрутизаторе R2 Выходные данные отладки от R1
Пингование адресов Link-Local R3 с маршрутизатора R2
В маршрутизаторе R2 Выходные данные отладки от R3

Адрес Link-local, как подразумевает его название, определен только в соответствующей локальной сети. Другими словами, маршрутизаторы могут иметь один и тот же адрес Link-local, и при этом непосредственно подключенные сети могут обмениваться данными друг с другом без конфликтов. Это не будет так же в случае глобального адреса индивидуальной рассылки. Глобальный адрес индивидуальной рассылки, являющийся маршрутизируемым, должен быть уникальным в сети. Команда show ipv6 interface brief показывает информацию об адресе Link-local на интерфейсе.

show ipv6 interface brief
На маршрутизаторе R1 В маршрутизаторе R3

В данном примере маршрутизаторам R1 и R3 назначен одинаковый адрес Link-local, а R2 все равно может достигнуть обоих маршрутизаторов, указав соответствующий выходной интерфейс.

Пингование адреса Link-local R1 и R3 с R2
Прозванивание локального для канала адреса R1 от R2 Выходные данные отладки от R1 Прозванивание локального для канала адреса R3 от R2 Выходные данные отладки от R3

Примечание. R2 может пропинговать адрес Link-local R1 и R3 только потому, что они подключены напрямую. R2 не может пропинговать адрес Link-local интерфейсов обратной связи в маршрутизаторах R1 и R3, поскольку они непосредственно не подключены. Эхозапрос работает для адресов Link-local только в случае непосредственно подключенных сетей.

Примечание. Трассировки маршрутов не работают в случае адресов Link-local и возвращаются с ошибкой % No valid source address for destination (Нет допустимого исходного адреса для назначения). сообщение об ошибке. Это вызвано тем, что маршрутизаторы IPv6 не должны перенаправлять пакеты, у которых адреса источника или назначения % No valid source address for destination ведут к другим каналам.

Оцените статью