JuniperJunosSRXNATARP代理-创新互联

SRX所使用的地址池使用的地址在SRX是虚拟的,它不是一个真正物理存在的。那么这个地址的可达性必然依赖于简单的IP路由查找。SRX也支持将自己的物理接口配置到Pool中,如图5-8。

在佳县等地区,都构建了全面的区域性战略布局,加强发展的系统性、市场前瞻性、产品创新能力,以专注、极致的服务理念,为客户提供做网站、网站建设 网站设计制作按需开发,公司网站建设,企业网站建设,品牌网站制作,营销型网站,成都外贸网站建设公司,佳县网站建设费用合理。

Figure5-8. Source NAT with ProxyARP

为保证这些Pool的可达性,Proxy ARP功能使能。由于Pool内有可路由的IP网络(或者SRX设备本身是不可达),关键是要在以太网层面(二层)提供可达性,而不是IP层的可达性。

最后一跳IP路由设备必须在本地以太网络上发送一个ARP请求,以获得MAC地址。Proxy ARP功能可以让SRX设备上代表Pool内地址回应这些ARP请求。在这样做时,SRX设备提供其自己的MAC地址作为数据包在以太网层目的地发送到池地址的IP层。一旦报文被接收时,SRX设备继续流处理为正常。

代理ARP配置

james@SRX5800-1>edit

Enteringconfigurationmode

[edit]

james@SRX5800-1# edit security natsource

[editsecurity natsource]

james@SRX5800-1# set pool phyPool address 198.18.5.64/27

创建一个新的rule-set应用这个Pool:

[edit]

james@SRX5800-1#editrule-set Dept-B-to-Inet

对来自Dept-B zone的流量进行匹配:

[editsecurity nat source rule-setDept-B-to-Inet]

james@SRX5800-1#set  from  zone Dept-B

目的是Inet zone:

[editsecuritynatsourcerule-setDept-B-to-Inet]

james@SRX5800-1# set to zone Inet

下面在rule层级下进行配置:

[editsecuritynatsourcerule-setDept-B-to-Inet]

james@SRX5800-1# editrulephypoolNAT

对源地址10.2.0.0/16的流量进行匹配:

[editsecurity nat source rule-set Dept-B-to-Inet rulephypoolNAT]

james@SRX5800-1# set  match  source-address 10.2/16

配置source nat的Action:

[editsecurity nat source rule-set Dept-B-to-Inet rulephypoolNAT]

james@SRX5800-1#set  then  source-nat  phyPool

[editsecurity nat source rule-set Dept-B-to-Inet rulephypoolNAT]

james@SRX5800-1#up 3

在Inet zone ge-0/0/2.0 interface为198.18.5.64/27range配置Proxy ARP:

[editsecurity nat]

james@SRX5800-1#set proxy-arp interface ge-0/0/2.0 address198.18.5.64/27

[editsecuritynat]

james@SRX5800-1#show |compare

[editsecurity natsource] pool ipPool { ...}

+    pool phyPool{

+           address{

+                  198.18.5.64/27;

+           }

+    }

[editsecurity natsource]

rule-setDept-A-to-Inet { ...}

+    rule-set Dept-B-to-Inet{

+           from zoneDept-B;

+           to zoneweb-dmz;

+           rule phypoolNAT{

+                  match{

+                         source-address198.18.11.0/24;

+                  }

+                  then{

+                         source-nat{

+                                 pool{

+                                        phyPool;

+                                 }

+                         }

+                  }

+           }

+    }

[editsecuritynat]

+ proxy-arp{

+         interface ge-0/0/2.0{

+                 address{

+                        198.18.5.64/27;

+                 }

+         }

+}

 [edit securitynat]

james@SRX5800-1#commit and-quit

configurationchecksucceeds commit complete

Exitingconfiguration mode

james@SRX5800-1>

来自Dept-B zone的10.2.0.0/16流量去往net zone的流量将被翻译为198.18.5.64/27,该地址池存在于egress Inet zone network。

当在GE-0/0/2.0接口上收到对198.18.5.64/27的ARP请求时,设备SRX将对其应答。

查看代理ARP:

可以看到一条flow通过新的rule-set进行了翻译:

james@SRX5800-1>show security flow session

SessionID: 2336, Policy name: webdmz_mgt/8, Timeout:1796

In:10.2.1.15/49842 --> 198.18.200.1/80;tcp, If:ge-0/0/0.0

Out:198.18.200.1/80 --> 198.18.5.78/2615;tcp, If:ge-0/0/2.0

1sessionsdisplayed james@SRX5800-1>

在此,内部源IP地址10.2.1.15被转换为198.18.5.78池地址(在Out返回方向可见),而源端口是从49842翻译到2615(因为它没有明确禁用)。该流量相应的日志是:

james@SRX5800-1>show logtraffic-log

Jan19 09:41:59 SRX210 RT_FLOW: RT_FLOW_SESSION_CREATE: sessioncreated10.2.1.15/49842->198.18.200.1/80junos-http198.18.5.78/2615->198.18.200.1/80

phypoolNATNone 6 webdmz_mgt Dept-B web-dmz2336

james@SRX5800-1>

此会话初始化日志条目显示翻译内部源IP地址和端口从10.2.1.15和49842至198.18.5.78和2615公共地址和端口,它也显示了匹配NAT规则(phypoolNAT)。

通过show命令查看rule:

james@SRX5800-1>show security nat source rule phypoolNAT

source NAT rule:phypoolNAT                        Rule-set:Dept-B-to-InetRule-Id      2

Ruleposition                               1

Fromzone                               :Dept-B

Tozone                                   :Inet

Match

Sourceaddresses                 :198.18.5.64           -198.18.5.95 Action    :phyPool

PersistentNATtype             :N/AInactivitytimeout              0

Max sessionnumber               0

Translationhits                           1

james@SRX5800-1>

    新的地址池:

james@SRX5800-1>showsecurity nat source pool all

Totalpools:1

Poolname                 :phyPool

Poolid                          5

Routinginstance        :default Host address base :0.0.0.0

Port                          : [1024,63487]

Totaladdresses             32

Translationhits             1

Addre***ange                                           SinglePorts        TwinPorts 198.18.5.64 -198.18.5.95                1                                                            0

james@SRX5800-1>

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。

分享标题:JuniperJunosSRXNATARP代理-创新互联
URL链接:https://www.cdcxhl.com/article24/jodce.html

成都网站建设公司_创新互联,为您提供动态网站移动网站建设微信小程序自适应网站品牌网站制作网站设计

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

成都seo排名网站优化