Juniper路由器配置命令介绍
层级子层级system
routing-options loopback
POS
GE
interface
protocol
ISIS
OSPF
BGP
MPLS-RSVP/LDP MPLS-FRR
MPBGP
MPLS-VPN COS
功能项
set system hostname hostname
set system root-authentication plain-text-password
set system login user lab class super-user authentication plain-text-password
set system services telnet/ftp/name-ser dns-add
s et interface lo0 description description
set interface lo0 unit 0 family inet address ip-address
set interface lo0 unit 0 family iso address iso-address
set interface so-slot/pic/port description description
set interface so-slot/pic/port mtu mtu-number
set interface so-slot/pic/port hold-time up ms down ms
set interface so-slot/pic/port encapsultation ppp
set interface so-slot/pic/port sonet-options fcs [32|16]
set interface so-slot/pic/port sonet-options payload-scrambler set interface so-slot/pic/port sonet-options rfc-2615
set interface so-slot/pic/port unit 0 family inet address ip-address
set interface so-slot/pic/port unit 0 family iso
set interface so-slot/pic/port unit 0 family mpls
set interface ge-slot/pic/port description description
set interface so-slot/pic/port mtu mtu-number
set interface so-slot/pic/port hold-time up ms down ms
set interface ge-slot/pic/port unit 0 family inet address ip-address
set interface ge-slot/pic/port unit 0 family iso
set interface ge-slot/pic/port unit 0 family mpls
set routing-options router-id router-id
set routing-options autonomous-system as-number
set routing-options static route network/mask next-hop address
set protocols isis level [ 1 | 2 ] interface
interface.logical-number
set protocols isis lsp-lifetime seconds
set protocols isis export export-policy
set protocols isis spf-delay ms
set protocols isis rib-group inet rg-name
set protocols isis traffic-engineering shortcuts
set protocols isis level [ 1 | 2 ] wide-metrics-only
set protocols isis level [ 1 | 2 ] preference number
set protocols isis level [ 1 | 2 ] external-preference number set protocols isis level [ 1 | 2 ] disable
set protocols isis interface interface-name lsp-interval ms
set protocols isis interface interface-nam level [ 1 | 2 ] metric number
set protocols isis interface interface-nam level [ 1 | 2 ]
hello-interval seconds
set protocols isis interface interface-nam level [ 1 | 2 ]
hold-time seconds
set protocols isis interface interface interface-nam passive set protocols ospf area XX interface interface.logical-number set protocols ospf interface interface.logical-number metric number
set protocols ospf interface interface interface.logical-number passiv
set protocols ospf traffic-engineering
set protocols bgp interface interface.logical-number
set protocols bgp group group-name
set protocols bgp group group-name type external/internal
set protocols bgp group group-name peer-as 1234
set protocols bgp group group-name neighbor X.X.X.X
set protocols bgp hold-time seconds
set protocols bgp mtu-discovery
set protocols bgp out-delay seconds
set protocols bgp log-updown
set protocols bgp damping
set protocols bgp group group-name description description
et protocols bgp group group-name local-address group-name
local-address address
set protocols bgp group group-name family inet any
set protocols bgp group group-name neighbor address description description
set interfaces interface.logical-number family mpls
set protocols mpls interface.logical-number
set protocols ldp interface.logical-number
set protocols rsvp interface.logical-number
set protocols mpls label-switched-path test to 10.0.9.7
set protocols mpls label-switched-path test ldp-tunneling
set protocols mpls label-switched-path test link-protection
set protocols rsvp interface so-0/0/3.0 link-protection
set protocols bgp group group-name family [inet|inet-
vpn|inet6|inet6-vpn|l2vpn]
set routing-instances instance-name
set routing-instances instance-name instance-type VRF
set routing-instances instance-name interface interface-number set routing-instances instance-name route-distinguisher xxxx set routing-instances instance-name vrf-target target:xxxx:yyyy set routing-instances instance-name routing-options static route x.x.x.x/z next-hop x.x.x.x
set routing-instances instance-name protocols ospf area XX interface interface-name.logical-number
set routing-instances instance-name protocols ospf export bgp-ospf
set policy-options policy-statement bgp-ospf term 1 from protocol bgp
set policy-options policy-statement bgp-ospf term 1 then accept
命令解释备注配置设备名必选 为root帐户设置密码
新建用户名为lab的帐户,并设定密码
配置路由器Telnet/ftp/dns服务
配置端口描述
配置IP地址
配置ISO地址
配置端口描述
配置端口MTU
配置端口up/down的damping时间
配置端口封装为PPP
配置端口FCS的位数
配置端口打开payload-scrambler
配置端口FCS 32,打开payload-scrambler,C2字节为
0x16
配置IP地址
端口允许运行ISIS
端口允许运行mpls
配置端口描述
配置端口MTU
配置端口up/down的damping时间
配置IP地址
端口允许运行ISIS
端口允许运行mpls
配置路由器Router-ID
配置路由器的AS号码
配置静态路由
配置聚合路由
配置ISIS接口并将接口加入到相应的ISIS LEVEL里必选 配置IS-IS的存活时间,LSP的refresh 时间为lsp-
lifetime-317秒
配置IS-IS的路由分发策略
配置IS-IS的SPF的延迟
配置IS-IS使用的路由组
配置IS-IS使用TE的shortcuts
配置IS-IS的Level使用wide-metric---支持TE必选
配置IS-IS内部路由的管理距离
配置IS-IS外部路由的管理距离
配置IS-IS禁止运行Leve 1或者2
配置IS-IS端口发送LSP的间隔
配置IS-IS端口的Metric值
配置IS-IS端口的IIH的间隔时间
配置IS-IS端口的Hold时间
配置IS-IS端口运行Passive模式
配置OSPF接口并将接口加入到相应的OSPF AREA里必选 配置OSPF端口的Metric值
配置OSPF端口运行Passive模式
配置OSPF支持流量工程(启用OPAQUE LSA)
配置o spf端口的IIH的间隔时间
配置BGP接口必选 配置BGP组必选 设定BGP组为EBGP或IBGP必选 设定本组内的neighbor的AS号码必选 设定本组内neighbor的session IP地址必选 配置BGP的Hold-timer时间,Hello时间自动调整为
Hold-time的1/3
配置BGP的TCP进程的MSS为路径的最大值
配置BGP的的路由发送延迟
配置路由器纪录BGP的邻居up/down的变化
配置BGP路由启用Damping算法
配置BGP的组的描述
配置和BGP的组内的邻居进行通讯的时候使用的本地地
址
配置BGP的Group内的邻居允许运行unicast 和
multicast
配置BGP的邻居的描述
端口允许运行mpls
配置将接口加到MPLS协议组里
配置将接口加到LDP协议组里
配置将接口加到rsvp协议组里
配置名称为test的RSVP signaled LSP, 此LSP终结点为
10.0.9.7
在LDP TUNNEL的路由器上配置名称为test的RSVP
signaled, LSP使得LDP能够穿越RSVP LSP
启用保护的LSP保护选项
在RSVP协议里,启用保护选项
配置本group下的BGP session的属性,inet是启用IP路由支持,此项为默认启用,inet-vpn是启用l3mbgp-vpn路由支持,启用任意非INET属性,会将inet禁用
配置routing-instances
配置routing-instances的VRF
将逻辑接口加入到routing-instances里
配置RD,确认RD在整个routing-instance里是唯一的配置RT,确认RT在整个routing-instance里是唯一的,并且同一个routing-instance里的多个PE上RT要相同配置PE-CE之间的静态路由,这里要注意,在PE-CE之间为以太网连接的情况下,一定要加一个特定的静态路由,目的地址为PE-CE之间的互联的IP子网,下一跳地址为对端CE的接口IP地址
配置PE-CE之间的OSPF路由,这里要注意,一定要加一个特定的POLICY,目的是为了将从对端PE学到的VPN路由注入PE-CE之间运行的OSPF协议,使得两端的CE互相
能学到对方的路由