1. One network port connects the camera and the other one connects the router connecting the external network.
2. Or one network port connects the IP address of one segment and another network port connects the camera of another segment.
NVR with two network ports can set different IP addresses for two network ports.
Whether you want to use it or not depends on your own situation.