所选语种没有对应资源,请选择:

本站点使用Cookies,继续浏览表示您同意我们使用Cookies。Cookies和隐私政策>

提示

尊敬的用户,您的IE浏览器版本过低,为获取更好的浏览体验,请升级您的IE浏览器。

升级

S7700, S9700 V200R010C00 配置指南-IP业务

本文档介绍了IP业务的配置,具体包括IP地址配置、ARP配置、DHCP配置、DNS配置、mDNS网关配置、mDNS中继配置、UDP Helper配置、IP性能优化配置、IPv6基础配置、DHCPv6配置、IPv6 DNS配置、IPv6 over IPv4隧道配置和IPv4 over IPv6隧道配置。
评分并提供意见反馈 :
华为采用机器翻译与人工审校相结合的方式将此文档翻译成不同语言,希望能帮助您更容易理解此文档的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 华为对于翻译的准确性不承担任何责任,并建议您参考英文文档(已提供链接)。
配置DHCPv6中继示例

配置DHCPv6中继示例

组网需求

图10-18所示,DHCPv6服务器要为两个网段(fc00:1::/64和fc00:2::/64)的主机动态分配IPv6地址和DNS服务器的地址,且DHCPv6服务器与主机不在同一链路。SwitchA上fc00:1::1/64和fc00:2::1/64分别作为fc00:1::/64和fc00:2::/64网段主机的网关地址。

图10-18  配置DHCPv6中继组网图

配置思路

在SwitchA上配置DHCPv6中继功能,通过转发DHCPv6服务器和主机之间的DHCPv6报文,以实现主机动态获取IPv6地址和DNS服务器的地址。

说明:

配置前请保证DHCPv6服务器与DNS服务器之间路由互通。

操作步骤

  1. 配置SwitchA作为DHCPv6中继

    # 使能DHCP服务。

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] dhcp enable

    # 配置接口GE1/0/1接口加入VLAN10,接口GE1/0/2接口加入VLAN20,接口GE1/0/3接口加入VLAN30。

    [SwitchA] vlan batch 10 20 30
    [SwitchA] interface gigabitethernet 1/0/1
    [SwitchA-GigabitEthernet1/0/1] port link-type access
    [SwitchA-GigabitEthernet1/0/1] port default vlan 10
    [SwitchA-GigabitEthernet1/0/1] quit
    [SwitchA] interface gigabitethernet 1/0/2
    [SwitchA-GigabitEthernet1/0/2] port link-type trunk
    [SwitchA-GigabitEthernet1/0/2] port trunk allow-pass vlan 20
    [SwitchA-GigabitEthernet1/0/2] quit
    [SwitchA] interface gigabitethernet 1/0/3
    [SwitchA-GigabitEthernet1/0/3] port link-type access
    [SwitchA-GigabitEthernet1/0/3] port default vlan 30
    [SwitchA-GigabitEthernet1/0/3] quit

    # 配置VLANIF接口的IPv6地址。

    [SwitchA] ipv6
    [SwitchA] interface vlanif 10
    [SwitchA-Vlanif10] ipv6 enable
    [SwitchA-Vlanif10] ipv6 address fc00:1::1 64
    [SwitchA-Vlanif10] quit
    [SwitchA] interface vlanif 20
    [SwitchA-Vlanif20] ipv6 enable
    [SwitchA-Vlanif20] ipv6 address fc00:3::1 64
    [SwitchA-Vlanif20] quit
    [SwitchA] interface vlanif 30
    [SwitchA-Vlanif30] ipv6 enable
    [SwitchA-Vlanif30] ipv6 address fc00:2::1 64
    [SwitchA-Vlanif30] quit

    # 使能DHCPv6中继功能。

    [SwitchA] interface vlanif 10
    [SwitchA-Vlanif10] dhcpv6 relay destination fc00:3::3
    [SwitchA-Vlanif10] quit
    [SwitchA] interface vlanif 30
    [SwitchA-Vlanif30] dhcpv6 relay destination fc00:3::3
    [SwitchA-Vlanif30] quit
    

    # 配置SwitchA作为网关向主机发送RA消息的M和O标志位,实现主机通过DHCPv6方式获取IPv6地址。

    [SwitchA] interface vlanif 10
    [SwitchA-Vlanif10] undo ipv6 nd ra halt
    [SwitchA-Vlanif10] ipv6 nd autoconfig managed-address-flag
    [SwitchA-Vlanif10] ipv6 nd autoconfig other-flag
    [SwitchA-Vlanif10] quit
    [SwitchA] interface vlanif 30
    [SwitchA-Vlanif30] undo ipv6 nd ra halt
    [SwitchA-Vlanif30] ipv6 nd autoconfig managed-address-flag
    [SwitchA-Vlanif30] ipv6 nd autoconfig other-flag
    [SwitchA-Vlanif30] quit

  2. 配置SwitchB作为DHCPv6服务器

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchB
    [SwitchB] dhcp enable
    [SwitchB] ipv6
    [SwitchB] vlan 20
    [SwitchB-vlan20] quit
    [SwitchB] interface gigabitethernet 1/0/2
    [SwitchB-GigabitEthernet1/0/2] port link-type trunk
    [SwitchB-GigabitEthernet1/0/2] port trunk allow-pass vlan 20
    [SwitchB-GigabitEthernet1/0/2] quit
    [SwitchB] interface vlanif 20
    [SwitchB-Vlanif20] ipv6 enable
    [SwitchB-Vlanif20] ipv6 address fc00:3::3 64
    [SwitchB-Vlanif20] quit
    [SwitchB] dhcpv6 pool pool1
    [SwitchB-dhcpv6-pool-pool1] address prefix fc00:1::/64  
    [SwitchB-dhcpv6-pool-pool1] excluded-address fc00:1::1
    [SwitchB-dhcpv6-pool-pool1] dns-server fc00:4::1
    [SwitchB-dhcpv6-pool-pool1] quit
    [SwitchB] dhcpv6 pool pool2
    [SwitchB-dhcpv6-pool-pool2] address prefix fc00:2::/64  
    [SwitchB-dhcpv6-pool-pool2] excluded-address fc00:2::1
    [SwitchB-dhcpv6-pool-pool2] dns-server fc00:4::1
    [SwitchB-dhcpv6-pool-pool2] quit
    [SwitchB] ipv6 route-static :: 0 fc00:3::1

  3. 配置DHCPv6客户端(PC的操作系统以Windows 7为例)

    1. 右击桌面“网络”,单击“属性”,进入“网络和共享中心”窗口。
    2. 单击“本地连接”,进入“本地连接状态”窗口。
    3. 单击“属性”,进入“本地链接属性”窗口。
    4. 选择“Internet协议版本6(TCP/IPv6)”,点击“属性”,进入“Internet协议版本6(TCP/IPv6)属性”窗口,选择“自动获得IPv6地址”和“自动获得DNS服务器地址”,单击“确定”。

  4. 验证配置结果

    # 在SwitchA上使用display dhcpv6 relay命令用来查看DHCPv6中继配置情况。

    [SwitchA] display dhcpv6 relay
    --------------------------------------------------------------------------------
    Interface               Mode        Destination
    --------------------------------------------------------------------------------
    Vlanif10                Relay       FC00:3::3
    Vlanif30                Relay       FC00:3::3
    --------------------------------------------------------------------------------
     Print count : 2                    Total count : 2
    # 在SwitchB上使用display dhcpv6 pool命令查看DHCPv6地址池的配置信息。
    [SwitchB] display dhcpv6 pool
    DHCPv6 pool: pool1
      Address prefix: FC00:1::/64
        Lifetime valid 172800 seconds, preferred 86400 seconds
        4 in use, 0 conflicts
      excluded-address FC00:1::1
      1 excluded addresses
      Information refresh time: 86400
      DNS server address: FC00:4::1 
      conflict-address expire-time: 172800
      renew-time-percent : 50
      rebind-time-percent : 80
      Active normal clients: 4
    
    DHCPv6 pool: pool2
      Address prefix: FC00:2::/64
        Lifetime valid 172800 seconds, preferred 86400 seconds
        2 in use, 0 conflicts
      excluded-address FC00:2::1
      1 excluded addresses
      Information refresh time: 86400
      DNS server address: FC00:4::1 
      conflict-address expire-time: 172800
      renew-time-percent : 50
      rebind-time-percent : 80
      Active normal clients: 2
    
    # 分别在SwitchB上使用命令display dhcpv6 pool pool1 allocated addressdisplay dhcpv6 pool pool2 allocated address查看DHCPv6地址池的IPv6地址分配情况。
    [SwitchB] display dhcpv6 pool pool1 allocated address
    Address                                 Valid    Expires             Left
    -------------------------------------------------------------------------------
    FC00:1::2                                 172800   2013-09-06 03:09:02 166610
    FC00:1::3                                 172800   2013-09-06 03:09:02 166610
    FC00:1::4                                 172800   2013-09-06 03:09:02 166610
    FC00:1::5                                 172800   2013-09-06 03:09:02 166610
    -------------------------------------------------------------------------------
    Total : 4
    [SwitchB] display dhcpv6 pool pool2 allocated address
    Address                                 Valid    Expires             Left
    -------------------------------------------------------------------------------
    FC00:2::2                                 172800   2013-09-06 03:09:02 166610
    FC00:2::3                                 172800   2013-09-06 03:09:02 166610
    -------------------------------------------------------------------------------
    Total : 2

配置文件

  • SwitchA的配置文件

    #
    sysname SwitchA
    #
    ipv6
    #
    vlan batch 10 20 30
    #
    dhcp enable
    #
    interface Vlanif10
     ipv6 enable
     ipv6 address FC00:1::1/64
     undo ipv6 nd ra halt
     ipv6 nd autoconfig managed-address-flag
     ipv6 nd autoconfig other-flag
     dhcpv6 relay destination FC00:3::3
    #
    interface Vlanif20
     ipv6 enable
     ipv6 address FC00:3::1/64
    #
    interface Vlanif30
     ipv6 enable
     ipv6 address FC00:2::1/64
     undo ipv6 nd ra halt
     ipv6 nd autoconfig managed-address-flag
     ipv6 nd autoconfig other-flag
     dhcpv6 relay destination FC00:3::3
    #
    interface GigabitEthernet1/0/1
     port link-type access
     port default vlan 10
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    interface GigabitEthernet1/0/3
     port link-type access
     port default vlan 30
    #
    return
  • SwitchB的配置文件

    #
    sysname SwitchB
    #
    ipv6
    #
    vlan batch 20
    #
    dhcp enable
    #
    dhcpv6 pool pool1
     address prefix FC00:1::/64
     excluded-address FC00:1::1
     dns-server FC00:4::1
    #
    dhcpv6 pool pool2
     address prefix FC00:2::/64
     excluded-address FC00:2::1
     dns-server FC00:4::1
    #
    interface Vlanif20
     ipv6 enable
     ipv6 address FC00:3::3/64
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    ipv6 route-static :: 0 FC00:3::1
    #
    return
翻译
下载文档
更新时间:2019-08-21

文档编号:EDOC1000141459

浏览量:18765

下载量:841

平均得分:
本文档适用于这些产品
相关文档
相关版本
Share
上一页 下一页