Matrix
  • NEW!
    NEW!  Connect Ideas Across Notes
    Save time and share insights. With Paragraph Citation, you can quote others’ work with source info built in. If someone cites your note, you’ll see a card showing where it’s used—bringing notes closer together.
    Got it
        • Sharing URL Link copied
        • /edit
        • View mode
          • Edit mode
          • View mode
          • Book mode
          • Slide mode
          Edit mode View mode Book mode Slide mode
        • Customize slides
        • Note Permission
        • Read
          • Owners
          • Signed-in users
          • Everyone
          Owners Signed-in users Everyone
        • Write
          • Owners
          • Signed-in users
          • Everyone
          Owners Signed-in users Everyone
        • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invite by email
        Invitee

        This note has no invitees

      • Publish Note

        Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

        Your note will be visible on your profile and discoverable by anyone.
        Your note is now live.
        This note is visible on your profile and discoverable online.
        Everyone on the web can find and read all notes of this public team.

        Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Explore these features while you wait
        Complete general settings
        Bookmark and like published notes
        Write a few more notes
        Complete general settings
        Write a few more notes
        See published notes
        Unpublish note
        Please check the box to agree to the Community Guidelines.
        View profile
      • Commenting
        Permission
        Disabled Forbidden Owners Signed-in users Everyone
      • Enable
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
        • Everyone
      • Suggest edit
        Permission
        Disabled Forbidden Owners Signed-in users Everyone
      • Enable
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
      • Emoji Reply
      • Enable
      • Versions and GitHub Sync
      • Note settings
      • Note Insights New
      • Engagement control
      • Make a copy
      • Transfer ownership
      • Delete this note
      • Insert from template
      • Import from
        • Dropbox
        • Google Drive
        • Gist
        • Clipboard
      • Export to
        • Dropbox
        • Google Drive
        • Gist
      • Download
        • Markdown
        • HTML
        • Raw HTML
    Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
    Menu
    Options
    Engagement control Make a copy Transfer ownership Delete this note
    Import from
    Dropbox Google Drive Gist Clipboard
    Export to
    Dropbox Google Drive Gist
    Download
    Markdown HTML Raw HTML
    Back
    Sharing URL Link copied
    /edit
    View mode
    • Edit mode
    • View mode
    • Book mode
    • Slide mode
    Edit mode View mode Book mode Slide mode
    Customize slides
    Note Permission
    Read
    Owners
    • Owners
    • Signed-in users
    • Everyone
    Owners Signed-in users Everyone
    Write
    Owners
    • Owners
    • Signed-in users
    • Everyone
    Owners Signed-in users Everyone
    Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 24 Implementing IPv6 Addressing on Routers ## Implementing Unicast IPv6 Addresses on Routers ![](https://i.imgur.com/dHtayNT.png) ![](https://i.imgur.com/6L62Lfa.png) ### Static Unicast Address Configuration Cisco routers give us two options for static configuration of IPv6 addresses. 1. In one case,you configure the full 128-bit address 2. while in the other, you configure a 64-bit prefix and let the router derive the second half of the address (the interface ID). #### Configuring the Full 128-Bit Address ![](https://i.imgur.com/YrUbS4h.png) To statically configure the full 128-bit unicast address—either global unicast or unique local—**the router needs an ipv6 address address/prefix-length** interface subcommand on each interface. The address can be an abbreviated IPv6 address or the full 32-digit hex address. ![](https://i.imgur.com/eYUA6Tv.png) #### Enabling IPv6 Routing On Cisco routers, **IPv4 routing is enabled by default, but IPv6 routing is not enabled by default.** The solution takes only a single command—ipv6 unicast-routing—which enables IPv6 routing on the router. #### Verifying the IPv6 Address Configuration - The show ipv6 interface brief - The show ipv6 interface ![](https://i.imgur.com/xx6Wj7Q.png) ![](https://i.imgur.com/UVLLnbG.png) ### Generating a Unique Interface ID Using Modified EUI-64 - With IPv6, routers also typically use static IPv6 addresses, while user devices use DHCP or Stateless Address Auto Configuration (SLAAC) to dynamically learn their IPv6 address. - IPv6 interface addresses,IOS supports two different methods to configure a stable address. - One method uses the ipv6 address command to define the entire 128-bit address, as shown in Examples 24-1 and 24-2. ![](https://i.imgur.com/eYUA6Tv.png) - The other method **uses this same ipv6 address command**, but the command configures only the 64-bit IPv6 prefix for the interface and lets the router automatically generate a unique interface ID. This second method uses rules **called modified EUI-64 (extended unique identifier)**. Often,in the context of IPv6 addressing, people refer to modified **EUI-64** as just EUI-64; ![](https://i.imgur.com/Wved2bU.png) ![](https://i.imgur.com/69PsdyV.png) stpe4 加入冒號 colon 接著拿第一個byte,第7bit顛倒 ![](https://i.imgur.com/r6dVIA6.png) 第7bit會0>1 或 1>0 所以參考下圖的話,一定是倆倆一組 ![](https://i.imgur.com/CDdWych.png) ![](https://i.imgur.com/CawSipP.png) G0/0 – MAC 0201.AA00.0001 – Interface ID 0001.AAFF.FE00.0001 G0/0 – MAC 30F7.0D29.8568 – Interface ID 32F7.0DFF.FE29.8568 ### Dynamic Unicast Address Configuration ■ Stateful DHCP ■ Stateless Address Autoconfiguration (SLAAC) ![](https://i.imgur.com/sQiBDPg.png) ### Special Addresses Used by Routers ![](https://i.imgur.com/Z3hQPGH.png) **Link-Local Addresses** IPv6 defines rules so that **packets sent to any link-local address should not be forwarded by any router to another subnet.** As a result, **several IPv6 protocols make use of link-local addresses** when the protocol’s messages need to stay within the local LAN. :bulb: **有效範圍只有在link local,線性拓樸的這個adrress才有效,把IPv6 enable就會有這個地址,這個address不允許重複但也不可能重複,這個IP也不會被routing** :bulb: **主要用途自動配置地址、發現鄰居、發現router** :bulb: **這個address也不會重複,後半段會用到MAC interface ID**,但如果手動配置則有可能重複 :bulb: **舉例像OSPF在建立routing會使用Link local,原因要有這個IP,它一定就是存在這個interface上,所以它是穩定的,而且又是唯一的** :bulb: **但這兩點要互相通,必須互相知道對方的link local address** ![](https://i.imgur.com/0xMkcx9.png) ![](https://i.imgur.com/VHEirsj.png) **Routers also use link-local addresses as the next-hop IP addresses in IPv6 routes**, as shown in Figure 24-8. IPv6 hosts also use a default router (default gateway) concept. Following are some key facts about link-local addresses: ![](https://i.imgur.com/FE0KVbk.png) ### Creating Link-Local Addresses on Routers IPv6 hosts and routers can calculate their own link-local address, for each interface, using some basic rules. First, all link-local addresses start with the same prefix. Figure 24-9. By definition, the first 10 bits must match prefix FE80::/10, meaning that the **first three hex digits will be either FE8, FE9, FEA, or FEB.** However,**when following the RFC, the next 54 bits should be binary 0, so the link-local address should always start with FE80:0000:0000:0000** as the first four unabbreviated quartets. The second half of the link-local address, in practice, can be formed using EUI-64 rules, can be randomly generated, or even configured. ![](https://i.imgur.com/0yIW3oI.png) ![](https://i.imgur.com/DI4Dzby.png) First, examine the two pairs of highlighted entries in the example. For each of the two interfaces that have a global unicast address (G0/0 and G0/0/0), the output lists **the global unicast, which happens to begin with 2001 in this case**. At the same time, the output also lists the **link-local address for each interface, beginning with FE80.** ### Routing IPv6 with Only Link-Local Addresses on an Interface This chapter has shown **four variations** on the ipv6 address command so far. 1. ipv6 address address/prefix-length: Static configuration of a specific address 2. ipv6 address prefix/prefix-length eui-64: Static configuration of a specific prefix and prefix length, with the router calculating the interface ID using EUI-64 rules 3. ipv6 address dhcp: Dynamic learning on the address and prefix length using DHCP 4. ipv6 address autoconfig: Dynamic learning of the prefix and prefix length, with the router calculating the interface ID using EUI-64 rules (SLAAC) ![](https://i.imgur.com/F8mWLMP.png) Additionally, **the routers do not need to have global unicast (or unique local) addresses** on the WAN links for routing to work. **IPv6 routing protocols use link-local addresses as the next-hop address** when dynamically building IPv6 routes. Additionally, static routes, as discussed in Chapter 25, “Implementing IPv6 Routing,” can use link-local addresses for the next-hop address. ### IPv6 Multicast Addresses IPv6 uses multicast IPv6 addresses for several purposes. Like IPv4, IPv6 includes a range of multicast addresses **that can be used by multicast applications**, with many of the same fundamental concepts as IPv4 multicasts. ### Reserved Multicast Addresses Those broadcast packets were then sent as Ethernet broadcast frames, destined to the Ethernet broadcast address of FFFF.FFFF.FFFF ![](https://i.imgur.com/urZwDze.png) ### Multicast Address Scopes ![](https://i.imgur.com/vE8Bhc6.png) ![](https://i.imgur.com/AFG43jR.png) **Finally, the term link-local** has a couple of common uses in IPv6 and can be confusing as a result. The following descriptions should clarify the different uses of the term: - ***Link-local address***: An IPv6 address that begins **FE80**. This **serves as a unicast address for an interface to which devices apply a link-local scope**. Devices often create their own linklocal addresses using EUI-64 rules. A more complete term for comparison would be linklocal unicast address. - ***Link-local multicast address***: An IPv6 address that begins with **FF02**. This serves as **a reserved multicast address to which devices apply a link-local scope**. - ***Link-local scope***: A reference to the scope itself, rather than an address. This scope defines that routers should not forward packets sent to an address in this scope. ### Solicited-Node Multicast Addresses IPv6 Neighbor Discovery Protocol (NDP) replaces IPv4 ARP, as discussed in Chapter 25. ![](https://i.imgur.com/mX4T3n2.png) ![](https://i.imgur.com/YZ3evQe.png) ### Miscellaneous IPv6 Addresses ![](https://i.imgur.com/wHfrDFl.png) ### Anycast Addresses :bulb: 接收端有多個,但是封包只傳送到路由最近的接收端。 :bulb: Anycast addresses不能當來源位址,也不能指定給hosts。 :bulb: 格式跟unicast address一樣,所以分辨不出來 :bulb: 每個不同的anycast address對應某特定的服務, 服務內容視應用需求而定,並且是預先定義好的。目前anycast的實現只能指定給router,所有被指定到同一個anycast address的routers都將提供相同的特定服務。 當anycast封包在轉送過程中到達具有此anycast位址身份的router時,將被router攔截並做進一步處理。 Imagine that routers collectively need to implement some service. **Rather than have one router supply that service, that service works best when implemented on several routers.** But the hosts that **use the service need to contact only the nearest such service, and the network wants to hide all these details from the hosts.** Step 1. **Two routers configure the exact same IPv6 address**, designated as an anycast address, to support some service. Step 2. In the future, when any router receives a packet for that anycast address, the other routers simply route the packet to the nearest router that supports the address. ![](https://i.imgur.com/YZsfxJM.png) ![](https://i.imgur.com/NfQBfIk.png) ### IPv6 Addressing Configuration Summary ![](https://i.imgur.com/CLcQlA5.png)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully