RAC 集群访问过程分析
本文介绍了通过 WireShark 分析的在 RAC11gR2 集群访问中连接建立的过程
环境
环境:
主机:192.168.40.37
SCAN节点:192.168.40.234
节点1:192.168.40.230 vip:192.168.40.231
节点2:192.168.40.232 vip:192.168.40.233
连接过程
主机与scan节点进行三次握手,建立tcp连接(目的端口1521)
主机向scan节点发送Oracle-TNS(Transparent Network Substrate Protocol)Request,主要携带信息如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 Packet Type: Connect (1) Connect Version: 314 Service Options: 0x0041 Session Data Unit Size: 8192 Maximum Transmission Data Unit Size: 32767 NT Protocol Characteristics:0xc60e, Hangon to listener connect, Confirmed release, Callback IO supported, ASync IO Supported, Generate SIGURG signal, Urgent IO supported, Full duplex IO supported Value of 1 in Hardware: 0100 Connect Flags 0:0x41, NA services wanted Connect Flags 1:0x41, NA services wanted Trace Cross Facility Item 1: 0x00000000 Trace Cross Facility Item 2: 0x00000000 Trace Unique Connection ID: 0x0000000000000000 Connect Data: (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=MER)(CID=(PROGRAM=E:\Navicat?for?Oracle\navicat.exe)(HOST=DESKTOP-PSOJPQF)(USER=MER)))(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.40.234)(PORT=1521)))
scan返回TNS Response, Redirect消息
scan返回TNS Response, Data,包含指示主机需要请求的host信息,同时填充了要访问的实例名:
1 2 3 4 5 6 7 Data Data Flag:0x0040, End of File Data Data: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.40.231)(PORT=1521))) (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=MER)(CID=(PROGRAM=E:\Navicat?for?Oracle\navicat.exe)(HOST=DESKTOP-PSOJPQF)(USER=MER))(SERVER=dedicated)(INSTANCE_NAME=mer1))(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.40.234)(PORT=1521))) Length: 293
主机与Scan进行四次挥手,断开tcp连接
主机向重定向节点,此处为节点1(vip)发起tcp连接
主机向节点1发送Connect消息,携带信息如下,此处的请求信息同scan返回响应一致(目的端口1521):
1 (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=MER)(CID=(PROGRAM=E:\Navicat?for?Oracle\navicat.exe)(HOST=DESKTOP-PSOJPQF)(USER=MER))(SERVER=dedicated)(INSTANCE_NAME=mer1))(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.40.234)(PORT=1521)))
节点1返回Accept
协商安全协议
协商数据类型
传输数据(用户名密码的验证是在这一部分做的 )