举例:配置通过BootStrap服务器实现SZTP
组网图形
^^^


配置思路
采用如下的思路配置SZTP:
- 配置DHCP服务器。
- 配置DHCP中继器。
- 配置BootStrap服务器。
- 配置HTTPS开局文件服务器。
- 将DeviceA、DeviceB上电,启动SZTP流程。
操作步骤
- 配置DHCP服务器。# 配置DHCP服务器分配给客户端的IP地址池,并参照表2配置DHCP服务器Option选项的值。本举例以华为设备为例配置DHCP服务器。
表2 DHCP服务器Option选项取值 Option编号 含义 取值 Option 1 IP地址的子网掩码 255.255.255.0 Option 3 DHCP客户端的出口网关 10.1.1.1 Option 143 BootStrap服务器IP地址 10.1.4.2 <HUAWEI> system-view [HUAWEI] sysname dhcp_server [dhcp_server] dhcp enable [dhcp_server] ip pool pool1 [dhcp_server-ip-pool-pool1] gateway-list 10.1.1.1 [dhcp_server-ip-pool-pool1] network 10.1.1.0 mask 255.255.255.0 [dhcp_server-ip-pool-pool1] option 143 hex 001268747470733a2f2f31302e312e342e323a31 [dhcp_server-ip-pool-pool1] quit [dhcp_server] vlan batch 10 [dhcp_server] interface 10ge 1/0/3 [dhcp_server-10GE1/0/3] portswitch [dhcp_server-10GE1/0/3] port link-type trunk [dhcp_server-10GE1/0/3] port trunk allow-pass vlan 10 [dhcp_server-10GE1/0/3] quit [dhcp_server] interface vlanif 10 [dhcp_server-Vlanif10] ip address 10.1.2.2 24 [dhcp_server-Vlanif10] quit
- 配置DHCP中继器。# 配置DeviceC的DHCP中继功能,同时配置DeviceC与DeviceA、DeviceB相连的接口IP地址为10.1.1.1,作为DeviceA、DeviceB的缺省网关。
<HUAWEI> system-view [HUAWEI] sysname DeviceC [DeviceC] vlan batch 10 [DeviceC] interface 10ge 1/0/1 [DeviceC-10GE1/0/1] portswitch [DeviceC-10GE1/0/1] port link-type trunk [DeviceC-10GE1/0/1] port trunk allow-pass vlan 10 [DeviceC-10GE1/0/1] port trunk pvid vlan 10 [DeviceC-10GE1/0/1] quit [DeviceC] interface 10ge 1/0/2 [DeviceC-10GE1/0/2] portswitch [DeviceC-10GE1/0/2] port link-type trunk [DeviceC-10GE1/0/2] port trunk allow-pass vlan 10 [DeviceC-10GE1/0/2] port trunk pvid vlan 10 [DeviceC-10GE1/0/2] quit [DeviceC] interface vlanif 10 [DeviceC-Vlanif10] ip address 10.1.1.1 24 [DeviceC-Vlanif10] quit [DeviceC] dhcp enable [DeviceC] interface vlanif 10 [DeviceC-Vlanif10] dhcp select relay [DeviceC-Vlanif10] dhcp relay server-ip 10.1.2.2
- 配置BootStrap服务器。# 华为设备不支持做BootStrap服务器功能,在SZTP组网中,需要部署第三方服务器,配置的具体方法请参考第三方服务器的操作指导。
# BootStrap服务器需要内置华为二级CA证书,所有权凭证和所有者证书。
# BootStrap服务器需要设置HTTPS文件服务器的IP地址10.1.3.2,DeviceA和DeviceB的开局文件和配置文件以及相应的路径。
- 配置HTTPS开局文件服务器。# 华为设备不支持做HTTPS服务器功能,在SZTP组网中,需要部署第三方服务器,配置的具体方法请参见第三方服务器的操作指导。
# 文件服务配置完成后,将设备需要加载的开局文件和配置文件放在BootStrap服务器指定的路径下。
- 将DeviceA、DeviceB上电,启动SZTP流程。
检查配置结果
# 设备上电后15分钟左右,完成SZTP开局流程。此时可以登录到设备后执行命令display startup查看设备当前的系统软件、配置文件是否与预期的一致。以DeviceA为例。
<DeviceA> display startup MainBoard: Configured startup system software: flash:/software_file.cc Startup system software: flash:/software_file.cc Next startup system software: flash:/software_file.cc Startup saved-configuration file: flash:/conf_file1.cfg Next startup saved-configuration file: flash:/conf_file1.cfg Startup paf file: default Next startup paf file: default Startup patch package: NULL Next startup patch package: NULL Startup feature software: NULL Next startup feature software: NULL
配置脚本
- DeviceC的配置文件
# sysname DeviceC # vlan batch 10 # dhcp enable # interface Vlanif10 ip address 10.1.1.1 255.255.255.0 dhcp select relay dhcp relay server-ip 10.1.2.2 # interface 10GE1/0/1 port link-type trunk port trunk pvid vlan 10 port trunk allow-pass vlan 10 # interface 10GE1/0/2 port link-type trunk port trunk pvid vlan 10 port trunk allow-pass vlan 10 # return
- DHCP服务器的配置文件
# sysname dhcp_server # dhcp enable # vlan batch 10 # ip pool pool1 gateway-list 10.1.1.1 network 10.1.1.0 mask 255.255.255.0 option 143 hex 001268747470733a2f2f31302e312e342e323a31 # interface Vlanif10 ip address 10.1.2.2 255.255.255.0 # interface 10GE1/0/3 port link-type trunk port trunk allow-pass vlan 10 # return
阅读剩余
版权声明:
作者:SE_YT
链接:https://www.cnesa.cn/2810.html
文章版权归作者所有,未经允许请勿转载。
THE END