Session mirroring allows you to send a copy of a context to an external device called a delivery function for analysis. With session mirroring, the original session is sent to its intended destination and the mirrored session is sent to the delivery function. The mirroring operations are transparent to the user whose session is being mirrored.
Session mirroring is supported for IPv4 and IPv6 traffic. IPv6 packets that are mirrored are encapsulated in IPv4 headers.
The BGF can mirror up to 1 percent of gates at a time.
When session mirroring is enabled, the BGF uses information in H.248 requests received from the gateway controller to identify sessions to be mirrored and to trigger the mirroring session. The following sample H.248 request includes session-mirroring information:
MEGACO/2 [123.123.123.3]:2944
Transaction = 10003 {
Context = $ {
Add = $ {
Media {
LocalControl {
Mode = SendReceive,
li/LICn=ff00ff00ff00ff00},
li/LITID = [ffffff00, ffffff01],
Remote {
v=0
c=IN IP4 124.124.124.222
m=audio 2222 RTP/AVP 0
a=ptime:20
}
}
}
}
}
If session mirroring is required on a gate, the pgcpd process embeds appropriate data in the gate open/modify request that it sends to the PIC or DPC. This data includes direction information to indicate whether the packet is mirrored before applying NAT actions or after. It also includes the decrypted correlation number and Target IDs that need to be embedded in the packet sent to the delivery function.
The PIC or DPC then:
Session mirroring can be enabled or disabled any time during a gate’s life by employing H.248 commands. If mirroring is enabled in one stream of a termination, all streams in the context are mirrored. Both RTP and RTCP packets are mirrored for a gate marked for mirroring.
To protect mirrored traffic that is sent from the BGF to the delivery function, you can use IPSec.