F5 LTM 配置导入导出工具

首页 / 🍁F5 / 正文

一、功能简介

checked📬 F5 LTM 配置导出到 excel 表格。


checked📪 通过指定 excel 表格配置 F5 LTM。


checked🪧 该工具目前支持 BIGIP 12 版本以上。


unchecked🌈 导出导出配置的表格格式,暂时只支持 .xlsx 格式,后续会继续更新!


二、工具下载

⛲ windows 版本工具下载地址:传送门🚪

⛺ Linux 版本工具下载地址:传送门🚪

⌛Github下载地址:传送门🚪

三、F5 LTM 配置导出到 excel 表格

1、表格输出效果

image-20220622151706375

参数说明

参数说明
partition分区名称
virtualservername虚拟服务名称
destination虚拟服务地址
description虚拟服务描述信息
source虚拟服务源地址
s_ip_protocol虚拟服务协议
profiles虚拟服务使用的 profile,多个用空格分隔开。
pool_namepool 名称
pool_memberspool 成员信息,多个成员之间用空格分开。
snat_type源地址转换类型
snat_pool源地址转换地址池
irules调用的 iRule

2、运行程序

程序语法:

C:\Users\wangh>C:\Users\wangh\Desktop\ltm.exe -h
ltm controls the f5 bigip devices.

Usage:
  ltm [flags]
  ltm [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  export      Read f5 device data and write to excel sheet
  help        Help about any command
  import      Read the excel configuration and load it to the f5 device
  version     Show ltm version

Flags:
  -h, --help   help for ltm

Use "ltm [command] --help" for more information about a command.

配置导出语法:

C:\Users\wangh>C:\Users\wangh\Desktop\ltm.exe export -h
Read f5 device data and write to excel sheet

Usage:
  ltm export [flags]

Flags:
  -f, --file string       Specifies an alternative configuration file (default "/tmp/create.xlsx")
  -h, --help              help for export
  -a, --host string       The host ip address (default "127.0.0.1")
  -p, --password string   Password for the given user (default "admin")
  -s, --sheet string      Specifies the table name of the workbook (default "Sheet1")
  -u, --username string   The username of the host (default "admin")

执行示例:

image-20220831170912445

注意:输出表格格式必须为 .xlsx 格式。

MacOS 和 Linux 版本再次不做演示了,用法几乎一致,有需要的 传送门

四、通过指定 excel 表格配置 F5 LTM

1、表格展示

image-20220616213316614

表格参数说明

参数说明
virtual_name虚拟服务名称
vs_destination虚拟服务目的地址
vs_ip_protocol虚拟服务协议,可选参数:tcp udp
profiles指定配置 profiles ,可选参数 http tcp fastL4 ...
translate_address地址转换 , 可选参数 enabled disabled
translate_port端口转换, 可选参数 enabled disabled
snat_type源地址转换类型 , 可选参数 automap none ,暂不支持指定 snatpool 。
persistence会话保持,可选参数 source_addr dest_addr hash none cookie
pool_namepool 名称
pool_memberpool 成员,多个成员可以使用回车或者空格进行分隔。示例:10.1.1.10:80
pool_monitorpool 健康检查,可选参数 tcp gateway_icmp http ...
pool_lbmodepool 成员负载均衡方式 ,可选参数 round-robin least-connections-member ...

2、表格下载

⛺ 表格下载地址: 传送门🚪

3、运行程序

程序语法

C:\Users\wangh>C:\Users\wangh\Desktop\ltm.exe -h
ltm controls the f5 bigip devices.

Usage:
  ltm [flags]
  ltm [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  export      Read f5 device data and write to excel sheet
  help        Help about any command
  import      Read the excel configuration and load it to the f5 device
  version     Show ltm version

Flags:
  -h, --help   help for ltm

Use "ltm [command] --help" for more information about a command.

配置导入语法

C:\Users\wangh>C:\Users\wangh\Desktop\ltm.exe import -h
Read the excel configuration and load it to the f5 device

Usage:
  ltm import [flags]

Flags:
  -f, --file string       Specifies an alternative configuration file (default "/tmp/create.xlsx")
  -h, --help              help for import
  -a, --host string       The host ip address (default "127.0.0.1")
  -p, --password string   Password for the given user (default "admin")
  -s, --sheet string      Specifies the table name of the workbook (default "Sheet1")
  -u, --username string   The username of the host (default "admin")

执行示例

image-20220901111418747

结果验证

image-20220616210337715

注意

  • 表格格式必须为 xlsx格式。且列的顺序不可变更
  • 所有表格内容必须填写完整。不许有空的格子。

五、致谢

🌞 项目作者:lefeck

🪐 如果该项目帮助了您,您的🌟是作者最大的动力!

无标签
打赏
文章目录