作者简介:网络工程师,希望能认识更多的小伙伴一起交流,可私信或QQ号:1686231613
文章简介:本文做了ipv6校园网设计
一.拓扑图
二.配置过程
Vlan创建
[ss_HJA]vlan batch 10 20 30 40 50 60 70 80 90 100
其他交换机配置相同
对于接入层根据规划,接入用户的端口加入相关VLAN,上行trunk口允许相关vlan通过。
[Acc-01]vlan batch 100 10 20 30 40 50 60 70 80 90 //创建vlan
配置接入用户接口
[Acc-01-Ethernet0/0/3]port link-type access
[Acc-01-Ethernet0/0/3]port default vlan 10
[Acc-01-Ethernet0/0/4]port link-type access
[Acc-01-Ethernet0/0/4]port default vlan 10
[Acc-02-Ethernet0/0/3]port link-type access
[Acc-02-Ethernet0/0/3]port default vlan 20
[Acc-02-Ethernet0/0/4]port link-type access
[Acc-02-Ethernet0/0/4]port default vlan 20
配置上行口
[Acc-01-Ethernet0/0/1]port link-type trunk
[Acc-01-Ethernet0/0/1]port trunk allow-pass vlan all
[Acc-01-Ethernet0/0/1]int e0/0/2
[Acc-01-Ethernet0/0/2]port link-type trunk
[Acc-01-Ethernet0/0/2]port trunk allow-pass vlan all
其他配置均相同 加入相应vlan即可
各业务汇聚交换机SVI接口配置
开启ipv6
[ss_HJA]ipv6
[ss_HJA]int vlan 10
[ss_HJA-Vlanif10]ipv6 enable
其他设备均要开启ipv6功能
配置接口ipv6地址
[ss_HJA-Vlanif10]ipv6 address 2001:200:3C02:1::2 64
[ss_HJB-Vlanif10]ipv6 address 2001:200:3C02:1::3 64
其他设备根据IP规划表配置即可
配置服务器vrrp网关
[ss_HJA-Vlanif10]vrrp6 vrid 10 virtual-ip fe80::1 link-local //必须配置链路本地地址
[ss_HJA-Vlanif10]vrrp6 vrid 10 virtual-ip 2001:200:3C02:1::1
[ss_HJA-Vlanif10]vrrp6 vrid 10 priority 120
备份组
[ss_HJB-Vlanif10] vrrp6 vrid 10 virtual-ip FE80::1 link-local
[ss_HJB-Vlanif10] vrrp6 vrid 10 virtual-ip 2001:200:3C02:1::1
配置DHCPv6
[Huawei]dhcpv6 pool vlan10
[Huawei-dhcpv6-pool-vlan10]address prefix 2001:200:3C02:1::/64
[Huawei-dhcpv6-pool-vlan10]dns-server 88::88
关闭ra报文抑制
[ss_HJA-Vlanif10]undo ipv6 nd ra halt
配置自动配置 RA标志位 使用有状态dhcpv6 获取地址
[ss_HJA-Vlanif10]ipv6 nd autoconfig managed-address-flag
[ss_HJA-Vlanif10]ipv6 nd autoconfig other-flag
DHCP中继配置
[ss_HJA-Vlanif10]dhcpv6 relay destination 2001:200:3C02:A::FFFE
以上dhcp以一个业务vlan为例 其他均相同
三层互联接口配置IPV6地址
[HX_A-GigabitEthernet0/0/0]ipv6 enable
[HX_A-GigabitEthernet0/0/0]ipv6 address 2001:200:3c02:abc::1 126
核心设备链路聚合配置
interface Eth-Trunk0
undo portswitch
mode lacp-static
max active-linknumber 2
interface GigabitEthernet5/0/0
eth-trunk 0
interface GigabitEthernet5/0/1
eth-trunk 0
interface GigabitEthernet5/0/2
eth-trunk 0
[HX_B-Eth-Trunk0]ipv6 address 2001:200:3c02:234::2 126 //配置聚合接口的IPV6地址
OSPFv3 配置
[ss_HJA]ospfv3 1
[ss_HJA-ospfv3-1]router-id 3.3.3.3
[ss_HJA]int vlan 10
[ss_HJA-Vlanif10]ospfv3 1 area 1
其他配置均相同 创建ospfv3 进程 进入siv接口启用ospfv3 以及区域
防火墙配置
去往ISP路由
ipv6 route-static :: 0 2001::2
Ospfv3 引入默认
default-route-advertise
安全区域配置
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/0
add interface GigabitEthernet1/0/0
add interface GigabitEthernet1/0/4
firewall zone untrust
set priority 5
add interface GigabitEthernet1/0/1
firewall zone dmz
set priority 50
add interface GigabitEthernet1/0/2
配置安全策略
security-policy
rule name out
source-zone trust
destination-zone untrust
action permit
rule name dmz
source-zone trust
destination-zone dmz
action permit
公网接口以及路由配置
[Huawei]ipv6 route-static 2001:200:3C02:: 48 2001::1