The appeal of such a program is its seeming simplicity: The worst malware could be blocked before it reaches companies, universities or individual users, many of whom may be using outdated virus protections, or none at all. Normal commercial virus programs are always running days, or weeks, behind the latest attacks — and the protection depends on users’ loading the latest versions on their computers.

The government has been testing a model for a national defense against cyberattack with major defense contractors including Lockheed Martin, Boeing and Raytheon. Early results were disappointing, but participants in the program — the specific details of which are heavily classified — say they are getting significantly improved results. Each company in the defense industrial base program now shares data on the kinds of attacks it is seeing, anonymously, with other participating companies.

But for the N.S.A., which is building a target list of servers used by the most aggressive cyberattackers, monitoring all Internet traffic would also be an intelligence bonanza. It would give it a real-time way to watch computer servers around the world, and focus more quickly on those it suspects are the breeding ground for governments or private hackers preparing attacks.

Even before the Snowden revelations, General Alexander had encountered opposition. Top officials of the Department of Homeland Security, which is responsible for domestic defense of the Internet, complained that N.S.A. monitoring would overly militarize America’s approach to defending the Internet, rather than making sure users took the primary responsibility for protecting their systems.

The deputy secretary of defense, Ashton B. Carter, described in speeches over the past year an alternative vision in which the government would step in to defend America’s networks only as a last line of defense. He compares the Pentagon’s proper role in defending cyberattacks to its “Noble Eagle” operation, in which it intercepts aircraft that appear threatening only after efforts by the airlines to identify the passengers and by the Transportation Safety Administration to search passengers and luggage have failed.

It appears unlikely that, with the administration divided, and faced with a backlash against the N.S.A. in Congress, any proposal for a formal plan for national cyberdefense will be submitted soon. Members of the Intelligence Committees in the House and Senate said that they were only vaguely aware of General Alexander’s plan, but that it would almost certainly require Congressional approval.

That is a fight the White House is not interested in having while it struggles to get a much more modest cybersecurity bill through Congress after years of arguments over privacy concerns and corporate America’s fears that Washington will dictate how companies protect data and how much they must spend on new defenses. The bill failed last year, and passage this year appears in doubt.