一个打算逐步更新Junos各种基本设定命令的Thread。
虽然BUG巨多但我还是很爱它(⋈◍>◡<◍)。✧♡
Juniper制品
◆ Firewall
SRX系列
JATP系列
Sky Enterprise
Virtual SRX
◆ Router
MX系列
M系列
PTX系列
T系列
Virtual MX
◆ Switch
EX系列
QFX系列
◆ Packet optical platform
BTI系列
基本设定
◆ リンクアグリゲーション(Link Aggregation Group 链接聚合组)
Juniper EX支持「Static Link Aggregation」与「Dynamic Aggregation」两种模式,一般将前者称为「Trunk」,后者称为「LACP」。
//Static Link Aggregation的设定方式
//定义当前SW中LAG的数量,此处设定为1个
user@host# set chassis aggregated-devices ethernet device-count 1
//新建一个LAG,此处命名为ae0
user@host# set interfaces ae0 unit 0 family ethernet-switching
//设定将要参加LAG的物理接口(需要先删除该接口的既有设定)
user@host# set interfaces ge-0/0/0 ether-options 802.3ad ae0
user@host# set interfaces ge-0/0/1 ether-options 802.3ad ae0
(写到这突然好奇是不是可以读一下传说中的规格书原文,然而在翻遍了IEEE官网也只有收费版。。。
不是说发布半年后就可以免费下载的吗???
//LAG设定①,此处接口模式是access,仅转送名为VLAN10的VLAN
user@host# set interfaces ae0 unit 0 family ethernet-switching port-mode access
user@host# set interfaces ae0 unit 0 family ethernet-switching vlan members VLAN10
//LAG设定②,此处接口模式是trunk,转送所有VLAN
user@host# set interfaces ae0 unit 0 family ethernet-switching port-mode trunk vlan members all
//设定①和设定②选择其一即可
######◆ Dynamic Aggregation的设定方式
在上记设定之后追加如下命令:
user@host# set interfaces ae0 aggregated-ether-options lacp active
user@host# set interfaces ae0 aggregated-ether-options lacp periodic fast
◆ BGP
机器A
set interfaces ge-0/0/0 vlan-tagging
set interfaces ge-0/0/0 unit 10 vlan-id 10
set interfaces ge-0/0/0 unit 10 family inet address [自己的IP]
set routing-options autonomous-system [AS号码]
set protocols bgp group EBGP-v4 type external
set protocols bgp group EBGP-v4 family inet unicast
set protocols bgp group EBGP-v4 authentication-key "$9$tQIVO1ELX-goGyl7VwsJZn/9tBIRhSrKM"
set protocols bgp group EBGP-v4 neighbor [邻居的IP] peer-as [peer号码]
set security zones security-zone [zone的名字] host-inbound-traffic protocols bgp
set security zones security-zone [zone的名字] interfaces ge-0/0/0.10
机器B
set interfaces ge-0/0/0 vlan-tagging
set interfaces ge-0/0/0 unit 10 vlan-id 10
set interfaces ge-0/0/0 unit 10 family inet address 10.238.50.41/30
set routing-options autonomous-system 131893
set protocols bgp group EBGP-v4 type external
set protocols bgp group EBGP-v4 family inet unicast
set protocols bgp group EQUINIX-EBGP-v4 authentication-key "$9$tQIVO1ELX-goGyl7VwsJZn/9tBIRhSrKM"
set protocols bgp group EQUINIX-EBGP-v4 neighbor 10.238.50.42 peer-as 4200013004
set security zones security-zone Z_RWAN host-inbound-traffic protocols bgp
set security zones security-zone Z_RWAN interfaces ge-0/0/0.10
※注意两个机器接口的vlan id 要保持一致
网友评论