This paper proposes a cost effective architecture for network security switch to deep inspect the traffic among switching ports. A security service engine (SSE) with packet deep inspection ability is also designed to accompany with manageable L2 switches. By properly configuring the VLAN parameters, packets from switch ports of the L2 switch are forwarded to the SSE, via the gigabit Ethernet interface, for deeply inspection. For security reason, abnormal/malicious packets are dropped by the SSE directly while normal packets are forwarded back to the switch to the correct output port. To evaluate the performance and latency of the proposed architecture, a cost effective P4-based SSE is also implemented as an intrusion detection and prevention system (IPS) with layer-7 content inspection function. The obtained measurements show that the proposed architecture is practical with high throughput and low latency. With IPC-based SSE implementation, the traditional L2 switches can now provide content security service in a very cost effective way.