A method for monitoring traffic between network members in a network , whereby the network is an automotive network, by means of a stateful firewall, wherein in the network different network members are connected with a network switch , the network switch comprising a processor unit and a content addressable memory CAM , the processor unit having access to a stateful firewall state table with stateful firewall rules stating whether connections and data transmissions between different network members are allowed or denied; wherein a first part of the stateful firewall is implemented in the network switch by software executed on the processor unit and wherein a second part of the stateful firewall is implemented in the network switch by hardware in the form of the CAM ; wherein the method comprises the following steps: ∘ upon receiving a request for establishing a connection between two network members , the processor unit decides whether to allow or to deny the connection according to the stateful firewall state table ; ∘ if the connection is allowed and established, the processor unit stores a stateful firewall rule concerning the data transmission between the two network members from the stateful firewall state table in the CAM or enables a stateful firewall rule concerning the data transmission between the two network members from the stateful firewall state table stored in the CAM ; ∘ upon receiving a data transmission between the two network members , the CAM compares this received data transmission with the stateful firewall rule concerning the data transmission between the two network members from the stateful firewall state table stored in the CAM , wherein the CAM compares attributes of the received data transmission with attributes of the stored stateful firewall rule; and ∘ depending on a result of this comparison and depending on whether the attributes of the received data transmission match the attributes of the stored stateful firewall rule the received data transmission is allowed or denied or transferred to the processor unit for further evaluation . ∘ upon receiving a request for establishing a connection between two network members , the processor unit decides whether to allow or to deny the connection according to the stateful firewall state table ; ∘ if the connection is allowed and established, the processor unit stores a stateful firewall rule concerning the data transmission between the two network members from the stateful firewall state table in the CAM or enables a stateful firewall rule concerning the data transmission between the two network members from the stateful firewall state table stored in the CAM ; ∘ upon receiving a data transmission between the two network members , the CAM compares this received data transmission with the stateful firewall rule concerning the data transmission between the two network members from the stateful firewall state table stored in the CAM , wherein the CAM compares attributes of the received data transmission with attributes of the stored stateful firewall rule; and ∘ depending on a result of this comparison and depending on whether the attributes of the received data transmission match the attributes of the stored stateful firewall rule the received data transmission is allowed or denied or transferred to the processor unit for further evaluation . <EOS>