苏泽湛 发表于 2018-7-14 14:55:22

Cisco ASA 5585 with firepower configuration for cluster 基本配置

  hostname NGFW-unit1###配置主机名
  hostname NGFW-unit2
  NGFW-unit1:   配置cluster
  interface Gi 0/7   ###配置cluster 通信端口,思科文档说作为集群后,cluster端口最为重要,因为这是不同节点用于同步所有信息的关键通道,所以你的业务口总带宽如果是8g,那么你的cluster端口总带宽最好也是8g,最开始就设计好省得出问题。
  channel-group 48 mode on   ###文档上是on(这个好像不用协商协议),不明白为啥不是active,最后发现貌似cisco设备间同步,例如cluster control和nesux 的 keepalive 都是portchannel on 模式,设备间跑数据都是port channel active
  no shut
  interface Gi 1/7
  channel-group 48 mode on
  no shut
  cluster interface-mode spanned check-details    ###启用cisco推荐的cluster模式 span(本例做法为官方推荐,即除mgt为individual模式,其余全部为span(尽可能发挥优势,简单,够猛),mgt做individual是为了管理全覆盖,(如果mgt做span那么每次看到到是master,而slave得用console登,管理不方便了就)
  cluster group admin   ###cluster组名字为admin
  key admin###密钥为admin
  local-unit unit1 ###本节点为unit1
  cluster-interface port-channel 48 ip 172.16.1.17 255.255.255.0 ###本节点地址为
  priority 1 ###本届点优先级为1越小越高
  enable noconfirm
  mtu cluster 9000###仅改变cluster mtu 为了最佳性能 9000为官方推荐
  interface port-channel 48
  no shutdown
  NGFW-unit2:
  interface Gi 0/7
  channel-group 48 mode on
  no shut
  interface Gi 1/7
  channel-group 48 mode on
  no shut
  cluster interface-mode spanned check-details
  cluster group admin
  key admin
  local-unit unit2
  cluster-interface port-channel 48 ip 172.16.1.18 255.255.255.0
  priority 2
  enable noconfirm
  mtu cluster 9000
  interface port-channel 48
  no shutdown
  集群配置后即可,进行以下配置,无论你在哪个unit上配置,都会自动同步到其他主机上,无论你在哪个unit 都只显示master的名字,识别你究竟是那个slave,你可以show cluster info看到你的节点名字,和其他节点名字
  !
  interface GigabitEthernet0/0   ###进入端口0/0
  channel-group 8 mode active   ###加入port channel8
  desservice
  no shut
  !
  interface GigabitEthernet0/1
  channel-group 1 mode active
  des sc
  no shut
  !
  interface GigabitEthernet0/2
  channel-group 2 mode active
  des oa
  no shut
  !
  interface GigabitEthernet0/3
  channel-group 3 mode active
  des chief
  no shut
  !
  interface GigabitEthernet0/4
  channel-group 4 mode active
  des zd
  no shut
  !
  interface GigabitEthernet0/5
  channel-group 5 mode active
  des tdb
  no shut
  !
  interface GigabitEthernet0/6
  channel-group 6 mode active
  des lxlf
  no shut
  !
  !
  ip local pool mgt-pool 192.168.224.17-192.168.224.20###配置管理pool 管理为individual模式,这种模式应用于管理,比span的优点在于,individual能管理每个节点,而span只能管理为主的节点,individual要求mgt端口一定得management only启用
  interface Management0/0
  management-only   ###仅用于管理,意味着这里不能转发别的端口来的数据,本端口数据也不能去别的端口,很严格的,都必须是这样的。
  nameif mgt
  security-level 0
  ip address 192.168.224.16 255.255.255.0 cluster-pool mgt-pool###16为虚地址,17为分配的实地址,18为分配给备的实地址
  no shut
  interface GigabitEthernet1/0
  channel-group 16 mode active
  des vpdn
  no shut
  interface GigabitEthernet1/1
  channel-group 9 mode active
  des dhdp
  no shut
  interface GigabitEthernet1/2
  channel-group 10 mode active
  des move
  no shut
  !
  interface Port-channel48
  description Clustering Interface
  interface Port-channel8   ###进入port channel8
  port-channel span-cluster###port channel模式为span配置portchannel 为span-cluster意味着启用clacp,启用集群lacp协议,即在不同的物理asa上能用port channel(有点像nexus的vpc啊)
  nameif service   ###必须起名字,删除的时候也要删除名字,才能删除别的
  security-level 50###安全等级为50 自己设置的 为了全通,我设置所有相同安全等级,然后用same-security permit inter,即能在不用acl的情况下实现全通,否则按照cisco高低安全级的规则,必须配置acl否则低到高不通。
  这样做也是为了以后的firepower做准备,这种新一代防火墙很奇特,是双层墙,第一层为asa,第二层为firepower,别人的双层墙(juniper以后这种模式貌似较多,偏向软的防火墙),如checkpoint,第一层就是一个系统,控制端口地址和路由啥的,第二次纯软件控制策略,
  可是cisco的这个第一层asa也能acl控制策略(这也许和cisco产品整合有关,毕竟asa是cisco原有的,firepower是收购的,性能很强,但整合需要时间,以后的cisco防火墙就叫firepower,第一层asa也不用写acl,全靠firepower),
  尽量使用简单高效的办法,如果你asa 和fire都用acl 效率低 排错差,策略要配置两次,若冲突不易发现,建议asa只配端口路由,其余交给万能的firepower,即把acl做了,也把ips 防病毒,网络扫描,用户认证(AD ISE)全做了,这个另说
  ip address 192.168.1.193 255.255.255.248
  mac-address 0008.0008.0008###cisco强烈推荐自己设置虚拟地址,不然老报这个cluster group wahahaWARNING: Strongly recommend to configure a virtual MAC address for each span-cluster port-channel interface or all subinterfaces of it in order to achieve best stability of span-cluster port-channel during unit join/leave.###你的两台节点mac ip 都是一模一样的,这样万一挂了一个的话,也许不用重新学习,丢一个包继续保持。。。
  no shut
  !
  interface Port-channel1
  port-channel span-cluster
  nameif sc
  security-level 50
  ip address 192.168.1.177 255.255.255.248
  mac-address 0001.0001.0001
  no shut
  !
  interface Port-channel2
  port-channel span-cluster
  nameif oa
  security-level 50
  ip address 192.168.1.161 255.255.255.248
  mac-address 0002.0002.0002
  no shut
  !
  interface Port-channel3
  port-channel span-cluster
  nameif chief
  security-level 50
  ip address 192.168.1.225 255.255.255.248
  mac-address 0003.0003.0003
  no shut
  !
  interface Port-channel4
  port-channel span-cluster
  nameif zd
  security-level 50
  ip address 192.168.1.145 255.255.255.248
  mac-address 0004.0004.0004
  no shut
  !
  interface Port-channel5
  port-channel span-cluster
  nameif tdb
  security-level 50
  ip address 192.168.1.153 255.255.255.248
  mac-address 0005.0005.0005
  no shut
  !
  interface Port-channel6
  port-channel span-cluster
  nameif lxlf
  security-level 50
  ip address 192.168.1.217 255.255.255.248
  mac-address 0006.0006.0006
  no shut
  !
  interface Port-channel16
  port-channel span-cluster
  nameif vpdn
  security-level 50
  ip address 192.168.1.233 255.255.255.248
  mac-address 0010.0010.0010
  no shut
  interface Port-channel9
  port-channel span-cluster
  nameif dhdp
  security-level 50
  ip address x.x.x.x 255.255.255.248
  mac-address 0009.0009.0009
  no shut
  interface Port-channel10
  port-channel span-cluster
  nameif move
  security-level 50
  ip address 192.168.1.201 255.255.255.248
  mac-address 000A.000A.000A
  no shut
  boot system disk0:/asa962-7-smp-k8.bin###设置system启动
  asdm image disk0:/asdm-762-150.bin   ###设置asdm启动
  ssh 192.168.0.0 255.255.0.0 mgt   ###设置准许ssh登陆的地址段
  ssh timeout 5   ###设置超时
  ssh version 2   ###设置ssh 版本为v2
  Crypto key generate rsa ###回车后 默认 1024 bit即可
  aaa authentication ssh console LOCAL   ###设置登陆认证为本地,如果你没有ise,没有aaa认证,那么这个你必须配置,否则无法用ssh登陆,telnet不推荐,
  http server enable###启用asdm
  http 192.168.0.0 255.255.0.0 mgt   ###准许asdm登陆的地址段
  username admin password shuangwaiwai privilege 15###设置用户名密码权值为最高
  !
  class-map inspection_default
  match default-inspection-traffic
  !
  policy-map global_policy
  class inspection_default
  inspect icmp   ###监控icmp   asa禁止ping,所以早期配置的时候发现怎么都ping不同,高到低不同,低到高不同,同等级不同,我擦,最后才发现是这个原因。。。开启这个吧,以后拍错用,及时开启,
  !
  route mgt 192.168.0.0 255.255.0.0 192.168.224.1   ###写路由
  route chief 192.168.224.0 255.255.248.0 192.168.1.226
  same-security permit inter   ###配置同等级间全通
页: [1]
查看完整版本: Cisco ASA 5585 with firepower configuration for cluster 基本配置