[i=s] 本帖最后由 wo1261450762 于 2025-5-24 11:30 编辑 [/i]
1、实验环境拓扑
更新前:
更新后:

附件:F5-LAB.zip
=================================================================
2025-05-24更新如下:
1、增加LAB文件,通过最新懒人版导出的lab文件。
2、拓扑图更新,新增加windows server,运行在ISP网络环境中,windows server主要为了实现dns解析和证书的颁发,现在已经实现DC2中心通过ISP网络访问DC2的http服务,LTM实现http重定向https,实现SSL卸载功能,win主机其中一个网卡与windows server一个网络环境,为了实现dns解析,并加载windows server颁发的证书(win未加入域),后续支持测试win是否还需要增加网卡到另外的ISP网络,后续实现通过不同运营商地址实现F5全局DNS解析。
=================================================================
1.1、镜像文件说明
区域 |
设备类型 |
镜像 |
镜像 |
DC1 |
Server1、2、3 |
Linux |
linux-ubuntu-18.04-server |
DC1 |
ACC-Switch |
cisco-vios-switch |
默认镜像 |
DC1 |
H3C-VFW(做堆叠模拟核心) |
h3cvfw |
h3cvfw1k-7.1.064-E1260P45 |
DC1 |
LTM |
F5 BIG-IP LTM VE |
bigip-15.1.10.6-0.0.0.6_BAM3.1 |
DC1 |
HX-Switch |
cisco-vios-switch |
默认镜像 |
DC1 |
ISP(所有路由器设备) |
cisco-vios-router |
vios-adventerprisek9-m.spa159.3.m9 |
管理网 |
管理PC |
winows |
win-10-x64-21H1v1 |
管理网 |
sw |
cisco IOL |
l2-adventerprisek9-ms-17.15.01.bin |
DC2 |
DC2设备同DC1相同 |
DC2设备同DC1相同 |
DC2设备同DC1相同 |
1.2、环境介绍
模拟2个数据中心通过2个ISP不同网络,外网PC访问www服务,通过F5的全局DNS,实现分流。
DC环境内部介绍:
以DC2为例(DC1同理):
1、出口不同运营商接入到DC2,ISP网络公网地址段通过不同vlan区分二层到核心交换机,vlan100-电信、vlan200联通,二层交换机通过vlan100和vlan200接入到旁挂DNS。核心交换机G1/1和DNS1.1接口接入电信;核心交换机G1/2和DNS1.2接口接入联通;核心交换机G1/3和DNS1.3互联,DNS到LTM一路也是vlan4000透传。
2、接入交换机互联接口通过不同vlan实现交互。上联VLAN到DNS,也透传到旁挂LTM,LTM的1.2端口和DNS交互;LTM的1.1端口和下方业务同网段。
3、server都是GUI界面的ubuntu系统,通过部署nginx去搭建对外http服务。(目前只能实现访问html,后续研究如何实现简单的cookie)
1.3、详细介绍
1、server端部署http服务,server端的网关地址指向LTM。
server端配置:
账户:eve/eve
su - 切换root用户,密码eve
apt install nginx
apt install vim
注意:上述需要联网下载
vim /var/www/html/index.html 创建并编辑
输入i进行编辑
#
<!DOCTYPE html>
<html>
<head>
<title>Welcome To WWW</title>
</head>
<body>
<H1>Hello,Word! This is ServerX</H1>
<p>This is a Simple HTML Page Served By Nginx.</p>
</body>
</html>
#
输入esc,并:wq进行保存退出,说明其中X是序号,标识serverID用的。
systemctl restart nginx
systemctl enable nginx
2、ACC-Switch只用于不同vlan透传
DC2-AGG-Swith#show run
Building configuration...
Current configuration : 3166 bytes
!
! Last configuration change at 15:49:25 UTC Wed May 21 2025
!
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname DC2-AGG-Swith
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
!
ip cef
no ipv6 cef
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
!
vlan 4000
!
!
!
interface GigabitEthernet0/0
switchport access vlan 1000
negotiation auto
!
interface GigabitEthernet0/1
switchport access vlan 1000
negotiation auto
!
interface GigabitEthernet0/2
switchport access vlan 1000
negotiation auto
!
interface GigabitEthernet0/3
switchport access vlan 4000
negotiation auto
!
interface GigabitEthernet1/0
switchport access vlan 1000
negotiation auto
!
interface GigabitEthernet1/1
switchport access vlan 1000
negotiation auto
!
interface GigabitEthernet1/2
switchport access vlan 4000
negotiation auto
!
interface GigabitEthernet1/3
switchport access vlan 4000
negotiation auto
!
interface Vlan1000
ip address 10.100.20.254 255.255.255.0
!
ip forward-protocol nd
!
ip http server
ip http secure-server
!
ip route 0.0.0.0 0.0.0.0 10.100.20.200
ip ssh server algorithm encryption aes128-ctr aes192-ctr aes256-ctr
ip ssh client algorithm encryption aes128-ctr aes192-ctr aes256-ctr
!
3.F5-LTM,实现对http的负载
该F5镜像默认集成Lic,如果无lic,
参考:https://pd.qq.com/g/emulatedlab/post/B_05102c681bb50d001441152188987052670X60?subc=684139305
通过命令行界面执行如下操作:账户root/default
设置自己常用密码需要符合密码强度。
登陆后执行,等待一段时间加载观察no lic是否还在,如还在执行bam
然后执行config通过图形化界面配置管理地址。
配置完成后,通过win去登陆F5的LTM,win配置与F5的LTM同网段,首次登陆需要修改密码。
登陆进入后按照向导操作即可,向导操作完成后。
1、network-vlans-vlan list 创建对应的Extermal vlan和向下的intermal vlan。
2、network-self IPs-self ip list 配置对应的IP地址和vlan做关联。
3、network-routes 创建一条默认到DNS的路由。
4、local traffic-nodes-default monitor 勾选一个默认的监控方式选择icmp。
5、local traffic-notes-nodes list 分别创建对应的主机名和地址,health monitors默认监控 node default,即上述我们选择的icmp,因为我当前环境默认有3个server所有创建3个nodes list。
6、local traffic-pools-pools list,创建一个http别名的pool地址池,默认负载方式轮询,在new member模块选择 nodes list,现在显示我们通过nodes list创建的节点,在service port我们选择80 http,其余都默认。
7、在virtual Servers-virtual Server list 创建一个针对3台http服务的虚拟地址,别名为vs-http-1、tpye选择标准standard、destomatopm address为10.100.200.100、service port为80 http、default pool选择上述创建的地址池。
简单的VS服务创建完成,通过win接入到10.100.200.x/24网络测试,通过浏览器进行访问http://10.100.200.100:80,由于环境都是虚拟的所有轮询的结果无法立马实现,多等待一段时间进行刷新效果就出来了。
===============================================================================================
测试通过客户端访问http做会话保持,http profile需要virtual Servers-virtual Server list点击刚刚穿创建的vs服务,在http profile(Client)选择http,选择resources-default persistence cookie或source_addr。
当前环境没有cookie,但f5回主动向客户端发送cookie进行会话保持。原地址负载因为当前环境只有一台所有也会进行保持。
1.4、后续待补充