고 가용성 구성(HA구성) ============================= NAC 시스템이 정상적인 서비스를 제공할 수 없게 되었을 때 이중화 구성을 통해 서비스 중단이 없도록 해주는 고가용성 기능을 제공합니다. 하나는 Active로 동작하면서 서비스를 제공하고, 나머지 하나는 Standby로 동작하면서 Active 장비의 동작상태를 모니터링합니다. 이를 위해서 표준 VRRP 프로토콜을 사용합니다. - **Group** - VRRP 그룹 ID - **Linkupdelay** – 인터페이스가 활성화 될 때까지 기다릴 시간 - **No-Virtual-Mac** – Master로 전환 할 때 인터페이스의 MAC 주소를 Virtual-MAC로 변환하지 않습니다. - **Nopreempt** – 우선 순위에 관계없이 마스터가 우선 적용 - **Priority** – 우선 순위 값. 가장 높은 가치는 마스터 - **Timeout** – VRRP 패킷 손실 대기 시간 - **Virtual-IP** – 장치 및 UI 용 공유 IP SSH가 설정되지 않은 경우 서버에 대한 시리얼콘솔 연결 ----------------------------------------------------- - Protocol: **Serial** - Port: **COM1** - Baud Rate: **115200** (*9600 for Mini-PC*) - Data Bits: **8** - Parity: **None** - Stop Bits: **1** HA구성을 위해 서버를 설정하는 방법 ---------------------------------------------- #. 준비된 장비를 네트워크에 연결합니다. #. CLI(Command Line Interface)에 연결하여 각 서버에 연결합니다. #. 현재 설정을 보려면 show 구성을 실행하십시오. (*두대의 정책서버 Device-ID는 동일해야하므로 기록합니다.*) #. 전역 설정모드로 들어갑니다. ( configure terminal ) #. 각 서버에서 다음 설정을 순서대로 입력합니다. .. note :: 유튜브를 통해 HA 구성 교육 영상을 확인할 수 있습니다 : `Online EDU Chapter 3 `_ , `HA 구성과 설정방법 `_ , `HA Configuration-en `_ Primary 정책 서버 -------------------- .. code:: bash 1. Interative Wizard 2. Manual Configration Select installation type: 2 Enter administrator username (4-31 characters) [admin]: [Admin ID] # Password must contain at least one alphabet, number and special character Enter administrator password (minimum 9 characters): ********* Re-enter Password: Welcome to Genian NAC Username: [Admin ID] Password: The privileged EXEC mode password is the same as the console login password. For security reasons please change your password. Type ‘enable’ to access privileged EXEC mode for password change. genian> enable Password: genian# configure terminal genian(config)# hostname PRIMARY PRIMARY(config)# interface eth0 address [IP address] [Subnetmask] PRIMARY(config)# interface eth0 gateway [Gateway] PRIMARY(config)# ip default-gateway [Gateway IP] PRIMARY(config)# ip name-server [DNS IP] PRIMARY(config)# data-server username [username] PRIMARY(config)# data-server enable PRIMARY(config)# data-server password [password] PRIMARY(config)# data-server access-list [Secondary DB IP] PRIMARY(config)# data-server replica serverid 1 PRIMARY(config)# data-server replica enable PRIMARY(config)# log-server enable PRIMARY(config)# log-server cluster-peers [Primary Policy Server real IP,Secondary Log Server real IP] PRIMARY(config)# log-server publish-port eth0 PRIMARY(config)# interface eth0 management-server enable PRIMARY(config)# interface eth0 node-server enable PRIMARY(config)# interface eth0 ha priority 200 PRIMARY(config)# interface eth0 ha group [HA group ID] PRIMARY(config)# interface eth0 ha linkupdelay 30 PRIMARY(config)# interface eth0 ha nopreempt enable PRIMARY(config)# interface eth0 ha timeout 20 PRIMARY(config)# interface eth0 ha virtual-ip [Virtual IP] PRIMARY(config)# show configuration cli-pass change interval 0D cli-pass history num 0 cli-pass minimum age 0D data-server enable data-server password ****** data-server replica enable data-server replica serverid 1 data-server username [username] device-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (*두대의 정책서버의 Device-id는 동일해야합니다*) hostname PRIMARY interface eth0 address [IP address] [Subnetmask] interface eth0 gateway [Gateway IP] interface eth0 ha group 20 interface eth0 ha linkupdelay 30 interface eth0 ha nopreempt enable interface eth0 ha priority 200 interface eth0 ha timeout 20 interface eth0 ha virtual-ip [Virtual IP] interface eth0 management-server enable interface eth0 node-server enable ip default-gateway [Gateway IP] ip name-server [DNS IP] log-server enable log-server cluster-name [Cluster name] log-server cluster-peers [Primary Policy Server real IP,Secondary Log Server real IP] log-server publish-port eth0 슬레이브 정책 서버 ------------------- .. code:: bash 1. Interactive Wizard 2. Manual Configration Select installation type: 2 Enter administrator username (4-31 characters) [admin]: [Admin ID] # Password must contain at least one alphabet, number and special character Enter administrator password (minimum 9 characters): Re-enter Password: Welcome to Genian NAC Username: [Admin ID] Password: The privileged EXEC mode password is the same as the console login password. For security reasons please change your password. Type ‘enable’ to access privileged EXEC mode for password change. genian> enable Password: genian# configure terminal genian(config)# hostname SECONDARY genian(config)# device-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (Primary 정책서버의 Device-ID를 입력) SECONDARY(config)# interface eth0 address [IP address] [Subnetmask] SECONDARY(config)# interface eth0 gateway [Gateway IP] SECONDARY(config)# ip default-gateway [Gateway IP] SECONDARY(config)# ip name-server [DNS IP] SECONDARY(config)# data-server username [username] SECONDARY(config)# data-server enable SECONDARY(config)# data-server password [password] SECONDARY(config)# data-server replica serverid 2 SECONDARY(config)# data-server replica enable SECONDARY(config)# data-server replica masterhost [Primary DB IP] SECONDARY(config)# data-server replica username [Primary DB username] SECONDARY(config)# data-server replica password [Primary DB password] SECONDARY(config)# log-server enable SECONDARY(config)# log-server cluster-peers [Secondary Policy Server real IP,Primary Log Server real IP] SECONDARY(config)# log-server publish-port eth0 SECONDARY(config)# interface eth0 management-server enable SECONDARY(config)# interface eth0 node-server enable SECONDARY(config)# interface eth0 ha priority 100 SECONDARY(config)# interface eth0 ha group 20 SECONDARY(config)# interface eth0 ha linkupdelay 30 SECONDARY(config)# interface eth0 ha nopreempt enable SECONDARY(config)# interface eth0 ha timeout 20 SECONDARY(config)# interface eth0 ha virtual-ip [Virtual IP] SECONDARY(config)# show configuration cli-pass change interval 0D cli-pass history num 0 cli-pass minimum age 0D data-server enable data-server password ****** data-server replica enable data-server replica masterhost [Primary DB IP] data-server replica password ****** data-server replica serverid 2 data-server replica username [Primary DB username] data-server username [username] device-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx hostname SECONDARY interface eth0 address [IP address] [Subnetmask] interface eth0 gateway [Gateway IP] interface eth0 ha group 20 interface eth0 ha linkupdelay 30 interface eth0 ha nopreempt enable interface eth0 ha priority 100 interface eth0 ha timeout 20 interface eth0 ha virtual-ip [Virtual IP] interface eth0 management-server enable interface eth0 node-server enable ip default-gateway [Gateway] log-server enable log-server cluster-name [Cluster name] log-server cluster-peers [Secondary Policy Server real IP,Primary Log Server real IPP] log-server publish-port eth0 Primary 네트워크센서 ----------------------- .. code:: bash device-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx interface eth0 vlan 10,11,12 interface eth0.10 address [IP address] [Subnetmask] interface eth0.10 gateway [Gateway IP] interface eth0.10 ha group [ha group id] interface eth0.10 ha priority 200 interface eth0.11 address [IP address] [Subnetmask] interface eth0.11 gateway [Gateway] interface eth0.12 address [IP address] [Subnetmask] interface eth0.12 gateway [Gateway] ip default-gateway [Gateway] ip name-server [DNS] node-server ip [Policy Server IP] SECONDARY 네트워크센서 --------------------------- .. code:: bash device-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx *(Primary network sensor Device-id)* interface eth0 vlan 10,11,12 interface eth0.10 address [IP address] [Subnetmask] interface eth0.10 gateway [Gateway] interface eth0.10 ha group [ha group id] interface eth0.10 ha priority 100 interface eth0.11 address [IP address] [Subnetmask] interface eth0.11 gateway [Gateway] interface eth0.12 address [IP address] [Subnetmask] interface eth0.12 gateway [Gateway] ip default-gateway [Gateway IP] ip name-server [DNS IP] node-server ip [Policy Server IP] .. attention:: | Primary와 Secondary 네트워크센서의 Device-id는 동일해야합니다. | Primary장비에 HA 설정된 인터페이스가 다운되거나 장비가 다운되는 경우에만 Failover가 진행됩니다. | 모든 VLAN 인터페이스에 HA 설정을 하는 경우 하나의 인터페이스라도 다운이 되는경우 Failover가 진행됩니다. 장비 HA 확인하는 방법 --------------------------------- .. code:: bash ——————PRIMARY——————— PRIMARY# show ha Status Status: MASTER Priority: 200 Group: 50 LinkupDelay: 30 Timeout: 10 Preempt: 0 VirtualIP: [Virtual IP] ——————SECONDARY——————— SECONDARY# show ha Status Status: SLAVE Priority: 100 Group: 50 LinkupDelay: 30 Timeout: 10 Preempt: 0 VirtualIP: [Virtual IP] DB Replicatin 확인하는 방법 --------------------------------- .. code:: bash ——————PRIMARY——————— PRIMARY(config)# show dataserver replicastatus Replication health is good. (Confirm left message is displayed) ==================== Primary Replication Status ==================== Host : [Master DB IP displayed] File : mysqld.000009 (Master DB의 현재 replication file) Position : 123456 (Master DB의 현재 replication position) ==================== Secondary Replication Status ==================== Host : [Slave DB IP displayed] Slave_IO_Running : Yes (YES 라고 표시되어야 정상) Slave_IO_State : Waiting for master to send event Slave_SQL_Running : Yes (YES 라고 표시되어야 정상) Slave_SQL_Running_State : Slave has read all relay log; waiting for the slave I/O thread to update it Master_Log_File : mysqld.000009 (Master DB의 현재 로그파일과 동일해야 정상) Read_Master_Log_Pos : 123456 (Master DB의 현재 로그포지션과 동일해야 정상) Relay_Master_Log_File : mysqld.000009 Exec_Master_Log_Pos : 123456 Last_Errno : 0 Last_Error : Last_IO_Errno : 0 Last_IO_Error : Last_SQL_Errno : 0 Last_SQL_Error : Relay_Log_File : mysqld-relay-bin.000026 Relay_Log_Pos : 123456 ——————SECONDARY—————– SECONDARY# show dataserver replicastatus Replication health is good.(이 메시지는 DB replication이 정상임을 나타냅니다.) ==================== Primary Replication Status ==================== Host : [Master DB IP displayed] File : mysqld.000009 (Master DB의 현재 replication file) Position : 123456 (Master DB의 현재 replication position) ==================== Secondary Replication Status ==================== Host : [Slave DB IP displayed] Slave_IO_Running : Yes (YES 라고 표시되어야 정상) Slave_IO_State : Waiting for master to send event Slave_SQL_Running : Yes (YES 라고 표시되어야 정상) Slave_SQL_Running_State : Slave has read all relay log; waiting for the slave I/O thread to update it Master_Log_File : mysqld.000009 (Master DB의 현재 로그파일과 동일해야 정상) Read_Master_Log_Pos : 123456 (Master DB의 현재 로그포지션과 동일해야 정상) Relay_Master_Log_File : mysqld.000009 Exec_Master_Log_Pos : 123456 Last_Errno : 0 Last_Error : Last_IO_Errno : 0 Last_IO_Error : Last_SQL_Errno : 0 Last_SQL_Error : Relay_Log_File : mysqld-relay-bin.000026 Relay_Log_Pos : 123456 .. attention:: Database 복제 확인 명령어는 Primary 와 Secondary 에서 각각 실행하여 확인 바랍니다. Bonding 구성 ------------------ Bonding은 물리적인 다수의 인터페이스를 논리적으로 하나의 인터페이스로 묶어서 사용하는 기술입니다. bonding은 물리적으로 인터페이스가 다운되는경우를 대비할때 사용합니다. - 케이블, 물리포트, 연결된 네트워크 장비 다운등의 상황에 서비스 가용성을 높이기 위하여 사용 Bonding 설정 ''''''''''''''''''' Bonding 설정은 물리적인 포트가 2개 이상인 정책서버와 네트워크센서에서 사용할 수 있습니다. **정책서버 & 네트워크센서** .. code:: bash genians(config)#interface bond0 slave eth0,eth1 genians(config)#interface bond0 address [PolicyServer IP] [Subnetmask] genians(config)#interface bond0 gateway [gateway IP] genians(config)#bonding parameters mode=1 #Bonding parameter# #mode=0: for balance-rr #mode=1: for active-backup (recommanded) .. note:: | Bonding 설정을 하기전에 인터페이스에는 어떤 설정도 존재해서는 안됩니다. | Bonding parameters 설정 적용을 위해서 장비 리부팅이 필요합니다. | Bonding 인터페이스를 사용하는 경우 장비내 다른 인터페이스의 사용을 금지합니다. Bonding 인터페이스 상태 확인 '''''''''''''''''''''''''''''''''' Bonding 인터페이스는 Active/Active, Active/Backup 형태의 상태변화가 발생합니다. 아래는 현재 상태를 확인하는 방법입니다. .. code:: bash Genians$ cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011) Bonding Mode: load balancing (round-robin) MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eth1 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 00:0c:29:21:be:a9 Slave queue ID: 0 Slave Interface: eth2 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 00:0c:29:21:be:b3 Slave queue ID: 0