V9命令实例参考
手册
基于V9.3.1
linjing
[选取日期]
V931相关命令整理
以下命令均在实际机器上验证过,系统版本V931
命令启用HA并设unit id =1
b db Failover.UnitId "1"
b db Failover.IsRedundant "true"
b db Failover.MemoryRestartPercent "97"
b db Failover.Standby.LinkDownTime "0"
F5并未提供直接方法,这是根据实践从db文件中摘出的
2.VLAN相关
b vlan myvlan interface 1.4 1.3 1.2
创建一个名为myvlan的VLAN,分配1.2 1.3 1.4口。vlan tag随机。
b vlan myvlan tag 4000
设置myvlan 的tag
b vlan myvlan interface 2.1
将myvlan中接口修改为 2.1
b vlan myvlan interface 1.4 add
在myvlan中新增接口1.4
b vlan myvlan interface 1.4 2.1 delete
从myvlan中删除接口1.4
‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
以上均是untagged方式,如果是tag接口,则将interface改为interface tagged b vlan myvlan interface tagged 1.4
‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
b vlan myvlan failsafe enable failover
配置vlan failsafe并设定动作(failover\restart all \reboot)
b vlan myvlan timeout 90
设定failsafe动作等待时间
b vlan myvlan delete
删除myvlan
b vlan myvlan trunk mytrunk
新建或修改myvlan vlan 并选择mytrunk接口(untag方式)
b vlan myvlan trunk tagged mytrunk
新建或修改myvlan vlan 并选择mytrunk接口(tag方式)
b vlan myvlan trunk mytrunk2 add
向现有myvlan中增加mytrunk2。删除是delete
验证命令 b
vlan (<name list> | all) delete
vlan [<name list> | all] [show [all]]
vlan [<name list> | all] list [all]
vlan [<name list> | all] tag [show]
vlan [<name list> | all] interface [show]
vlan [<name list> | all] trunk [show]
vlan [<name list> | all] failsafe [show]
vlan [<name list> | all] timeout [show]
vlan [<name list> | all] mac masq [show]
vlan [<name list> | all] fdb [<mac addr>] [dynamic | static] [show]                  vlan [<name list> | all] mirror vlans [show]
vlan [<name list> | all] mirror hash port [show]
vlan [<name list> | all] learning [show]
vlan [<name list> | all] mtu [show]
vlan [<name list> | all] source check [show]
举例:
[root@cdgdc:Active] config # b vlan myvlan tag 4080 interface tagged 1.4 2.1
[root@cdgdc:Active] config # b vlan list
vlan myvlan {
tag 4080
interfaces tagged 1.4 2.1
}
3. trunk相关
b trunk mytrunk interface 2.1 2.2
新建mytrunk,。最简洁设置,一切默认,不启用lacp
b trunk mytrunk interface 2.3 add
修改mytrunk中的接口,add | delete
b trunk mytrunk interface 2.1 2.2 policy max bw  lacp enable lacp mode active lacp timeout short distribution sr
c dest mac
policy max bw 设置trunk如何决定哪条链路来处理新流量
lacp enable  启用lacp,enable|disable
lacp mode active 设置lacp模式 active|passive
lacp timeout short 设置lacp 控制包发送速率 short|long  short是1秒,long是30秒 distribution src dest mac 设置trunk hash算法 src dest mac | dest mac | src dest ip
验证
bigpipe trunk [<name list> | all] [show [all]]
bigpipe trunk [<name list> | all] list [all]
bigpipe trunk [<name list> | all] lacp [show]
bigpipe trunk [<name list> | all] interface [show]
bigpipe trunk [<name list> | all] lacp mode [show]
bigpipe trunk [<name list> | all] lacp timeout [show]
bigpipe trunk [<name list> | all] distribution [show]
bigpipe trunk [<name list> | all] policy [show]
4.self ip相关
b self 22.22.22.22  allow all  netmask 255.255.255.0  vlan myvlan
在myvlan上设置22.22.22.22 掩码255.255.255.0,portlockdown设置为allow all.
b self 22.22.22.22  allow all unit 1 netmask 255.255.255.0  vlan myvlan floating enable
同上,这个适合在HA开启机器上设置floating ip。注意要先设selfip 后设floating ip
Allow 参数 all | default | none
Floating 参数 enable|disable
Unit 参数,只有在floating 参数启用时候,才配合设置。值为1 或 2
b self ip 22.22.22.22 delete
删除一个IP
验证
bigpipe self [<ip addr list> | all] list [all]
bigpipe self [<ip addr list> | all] [show [all]]
bigpipe self [<ip addr list> | all] vlan [show]
bigpipe self [<ip addr list> | all] floating [show]
bigpipe self [<ip addr list> | all] unit [show]
route add命令实例
bigpipe self [<ip addr list> | all] allow [show]
bigpipe self [<ip addr list> | all] netmask [show]
5.路由相关
b  route 10.0.0.0 netmask 255.0.0.0 pool default_gateway_pool
pool方式的路由
b route 10.0.0.0/8 vlan myvlan
vlan方式的路由
b route 10.0.0.0/8 gateway 10.0.0.1
下一跳方式路由
B route 10.0.0.0/8 reject
拒绝路由
b route 22.22.22.22/32 delete
删除某个路由
验证
bigpipe route [<route key list> | all | inet | inet6] [static | dynamic] [show [all]]        bigpipe route [<route key list> | all] list [all]
bigpipe route [<route key list> | all | inet | inet6] gateway [show]
bigpipe route [<route key list> | all | inet | inet6] mtu [show]
bigpipe route [<route key list> | all | inet | inet6] pool [show]
bigpipe route [<route key list> | all | inet | inet6] type [show]
bigpipe route [<route key list> | all | inet | inet6] vlan [show]
6.管理接口及路由相关
b mgmt 192.168.1.245 delete
b mgmt 192.168.1.246 netmask 255.255.255.0
b mgmt route 0.0.0.0/0 gateway 192.168.1.1
7.pool相关
b pool mypool lb method member ratio monitor all tcp
增加一个pool  mypool ,设置pool monitor为tcp, LB算法为member ratio
命令行无法同时设置pool的多个monitor
b pool mypool  member 10.10.10.100:http add
在mypool中增加一个成员10.10.10.100:http 要增加多个成员重复执行语句
b  pool mypool2 member '10.10.10.21:2233 10.10.10.22:http ' add
同时增加多个pool member

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。