f5 tmsh 配置 业务
F5 TMSH (Traffic Management Shell) 是 F5 BIG-IP 上一种基于命令行的配置方式,可以通过 TMSH 命令行配置 F5 BIG-IP 的各种功能。下面是配置 F5 BIG-IP 业务的示例:
- 创建一个 iRule
tmsh create sys irule my_irule {
when CLIENT_ACCEPTED {
log local0. "Client accepted from [IP::client_addr]"
}
}
- 创建一个 Virtual Server
tmsh create ltm virtual my_vs {
destination 10.0.0.1:80
ip-protocol tcp
mask 255.255.255.255
profiles {
fastL4 { }
tcp { }
}
source-address-translation {
type automap
}
}
- 将 iRule 绑定到 Virtual Server 上
tmsh modify ltm virtual my_vs {
rules {
my_irule { }
}
}
- 创建一个 Pool
tmsh create ltm pool my_pool {
members {
10.0.0.2:80 { }
10.0.0.3:80 { }
}
monitor /Common/tcp
}
- 将 Pool 绑定到 Virtual Server 上
tmsh modify ltm virtual my_vs {
pool my_pool
}
以上就是通过 F5 TMSH 配置 F5 BIG-IP 业务的示例,其中包括创建 iRule、Virtual Server、Pool,并将它们关联起来。这些配置可以通过 F5 BIG-IP GUI 进行配置,但使用 TMSH 可以更灵活地进行批量配置和自动化配置
原文地址: https://www.cveoy.top/t/topic/d46b 著作权归作者所有。请勿转载和采集!