设为首页 收藏本站
查看: 1372|回复: 0

[经验分享] Juniper configuring port

[复制链接]

尚未签到

发表于 2015-11-5 14:21:46 | 显示全部楼层 |阅读模式
Configuring Port Mirroring
Port mirroring is the ability of a router to send a copy of an IPv4 or IPv6 packet to an external host address or a packet analyzer for analysis. Port mirroring is different from traffic sampling. In traffic sampling, a sampling key based on the packetheader is sent to the Routing Engine. There, the key can be placed in a file, or cflowd packets based on the key can be sent to a cflowd server. In port mirroring, the entire packet is copied and sent out through a next-hop interface.
One application for port mirroring sends a duplicate packet to a virtual tunnel. A next-hop group can then be configured to forward copies of this duplicate packet to several interfaces. For more information about next-hop groups, see ConfiguringNext-Hop Groups.
All M Series Multiservice Edge Routers, T Series Core Routers, and MX Series Ethernet Services Routers support port mirroring for IPv4 or IPv6. The M120, M320, and MX Series routers support port mirroring for IPv4 and IPv6 simultaneously.
Port mirroring for VPLS traffic is supported on M7i and M10i routers configured with an Enhanced CFEB (CFEB-E), on M120 routers, on M320 routers configured with an Enhanced III Flexible PIC Concentrators (FPCs), and MX Series routers.
Port mirroring for VPLS traffic is supported on M7i and M10i routers configured with Enhanced CFEBs (CFEB-Es), on M120 routers, on M320 routers configured with Enhanced III Flexible PIC Concentrators (FPCs), and MX Series routers.
In JUNOS Release 9.3 and later, port mirroring is supported for Layer 2 traffic on MX Series routers. For information about how to configure port mirroring for Layer 2 traffic, see the JUNOS MX-series Layer 2 Configuration Guide.
In JUNOS Release 9.6 and later, port mirroring is supported for Layer 2 VPN traffic on M120 routers and M320 routers configured with an Enhanced III FPCs. You can also set the maximum length of the mirrored packet. When set, the mirrored packet is truncatedto the specified length.
Configuration Guidelines
When configuring port mirroring, the following restrictions apply:

  • Only transit data is supported.
  • You can configure either IPv4 or IPv6 port mirroring but not both on M Series routers, except for the M120 and M320 routers, which support port mirroring for IPv4 and IPv6 simultaneously.
  • You can configure port mirroring for IPv4 and IPv6 simultaneously on the M120 and M320 routers and the MX Series routers.
  • You cannot configure firewall filters on the port-mirroring interface.
  • You must include a firewall filter with both the accept action and the port-mirror actionmodifier on the inbound interface. Port mirroring does not work if you specify the discard action.
  • The interface you configure for port mirroring should not participate in any kind of routing activity.
  • The destination address you specify should not have a route to the ultimate traffic destination. For example, if the sampled IPv4 packets have a destination address of 192.68.9.10 andthe port-mirrored traffic is sent to 192.68.20.15 for analysis, the device associated with the latter address should not know a route to 192.68.9.10.Also, it should not send the sampled packets back to the source address.
  • On all routers except the MX Series router, you can configure only one port-mirroring interface per router. If you include more than one interface in the port-mirroring statement,the previous one is overwritten. MX Series routers support more than one port-mirroring interface per router.
  • You can configure multiple port mirroring instances on the M120, M320, and MX Series routers.
  • In typical applications, you send the sampled packets to an analyzer or a workstation for analysis, not to another router. If you must send this traffic over a network, you should use tunnels. For more informationabout tunnel interfaces, see the JUNOS Network Interfaces Configuration Guide.
Configuring Port Mirroring
To configure port mirroring, include the port-mirroring statement at the [editforwarding-options] hierarchy level:
[edit forwarding-options]port-mirroring {family (ccc| inet | inet6 | vpls) {output {interface interface-name {next-hop address;}no-filter-check;}input {maximum-packet-length bytes;rate number;run-length number;}}}Configuring the Port-Mirroring Address Family and Interface
To configure port mirroring, include the port-mirroring statement. To configure the address family type of traffic to sample, include the family statement.To configure the rate of sampling, length of sampling, and the maximum size for the mirrored packet, include the input statement. To specify on which interfaceto send duplicate packets and the next-hop address to send packets, include the output statement. To determine whether there are any filters on the specifiedinterface, include the no-filter-check statement.
For information about the rate and run-length statements,see Configuring Traffic Sampling.
Configuring Multiple Port-Mirroring Instances
In JUNOS Release 9.5 and later, you can configure multiple port-mirroring instances on the M120, M320, and MX Series routers. On the M120 router, you can associate each instance with a specific Forwarding Engine Board (FEB). You cannot associate a port-mirroringinstance with an FEB configured as a backup FEB. On the M320 router, you can associate each instance with a specific Flexible PIC Concentrator (FPC). Associating a port-mirroring instance with an FPC or an FEB enables you to mirror packets to different destinations.Multiple port-mirroring instances are also supported on MX Series routers. For information about configuring multiple port-mirroring instances on MX Series routers, see the JUNOS MX-series Layer 2 Configuration Guide.
To configure a port-mirroring instance, include the instance port-mirroring-instance statement at the [editforwarding-options port-mirroring] hierarchy level:
[edit forwarding-options port-mirroring]instance port-mirroring-instance-name {family (inet| inet6 | vpls | ccc) {output {interface interface-name {next-hop address;}no-filter-check;}}input {maximum-packet-length bytes;rate number;run-length number;}}Configuring Port-Mirroring Instances
You can configure multiple port-mirroring instances. Specify a unique port-mirroring-instance-name for each instance you configure.
Associating a Port-Mirroring Instance on M320 Routers
You can associate a port-mirroring instance with a specific FPC on an M320 router or with a specific FEB on an M120 router. You can associate only one port-mirroring instance with each FPC on an M320 router or with each FEB on an M120 router. On an M120 router,you cannot associate a port-mirroring instance with a FEB configured as a backup FEB.
To associate a port-mirroring instance with an FPC on an M320 router, include the port-mirror-instance port-mirroring-instance-name statement atthe [edit chassis fpc slot-number] hierarchy level:
[edit chassis]fpc slot-number {port-mirror-instance port-mirroring-instance-name;}For slot-number, specify the slot number of the FPC you want to associate with the port-mirroring instance. For port-mirroring-instance-name,specify the name of a port-mirroring instance you configured at the [edit forwarding-options port-mirroring] hierarchy level. For more information aboutconfiguring an FPC on an M320 router, see the JUNOS System Basics Configuration Guide.
Associating a Port-Mirroring Instance on M120 Routers
To associate a port-mirroring instance with a FEB on an M120 router, include the port-mirror-instance port-mirroring-instance-name statement atthe[edit chassis feb slot-number] hierarchy level:
[edit chassis]feb slot-number {port-mirror-instance port-mirroring-instance-name;}For slot-number, specify the slot number of the FEB you want to associate with the port-mirroring instance. For port-mirroring-instance-name,specify the name of a port-mirroring instance you configured at the [edit forwarding-options port-mirroring] hierarchy level. For information about configuringFEB redundancy on an M120 router, see the JUNOS High Availability Configuration Guide. For information about configuring FPC to FEB connectivity on an M120 router, see the JUNOS System Basics Configuration Guide.
Configuring MX Series Ethernet Services Routers and M120 Routers to Mirror Traffic Only Once
On MX Series and M120 routers only, you can configure port mirroring so that the router mirrors traffic only once. If you configure port mirroring on both ingress and egress interfaces, the same packet could be mirrored twice. To mirror packets only once andprevent the router from sending duplicate sampled packets to the same mirroring destination, include the mirror-once statement at the [editforwarding-options port-mirroring] hierarchy level:
[edit forwarding-options port-mirroring]mirror-once;

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-135503-1-1.html 上篇帖子: LigthtReading解析思科惠普Juniper SDN策略 探讨行业发展趋势 下篇帖子: Pass4Sure Juniper Interactive Testing Engine and BrainDumps
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表