一個(gè)打算逐步更新Junos各種基本設(shè)定命令的Thread。
雖然BUG巨多但我還是很愛它(??>?<?)。??
Juniper制品
◆ Firewall
SRX系列
JATP系列
Sky Enterprise
Virtual SRX
◆ Router
MX系列
M系列
PTX系列
T系列
Virtual MX
◆ Switch
EX系列
QFX系列
◆ Packet optical platform
BTI系列
基本設(shè)定
◆ リンクアグリゲーション(Link Aggregation Group 鏈接聚合組)
Juniper EX支持「Static Link Aggregation」與「Dynamic Aggregation」兩種模式,一般將前者稱為「Trunk」,后者稱為「LACP」。
//Static Link Aggregation的設(shè)定方式
//定義當(dāng)前SW中LAG的數(shù)量,此處設(shè)定為1個(gè)
user@host# set chassis aggregated-devices ethernet device-count 1
//新建一個(gè)LAG,此處命名為ae0
user@host# set interfaces ae0 unit 0 family ethernet-switching
//設(shè)定將要參加LAG的物理接口(需要先刪除該接口的既有設(shè)定)
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
(寫到這突然好奇是不是可以讀一下傳說(shuō)中的規(guī)格書原文,然而在翻遍了IEEE官網(wǎng)也只有收費(fèi)版。。。
不是說(shuō)發(fā)布半年后就可以免費(fèi)下載的嗎???
//LAG設(shè)定①,此處接口模式是access,僅轉(zhuǎn)送名為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設(shè)定②,此處接口模式是trunk,轉(zhuǎn)送所有VLAN
user@host# set interfaces ae0 unit 0 family ethernet-switching port-mode trunk vlan members all
//設(shè)定①和設(shè)定②選擇其一即可
######◆ Dynamic Aggregation的設(shè)定方式
在上記設(shè)定之后追加如下命令:
user@host# set interfaces ae0 aggregated-ether-options lacp active
user@host# set interfaces ae0 aggregated-ether-options lacp periodic fast
◆ BGP
機(jī)器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號(hào)碼]
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號(hào)碼]
set security zones security-zone [zone的名字] host-inbound-traffic protocols bgp
set security zones security-zone [zone的名字] interfaces ge-0/0/0.10
機(jī)器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
※注意兩個(gè)機(jī)器接口的vlan id 要保持一致