逻辑系统的安全配置文件
逻辑系统的安全配置文件允许您分配资源。安全配置文件指定要分配给安全配置文件绑定的逻辑系统的资源数。所有系统资源均分配给主逻辑系统,主管理员使用安全配置文件将其分配给用户逻辑系统。有关更多信息,请参阅以下主题:
了解逻辑系统安全配置文件(仅限主管理员)
逻辑系统允许您将受支持的 SRX 系列防火墙以虚拟方式划分为多个设备,相互隔离,保护它们免受入侵和攻击,并保护它们免受自身环境之外故障情况的影响。为了保护逻辑系统,安全资源的配置方式与为离散设备配置它们的方式类似。但是,作为主管理员,您必须为逻辑系统分配安全资源的种类和数量。逻辑系统管理员为其自己的逻辑系统分配资源。
运行逻辑系统的 SRX 系列防火墙可以划分为用户逻辑系统、互连逻辑系统(如果需要)和默认主逻辑系统。初始化系统时,在根级别创建主逻辑系统。系统会为其分配所有系统资源,从而有效地创建默认的主逻辑系统安全配置文件。要跨逻辑系统分配安全资源,主管理员需创建安全配置文件,以指定要分配给安全配置文件绑定的逻辑系统的资源的种类和数量。只有主管理员才能配置安全配置文件并将其绑定到逻辑系统。用户逻辑系统管理员为自己的逻辑系统配置这些资源。
逻辑系统主要由分配给它们的资源定义,包括安全组件、接口、路由实例、静态路由和动态路由协议。当主管理员配置用户逻辑系统时,他将绑定一个安全配置文件。任何尝试在未绑定安全配置文件的情况下为用户逻辑系统提交配置都将失败。
本主题包含以下部分:
逻辑系统安全配置文件
作为主管理员,您可以配置单个安全配置文件来将资源分配给特定的逻辑系统,对多个逻辑系统使用相同的安全配置文件,或者结合使用这两种方法。您可以在运行逻辑系统的 SRX 系列防火墙上配置多达 32 个安全配置文件。达到限制后,必须删除安全配置文件并提交配置更改,然后才能创建并提交另一个安全配置文件。在许多情况下,所需的安全配置文件更少,因为您可以将单个安全配置文件绑定到多个逻辑系统。
安全配置文件允许您:
在所有逻辑系统之间适当地共享设备的资源,包括策略、区域、地址和地址簿、流会话以及各种形式的 NAT。您可以将大量资源专用于逻辑系统,并允许它们争相使用免费资源。
安全配置文件可防止一个逻辑系统耗尽其他逻辑系统同时需要的资源。当设备流量大时,安全配置文件可保护关键系统资源,并在用户逻辑系统之间保持相当的性能水平。它们可抵御一个用户逻辑系统主导资源使用并剥夺其他用户逻辑系统的资源。
以可扩展方式配置设备,以便将来创建额外的用户逻辑系统。
必须先删除某个逻辑系统的安全配置文件,然后才能删除该逻辑系统。
系统如何评估跨逻辑系统的资源分配和使用
要为逻辑系统调配安全资源,请作为主管理员配置一个安全配置文件,为每个资源指定:
保留的配额可确保指定的资源量始终对逻辑系统可用。
允许的最大配额。如果逻辑系统需要的资源的保留量多于其保留数量所允许的资源,则它可以利用为全局最大资源量配置的资源(如果可用,也就是说,如果这些资源未分配给其他逻辑系统)。允许的最大配额指定逻辑系统可以使用的可用全局资源部分。允许的最大配额不保证为安全配置文件中的资源指定数量可用。逻辑系统必须争夺全球资源。
如果未为资源配置保留配额,则默认值为 0。如果未为资源配置允许的最大配额,则默认值为该资源的全局系统配额(全局系统配额取决于平台)。主管理员必须在安全配置文件中配置相应的允许的最大配额值,以便特定逻辑系统的最大资源使用情况不会对设备上配置的其他逻辑系统产生负面影响。主管理员必须在安全配置文件中配置相应的允许的最大配额值,以便特定逻辑系统的最大资源使用情况不会对设备上配置的其他逻辑系统产生负面影响。
系统维护所有分配的资源计数,这些资源在删除逻辑系统时将保留、使用和再次可用。此计数确定资源是可用于新的逻辑系统,还是通过资源的安全配置文件增加分配给现有逻辑系统的资源量。
删除用户逻辑系统时,将释放其保留的资源分配,供其他逻辑系统使用。
在安全配置文件中配置的资源的特点是静态模块化资源或动态资源。对于静态资源,我们建议将资源的最大配额设置为等于或接近其保留配额指定的数量,以便实现逻辑系统的可扩展配置。资源的最大配额较高,通过访问大量资源,可能会为逻辑系统带来更大的灵活性,但它会限制分配给新用户逻辑系统的可用数量。
动态资源的保留量和允许的最大数量之间的差异并不重要,因为动态资源已经老化,并且不会耗尽可用于分配给其他逻辑系统的池。
可以在安全配置文件中指定以下资源:
安全策略,包括调度器
安全区域
用于安全策略的地址和地址簿
应用程序防火墙规则集
应用程序防火墙规则
防火墙身份验证
流会话和门
NAT,包括:
圆锥 NAT 绑定
NAT 目标规则
NAT 目标池
源池中的 NAT IP 地址,不带端口地址转换 (PAT)
注意:没有 PAT 的 IPv6 源池中的 IPv6 地址不包括在安全配置文件中。
使用 PAT 的源池中的 NAT IP 地址
NAT 端口过载
NAT 源池
NAT 源规则
NAT 静态规则
流会话以外的所有资源都是静态的。
当该安全配置文件分配给其他逻辑系统时,您可以动态修改逻辑系统安全配置文件。但是,为了确保不会超过系统资源配额,系统将采取以下措施:
如果静态配额发生变化,则维护安全配置文件中指定资源的逻辑系统计数的系统守护程序将重新验证安全配置文件。此检查将识别跨所有逻辑系统分配的资源数量,以确定分配的资源(包括增加的金额)是否可用。
这些配额检查与添加新用户逻辑系统并将安全配置文件绑定到该系统时执行的配额检查相同。当您将当前分配给它的安全配置文件绑定到现有用户逻辑系统(或主逻辑系统)时,也会执行这些配置文件。
如果动态配额发生变化,则不会执行检查,但会对未来的资源使用应用新的配额。
案例:评估通过安全配置文件分配的保留资源
要了解系统如何通过安全配置文件评估保留资源的分配,请考虑以下三种用于处理一个资源区域分配的情况。为简化示例,在安全配置文件-1:4 个保留区域和最多 6 个区域中分配了 10 个区域。此示例假设为用户逻辑系统指定了 6 个区域,其指定的全部最大数量可用。系统最大区域数为 10。
这些案例涉及跨逻辑系统的配置。他们会根据区域分配测试,看看在提交配置时是成功还是失败。
表 1 显示了安全配置文件及其区域分配。
配置案例中使用的两个安全配置文件 |
---|
安全配置文件-1
注意:
之后,主管理员会动态增加此配置文件指定的保留区域计数。 |
主逻辑系统配置文件
|
表 2 显示了三个案例,说明了系统如何根据安全配置文件配置跨逻辑系统评估区域保留资源。
第一个案例的配置会成功,因为在绑定到所有逻辑系统的安全配置文件中配置的区域的累计保留资源配额为 8,低于系统的最大资源配额。
第二种情况的配置失败,因为在绑定到所有逻辑系统的安全配置文件中配置的区域的累计保留资源配额为 12,大于系统最大资源配额。
第三种情况的配置失败,因为在绑定到所有逻辑系统的安全配置文件中配置的区域的累计保留资源配额为 12,大于系统最大资源配额。
跨逻辑系统的保留资源配额检查 |
---|
示例 1:成功 此配置在边界内:4+4+0=8,最大容量 = 10。 使用的安全配置文件
|
示例 2:失败 此配置超出限制:4+4+4=12,最大容量 = 10。
安全配置文件
|
示例 3:失败 此配置超出限制:6+6=12,最大容量 = 10。 主管理员修改安全配置文件 1 中的保留区域配额,将计数增加到 6。
|
另请参阅
示例:配置逻辑系统安全配置文件(仅限主管理员)
此示例说明主管理员如何配置三个逻辑系统安全配置文件以分配给用户逻辑系统,以及主要逻辑系统以配置这些逻辑资源。
要求
示例使用运行具有逻辑系统的 Junos OS 的 SRX5600 设备。
开始之前,请阅读 SRX 系列逻辑系统主管理员配置任务概述 ,了解此任务如何适合整个配置过程。
概述
此示例说明如何为以下逻辑系统配置安全配置文件:
根逻辑系统逻辑系统。安全配置文件主配置文件被分配给主逻辑系统或根逻辑系统。
ls-product-design 逻辑系统。安全配置文件 ls-design-profile 分配给逻辑系统。
ls-marketing-dept 逻辑系统。安全配置文件 ls-accnt-mrkt-profile 被分配给逻辑系统。
ls-accounting-dept 逻辑系统。安全配置文件 ls-accnt-mrkt-profile 被分配给逻辑系统。
互连逻辑系统(如果使用的话)。您必须为其分配一个虚拟或空安全配置文件。
拓扑
此配置依赖于 示例:创建用户逻辑系统、管理员、用户和互连逻辑系统中显示的部署。
配置
配置逻辑系统安全配置文件
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层级的 [edit]
CLI 中,然后从配置模式进入 commit
。
set system security-profile master-profile policy maximum 65 set system security-profile master-profile policy reserved 60 set system security-profile master-profile zone maximum 22 set system security-profile master-profile zone reserved 17 set system security-profile master-profile flow-session maximum 3000 set system security-profile master-profile flow-session reserved 2100 set system security-profile master-profile icap-redirect-profile maximum 64 set system security-profile master-profile icap-redirect-profile reserved 30 set system security-profile master-profile nat-nopat-address maximum 115 set system security-profile master-profile nat-nopat-address reserved 100 set system security-profile master-profile nat-static-rule maximum 125 set system security-profile master-profile nat-static-rule reserved 100 set system security-profile master-profile idp set system security-profile master-profile root-logical-system set system security-profile ls-accnt-mrkt-profile policy maximum 65 set system security-profile ls-accnt-mrkt-profile policy reserved 60 set system security-profile ls-accnt-mrkt-profile zone maximum 22 set system security-profile ls-accnt-mrkt-profile zone reserved 17 set system security-profile ls-accnt-mrkt-profile flow-session maximum 2500 set system security-profile ls-accnt-mrkt-profile flow-session reserved 2000 set system security-profile master-profile icap-redirect-profile maximum 64 set system security-profile master-profile icap-redirect-profile reserved 30 set system security-profile ls-accnt-mrkt-profile nat-nopat-address maximum 125 set system security-profile ls-accnt-mrkt-profile nat-nopat-address reserved 100 set system security-profile ls-accnt-mrkt-profile nat-static-rule maximum 125 set system security-profile ls-accnt-mrkt-profile nat-static-rule reserved 100 set system security-profile ls-accnt-mrkt-profile logical-system ls-marketing-dept set system security-profile ls-accnt-mrkt-profile logical-system ls-accounting-dept set system security-profile ls-design-profile policy maximum 50 set system security-profile ls-design-profile policy reserved 40 set system security-profile ls-design-profile zone maximum 10 set system security-profile ls-design-profile zone reserved 5 set system security-profile ls-design-profile flow-session maximum 2500 set system security-profile ls-design-profile flow-session reserved 2000 set system security-profile master-profile icap-redirect-profile maximum 64 set system security-profile master-profile icap-redirect-profile reserved 30 set system security-profile ls-design-profile nat-nopat-address maximum 120 set system security-profile ls-design-profile nat-nopat-address reserved 100 set system security-profile ls-design-profile logical-system ls-product-design set system security-profile interconnect-profile logical-system interconnect-logical-system
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关如何操作的说明,请参阅 Junos OS CLI 用户指南 中的在配置模式下使用 CLI 编辑器 。
创建三个安全配置文件。
创建第一个安全配置文件。
逐步过程
指定最大和保留策略的数量。
[edit system security-profile] user@host# set master-profile policy maximum 65 reserved 60
指定最大和保留区域的数量。
[edit system security-profile] user@host# set master-profile zone maximum 22 reserved 17
指定最大会话数和保留会话数。
[edit system security-profile] user@host# set master-profile flow-session maximum 3000 reserved 2100
指定最大和保留的 ICAP 重定向配置文件的数量
[edit system security-profile] user@host# set master-profile icap-redirect-profile maximum 64 reserved 30
指定最大和保留的源 NAT 无 PAT 地址数以及静态 NAT 规则。
[edit system security-profile] user@host# set master-profile nat-nopat-address maximum 115 reserved 100 user@host# set master-profile nat-static-rule maximum 125 reserved 100
启用入侵检测和防御 (IDP)。只能为主(根)逻辑系统启用 IDP。
[edit system security-profile] user@host# set idp
将安全配置文件绑定到逻辑系统。
[edit system security-profile] user@host# set master-profile root-logical-system
创建第二个安全配置文件。
逐步过程
指定最大和保留策略的数量。
[edit system security-profile] user@host# set ls-accnt-mrkt-profile policy maximum 65 reserved 60
指定最大和保留区域的数量。
[edit system security-profile] user@host# set ls-accnt-mrkt-profile zone maximum 22 reserved 17
指定最大会话数和保留会话数。
[edit system security-profile] user@host# set ls-accnt-mrkt-profile flow-session maximum 2500 reserved 2000
指定最大和保留的 ICAP 重定向配置文件的数量
[edit system security-profile] user@host# set ls-accnt-mrkt-profile icap-redirect-profile maximum 64 reserved 30
指定最大和保留的源 NAT 无 PAT 地址的数量。
[edit system security-profile] user@host# set ls-accnt-mrkt-profile nat-nopat-address maximum 125 reserved 100
指定最大和保留的静态 NAT 规则的数量。
[edit system security-profile] user@host# set ls-accnt-mrkt-profile nat-static-rule maximum 125 reserved 100
将安全配置文件绑定到两个逻辑系统。
[edit system] user@host# set security-profile ls-accnt-mrkt-profile logical-system ls-marketing-dept user@host# set security-profile ls-accnt-mrkt-profile logical-system ls-accounting-dept
创建第三个安全配置文件。
逐步过程
指定最大和保留策略的数量。
[edit system security-profile] user@host# set ls-design-profile policy maximum 50 reserved 40
指定最大和保留区域的数量。
[edit system security-profile] user@host# set ls-design-profile zone maximum 10 reserved 5
指定最大会话数和保留会话数。
[edit system security-profile] user@host# set ls-design-profile flow-session maximum 2500 reserved 2000
指定最大和保留的 ICAP 重定向配置文件的数量
[edit system security-profile] user@host# setls-design-profile icap-redirect-profile maximum 64 reserved 30
指定最大和保留的源 NAT 无 PAT 地址的数量。
[edit system security-profile] user@host# set ls-design-profile nat-nopat-address maximum 120 reserved 100
将安全配置文件绑定到逻辑系统。
user@host# set system security-profile ls-design-profile logical-system ls-product-design
将空安全配置文件绑定到互连逻辑系统。
user@host# set system security-profile interconnect-profile logical-system interconnect-logical-system
结果
在配置模式下,输入 show system security-profile
命令以查看配置的所有安全配置文件,以确认您的配置。
要查看各个安全配置文件,请输入 、 show system security-profile master-profile
show system security-profile ls-accnt-mrkt-profile
和 命令show system security-profile ls-design-profile
。如果输出未显示预期的配置,请重复此示例中的配置说明,以便进行更正。
user@host# show system security-profile interconnect-profile { logical-system interconnect-logical-system; } ls-accnt-mrkt-profile { policy { maximum 65; reserved 60; } zone { maximum 22; reserved 17; } flow-session { maximum 2500; reserved 2000; } icap-redirect-profile { maximum 64; reserved 30; } nat-nopat-address { maximum 125; reserved 100; } nat-static-rule { maximum 125; reserved 100; } logical-system [ ls-marketing-dept ls-accounting-dept ]; } ls-design-profile { policy { maximum 50; reserved 40; } zone { maximum 10; reserved 5; } flow-session { maximum 2500; reserved 2000; } icap-redirect-profile { maximum 64; reserved 30; } nat-nopat-address { maximum 120; reserved 100; } nat-static-rule { maximum 125; reserved 100; } logical-system ls-product-design; } master-profile { policy { maximum 65; reserved 60; } zone { maximum 22; reserved 17; } flow-session { maximum 3000; reserved 2100; } icap-redirect-profile { maximum 64; reserved 30; } nat-nopat-address { maximum 115; reserved 100; } nat-static-rule { maximum 125; reserved 100; } root-logical-system; }
user@host# show system security-profile master-profile policy { maximum 65; reserved 60; } zone { maximum 22; reserved 17; } flow-session { maximum 3000; reserved 2100; } icap-redirect-profile { maximum 64; reserved 30; } nat-nopat-address { maximum 115; reserved 100; } nat-static-rule { maximum 125; reserved 100; } root-logical-system;
user@host# show system security-profile ls-accnt-mrkt-profile policy { maximum 65; reserved 60; } zone { maximum 22; reserved 17; } flow-session { maximum 2500; reserved 2000; } icap-redirect-profile { maximum 64; reserved 30; } nat-nopat-address { maximum 125; reserved 100; } nat-static-rule { maximum 125; reserved 100; } logical-system [ ls-accounting-dept ls-marketing-dept ];
user@host# show system security-profile ls-design-profile policy { maximum 50; reserved 40; } zone { maximum 10; reserved 5; } flow-session { maximum 2500; reserved 2000; } icap-redirect-profile { maximum 64; reserved 30; } nat-nopat-address { maximum 120; reserved 100; } nat-static-rule { maximum 125; reserved 100; } logical-system ls-product-design;
完成设备配置后,请在配置模式下输入提交。
验证
要确认您为逻辑系统分配的安全资源是否已分配给它们,请为每个逻辑系统及其所有资源执行此过程。
验证安全配置文件资源是否已有效地分配给逻辑系统
目的
验证每个逻辑系统的安全资源。对于所有配置的逻辑系统,请遵循此过程。
行动
-
使用 SSH 以用户逻辑系统管理员身份登录到每个用户逻辑系统。
运行 SSH,指定 SRX 系列防火墙的 IP 地址。
输入您创建的其中一个用户逻辑系统的登录 ID 和密码。
login: lsmarketingadmin1 password: Talk2345 lsmarketingadmin1@host:ls-marketing-dept>
输入以下语句以标识为配置文件配置的资源。
lsmarketingadmin1@host:ls-marketing-dept> show system security-profile ?
在生成的提示时输入以下命令。对于为配置文件配置的每个功能,都这样做。
lsmarketingadmin1@host:ls-marketing-dept> show system security-profile zone detail logical system name : ls-marketing-dept security profile name : ls-accnt-mrkt-profile used amount : 0 reserved amount : 17 maximum quota : 22
示例:配置用户逻辑系统安全配置文件
在此示例中,您将配置用户逻辑系统安全配置文件。它提供了有关在安全配置文件中分配给逻辑系统的资源的信息。
SRX4100和SRX4200设备在透明和路由模式下都支持逻辑系统。
SRX4600 设备仅在路由模式下支持逻辑系统。
不支持第 2 层跨逻辑系统流量。
要求
概述
逻辑系统允许主管理员将 SRX 系列防火墙划分为称为用户逻辑系统的离散上下文。用户逻辑系统是自包含的专用上下文,既相互分离,又独立于主逻辑系统。用户逻辑系统拥有自己的安全、网络、逻辑接口、路由配置,以及一个或多个用户逻辑系统管理员。
在此示例中,您将为 表 3 中描述的用户逻辑系统配置安全功能。用户逻辑系统管理员使用此配置显示用户逻辑系统的资源信息。
字段名称 |
字段说明 |
---|---|
MAC 标志 |
每个接口的 MAC 地址学习属性的状态:
|
以太网交换表 |
对于学习到的条目,以将条目添加到以太网交换表中的时间。 |
逻辑系统 |
逻辑系统的名称 |
路由实例 |
路由实例的名称 |
VLAN 名称 |
VLAN 名称 |
MAC 地址 |
在逻辑接口上学习的一个或多个 MAC 地址 |
年龄 |
不支持此字段 |
逻辑接口 |
逻辑接口的名称 |
RTR ID |
路由设备的 ID |
NH 指数 |
用于路由给定前缀流量的下一跃点的软件索引。 |
配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层级的 [edit]
CLI 中,然后从配置模式进入 commit
。
set system security-profile security-profile-name logical-system logical-system-name set logical-systems logical-system-name interfaces xe-0/0/0 unit 0 family ethernet-switching interface-mode access set logical-systems logical-system-name interfaces xe-0/0/0 unit 0 family ethernet-switching vlan members VLAN100 set logical-systems logical-system-name interfaces xe-0/0/1 unit 0 family ethernet-switching interface-mode access set logical-systems logical-system-name interfaces xe-0/0/1 unit 0 family ethernet-switching vlan members VLAN100 set logical-systems logical-system-name interfaces xe-0/0/2 unit 0 family ethernet-switching interface-mode trunk set logical-systems logical-system-name interfaces xe-0/0/2 unit 0 family ethernet-switching vlan members VLAN200 set logical-systems logical-system-name interfaces xe-0/0/1.0 unit 0 family ethernet-switching interface-mode trunk set logical-systems logical-system-name interfaces xe-0/0/2.0 unit 0 family ethernet-switching vlan members vlan200 set logical-systems logical-system-name interfaces irb unit 22 family inet address 10.11.11.150/24 set logical-systems logical-system-name security policies default-policy permit-all set logical-systems logical-system-name security zones security-zone trust host-inbound-traffic system-services all set logical-systems logical-system-name security zones security-zone trust host-inbound-traffic protocols all set logical-systems logical-system-name security zones security-zone trust interfaces xe-0/0/2.0 set logical-systems logical-system-name security zones security-zone untrust host-inbound-traffic system-services all set logical-systems logical-system-name security zones security-zone untrust host-inbound-traffic protocols all set logical-systems logical-system-name security zones security-zone untrust interfaces xe-0/0/2.0 set logical-systems logical-system-name security zones security-zone untrust interfaces xe-0/0/3.0 set logical-systems logical-system-name vlans VLAN100 vlan-id 100 set logical-systems logical-system-name vlans VLAN100 l3-interface irb.22
程序
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关如何操作的说明,请参阅 Junos OS CLI 用户指南 中的在配置模式下使用 CLI 编辑器 。
要配置用户逻辑系统安全配置文件:
以逻辑系统管理员身份登录用户逻辑系统并进入配置模式。
[edit] admin@host> configure admin@host#
配置安全配置文件并将其分配给逻辑系统。
[edit system security-profile ] admin@host# set system security-profile security-profile-name logical-system
将接口设置为相应的接口模式,并指定将接收未标记数据包的逻辑接口为本机 VLAN 的成员。
[edit logical-systems] admin@host#set logical-systems logical-system-name interfaces xe-0/0/0 unit 0 family ethernet-switching interface-mode access admin@host# set logical-systems logical-system-name interfaces xe-0/0/2 unit 0 family ethernet-switching vlan members VLAN100 admin@host#set logical-systems logical-system-name interfaces xe-0/0/1 unit 0 family ethernet-switching interface-mode access admin@host# set logical-systems logical-system-name interfaces xe-0/0/3 unit 0 family ethernet-switching vlan members VLAN100 admin@host#set logical-systems logical-system-name interfaces xe-0/0/2 unit 0 family ethernet-switching interface-mode trunk admin@host#set logical-systems logical-system-name interfaces xe-0/0/2 unit 0 family ethernet-switching vlan members VLAN100 admin@host#set logical-systems logical-system-name interfaces xe-0/0/1.0 unit 0 family ethernet-switching interface-mode trunk admin@host#set logical-systems logical-system-name interfaces xe-0/0/2.0 unit 0 family ethernet-switching vlan members vlan200
创建 IRB 接口并为其分配子网中的地址。
[edit interface] admin@host# set interfaces irb unit 22 family inet address 10.11.11.150/24
创建安全策略以允许从信任区域到不信任区域的流量,并将接口分配给每个区域。
[edit security policies] admin@host# set security policies default-policy permit-all admin@host# set security zones security-zone trust host-inbound-traffic system-services all admin@host# set security zones security-zone trust host-inbound-traffic protocols all admin@host# set security zones security-zone trust interfaces xe-0/0/2.0 admin@host# set security zones security-zone untrust host-inbound-traffic system-services all admin@host# set security zones security-zone untrust host-inbound-traffic protocols all admin@host# set security zones security-zone untrust interfaces xe-0/0/2.0 admin@host# set security zones security-zone untrust interfaces xe-0/0/3.0
将 IRB 接口与 VLAN 进行关联。
[edit logical-systems] admin@host# set logical-systems logical-system-name vlans VLAN100 vlan-id 100 admin@host# set logical-systems logical-system-name vlans VLAN100 l3-interface irb.22
结果
在配置模式下,输入命令以确认 show ethernet-switching table
您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明,以便进行更正。
admin@host# show ethernet-switching table ethernet-switching table { filter; inner-vlan; inter-switch-link; interface-mode; policer; recovery-timeout; storm-control; vlan; vlan-auto-sense; vlan-rewrite; }
验证
要确认配置工作正常,请执行以下任务:
验证用户逻辑系统安全配置文件配置
目的
验证安全策略信息。
行动
在操作模式下,输入 show ethernet-switching table
命令。
admin@host> show ethernet-switching table MAC flags (S - static MAC, D - dynamic MAC, L - locally learned, P - Persistent static, C - Control MAC SE - statistics enabled, NM - non configured MAC, R - remote PE MAC, O - ovsdb MAC) Ethernet switching table : 1 entries, 1 learned Logical system : LD2 Routing instance : default Vlan MAC MAC Age Logical NH RTR name address flags interface Index ID VLAN100 d4:04:ff:89:fd:30 D - xe-0/0/2.0 0 0
示例:为逻辑系统配置安全日志流
此示例说明如何为逻辑系统配置安全配置文件。
要求
概述
作为主管理员,您可以配置单个安全配置文件,将资源分配给特定的逻辑系统。Yo 可以为多个逻辑系统使用相同的安全配置文件,或者结合使用这两种方法。引入 set logical-system LSYS1 security log
命令是为了支持在 SRX 系列防火墙上进行日志记录。
配置
配置逻辑系统安全配置文件逻辑系统
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到层级的 CLI 中 [edit]
,然后从配置模式进入 commit
。
set system security-profile p1 security-log-stream-number reserved 1 set system security-profile p1 security-log-stream-number maximum 2 set system security-profile p1 logical-system LSYS1
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关如何操作的说明,请参阅 Junos OS CLI 用户指南 中的在配置模式下使用 CLI 编辑器 。
配置安全配置文件并指定最大策略和保留策略的数量。。
[edit system] user@host# set security-profile p1 security-log-stream-number reserved 1 user@host# set security-profile p1 security-log-stream-number maximum 2
将配置的安全配置文件分配给 LSYS1。
user@host# set security-profile p1 logical-system LSYS1
结果
在配置模式下,输入 show system security-profile
命令以查看配置的所有安全配置文件,以确认您的配置。
[edit] user@host# show system security-profile p1 { security-log-stream-number { maximum 2; reserved 1; } logical-system LSYS1; }
验证
要确认配置工作正常,请执行以下任务:
验证逻辑系统的安全配置文件资源
目的
验证每个逻辑系统的安全资源。
行动
在操作模式下,输入 show system security-profile all-resource
、 show system security-profile security-log-stream-number logical-system all
、 show system security-profile security-log-stream-number summary
或 show system security-profile security-log-stream-number detail logical-system all
命令,以查看输出:
show system security-profile all-resource
user@host> show system security-profile all-resource resource usage reserved maximum [logical system name: root-logical-system] [security profile name: Default-Profile] address-book 0 0 512 auth-entry 0 0 2147483647 cpu on CP 0.00% 1.00% 80.00% cpu on SPU 0.00% 1.00% 80.00% flow-gate 0 0 524288 flow-session 2 0 6291456 nat-cone-binding 0 0 65536 nat-destination-pool 0 0 4096 nat-destination-rule 0 0 8192 nat-nopat-address 0 0 1048576 nat-pat-address 0 0 2048 nat-port-ol-ipnumber 0 0 4 nat-rule-referenced-prefix 0 0 1048576 nat-source-pool 0 0 2048 nat-source-rule 0 0 8192 nat-static-rule 0 0 20480 policy 0 0 40000 policy-with-count 0 0 1024 scheduler 0 0 64 zone 0 0 512
意义
示例输出在安全配置文件中显示有关分配给逻辑系统的资源的信息。对于指定的每个资源,将显示逻辑系统使用的编号以及配置的最大值和保留值。
验证逻辑系统的安全日志流编号
目的
验证每个逻辑系统的安全日志流编号。
行动
在操作模式下,输入 show system security-profile security-log-stream-number logical-system all
命令以查看输出:
显示系统安全-配置文件 security-log-stream-number 逻辑系统 全部
user@host> show system security-profile security-log-stream-number logical-system all logical system name security profile name usage reserved maximum root-logical-system Default-Profile 1 0 3 LSYS1 sp1 0 1 3 LSYS2 sp2 1 0 3
意义
示例输出在具有安全配置文件名称的安全配置文件中显示有关分配给逻辑系统的资源的信息。对于指定的每个资源,将显示逻辑系统使用的编号以及配置的最大值和保留值。
验证逻辑系统的安全-log-stream-number 摘要
目的
验证安全日志流编号摘要。
行动
在操作模式下,输入 show system security-profile security-log-stream-number summary
命令以查看输出:
show system security-profile security-log-stream-number summary
user@host> show system security-profile security-log-stream-number summary global used amount : 0 global maximum quota : 32 global available amount : 32 total logical systems : 1 total security profiles : 0 heaviest usage / user : 0 / root-logical-system lightest usage / user : 0 / root-logical-system
意义
示例输出显示有关所有逻辑系统的资源的摘要信息。
验证逻辑系统的安全-log-stream-number 详细信息
目的
验证安全日志流编号详细信息。
行动
在操作模式下,输入 show system security-profile security-log-stream-number detail logical-system all
命令以查看输出:
显示系统安全配置文件 security-log-stream-number detail 逻辑系统 all
user@host> show system security-profile security-log-stream-number detail logical-system all logical system name : root-logical-system security profile name : Default-Profile used amount : 0 reserved amount : 0 maximum quota : 8 logical system name : lsys0 security profile name : lsys_profile used amount : 0 reserved amount : 0 maximum quota : 8 logical system name : lsys1 security profile name : lsys_profile used amount : 0 reserved amount : 0 maximum quota : 8 logical system name : lsys2 security profile name : lsys_profile used amount : 0 reserved amount : 0 maximum quota : 8
意义
示例输出显示所有逻辑系统的详细输出级别。