interfaces in Junos

来源:互联网 发布:知乎 特朗普 希拉里 编辑:程序博客网 时间:2024/06/06 07:14

  form <Junos cookbook>

 

Introduction
JUNOS routers have three types of interfaces: network, services, and special interfaces. As you might expect, network interfaces physically connect to the network and carry network traffic. Services interfaces manipulate the traffic before transmitting or receiving it, for example, to perform Network Address Translation (NAT), IPSec functions, or monitoring traffic flows. Special interfaces include two internal Ethernet management interfaces and the loopback interface, which is not used for performance monitoring but as a place to define an IP address for the router as a whole. The naming conventions for the three types of interfaces are the same, and you configure them the same way.
Junos Routers有三种类型的接口:network interfaces, services interfaces, special interfaces.
Network interfaces 物理连接在网络上,并运行网络流量。
Service interfaces在发送或者接受流量之前管理流量。
Special interfaces包括两个内部以太网管理接口和回环接口,他们并不用于管理而只是将Router作为一个整体定义IP地址。
For interfaces to work, you must configure them. Simply installing the hardware in the router is not sufficient. The router detects that network hardware is present and you can list the hardware and interfaces with the show chassis hardware and show interfaces terse commands, but they will not carry traffic. You can also configure interfaces that are not present in the router, which is a handy feature when you are preparing to receive new hardware or to move a Flexible PIC Concentrator (FPC) or a Physical Interface Card (PIC) to another slot. When checking the configuration during a commit operation, MGD, the management process (daemon), checks whether the hardware corresponding to the configuration is present in the router. If it is, MGD hands that portion of the configuration over to the proper processes for activation. If the hardware is not present, MGD ignores that portion of the configuration.
When configuring interfaces on the router, you identify the interface by media type and location in the router. The media type is a string, typically two letters, that identifies the network device. Table 7-1 lists some of the common interface media names.

Interface type

Identifier

Name

Network

at

ATM over SONET/SDH

 

fe

Fast Ethernet

 

ge

Gigabit Ethernet

 

se

Serial

 

so

SONET/SDH

 

t1

T1

Services

es

Encryption Services

 

gr

Generic Route Encapsulation tunnel interface

 

mo

Monitoring Services

 

mt

Multicast tunnel interface

 

sp

Services (for ES and AS PICs)

Special

lo0

Loopback

 

fxp0

Out-of-band management

 

fxp1

Internal management

The location portion of the interface name identifies which slot the FPC is in, which PIC slot on the FPC the media is installed on, and the specific port on the PIC. Most M-series and T-series routers have either four or eight FPC slots, and each slot has either two or four PIC locations. On J-series routers, there can be up to six FPC slots.
To illustrate interface naming, the interface name for the first port of a Fast Ethernet PIC installed on the FPC in slot 2, in the first PIC position, would be:
        fe-2/0/0
 
For channelized interfaces, such as T1, the interface name includes the channel number. The name for the first channel on a T1 interface would be:
        t1-1/1/0:0
 
When numbering the slots, ports, and channels in an interface name, the first item is 0, not 1. For routers that have eight FPC slots, the slots are numbered from 0 through 7. Most PICs have four locations, numbered 0 through 3, and port and channel numbering starts at 0. You can find the FPC and PIC slot numbers on the router chassis, and the port numbers on the PIC faceplate.
JUNOS interfaces consist of a number of layers that affect how you configure them. Like an onion with an outer skin and inner layers, the outer skin of the interface is the physical interface, which generally encompasses the entire physical device. On the physical interface, you set properties that control the behavior of the device itself. These properties typically correspond to OSI Reference Model Layer 1 and Layer 2 properties. 在物理接口上设置控制设备行为的属性。这些属性与OSI参考模型的一层和二层相对应。As examples, Ethernet physical interface properties include the speed (10 Mbps or 100 Mbps) and half-duplex or full-duplex operation;以太网物理接口包括10M或100M的速率,和半双工与全双工方式。 T1 interface properties include framing, encoding, loopback, and setting up a Bit Error Rate Test ( BERT); and for SONET, Automatic Protection Switching (APS) is a physical property.T1接口包括framing, encoding, loopback,和设置比特错误率检测,以及为SONET的自动检测交换。 You configure the physical properties of an interface in two places: directly under the name of the interface and in an interface-specific -options section directly under the name of the interface. So for a Fast Ethernet interface to run at 100 Mbps, use the set fe-2/0/0 speed 100m command, which in the configuration looks like this:
        [edit]
        aviva@
router1# show
         
interfaces {
             fe-2/0/0 {
                  speed 100m; # <--physical property of the interface
             }
        }
 
You see that the speed statement is directly under the name of the interface. An example of including the statement in an -options grouping is when setting a SONET interface to run APS. In this case, you use commands that place statements under the sonet-options hierarchy, as in this example configuration:
        [edit]
        aviva@t320# show
        interfaces {
            so-3/1/0 {
                sonet-options { # <-- options group of physical interface properties
                    aps {
                        working-circuit APS-at-my-colo;
                        authentication key $1991poPPi;
                    }
                }
            }
        }
 
The next layer of our interface onion is the logical interface (sometimes also referred to as a subinterface), which is the mechanism that divides a single interface into one or more virtual devices.下层是逻辑接口,它将一个接口分成一个或多个虚拟设备。 Logical interfaces take all the traffic traversing the physical interface and create separate streams or flows that can have different properties. Virtual device properties include Frame Relay DLCIs and ATM virtual paths (VPs) and virtual circuits (VCs).虚拟设备属性包括帧中继DLCI和ATM虚拟电路和虚链路。 For a physical interface to function, you must create at least one logical interface on it. Each logical interface is identified by a unit statement under each physical interface and a number that identifies the specific instance. The first logical interface is 0. 要让一个物理接口起作用,必须在上面创建至少一个逻辑接口,每个逻辑接口由一个物理接口下的unit和一个数字标识组成。So, to configure a Frame Relay DLCI, use the set t1-0/0/3 unit 0 dlci 100 command, which results in the following configuration:
        [edit]
        aviva@router1# show
        interfaces {
            t1-0/0/3 {
                encapsulation frame-relay; # <-- physical interface property
                unit 0 { # <-- logical interface opener
                     dlci 100; # <-- logical interface property
                }
            }
        }
 
When you configure an IGP to run over an interface, the JUNOS software forms IGP adjacencies over the logical interface.
The third layer of the interface onion is the protocol family, which is where you start tying together the routing protocols on the routers and the interfaces on which they can run. For IPv4 protocols to run on an interface, an inet family must be present on the logical interface. Other common families are inet6, for IPv6 protocols, iso for IS-IS, mpls for MPLS, and vpls for VPLS. Multiple protocol families can run on a single logical interface. If you do not configure the appropriate family on the logical interface, the router will not recognize any packets in that protocol family and will discard them even though you have configured the interface in the routing protocol's configuration.
The final layer is the address, which associates the network address with the protocol family and controls other address properties. For any protocol family to operate, an address must be configured. For example, for an IPv4 protocol such as BGP or RIP to work on an interface, you must assign an IPv4 address for the logical interface's inet family with a command such as set interfaces fe-0/0/0 unit 0 family inet address 10.0.16.1/32. For IS-IS to also run on this logical interface, add the family iso:
        [edit]
        aviva@router1# show
        interfaces {
             fe-0/0/0 {
                 unit 0 {
                      family inet { # <-- set the IPv4 protocol family
                          address 10.0.16.1/32; # <-- set an IPv4 address
                      }
                      family iso; # <-- set for IS-IS
                 }
             }
        }
 

 References:

1, Flexible PIC Concentrators
The FPCs house PICs and connect them to the rest of the router so that incoming packets are then forwarded across the midplane to the appropriate destination port. Each FPC slot contains an FPC1, FPC2, or an OC-192c/STM-64 PIC. There are four dedicated 3.2-Gbps full-duplex channels (one per SFM) between each FPC slot and the core of the PFE.

FPC装载PIC并将它们连接到路由器,让进来的包通过中层传到正确的目的端口。每个FPC槽包含一个FPC1,FPC2, 或一个OC-192C/STM-64PIC.在FPC槽和PFE核心之间有四个专用的3.2G全双工信道。

Each FPC contains shared memory for storing data packets received; the Distributed Buffer Manager ASICs on each SFM manage this memory. Each FPC also contains two Packet Director ASICs for sending bytes to each of the four I/O Manager ASICs, also located on the FPC.
每个FPC包含存储接收数据包的共享内存;...

2,Physical Interface Cards
PICs provide a complete range of fiber optic and electrical transmission interfaces to the network. All PICs except the OC-192c/STM-64 occupy one of four PIC spaces in an FPC. The OC-192c/STM-64 PIC occupies an entire FPC slot.

原创粉丝点击