Download as pdf or txt
Download as pdf or txt
You are on page 1of 283

JUNOS Hands On Training

“EX/QFX” Course
Juniper Network, K.K.
03/2017 rev.1.2
はじめに

•  本資料にあるロードマップの内容は、資料作成時点における
ジュニパーネットワークスの予定を⽰したものであり、事前の通告無しに
内容が変更されることがあります。
•  またロードマップに描かれている機能や構成は、購⼊時の条件になりません
ので、ご注意ください。

Legal Disclaimer:
This statement of product direction (formerly called“roadmap”) sets forth
Juniper Networks' current intention, and is subject to change at any time
without notice. No purchases are contingent upon Juniper Networks delivering
any feature or functionality depicted on this statement.

2
2 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOS Basic

JUNOS Hands-on Training


Juniper Network, K.K.
Training Outline ”JUNOS Basic”
トレーニング内容(前半) 記載ページ
ジュニパーネットワークス会社紹介 P.6
JUNOSとは P.13
運⽤⾯からみたJUNOSのアドバンテージ P.25
トレーニング・デバイスへのアクセス⽅法 P.35
CLIモードと各モード間の移動 P.39
JUNOS CLI操作 〜Operationalモード〜 P.46

JUNOS CLI操作 〜Configurationモード〜 P.65


JUNOSシステム設定 P.82
JUNOSインタフェース設定 P.90
JUNOS経路設定 P.98
Firewall Filterの設定 P.102

4
4 © 2016 Juniper Networks, Inc. All rights reserved.
Training Outline Ethernet Switching "EX/QFX" course
トレーニング内容(後半) 記載ページ
ジュニパーのイーサネット・スイッチポートフォリオ P.111
LAB.1 JUNOSの基本的な操作・設定 P.121
LAB.2 Interfaceの設定 P.135
LAB.3 Routingの設定 P.148
LAB.4 Firewall Filterの設定 P.155
Virtual Chassisとは P.161
Virtual Chassis Deep Dive P.176
LAB.5 Virtual Chassisの設定 P.195
Wrap up P.209
TIPs to be JUNOS Experts P.211
Appendix A: Virtual Chassis Fabric P.242
Appendix B: Multi-Chassis LAG P.253

5
5 Appendix C: Zero Touch Provisioning P.271
© 2016 Juniper Networks, Inc. All rights reserved.
ジュニパーネットワークス
会社紹介

6
ジュニパーネットワークス 会社概要
  設⽴: 1996年
  本社所在地: カリフォルニア州サニーベール
  Juniper Networks (NYSE: JNPR)
  CEO: Rami Rahim
  事業概要: IP通信機器(ルータ・スイッチ)及び
セキュリティー製品(ファイアウォール・IPS)の製造販売
  従業員: 約9,000名
  拠点:46カ国 100拠点以上
  年間売上規模:約5600億円

7
7 © 2016 Juniper Networks, Inc. All rights reserved.
ジュニパーネットワークスの戦略
Vision: ネットワークイノベーションにおけるリーダー
Go-To-Market: ハイパフォーマンスネットワーキングをビジネスの基盤と位置付けるお客様とパートナー様に価値を提供

パフォーマンスと⾃動化におけるバリュー CENTRALIZED
ü  スケーラブル INTELLIGENCE AND
ü  信頼性 CONTROL

ü  セキュリティ
ü  ⾼コスト効率 ROUTING SWITCHING SECURITY
ü  俊敏性
ü  ⾼効率
SILICON SYSTEMS SOFTWARE

Grow Revenue Faster than the Market

8
8 © 2016 Juniper Networks, Inc. All rights reserved.
ジュニパーネットワークスの戦略
AUTOMATION

ROUTING SWITCHING SECURITY

PERFORMANCE

9
9 © 2016 Juniper Networks, Inc. All rights reserved.
プロダクト・ポートフォリオ(カテゴリ別)
ROUTING SWITCHING SECURITY

NetScreen Series
NetScreen-5200
NetScreen-5400

EX Series QFX Series SRX Series


EX9200 QFX10000 SRX5800
EX8200 QFX5200 SRX5600
PTX Series EX4600 QFX5110 SRX5400 SSG Series
MX Series PTX5000 EX4550 QFX5100 SRX3600 SSG550M
MX2020 PTX3000 EX4300 QFX3600 SRX3400 SSG520M
MX2010 PTX1000 EX4200 QFX3500 SRX1400 SSG350M
MX960 EX3400 QFabric SRX1500 SSG320M
EX3300 (QFX3000-G/M) SSG140
MX480 SRX550
MX240 EX2300 SRX345
ACX Series EX2200
MX104 SRX340
ACX5000
MX80 EX2300-C SRX320
ACX4000
MX40 EX2200-C SRX300
ACX2100
MX10 ACX2000 vSRX
ISG Series
MX5 ACX1100
ISG2000
vMX ACX1000
ISG1000
ACX500

Network Director
Security Director
10
10 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOS: THE POWER OF ONE
Integrated Architecture

Datacenter Service Gateway Universal Edge Router Datacenter Fabric Switch


SRX series MX series QFX series

11
11 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOS: THE POWER OF ONE
Integrated Architecture

Branch Service Gateway Campus Ethernet Switch


SRX series EX series

12
12 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOSとは

13
multiple operating systems vs. ONE approach

セキュリティもネットワークもカバーする
プラットフォーム毎に異なるOSと機能セット
業界唯⼀のシングル・ネットワークOS

14
14 © 2016 Juniper Networks, Inc. All rights reserved.
THE POWER OF ONE
LEARN ONCE, INTEGRATE ONCE, QUALIFY ONCE

プラットフォーム共通機能
§  Routing
§  Layer 2 Switching
§  Class of Service ベース・コンポーネント
§  IPv4 and IPv6 §  Kernel and µKernel
§  Etc… §  Chassis Management (chassisd)
§  IP Services (Telnet, SSH, NTP)
§  Network Management
–  (AAA, CLI/mgd, XML/DMI, syslogd)
Cross-Portfolio Commonality

BGP/MPLS Control Plane

End-to-end Security

In-network Automation

SDK and Licensing of Junos


プラットフォーム専⽤機能
§  Advanced Security(SRX)
§  Virtual Chassis Fabric(QFX)
etc,etc… §  MPLS/EVPN(MX)
§  ISSU(MX&EX9k)
§  Etc…

15
15 © 2016 Juniper Networks, Inc. All rights reserved.
コントロールプレーンとフォワーディングプレーンの分離
  Scale and Performance
§  各Planeにおけるパフォーマンスを担保
§  より⾼いパフォーマンスをそれぞれの領域で独⽴して
開発することが可能に

Control Plane
Routing
Engine

  Resilient
§  独⽴したオペレーション

Data Plane
§  Routing Engine (RE)
§  Packet Forwarding Engine(PFE) Packet
Forwarding
§  冗⻑化に対するさまざまなオプションをそれぞれに提供
Engine

16
16 © 2016 Juniper Networks, Inc. All rights reserved.
EVOLUTION OF ONE ARCHITECTURE
  モジュラー型
Development
§  拡張性とパフォーマンスを担保するコンポーネント APIʼS
NETCONF/XML Yang & DMI SDK
§  冗⻑性、安定性、サービス拡張を効率的に提供するた
めの独⽴したオペレーション

Control Plane

Switching
Interface

Security
Routing


Scalable
§  Up: multi-core & 64-bit
§  Down: モジュラーごとのパッケージング
Kernel

Open

Data Plane
§  Hardware Abstraction Layer PFE Microkernel
§  Automation APIs & Junos SDK

Hardware Abstraction Layer

17
17 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOSのアプローチ・運⽤者/設計者にとって
  ネットワーク停⽌の原因に対する調査
計画停⽌
JUNOSのCLIは、業界標準型CLIと
根本的に異なるアプローチを採⽤
障害やバグによる予期せぬ停⽌

業界標準型CLI JUNOS CLI

コマンドは編集⽤ファイル
コマンドは1⾏毎に実⾏され、
のみ変更し、変更は意図し
変更は即時反映される
たタイミングで反映させる
⼈為的な要因
ミスや間違いも即時反映 ミスや間違いがあっても
致命的な影響となることも… 確認・修正してから適⽤

全体の70%は⼈為的なミスが原因で
ネットワークに悪影響
作業者の努⼒にたよるのではなく
ソフトウェアの仕組みでミスをなくすサポート

18
18 © 2016 Juniper Networks, Inc. All rights reserved.
CLASSIC

19
これまでの⼀般的なNW-OSの不便さ
Running Config Running Config

§  ⼀般的なネットワークOSの場合、管理者がコンソールなどで設定変更を⾏う際、
投⼊した設定が即座に実稼働のネットワーク設定へと反映されてしまう
§  このことにより、
–  ヒューマンエラーが発⽣する余地がある
–  設定の復旧が困難
–  意図しない設定を⾏ってしまうと、機器への通信⾃体が不可能になってしまうケースがある
などの課題が存在する

20
20 © 2016 Juniper Networks, Inc. All rights reserved.
MODERN

21
JUNOSの場合
Candidate Config Active Config

check !

commit

•  JUNOSの場合、管理者が設定変更を⾏うのは、あくまで設定ファイル
これを実ネットワークの設定へと投⼊するためにはJUNOSによるシステムチェックを⾏った後に、
”commit“というコマンドを投⼊することにより反映させる
•  この仕組みにより、
•  JUNOSのシステムチェックによるヒューマンエラーの予防
•  設定ファイルは過去50世代まで⾃動保存されるため、⼀瞬で過去の状態へと戻すことができる
•  作成した設定ファイルを、“ためしに”投⼊してみることも可能
•  などのメリットを享受することができる。

22
22 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOSのアプローチ :Human factors への対応
有効なJUNOSツール Benefits
•  “commit” •  Configミスによるダウンタイムの回避
•  設定変更を有効にするコマンド
•  Config変更/ 切り戻し作業の時間短縮
•  有効時にconfigチェックをおこない,誤り(⽭盾)がなければ投⼊
した設定が有効となる
•  “rollback”
•  設定の履歴管理,設定・OSの切り戻しを容易に
•  既存configを含み最⼤50世代までの管理が可能
•  “Load”コマンドにより外部から設定ファイルを更新することも可能
•  “JUNOScript” & “Event Policy”
•  スクリプティングによる⾃動化ツール
•  イベントをトリガーとした⾃動化機能

1 2 3

commit
load candidate validated active

rollback
configuration configuration configuration
commit
confirmed
commit commit 1
scripts validations 49

23
23 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOS: THE POWER OF ONE
PTX Series
SRX5000 Series

MX Series

QFX10000 Series

SRX1400
SRX3000 Series
QFX5100 Series
SRX550
EX4600
vSRX SRX340 EX4300 Series
EX3300 Series
SRX300 SRX320
EX2200 Series

14.1 14.2 15.1

–API–
Module
Frequent Releases
x
branch core

One Release Track One OS One Architecture

24
24 © 2016 Juniper Networks, Inc. All rights reserved.
運⽤⾯からみたJUNOSのアドバンテージ

25
導⼊,運⽤,トラブルシュートに有効なJUNOS UTILITY群

JUNOSは導⼊、運⽤、トラブルシュートに有効な様々なツールを提供
•  Commit
•  設定変更を有効にするコマンド
•  check, confirmed, compareなど様々なOptionが使⽤可能

•  Rollback
•  設定の履歴管理,切り戻しを容易にする機能

•  ⾃動化Tool :JUNOScript / Event Policy


•  運⽤を⾃動化するユーティリティ

•  Etc…

26
26 © 2016 Juniper Networks, Inc. All rights reserved.
”Commit & Rollback”
Configurationモードで⾏った設定変更は、Candidate Configurationとして保持され、
”Commit“するまで設定はActive Configurationとして反映されません。
万⼀間違えた場合でも,”rollback“コマンドにてすぐに前の状態に戻ることが可能です。

commit

Candidate Active
configuration configuration

編集中の 稼動中の              
コンフィグファイル コンフィグファイル

1 2 ...
0
rollback n

27 © 2016 Juniper Networks, Inc. All rights reserved.


”Commit & Rollback” (アニメ)
Configurationモードで⾏った設定変更は、Candidate Configurationとして保持され、
”Commit“するまで設定はActive Configurationとして反映されません。
万⼀間違えた場合でも,”rollback“コマンドにてすぐに前の状態に戻ることが可能です。
呼び出したconfigを反映
編集したあとに気が変わったら… commit
いつでも編集を破棄してやり直しが可能 Candidate Configを
Active Configに反映

Candidate
Configuration Active
稼動中の              
Configuration
Active
コマンド2つで 過去のconfigを呼び出し
delete
set 編集中の
xxxxxxxxxx
xxxxxxxxxx
切り戻しが完了!
0
コンフィグファイル
configuration
Candidate Configを編集 コンフィグファイル
set Candidate
delete
xxxxxxxxxx
xxxxxxxxxx
set xxxxxxxxxx
configuration
delete
set xxxxxxxxxx
xxxxxxxxxx
0
delete
set xxxxxxxxxx
xxxxxxxxxx
1 2 ...

rollback n
commitしたあとで
切り戻しが必要になった場合には、 commit時に⾃動的に過去のconfigを保存・世代管理

28 © 2016 Juniper Networks, Inc. All rights reserved.


”Commit & Rollback”
Configurationモードで⾏った設定変更は、Candidate Configurationとして保持され、
”Commit“するまで設定はActive Configurationとして反映されません。
万⼀間違えた場合でも,”rollback“コマンドにてすぐに前の状態に戻ることが可能です。

commit

Candidate Active
configuration configuration

編集中の 稼動中の              
コンフィグファイル コンフィグファイル

1 2 ...
0
rollback n

29 © 2016 Juniper Networks, Inc. All rights reserved.


JUNOS:commit at time オプション
•  設定反映の時間指定(メンテナンスタイムにおける設定反映)
•  commit at xx:xx:xx (time) コマンドでcommitすると、指定した時間に設定
ファイルをActivateすることが可能となります
[edit]
mike@jnpr1# commit at 02:00:00
commit check succeeds
commit will be executed at 2016-02-02 02:00:00 UTC
Exiting configuration mode
mike@jnpr1>

メンテナンスタイムにCommitが⾃動的に実施されるため、
管理者が該当の時間に操作する必要はなし
xxxxx
xxxxx
xxxxx
...

30 © 2016 Juniper Networks, Inc. All rights reserved.


JUNOS:commit confirmed オプション
•  設定の⾃動復旧機能(ヒューマンエラーによるトラブル防⽌のため)
•  commit confirmed コマンドでcommitすると、再度commitしない限り
default10分で元のconfigにrollbackします
–  指定した時間あるいはdefaultの10分以内に2度⽬のcommitを⼊れることで、
configは完全に格納されます
[edit]
[edit]
root@lab# commit confirmed 5
root@lab# commit confirmed 5
commit confirmed will be automatically rolled back in 5 minutes unless                     
commit confirmed will be automatically rolled back in 5 minutes unless                     
confirmed
confirmed
commit complete
commit complete

設定間違いのままcommitしてしまいSSHなどが繋がらなくなってしまった後も、
⼀定時間のあと1つ前のconfigに⾃動復旧するため、リモートデバイスのポリシー変更時などに便利
xxxxx
xxxxx
xxxxx
誤ったアクセスコントロール設定 ...
Remote
WAN

31 © 2016 Juniper Networks, Inc. All rights reserved.


JUNOScriptの概要
•  JUNOScript とはJuniperのネットワーク装置上で動作させることができるスクリプティン
グ機能です。JUNOS⾃体に⼿を加える必要がないため、 JUNOSの安定性を損なうことなく、
ユーザ個別の⾃動化に対する要望に対し柔軟かつ速やかに対応することができます。
•  ⼤別すると、運⽤者が起動するスクリプトである“Commit Script”、“Op Script”とシステム
が起動するスクリプトである“Event Policy”、“Event Script”が存在します。

XSLT / SLAXベースのスクリプト

運⽤者が起動するスクリプト システムが起動するスクリプト
(CLIやProvisioning System) (ルーティングなどのイベント)

Commit Script Op Script Event Policy Event Script


Commit時に起動 運⽤者が起動 システムのイベント Event Policyに
するスクリプト するスクリプト により起動される より起動される
ポリシー スクリプト

32
32 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOS:Event Policy/Script
•  ネットワーク機器上のイベントやタイマーをトリガーとして、コマンドやスクリプトを実⾏
することで、運⽤の⾃動化が可能となります。
•  イベントをトリガーとしたアクションを実⾏(Self-monitor)
•  ルータ上の特定のイベントをトリガーとして、コマンドやスクリプトを実⾏
•  タイマーをトリガーとしたアクションの実⾏
•  インターバル設定や⽇時指定に応じて、コマンドやスクリプトを実⾏

Routing
(rpd) ルータの各コンポーネントのイベントを監視

Chassis
(chassisd) if
イベント監視
プロセス then
eventd rules
ユーザが設定したアクションに応じ
て運⽤コマンド、設定変更、スクリ
プトなどを実⾏
Management
(mgd)

33
33 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOS: JUNOS Automation EXAMPLE
– EVENT base AUTOMATION
デバイスに発⽣したイベントに応じて、
⾃動的に発動されるプログラムを事前に設定しておくことが可能

§  イベントに応じて⾃動的にトラブルシュート⽤のLogを取得
§  イベントに応じて動的なアクションをデバイスに取らせる

event event
program Actions!!
  Event Policyで取り得るアクション
§  イベントを無視
§  ファイルをアップロード
§  オペレーションコマンドの実⾏
§  コンフィグレーションコマンドの実⾏
§  SNMP Trapを送出
§  Event Script の実⾏
§  Etc…
イベントに対する⾃動的なレスポンスにより
ダウンタイムを削減したり必要なLog取得を⾃動的に実⾏することが可能!

34
34 © 2016 Juniper Networks, Inc. All rights reserved.
トレーニング・デバイスへのアクセス⽅法

35
Ethernet Switching "EX/QFX" course
Topology (Lab1) – グループ1 §  管理⽤IP(me0)
: 192.168.1.x/24
EX3400 Group1
.1 .2 •  Tokyo-1: .1
Tokyo-1 Nagoya-1
ge-0/0/2
Tokyo-1
ge-0/0/1 ge-0/0/1
Nagoya-1
ge-0/0/2 •  Nagoya-1: .2
me0 me0
•  Osaka-1: .3
•  Fukuoka-1: .4
ge-0/0/0 ge-0/0/10 ge-0/0/0 ge-0/0/10

MGMT Switch

ge-0/0/0 ge-0/0/10 ge-0/0/0 ge-0/0/10

me0 me0
ge-0/0/2 ge-0/0/2

Osaka-1 ge-0/0/1 ge-0/0/1 Fukuoka-1


.3 .4

36
36 © 2016 Juniper Networks, Inc. All rights reserved.
Ethernet Switching "EX/QFX" course
Topology (Lab1) – グループ2 §  管理⽤IP(me0)
: 192.168.1.x/24
EX3400 Group1
.5 .6 •  Tokyo-1: .5
Tokyo-2 Nagoya-2
ge-0/0/2
Tokyo-1
ge-0/0/1 ge-0/0/1
Nagoya-1
ge-0/0/2 •  Nagoya-1: .6
me0 me0
•  Osaka-1: .7
•  Fukuoka-1: .8
ge-0/0/0 ge-0/0/10 ge-0/0/0 ge-0/0/10

MGMT Switch

ge-0/0/0 ge-0/0/10 ge-0/0/0 ge-0/0/10

me0 me0
ge-0/0/2 ge-0/0/2

Osaka-2 ge-0/0/1 ge-0/0/1 Fukuoka-2


.7 .8

37
37 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOSへのログイン
初期設定状態のEXにアカウントʼrootʼでログインします。
cliコマンドでJUNOSのOperationalモードを起動します。

–  rootアカウントはserial console、またはssh接続時のみ使⽤可能です。
–  今回は事前にIPアドレス, rootパスワード, ssh, telnetを設定済みです。
•  Root Password: Juniper

–  Tera TermからSSHv2接続で接続してください。

--- JUNOS 15.1X49-D50.3 built 2016-05-28 20:02:37 UTC


root@SRX-1% cli
root@SRX-1>

38
38 © 2016 Juniper Networks, Inc. All rights reserved.
CLIモードと各モード間の移動

39
CLI概要 
•  Junos CLIの3つのモード遷移について

Configuration mode # 機器のconfiguration設定


・システム設定
・インタフェース設定
・ルーティング設定
> configure exit ・パケットフィルタリング設定
・ポリシー設定
・SNMP …などその他すべての設定

Operational mode >


機器のステータス確認や基本操作
・show コマンドでの状態表⽰
・ping, raceroute, telnet, clear
% cli exit ・debug (monitor)
・OSアップグレード
・機器のリブート、シャットダウン
FreeBSD
・set コマンドでの⽇時やTerminal表⽰
Shell mode %  ⽅法の設定

40
40 © 2016 Juniper Networks, Inc. All rights reserved.
Operationalモード
• RootユーザでLoginするとShellモード(プロンプトが“%”)に⼊ります
•  “cli”と投⼊することでShellモードからOperational モードへと移⾏します
login: root
Password:

--- JUNOS 15.1X49-D35 built 2016-02-02 07:16:16 UTC


root@%
root@% cli
root>

•  Rootユーザ以外でLoginすると、Operationalモード(プロンプトが>)に⼊ります
•  “start shell”と投⼊することでOperationalモードからShellモードへと移⾏します
login: AAA
Password:

--- JUNOS 15.1X49-D35 built 2016-02-02 07:16:16 UTC


AAA>
AAA> start shell
%

41
41 © 2016 Juniper Networks, Inc. All rights reserved.
Operationalモード

•  Operationalモードではステータスの確認やシステム操作などに
⽤いるコマンドを提供しています。
clear Clear information in the system
configure Manipulate software configuration information
file Perform file operations
help Provide help information
monitor Show real-time debugging information
mtrace Trace multicast path from source to receiver
op Invoke an operation script
ping Ping remote target
quit Exit the management session
request Make system-level requests
restart Restart software process
set Set CLI properties, date/time, craft interface message
show Show system information
ssh Start secure shell on another host
start Start shell
telnet Telnet to another host
test Perform diagnostic debugging
traceroute Trace route to remote host

42
42 © 2016 Juniper Networks, Inc. All rights reserved.
Operationalモード

•  コマンドは階層構造になっています
•  例: 経路情報(簡易版)を確認
clear configure monitor set show 確認コマンド ⼤項⽬

bgp chassis interfaces isis ospf route version 経路情報

brief exact protocol table terse 簡易版 ⼩項⽬

root> show route terse


inet.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

A V Destination P Prf Metric 1 Metric 2 Next hop AS path


* 0.0.0.0/0 S 5 >172.27.112.1
* 172.27.112.0/22 D 0 >ge-0/0/0.0
* 172.27.113.19/32 L 0 Local

43
43 © 2016 Juniper Networks, Inc. All rights reserved.
Configurationモード
•  Operationalモードにてconfigureと投⼊することでConfigurationモード
へ移⾏します

root@lab> configure
Entering configuration mode
[edit]
root@lab#

•  他のユーザがconfigurationモードに⼊っていれば、以下の様に表⽰されます

root@lab> configure
Entering configuration mode
Current configuration users:
fbrooks terminal d0 on since 1999-10-14 07:11:29 UTC,
idle 00:00:49 [edit protocols ospf]
The configuration has been changed but not committed
[edit]
root@lab#

44
44 © 2016 Juniper Networks, Inc. All rights reserved.
Configurationモード:オプション
•  configure private コマンドを使⽤すると、ログインユーザー専⽤のcandidate
configurationが⽤意される Candidate 1

mike@jnpr1> configure private


warning: uncommitted changes will be discarded on exit
Entering configuration mode
user 1 Active
Config

user 2
Candidate 2

•  configure exclusive コマンドを使⽤すると、ログインユーザーが設定変更を


⾏っている最中に他のログインユーザーが設定変更を⾏うことを禁⽌すること
が可能
Candidate
mike@jnpr1> configure exclusive
warning: uncommitted changes will be discarded on exit
Entering configuration mode user 1 Active
Config
X
Commit 不可
user 2
45
45 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOS CLI操作
〜Operationalモード〜

46
show コマンド

•  showコマンド: システム、ステータスに関する情報を表⽰します

> show arp :ARPテーブルを確認する


> show chassis environment :温度、ファンなどの環境状態を確認する
> show chassis hardware :ハードウェア情報(シリアルナンバー等)を確認する
> show chassis routing-engine :ルーティングエンジン(CPUやMemory)の状態を確認する
> show configuration :稼働中の設定を確認する
> show interfaces :Interfaceの状態を確認する
> show route :経路情報を確認する
> show system uptime :稼働時間を確認する
> show system users :ユーザのログイン状況を確認する
> show system alarms :システムアラームの有無を確認する
> show version :JUNOSソフトウェアバージョンを確認する

47
47 © 2016 Juniper Networks, Inc. All rights reserved.
show コマンド: オプション

•  showコマンドではterse, brief, detail, もしくはextensiveオプションを使⽤


することで確認できる情報量を選択することができます。

•  terse, briefのオプションはオプションなしの出⼒結果と⽐べ、より簡易的な
情報を表⽰させます。

•  detail, extensiveのオプションはオプションなしの際と⽐べ、より詳細な情報
を表⽰させます。

48
48 © 2016 Juniper Networks, Inc. All rights reserved.
show コマンド: オプション

> show interfaces ge-0/0/0 terse


> show interfaces ge-0/0/0 terse
Interface Admin Link Proto Local Remote
ge-0/0/0 up up

> show interfaces ge-0/0/0 brief


> show interfaces ge-0/0/0 brief
Physical interface: ge-0/0/0, Enabled, Physical link is Up
Link-level type: Ethernet, MTU: 1514, Speed: Auto, Duplex: Auto, Loopback: Disabled, Source filtering:
Disabled, Flow control: Enabled, Auto-negotiation: Enabled, Remote fault: Online, Media type: Copper,
IEEE 802.3az Energy Efficient Ethernet: Disabled
Device flags : Present Running
Interface flags: SNMP-Traps Internal: 0x4000
Link flags : None

49
49 © 2016 Juniper Networks, Inc. All rights reserved.
show コマンド: オプション
> show interfaces ge-0/0/2 (オプションなし)
> show interfaces ge-0/0/0
Physical interface: ge-0/0/0, Enabled, Physical link is Up
Interface index: 139, SNMP ifIndex: 504
Link-level type: Ethernet, MTU: 1514, Speed: Auto, Duplex: Auto, BPDU Error: None, MAC-REWRITE Error:
None, Loopback: Disabled, Source filtering: Disabled, Flow control: Enabled, Auto-negotiation: Enabled,
Remote fault: Online, Media type: Copper, IEEE 802.3az Energy Efficient Ethernet: Disabled
Device flags : Present Running
Interface flags: SNMP-Traps Internal: 0x4000
Link flags : None
CoS queues : 8 supported, 8 maximum usable queues
Current address: 5c:5e:ab:7e:75:c3, Hardware address: 5c:5e:ab:7e:75:c3
Last flapped : 2016-02-16 18:44:29 JST (8w1d 17:33 ago)
Input rate : 0 bps (0 pps)
Output rate : 0 bps (0 pps)
Active alarms : None
Active defects : None
Interface transmit statistics: Disabled

50
50 © 2016 Juniper Networks, Inc. All rights reserved.
show コマンド: オプション
> show interfaces ge-0/0/0 detail
> show interfaces ge-0/0/0 detail
Physical interface: ge-0/0/0, Enabled, Physical link is Up
Interface index: 139, SNMP ifIndex: 504, Generation: 142
Link-level type: Ethernet, MTU: 1514, Speed: Auto, Duplex: Auto, BPDU Error: None, MAC-REWRITE Error: None, Loopback: Disabled, Source filtering: Disabled, Flow
control: Enabled, Auto-negotiation: Enabled,
Remote fault: Online, Media type: Copper, IEEE 802.3az Energy Efficient Ethernet: Disabled
Device flags : Present Running
Interface flags: SNMP-Traps Internal: 0x4000
Link flags : None
CoS queues : 8 supported, 8 maximum usable queues
Hold-times : Up 0 ms, Down 0 ms
Current address: 5c:5e:ab:7e:75:c3, Hardware address: 5c:5e:ab:7e:75:c3
Last flapped : 2016-02-16 18:44:29 JST (8w1d 17:37 ago)
Statistics last cleared: Never
Traffic statistics:
Input bytes : 995586 0 bps
Output bytes : 1473366 0 bps
Input packets: 10870 0 pps
Output packets: 15732 0 pps
IPv6 transit statistics:
Input bytes : 0
Output bytes : 0
Input packets: 0
Output packets: 0
Egress queues: 8 supported, 4 in use
Queue counters: Queued packets Transmitted packets Dropped packets
0 best-effort 0 9262 0
1 assured-forw 0 0 0
5 expedited-fo 0 0 0
7 network-cont 0 6470 0
Queue number: Mapped forwarding classes
0 best-effort
1 assured-forwarding
5 expedited-forwarding
7 network-control
Active alarms : None
Active defects : None
Interface transmit statistics: Disabled

51
51 © 2016 Juniper Networks, Inc. All rights reserved.
show コマンド: オプション
> show interfaces ge-0/0/0
extensive
> show interfaces ge-0/0/0 extensive
Physical interface: ge-0/0/0, Enabled, Physical link is Up
Queue number:
0
Mapped forwarding classes
best-effort
Interface index: 139, SNMP ifIndex: 504, Generation: 142 1 assured-forwarding
Link-level type: Ethernet, MTU: 1514, Speed: Auto, Duplex: Auto, BPDU Error: None, MAC- 5 expedited-forwarding
REWRITE Error: None, Loopback: Disabled, Source filtering: Disabled, Flow control: Enabled, 7 network-control
Auto-negotiation: Enabled, Active alarms : None
Remote fault: Online, Media type: Copper, IEEE 802.3az Energy Efficient Ethernet: Active defects : None
Disabled MAC statistics: Receive Transmit
Device flags : Present Running Total octets 995586 1473366
Interface flags: SNMP-Traps Internal: 0x4000 Total packets 10870 15732
Link flags : None Unicast packets 8989 9262
CoS queues : 8 supported, 8 maximum usable queues Broadcast packets 1876 1872
Hold-times : Up 0 ms, Down 0 ms Multicast packets 5 4598
Current address: 5c:5e:ab:7e:75:c3, Hardware address: 5c:5e:ab:7e:75:c3 CRC/Align errors 0 0
Last flapped : 2016-02-16 18:44:29 JST (8w1d 17:40 ago) FIFO errors 0 0
Statistics last cleared: Never MAC control frames 0 0
Traffic statistics: MAC pause frames 0 0
Input bytes : 995586 0 bps Oversized frames 0
Output bytes : 1473366 0 bps Jabber frames 0
Input packets: 10870 0 pps Fragment frames 0
Output packets: 15732 0 pps Code violations 0
IPv6 transit statistics: Autonegotiation information:
Input bytes : 0 Negotiation status: Complete
Output bytes : 0 Link partner:
Input packets: 0 Link mode: Full-duplex, Flow control: Symmetric, Remote fault: OK,
Output packets: 0 Link partner Speed: 1000 Mbps
Input errors: Local resolution:
Errors: 0, Drops: 0, Framing errors: 0, Runts: 0, Policed discards: 0, L3 incompletes: Flow control: Symmetric, Remote fault: Link OK
0, L2 channel errors: 0, L2 mismatch timeouts: 0, FIFO errors: 0, Resource errors: 0 Packet Forwarding Engine configuration:
Output errors: Destination slot: 0 (0x00)
Carrier transitions: 3, Errors: 0, Drops: 0, Collisions: 0, Aged packets: 0, FIFO CoS information:
errors: 0, HS link CRC errors: 0, MTU errors: 0, Resource errors: 0 Direction : Output
Egress queues: 8 supported, 4 in use CoS transmit queue Bandwidth Buffer Priority
Queue counters: Queued packets Transmitted packets Dropped packets Limit
0 best-effort 0 9262 0 % bps % usec
1 assured-forw 0 0 0 0 best-effort 95 950000000 95 NA low
5 expedited-fo 0 0 0 none
7 network-cont 0 6470 0 7 network-control 5 50000000 5 NA low
none
Interface transmit statistics: Disabled

52
52 © 2016 Juniper Networks, Inc. All rights reserved.
コンソール画⾯出⼒に関する操作
•  画⾯に ---(more)--- promptが表⽰されているときは
以下のキーで操作します > show configuration
## Last commit: 2016-04-12 17:41:17 JST by lab
version 12.3X48-D20.4;
Space: 次画⾯に進む groups {
b: 前画⾯に戻る Japan_ENT_POC {
system {
d: ½画⾯進む host-name mino_srx240;
Enter: 1⾏進む backup-router 172.27.112.1;
time-zone Asia/Tokyo;
/string: 検索 dump-on-panic;
n: 再検索 root-authentication {
encrypted-password
q: プロンプトに戻る(出⼒のAbort) "$1$YrXW4H1t$0Ry0FagjB/wMKbVM1izGf/"; ## SECRET-DATA
h: これらキーヘルプの表⽰ }
name-server {
208.67.222.222;
208.67.220.220;
}
login {
user lab {
uid 2000;
class super-user;
authentication {
---(more)---

53
53 © 2016 Juniper Networks, Inc. All rights reserved.
コンソール画⾯出⼒に関する操作 | no-more
•  通常、出⼒はCLIのスクリーンサイズを考慮して⾏われます。出⼒内容が多い場合、CLI画⾯
に---(more)---を表⽰し、出⼒を⼀時停⽌します。ログ取得時などは“ | no-more” オプ
ションを使⽤し、全て⼀度に表⽰することが可能です

[edit]
root@lab> show configuration | no-more
## Last commit: 2016-01-25 11:25:54 JST by root
version 10.4R7.5;
groups {
Japan_team {
system {
backup-router 172.16.1.1;
time-zone Asia/Tokyo;
dump-on-panic;
root-authentication {
encrypted-password "$1$YrXW4H1t$0Ry0FagjB/wMKbVM1izGf/";
## SECRET-DATA
}
login {
user lab {
uid 2000;
"$1$4TDfGIs7$.wTBpcNviWRCebbvcSLzv."; ## SECRET-DATA
:

54
54 © 2016 Juniper Networks, Inc. All rights reserved.
パイプ “|” オプションの利⽤
•  Unix同様のパイプ ”|” をサポート。configやshowコマンド等で有効利⽤
•  root@lab> show configuration | display set
•  root@lab> show log messages | no-more
•  root@lab> show route | find 192.168.1.0
•  root@lab# show interface | save interface_config.txt

root@lab> show configuration | ?


Possible completions:
compare Compare configuration changes with prior version
count Count occurrences
display Show additional kinds of information
except Show only text that does not match a pattern
find Search for first occurrence of pattern
hold Hold text without exiting the --More-- prompt
last Display end of output only
match Show only text that matches a pattern
no-more Don't paginate output
request Make system-level requests
resolve Resolve IP addresses
save Save output text to file
trim Trim specified number of columns from start of line

55
55 © 2016 Juniper Networks, Inc. All rights reserved.
パイプ “|” 使⽤例
•  Configurationの表⽰⽅法を変更する
•  階層表記に加え、⾏単位での表⽰も可能

root@EX2200C> show configuration protocols dot1x |display set


root@EX2200C> show configuration protocols dot1x
traceoptions { set protocols dot1x traceoptions file 1x
file 1x; set protocols dot1x traceoptions flag all
flag all; set protocols dot1x authenticator authentication-profile-name
} dot-1x
authenticator { set protocols dot1x authenticator interface ge-0/0/0.0
authentication-profile-name dot-1x; supplicant single-secure
interface { set protocols dot1x authenticator interface ge-0/0/0.0
ge-0/0/0.0 { reauthentication 3600
supplicant single-secure; set protocols dot1x authenticator interface ge-0/0/3.0
reauthentication 3600; supplicant single-secure
} set protocols dot1x authenticator interface
ge-0/0/3.0 {
supplicant single-secure;

状況に応じ、お好みの表記⽅法を選択可能
56
56 © 2016 Juniper Networks, Inc. All rights reserved.
パイプ “|” 使⽤例
•  Configurationの⼀部を保存する
•  稼働中のconfigurationの⽅法
Operationalモードにてshow configuration | save <出⼒先+ファイル名>

> show configuration | save ftp://abc@172.xx.xxx.xx/Ex_config FTPサーバへ出⼒


Password for abc@172.xx.xxx.xx:
ftp://abc@172.xx.xxx.xx/mx_config 100% of 7928 B 30 MBps
Wrote 352 lines of output to 'ftp://abc@172.xx.xxx.xx/Ex_config'

•  編集中のconfigurationの出⼒⽅法
Configurationモードにてsave <出⼒先+ファイル名>

# save /config/EDITING-CONFIG /config/へ出⼒


Wrote 232 lines of configuration to '/config/EDITING-CONFIG'

※保存先を指定しない場合、userのhome directoryに出⼒されます
57
57 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOSファイルシステムの構成について
•  JUNOSでは各種構成ファイルやLogファイルなどをファイルシステム上のディレ
クトリに管理しています

/config
使⽤中のコンフィグレーションと過去3世代までのコンフィグレーションを格納。

/var/db/config
4世代以降のコンフィグレーションを格納。gz形式に圧縮されて保存されているがfile showコマンドで表⽰可能。FreeBSDではzcatコマンドで表⽰可能。

/var/tmp
JUNOSソフトウェアアップグレード時など、image格納するディレクトリ。また、各デーモンのコアダンプファイルを格納。

/var/log
各種LogやTrace option機能にて取得したデバッグ情報ファイルを格納。

/var/home
各ユーザのホームディレクトリが作成される。
各ユーザがローカルに保存した情報は全て各ユーザのホームディレクトリに格納する。
例えば、現在使⽤中のコンフィグをsaveコマンドにて保存した場合など
58
58 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOSファイルシステムの構成について
•  各ディレクトリに格納しているファイルの確認⽅法
> file list / <directory>/
root> file list /var/home/ /var/home配下の情報を表⽰
/var/home/: ユーザ(SAMPLE)のホームディレクトリが作成されている
SAMPLE/

root> file list /var/home/SAMPLE/ /var/home/SAMPLE配下の情報を表⽰


/var/home/SAMPLE/: ユーザ(SAMPLE)が作成したTEST_CONFIGが保存されている
TEST_CONFIG

•  ディレクトリ配下のファイル内容の確認⽅法
> file show /<directory>/<file_name>
root> file show /var/home/SAMPLE/TEST_CONFIG ユーザ(SAMPLE)が作成した
## Last changed: 2016-03-30 17:34:10 UTC TEST_CONFIGを確認
version 12.3X48-D25.3;
system {
root-authentication {
encrypted-password "$1$73UgjTsC$EznYXp/4DfJIRTI6KnFYE1"; ## SECRET-DATA

~~~~~~~~~~~~~~~~~~~~~~~~~以下省略~~~~~~~~~~~~~~~~~~~~~~~~~~

59
59 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOS運⽤管理コマンド
•  JUNOSでは運⽤管理に必要な機能をサポートしています。
•  Ping
•  Traceroute
•  telnet / ssh
•  Monitor

Ping : ネットワークの疎通確認をする
>ping アドレス + オプション
例: 172.27.112.1へ512 byteのpingを3回実施
root> ping 172.27.112.1 count 3 size 512
PING 172.27.112.1 (172.27.112.1): 512 data bytes
520 bytes from 172.27.112.1: icmp_seq=0 ttl=64 time=1.037 ms
520 bytes from 172.27.112.1: icmp_seq=1 ttl=64 time=0.704 ms
520 bytes from 172.27.112.1: icmp_seq=2 ttl=64 time=0.741 ms

--- 172.27.112.1 ping statistics ---


3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.704/0.827/1.037/0.149 ms

60
60 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOS運⽤管理コマンド
Traceroute : ネットワークの経路確認をする
>traceroute アドレス + オプション
例: 8.8.8.8へge-0/0/0からtrace routeを実施
> traceroute 8.8.8.8 interface ge-0/0/0
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 40 byte packets
1 172.27.112.2 (172.27.112.2) 4.394 ms 1.814 ms 2.209 ms
(snip)
13 google-public-dns-a.google.com (8.8.8.8) 4.276 ms 4.286 ms 4.063 ms

Telnet / SSH : ネットワークに接続された機器を操作する


>telnet アドレス + オプション
例: 172.27.112.161: port 23へtelnetを実施
> telnet 172.27.112.161 port 23
Trying 172.27.112.161...
Connected to 172.27.112.161.
Escape character is '^]'.

srx300beta (ttyp0)

login:

61
61 © 2016 Juniper Networks, Inc. All rights reserved.
monitor コマンド
•  monitorコマンド: 現在のI/F別トラフィック状況を表⽰します
•  > monitor interface traffic

各Interfaceのトラフィックをリアルタイム表⽰する

Bytes=b, Clear=c, Delta=d, Packets=p, Quit=q or ESC, Rate=r, Up=^U, Down=^D


Interface Link Input packets (pps) Output packets (pps)
ge-0/0/0 Down 0 (0) 0 (0)
gr-0/0/0 Up 0 (0) 0 (0)
ip-0/0/0 Up 0 (0) 0 (0)
lsq-0/0/0 Up 0 (0) 0 (0)
lt-0/0/0 Up 0 (0) 0 (0)
mt-0/0/0 Up 0 (0) 0 (0)
sp-0/0/0 Up 0 (0) 0 (0)
ge-0/0/1 Down 0 (0) 0 (0)
(snip)

62
62 © 2016 Juniper Networks, Inc. All rights reserved.
requestコマンド
•  requestコマンド: システムの挙動に関するコマンドを実⾏します
•  システムを再起動する
> request system reboot

•  システムをシャットダウンする
> request system power-off

•  初期化する
> request system zeroize

•  サポートに必要な情報を取得する
> request support information

•  基本となるConfigurationファイルを保存する(rescue configの保存)
> request system configuration rescue save

•  OSをアップグレードする
> request system software add <ファイル名>

63
63 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOSのソフトウエアアップグレード
•  ソフトウエアアップグレード⼿順
1.  対象のJUNOS OSをダウンロードする。

https://www.juniper.net/support/downloads/group/?f=junos

2.  CLIコマンドでJUNOSソフトウェアを
FTP/TFTPサーバからデバイス(/var/tmp)に保存
root> file copy ftp://abc@172.xx.xxx.xx/jinstall-
> file copy ftp://ログインID@アドレス/JUNOSパッケージ名/var/tmp ex-4200-11.4R1.6-domestic-signed.tgz /var/tmp
Password for abc@172.xx.xxx.xx:
/var/tmp//...transferring.file.........TfBx6L/100% of
3.  デバイスに保存したパッケージをロード 381 MB 8099 kBps 00m00s

root> request system software add /var/tmp/ jinstall-


> request system software add /var/tmp/JUNOSパッケージ名
ex-4200-11.4R1.6-domestic-signed.tgz
NOTICE: Validating configuration against jinstall-
4.  再起動する ex-4200-11.4R1.6-domestic-signed.tgz.
(snip)

> request system reboot root> request system reboot


   

64
64 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOS CLI操作
〜Configurationモード〜

65
commit コンセプト(アニメ)
•  Configurationモードに⼊ると編集⽤configが⽤意されます
•  設定変更はすべて編集⽤のconfig上にのみ投⼊
•  commit コマンドでactive configに反映されます

Candidate
Active
Configuration
commit AAA
BBB
CCC
DDD DDD

Active Configのコピー

66
66 © 2016 Juniper Networks, Inc. All rights reserved.
commit コンセプト
•  Configurationモードに⼊ると編集⽤configが⽤意されます
•  設定変更はすべて編集⽤のconfig上にのみ投⼊
•  commit コマンドでactive configに反映されます

Candidate Active
Configuration Configuration
AAA commit AAA
BBB BBB
CCC CCC
DDD DDD

Active Configのコピー

67
67 © 2016 Juniper Networks, Inc. All rights reserved.
rollback コンセプト(アニメ)
•  commit実⾏時に、現在稼働中のconfigが履歴として⾃動的に保存されま

•  commit前の状態に戻すときは、rollback 1 コマンドで1世代前をロード
•  再度commit コマンドを実⾏して、active configに反映

Candidate rollback
Active 1
Configuration Configuration
AAA commit AAA
AAA
BBB BBB
BBB
CCC CCC
CCC
DDD DDD
DDD
0世代

rollback 2
rollback 1 Configuration
AAA
BBB
CCC

1〜49世代

68
68 © 2016 Juniper Networks, Inc. All rights reserved.
rollback コンセプト
•  commit実⾏時に、現在稼働中のconfigが履歴として⾃動的に保存されま

•  commit前の状態に戻すときは、rollback 1 コマンドで1世代前をロード
•  再度commit コマンドを実⾏して、active configに反映

Candidate Active
Configuration Configuration
AAA commit AAA
BBB BBB
CCC CCC
DDD DDD
0世代

rollback 1 rollback 2
rollback 1 Configuration Configuration
AAA AAA
BBB BBB
CCC CCC
DDD
1世代 2世代
1〜49世代

69
69 © 2016 Juniper Networks, Inc. All rights reserved.
設定の追加(set)
•  set コマンド:設定の追加変更を⾏います
•  Commitするまでは設定は反映されません。

user@lab# set interface ge-0/0/1 disable

•  Commitすることで初めて動作しているデバイスに設定追加の変更が反映されます。

user@lab# commit
configuration check succeeds

commit complete

70
70 © 2016 Juniper Networks, Inc. All rights reserved.
設定の変更(delete)
•  delete コマンド:設定の削除変更を⾏います
•  Commitするまでは設定は反映されません。

user@lab# delete interface ge-0/0/1 disable

•  やはりCommitすることで動作しているデバイスに設定削除の変更が反映されます。

user@lab# commit
configuration check succeeds

commit complete

71
71 © 2016 Juniper Networks, Inc. All rights reserved.
編集中の設定確認(show | compare)
•  show | compare コマンド:編集中の設定と稼動中の設定を⽐較します
user@lab# set interfaces ge-0/0/0 unit 0 family inet address 192.168.1.1/24
user@lab# show | compare
[edit interfaces]
+ ge-0/0/0 {
+ unit 0 { Active configと⽐較して、ge-0/0/0にIPアドレスが追加されている
+ family inet { +:追加
+ address 192.168.1.1/24; ー:削除
+ }
+ }
+ }

•  過去のconfigと編集中の設定を⽐較することも可能
user@lab# show | compare rollback [1-49]

Candidate Active
Configuration Configuration
# show | compare
(rollback 0)

72
72 © 2016 Juniper Networks, Inc. All rights reserved.
設定ファイルの復旧(rollback)
•  rollback コマンド:設定ファイルの復旧を⾏います
•  変更した設定ファイルを破棄したい場合は、Rollbackコマンドを投⼊します。(rollbackはrollback 0の略)

user@lab# rollback

•  rollback n(0-49)でファイル番号を指定すると、過去の設定をCandidate Configにコピーすることが可能


で、容易に過去の状態に戻すことが可能です。(過去50世代分の設定ファイルを⾃動保存)

user@lab# rollback ?
Possible completions: <[Enter]> Execute this command
0 2016-07-14 08:41:21 JST by root via cli
1  2016-07-13 16:01:54 JST by root via cli
2  2016-07-13 15:59:51 JST by root via cli
3  2016-07-13 15:57:33 JST by root via cli
4  2016-07-13 15:57:20 JST by root via cli commit confirmed, rollback in 2mins
5  2016-07-12 15:21:37 JST by lab via netconf
6  2016-07-08 16:35:39 JST by lab via cli
7  2016-06-22 19:30:53 JST by lab via cli
8  2016-06-22 19:28:39 JST by lab via cli
9  2016-06-22 19:28:18 JST by lab via cli
…(snip)

73
73 © 2016 Juniper Networks, Inc. All rights reserved.
commit オプション(commit confirmed / at)
•  commit confirmed コマンド:⼀時的に設定を反映します
•  変更を確定する場合は、時間内にcommitを実⾏します
•  デフォルトでは10分(指定可能)
•  時間までにcommitされなければ、⾃動的にcommit前の状態に戻る

user@lab# commit confirmed 5


configuration check succeeds
commit confirmed will be automatically rolled back in 5 minutes unless confirmed
commit complete

# commit confirmed will be rolled back in 5 minutes

•  commit at コマンド:⽇時を指定してcommitの実⾏を予約します
•  hh:mm:[ss] または “yyyy-mm-dd hh:mm:[ss]”
user@lab# commit at "2016-04-20 00:00"
configuration check succeeds
commit at will be executed at 2016-04-20 00:00:00 JST
Exiting configuration mode

※予約をキャンセルしたいときは、Operationalモードからclear system commit コマンドを実⾏


74
74 © 2016 Juniper Networks, Inc. All rights reserved.
Configurationのロード(load)
•  load コマンド:configurationファイルをロードします
•  loadコマンドはいくつかのオプションがあります
•  load factory-default ⼯場出荷時のconfigをロード
•  load override <filename> ロードしたconfigによる置き換え
•  load merge <filename> ロードしたconfigを追加

user@lab# load ?
Possible completions:
factory-default Override existing configuration with factory default
merge Merge contents with existing configuration
override Override existing configuration
patch Load patch file into configuration
replace Replace configuration data
set Execute set of commands on existing configuration
update Update existing configuration

•  configファイルは外部のFTPサーバや機器内ディレクトリからロードすることも可能
user@lab# load merge /var/tmp/saved_config.txt
user@lab# load merge ftp://user:passwd@192.168.1.1/saved_config.txt

75
75 © 2016 Juniper Networks, Inc. All rights reserved.
Configurationのロード(load set terminal)
•  load set terminal コマンド:CLIで追加のsetコンフィグを貼り付けるときに使⽤
•  setコマンドの⼤量コピー&ペースト時にconfigのとりこぼしが防げます

user@lab# load set terminal


[Type ^D at a new line to end input]
set services security-intelligence profile feeds-cc-p1 category CC
set services security-intelligence profile feeds-cc-p1 default-rule then action permit
set services security-intelligence profile feeds-cc-p1 default-rule then log
set services security-intelligence profile Inf-hosts category Infected-Hosts
set services security-intelligence profile Inf-hosts default-rule then action permit
set services security-intelligence profile Inf-hosts default-rule then log 貼り付けたいconfigを
set services security-intelligence policy pol-cc CC feeds-cc-p1 terminal上でペースト
し、最後に改⾏してか
set services security-intelligence policy pol-cc Infected-Hosts Inf-hosts
らCTRL+Dを押して読
set services advanced-anti-malware policy skyatp_test match application HTTP み込む
set services advanced-anti-malware policy skyatp_test match verdict-threshold 3
set services advanced-anti-malware policy skyatp_test then action permit キャンセルしたい場合
はCTRL+Cで抜ける
set services advanced-anti-malware policy skyatp_test then notification log
set services advanced-anti-malware policy skyatp_test inspection-profile test
set services advanced-anti-malware policy skyatp_test fallback-options action permit
set services advanced-anti-malware policy skyatp_test fallback-options notification log
set services advanced-anti-malware policy skyatp_test whitelist-notification log
set services advanced-anti-malware policy skyatp_test blacklist-notification log
CTRL+D load complete

76
76 © 2016 Juniper Networks, Inc. All rights reserved.
Configurationのロード(load merge terminal)
•  load merge terminal コマンド:CLIで追加のconfigを貼り付けるときに使⽤
•  ⼤量のコピー&ペースト時にもconfigのとりこぼしが防げます、最上位の階層から追加の
configを投⼊する階層までのパスが全部必要です
•  relative オプションを付けると今いる階層に応じてconfigの階層もショートカットされます
[edit] [edit protocols ospf]
user@lab# load merge terminal lab# load merge terminal relative
[Type ^D at a new line to end input] [Type ^D at a new line to end input]
protocols { area 0.0.0.0 {
ospf { interface xe-1/0/0.0;
export static-route; }
area 0.0.0.0 { area 0.0.0.1 {
interface ge-0/0/0.0; stub default-metric 10 no-summaries;
interface ge-0/0/1.0; area-range 192.168.16.0/20;
interface ge-0/0/2.0; interface ge-0/0/3.0;
interface lo0.0 { }
passive; area 0.0.0.2 {
protocols ospfの階層
} interfaces, protocolsや nssa { に移動しareaのconfig
} policy-optionsなど最上位 default-lsa { だけ追加
} の構⽂から記述していく default-metric 20;
} metric-type 1; protocols { ospf { の
policy-options { type-7; 記述は不要
policy-statement static-route { }
from { no-summaries;
protocol static; area-range 172.16.12.0/22;
route-filter 10.1.1.0/24 longer; }
} area-range 192.168.48.0/20;
then accept; }
} load complete
} CTRL+D
CTRL+D load complete
77
77 © 2016 Juniper Networks, Inc. All rights reserved.
Configurationモード:コマンドサマリー
•  設定&確認コマンド
•  set : パラメータを設定する際に使⽤します
•  delete : パラメータを削除する際に使⽤します
•  show : 設定した内容を確認します
•  show | compare : 編集中のconfigと稼働中のconfigを⽐較します

•  設定反映コマンド
•  commit : 編集した設定をactive configに反映させます
•  rollback : 過去のconfigをロードして編集内容を元に戻します
•  load : 設定したファイルをロードする際に使⽤します

78
78 © 2016 Juniper Networks, Inc. All rights reserved.
便利なショートカットキー
•  カーソルの移動
Ctrl-B 1⽂字戻る
Ctrl-F 1⽂字進む
Ctrl-A ⾏頭に移動
Ctrl-E ⾏末に移動
•  ⽂字の削除
Delete/Backspace カーソル前の1⽂字を削除
Ctrl-D カーソル後の1⽂字を削除
Ctrl-K カーソルから⾏末までを削除
Ctrl-U ⾏をすべて削除
Ctrl-W 現在⼊⼒途中の単語または、カーソルより左側の1単語を削除
•  その他
Ctrl-P or ↑ コマンド履歴の前を表⽰
Ctrl-N or ↓ コマンド履歴の次を表⽰
? 次に⼊⼒すべきコマンドやパラメータのヒント

79
79 © 2016 Juniper Networks, Inc. All rights reserved.
コマンド補完と構⽂エラー
•  コマンド補完機能
•  Spaceキー/ Tabキー:固定値を補完
•  Tabキーはユーザが定義したpolicy名やFilter名の補完も可能

user@lab# set interfaces ge-0/0/0 unit 0 family inet filter input ?


Possible completions:
TEST [firewall family inet filter]

user@lab# set interfaces ge-0/0/0 unit 0 family inet filter input T[tab]

•  構⽂エラーの通知
•  構⽂に誤りがあるとsyntax errorと表⽰される
•  ^ マークはエラーとなる項⽬を⽰す
user@lab# load replase
^
syntax error, expecting <command>.

80
80 © 2016 Juniper Networks, Inc. All rights reserved.
Configurationモード: Operationalモードのコマンドを実⾏
•  runコマンドにより、Configurationモードにおいてshowコマンド等を実⾏し、
status等確認することができます
•  Operationalモードで確認可能な全てのコマンドの実⾏が可能
•  Operationalモードに戻る必要なし

runコマンドを使⽤し、interfaceの状態を確認 interfaceの設定を確認

root@lab# run show interfaces root@lab# show interfaces


Physical interface: ge-0/0/0, Enabled, Physical link is Up ge-0/0/0 {
Interface index: 134, SNMP ifIndex: 508 unit 0;
Link-level type: Ethernet, MTU: 1514, Link-mode: Full-duplex, Speed: }
100mbps, ge-0/0/1 {
BPDU Error: None, MAC-REWRITE Error: None, Loopback: Disabled, unit 0 {
Source filtering: Disabled, Flow control: Disabled, Auto- family ethernet-
negotiation: Enabled, switching {
Remote fault: Online vlan {
Device flags : Present Runnin members
vlan-trust;
(snip)
(snip)

81
81 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOSシステム設定

82
システム設定
•  JUNOSデバイスのシステムに関する主な設定
•  ユーザ設定
•  ホスト名の設定
•  時刻設定
•  DNS設定
•  デバイスのサービス設定
•  管理インタフェース設定
•  ログの設定
•  SNMP設定

83
83 © 2016 Juniper Networks, Inc. All rights reserved.
システム設定
•  ユーザ設定
•  rootユーザのパスワードを設定
root# set system root-authentication plain-text-password
New password:
Retype new password:

•  rootユーザ以外のユーザアカウントを作成
•  デフォルトでは3つのユーザクラスを選択可能
•  read-only :view(show コマンドなど)
•  operator :clear, network, reset, trace, view(デーモンの停⽌, ping/telnet, etc)
•  super-user:all(すべて)
root# set system login user TEST class super-user authentication plain-text-password
New password:
Retype new password:

84
84 © 2016 Juniper Networks, Inc. All rights reserved.
システム設定
•  ホスト名の設定
root# set system host-name LAB

•  時刻設定
•  Time zoneを指定する
root# set system time-zone Asia/Tokyo

•  NTPサーバを指定する
root# set system ntp server 10.10.10.100

•  DNS設定
root# set system name-server 192.168.1.100

85
85 © 2016 Juniper Networks, Inc. All rights reserved.
システム設定
•  デバイスのサービス設定
•  telnet, sshによるアクセスを有効にする
root# set system services telnet
root# set system services ssh
root# set system services ssh root-login allow RootユーザとしてSSHでログインしたい場合に設定

•  FTP, netconfのサービスを有効にする
root# set system services ftp
root# set system services netconf ssh

86
86 © 2016 Juniper Networks, Inc. All rights reserved.
システム設定
•  管理インタフェース設定
•  例1:EXの管理インタフェース(me0)を設定
root# set interfaces me0 unit 0 family inet address 192.168.1.1/24

•  例2:MX, SRXの管理インタフェース(fxp0)を設定
root# set interfaces fxp0 unit 0 family inet address 192.168.1.1/24

EX3400 rear view SRX340 front view

me0

fxp0

※管理ポートは、
MX/SRXは”FXP0”、EXは”ME0”、QFXは”EM0”、 EX/QFXのVCでは”VME(Virtual ME)”と命名されています。
Branch SRXのLow End(SRX300/320)など、Out of Bandの管理ポートが存在しないモデルもあります。

87
87 © 2016 Juniper Networks, Inc. All rights reserved.
システム設定
•  ログの設定
•  syslogサーバ、ファシリティ、ログレベルを指定
•  例:すべてのレベルのログを10.10.10.1へ送信する
root# set system syslog host 10.10.10.1 any any

■Syslogレベルについて
⾼ emergency: ソフトウェアコンポーネントの機能停⽌を招く状況のメッセージ
alert: データベースなどのデータ破損など、直ちに修復が必要な状況のメッセージ
critical: 物理的なエラーなど重⼤な問題がある状況のメッセージ
error: 上記よりも深刻度の低いエラー状況のメッセージ
warning: モニタリングの必要性がある状況のメッセージ
notice: エラーではないが、特別な処理が必要となる可能性がある状況のメッセージ
info: 対象のイベントまたは⾮エラー状況のメッセージ
低 any: すべてのレベルのメッセージ

88
88 © 2016 Juniper Networks, Inc. All rights reserved.
システム設定
•  SNMP設定
•  SNMPコミュニティを作成する
•  例:コミュニティ名をpublicに設定、読み込みのみ許可
root# set snmp community public authorization read-only

•  SNMPトラップを設定する
•  例:トラップの送信元をLoopback 0に、宛先を10.10.10.1に設定
root# set snmp trap-options source-address lo0
root# set snmp trap-group <group-name> targets 10.10.10.1

89
89 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOSインタフェース設定

90
インタフェースタイプの表記
•  インタフェースタイプにより以下のように表記されます

Type: fe-x/x/x: Fast Ethernet ports


ge-x/x/x: Gigabit Ethernet ports

ge-0/0/0 xe-x/x/x: 10 Gigabit Ethernet ports


et-x/x/x: 40/100 Gigabit Ethernet ports

Port number

PIC slot: Physical Interface Card →アップリンクモジュール

FPC slot: Flexible PIC Concentrator (line card) →筐体ナンバー


•  その他のインタフェース
•  ae: LAGインタフェース

•  lo0: Loopbackインタフェース

•  me0: EX, QFXシリーズの管理インタフェース

•  fxp0: SRX, MXシリーズの管理インタフェース


91
91 © 2016 Juniper Networks, Inc. All rights reserved.
PICと FPC
FPCはBOX型の筐体番号、Chassis型のラインカード番号に相当します。
PICはFPCに接続されるアップリンクモジュールを指します。

xx-X/X/X FPC
PIC
Port

BOX型 Chassis 型

※BOX型におけるOn-Board Portは、xx-0/0/Xと表現されます

92
92 © 2016 Juniper Networks, Inc. All rights reserved.
インタフェース設定
•  インタフェースの設定は物理プロパティの設定と論理プロパティの設定に分か
れます
•  物理プロパティの設定
•  データリンクプロトコル
•  リンクスピード、半/全2重通信 interfaces {
•  MTU interface-name {
インタフェース名配下に
physical-properties; 物理プロパティを設定
[…]
•  論理プロパティの設定 unit unit-number {
•  プロトコルファミリー logical-properties;
•  inet (IPv4の設定) […] Unit#配下に
•  inet6 (IPv6の設定) } 論理プロパティを設定
•  mpls }
•  ethernet-switching }

93
93 © 2016 Juniper Networks, Inc. All rights reserved.
物理/論理インタフェース設定例

ge-0/0/0 {
description TEST;
speed 1g;
mtu 1400;
ether-options {
no-auto-negotiation;
link-mode full-duplex;
} 物理プロパティ
unit 0 { 論理プロパティ
description TEST2;
family inet {
address 10.10.10.1/24;
}
}
unit 100 {
description TEST3;
family inet6 {
address 1::1/64;
}
}
}

94
94 © 2016 Juniper Networks, Inc. All rights reserved.
Unit ナンバーとは
•  ロジカルプロパティを設定する際には”unit”とよばれる単位で設定します
•  ⼀般的なネットワークOSであるサブインタフェースに相当するもの
•  unit 0がメインインタフェースに相当
•  1つの物理インタフェースに複数作成することも可能
•  インタフェースを動作させるために最低1つは必須

•  物理インタフェースge-0/0/0 の unit 0 は、”ge-0/0/0.0”と表記


•  showコマンド等でunitナンバーを指定しない場合はunit 0として認識されます
L3設定 ge-0/0/0 {
unit 0 {
Data IP ETH family inet {
unit 0
family inet ge-0/0/0 address 192.168.1.1/24;
}
}
}

ge-0/0/0 {
L2設定
unit 0 {
Data IP ETH
unit 0 family ethernet-switching {
family interface-mode access;
ethernet- ge-0/0/0
switching }
}
}
95
95 © 2016 Juniper Networks, Inc. All rights reserved.
複数unitの設定例
•  1つの物理インタフェースに複数のunitを使⽤するケース
•  unitごとにvlan-idを設定して振り分け
•  IPアドレスやFirewall Filterもunitごとに個別に設定可能
ge-0/0/0 {
vlan-tagging;
unit 10 {
vlan-id 10;
family inet {
address 192.168.1.1/24;
unit 10 }
vlan-id 10
}
unit 20 {
Packet Vlan 10 vlan-id 20;
unit 20 ge-0/0/0 family inet {
Packet Vlan 20 vlan-id 20 address 172.16.1.1/24;
Packet Vlan 30 }
}
unit 30 unit 30 {
vlan-id 30
vlan-id 30;
family inet {
address 10.1.1.1/24;
}
}
}

96
96 © 2016 Juniper Networks, Inc. All rights reserved.
L3インタフェースの作り⽅
•  EX/QFX/SRXでは、L3の設定を⼆通りの⽅法で⾏うことができます
•  インタフェースに直接L3の設定を⾏う Routed Port
(Routed Port)
•  ルーター寄りの設定
•  “no switchport” のようなもの unit 0
family inet ge-0/0/0 ge-0/0/X
unit 0
family inet
•  1つのセグメントには1つのポートのみ 192.168.1.1 192.168.x.x

•  VLANを受け、複数のセグメントを収容
したい場合はunitを複数作成する
(次ページ) set interfaces ge-0/0/0 unit 0 family inet address 192.168.1.1/24

•  VLANを作成し、VLANにL3の設定を Switch Port

⾏った上で、インターフェイスとVLAN VLAN 10 VLAN xx


を紐付ける (Switch Port) ge-0/0/0
irb.10 irb.x
ge-0/0/x

•  スイッチ寄りの設定 ge-0/0/1
192.168.10.1 192.168.x.x
ge-0/0/y

•  1つのセグメントに複数のポートが所属できる
•  1つのポートで複数のVLANを使いたい場合、 set vlans v10 vlan-id 10

trunkに設定し、所属するVLANを増やす
set vlans v10 l3-interface irb.10
set interfaces irb unit 10 family inet address 192.168.10.1/24
set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members v10
set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members v10

97
97 © 2016 Juniper Networks, Inc. All rights reserved.
管理者側から強制的にインタフェースを落とす⽅法

•  Disableコマンドを使⽤してインタフェースを落とす
root# set interfaces ge-0/0/2 disable
[edit]
root# commit
commit complete

Admin(オペレーター)モードの操作の確認
root# show interfaces root# run show interfaces terse
ge-0/0/2 { Interface Admin Link Proto Local
disable; admin(オペレータ)の強制的な Remote
unit 0 { インタフェースのダウン ge-0/0/0 up up
family inet { ge-0/0/1 up down
address 140.0.0.12/24; ge-0/0/2 down down

•  Disableコマンドを消去してインタフェースをあげる
root# delete interfaces ge-0/0/2 disable root# run show interfaces terse
[edit] Interface Admin Link Proto Local
root# commit Remote
commit complete ge-0/0/0 up up
ge-0/0/1 up down
ge-0/0/2 up up

98
98 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOS経路設定

99
Static Routeの設定
•  Static route設定
# set routing-options static route <あて先アドレス>next-hop <ネクストホップアドレス>
# set routing-options static route <あて先アドレス>オプション設定

設定例
[edit routing-options]
root# show
static {
route 0.0.0.0/0 next-hop 172.30.25.1; IPv4デフォルトルートの設定
route 172.28.102.0/24 {
next-hop 10.210.11.190;
no-readvertise;
}
}

経路を広報させないための設定
マネージメント⽤の経路などに利⽤

100
100 © 2016 Juniper Networks, Inc. All rights reserved.
制限付きネクストホップの設定
•  同じあて先にstatic routeを設定する場合はqualified-next-hopのオ
プションを利⽤しpreference(優先)の設定を施します
例: インターネット接続のためのデフォルトルートの設定
172.30.25.0/30
ge-0/0/1
.2 primary .1
Network A
172.29.100.0/24 .1 Internet
.6 secondary .5
ge-1/0/0

172.30.25.4/30

[edit routing-options]
root# show Primary route
static {
※Juniperのstatic routeのpreferenceは5
route 0.0.0.0/0 {
next-hop 172.30.25.1;
qualified-next-hop 172.30.25.5 {
preference 7;
} Secondary route
} ※preferenceを7に設定することで優先度を下げる
}

101
101 © 2016 Juniper Networks, Inc. All rights reserved.
Static Routeの確認
•  showコマンドでstatic routeを確認する
root> show route protocol static

inet.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)


+ = Active Route, - = Last Active, * = Both
プロトコルとpreference
0.0.0.0/0 *[Static/5] 00:41:59
> to 172.30.25.1 via ge-0/0/1.0
デフォルトルート ネクストホップのアドレスとインタフェース

102
102 © 2016 Juniper Networks, Inc. All rights reserved.
Firewall Filter (ACL) の設定

103
Firewall Filterの設定
•  FWフィルタとは個々のパケットのフローを制御するためのステートレスなフィルタリング
ポリシーです(=ACL)
•  FWフィルタではtermと呼ばれる条件付けのブロックを定義します
•  フィルタ内のtermはtop→downの順番で精査されます
test-filter FW filter名

term <first-term> term名

from then
match 適合条件:アドレスなど
no match

term <second-term>
from then アクション:許可、不許可など

no match
match

discard 各termに適合しなかった場合、discardします

※新しくtermを作成した際など、評価の順番を変更する際はinsertコマンドを利⽤して意図した順番にTermを⼊れ替えて下さい
104
104 © 2016 Juniper Networks, Inc. All rights reserved.
Firewall Filterの設定
例1: 10.10.10.0/24からの通信を許可しないFWフィルタを作成

root# set firewall family inet filter FW-FILTER term BLOCK from source-address 10.10.10.0/24
root# set firewall family inet filter FW-FILTER term BLOCK then discard
root# set firewall family inet filter FW-FILTER term PERMIT then accept

FW filter名
root# show firewall family inet filter FW-FILTER
term BLOCK { term名
from {
source-address { 適合条件:10.10.10.0/24からの通信
10.10.10.0/24;
}
}
then {
discard; アクション:不許可
}
}
term PERMIT {
then accept; 他のIPからの通信を許可
}

105
105 © 2016 Juniper Networks, Inc. All rights reserved.
Firewall Filterの設定
例1: 作成したFWフィルタをインタフェースへ適⽤
root# set interfaces ge-0/0/0 unit 0 family inet filter input FW-FILTER

root# show interfaces ge-0/0/0


unit 0 {
family inet {
filter {
input FW-FILTER; ge-0/0/0に⼊ってくる通信に対してFW-FILTERを適⽤
}
}
}

※FWフィルタの設定を有効にする際(commitする際)にcommit confirmを利⽤すると万
が⼀設定を誤ってしまった場合にも切り戻しが可能になります

106
106 © 2016 Juniper Networks, Inc. All rights reserved.
Firewall Filterの設定
例2: Termの順序⼊れ替え

root# set firewall family inet filter FW-FILTER term BLOCK from source-address 10.10.10.0/24
root# set firewall family inet filter FW-FILTER term BLOCK then discard
root# set firewall family inet filter FW-FILTER term PERMIT then accept
root# set firewall family inet filter FW-FILTER term BLOCK2 from protocol udp
root# set firewall family inet filter FW-FILTER term BLOCK2 then discard
All permitのあとにtermがあるので
この順序だとこのtermはLookupされない

Termは設定した順番で設定ファイルに書き込みが⾏われます。
⼀⽅で、意図したフィルターを掛けるためには適切な順序でTermを記載する必要があります
(上記例では、all PERMIT termの後にBLOCK2が書かれているので、Lookupがされないことに注意)

•  insert コマンド:Firewall FilterやFirewall Policyのterm順序を変更する


root# insert firewall family inet filter FW-FILTER term BLOCK2 before term PERMIT

OR

root# insert firewall family inet filter FW-FILTER term PERMIT after term BLOCK2

107
107 © 2016 Juniper Networks, Inc. All rights reserved.
Firewall Filterの設定
例2: Termの順序⼊れ替え
意図した順番でtermが記載されていることを確認した上で、commitを⾏います
root# show firewall family inet
filter FW-FILTER {
term BLOCK {
from {
source-address {
10.10.10.0/24;
}
}
then {
discard;
}
}
term BLOCK2 { insertコマンドによりterm BLOCK2がPERMITの前に移動している
from {
protocol udp;
}
then {
discard;
}
}
term PERMIT {
then accept;
}
}

108
108 © 2016 Juniper Networks, Inc. All rights reserved.
Firewall Filterの設定
例3: JUNOS製品へのマネージメント通信を制限する
1.  FWフィルタを作成する
•  192.168.1.0/24のセグメントからSSHでの通信のみ許可
2.  作成したFWフィルタをlo0 (ループバックインタフェース)に適⽤する

root# show firewall family inet root# show interfaces Routing Engine
filter MANAGEMENT { lo0 {
term PERMIT { unit 0 {
from {
source-address {
family inet {
filter { CPU
192.168.1.0/24; input MANAGEMENT;
} }
protocol tcp; address
destination-port ssh; 10.10.10.1/24; lo0
} }
then accept; } マネージメント通信はlo0を経由する
} }
}

Packet Forwarding Engine


※EX, QFXシリーズ⾃⾝への通信を制御する場合、lo0および、me0(EX), em0(QFX)へFirewall Filterを適⽤する必要があります。
※SRX, MXシリーズ⾃⾝への通信を制御する場合、lo0のみにFirewall Filterを適⽤することで制御可能となります。(管理インタフェースfxp0への適⽤は不要)

109
109 © 2016 Juniper Networks, Inc. All rights reserved.
Ethernet Switching
“EX/QFX” course

JUNOS Hands-on Training


Juniper Network, K.K.
110
Training Outline Ethernet Switching "EX/QFX" course
トレーニング内容(後半) 記載ページ
ジュニパーのイーサネット・スイッチポートフォリオ P.111
LAB.1 JUNOSの基本的な操作・設定 P.121
LAB.2 Interfaceの設定 P.135
LAB.3 Routingの設定 P.148
LAB.4 Firewall Filterの設定 P.155
Virtual Chassisとは P.161
Virtual Chassis Deep Dive P.176
LAB.5 Virtual Chassisの設定 P.195
Wrap up P.209
TIPs to be JUNOS Experts P.211
Appendix A: Virtual Chassis Fabric P.242
Appendix B: Multi-Chassis LAG P.253

111
111 Appendix C: Zero Touch Provisioning P.271
© 2016 Juniper Networks, Inc. All rights reserved.
ジュニパーのイーサネットスイッチ・ポートフォリオ

112
ジュニパーのイーサネットスイッチングプラットフォーム

Ethernet Switch キャンパス・データセンターで利⽤される


オールマイティなL2/L3イーサネット・スイッチ (2008~)
EX series •  1G/10G/40G/100GbE
•  L2/L3 Switching
•  L2/L3 Protocols(STP, LACP, OSPF, BGP, …)
•  802.1x, WebAuth
•  PoE, PoE+
•  Virtual Chassis (up to 10 members)
•  Junos Fusion Enterprise
•  MACsec
基本的な操作⽅法は
全く⼀緒!!

Datacenter Fabric Switch データセンタでの利⽤に特化した


ハイスペック・イーサネット・スイッチ (2011~)
QFX series •  10G/25G/40G/50G/100GbE
•  L2/L3 Low-Latency Switching
•  L2/L3 Protocols(STP, LACP, OSPF, BGP, …)
•  Clos IP Fabric
•  L2 Overlay - VXLAN, EVPN-VXLAN
•  MPLS
•  Virtual Chassis (up to 10 members)
•  Virtual Chassis Fabric (up to 20 members)
•  Junos Fusion, QFabric (up to 128 members)

113
113 ※ 128 member support for Junos Fusion is Roadmap. FRS supports up to 64 members. © 2016 Juniper Networks, Inc. All rights reserved.
EX シリーズ 固定型スイッチ

ALL L2/L3 Models


§  32 x 1/10GBASE-SFP+/-T
(No L2 Dedicated)
§  全てのポートでワイヤーレート
を実現するパフォーマンス
§  PoE/PoE+ §  冗⻑電源・冷却
§  データセンタエアフロー §  省スペース
§  モジュール型の電源ユニットとファ §  拡張スロット×2
§  24/48 10/100/1000BASE-T ントレイ §  最⼤10メンバ Virtual Chassis
§  PoE/PoE+ §  4 port GbE SFP アップリンクモ §  EX4200との混在Virtual
ジュール(オプション) Chassisが可能
§  データセンタエアフロー
§  2 port 10GbE XFP アップリンクモ §  MACsec
§  24/48 port 10/100/1000BASE-T §  最⼤10 メンバ Virtual Chassis ジュール(オプション)
§  固定の電源ユニットとファン §  固定の電源ユニットとファントレイ §  最⼤10 メンバ Virtual Chassis
§  静⾳ §  外付け冗⻑化電源 §  128 Gbps
§  12 port 10/100/ §  4 port SFPアップリンク §  4 port SFP/SFP+ アップリンク Virtual Chassis backplane
1000BASE-T §  PoE/PoE+
§  固定の電源ユニット §  最⼤4台までのVirtual Chassis lite
§  ファンレス
§  2 SFPアップリンク
§  PoE/PoE+
§  最⼤4台までのVirtual Chassis lite

EX2200-C EX2200 EX3300 EX4200 EX4550


※Legacy L2 Switching モデル
114
114 © 2016 Juniper Networks, Inc. All rights reserved.
EX シリーズ 固定型スイッチ(ELS)

ALL L2/L3 Models


§  24 10GbE ports
(No L2 Dedicated)
§  4x40GbEポート
§  拡張スロット×2
§  24/48 10/100/1000BASE-T §  筐体内モジュール型の冗⻑電源
32 port 1000BASE-X ユニットとファントレイ
§  PoE/PoE+ §  省スペース
§  24/48 10/100/1000BASE-T §  データセンターエアフロー §  最⼤10メンバ Virtual Chassis
§  PoE/PoE+ §  40 10GbE fiber ports §  EX4300との混在Virtual
§  筐体内モジュール型の冗⻑電源ユ Chassisが
§  データセンターエアフロー 可能
ニットとファントレイ
§  24/48 port 10/100/1000BASE-T §  40 10GbE fiber ports §  MACsec
§  最⼤10メンバ Virtual Chassis
§  固定の電源ユニットとファン §  筐体内モジュール型の冗⻑電源ユ ハードウェアサポート
ニットとファントレイ §  MACsec
§  静⾳
§  12 port 10/100/ §  4 port 10Gアップリンク §  最⼤10メンバ Virtual Chassis
1000BASE-T §  PoE/PoE+ §  MACsec
§  固定の電源ユニット §  最⼤4台までのVirtual Chassis lite
§  ファンレス
§  2 port 10Gアップリンク
§  PoE/PoE+
§  最⼤4台までのVirtual Chassis lite

EX2300-C EX2300 EX3400 EX4300 EX4600

※ELS(Enhanced Layer2 Switching)モデル


115
115 © 2016 Juniper Networks, Inc. All rights reserved.
EX シリーズ モジュラー型スイッチ

§  4/8/14 スロット(RE/Fabric含む)のシャーシモデル
§  2台のVirtual Chassisをサポート
§  冗⻑化されたファブリックとREモジュール
§  スロットあたり240Gbps のパフォーマンス
§  40 ポート 10/100/1000BASE-T ラインカード
§  40 ポート 1000BASE-X ラインカード 40x1G

§  32ポート 10GBase-X ラインカード 32x10G


§  4ポート 40GBase-Xラインカード
4x40G
§  VPLS, Logical system
2x100G+
EX9204 EX9208 EX9214 8x10G

EX9200
※ELS(Enhanced Layer2 Switching)モデル

116
116 © 2016 Juniper Networks, Inc. All rights reserved.
EXシリーズ・ラインナップ
Core

40 / 100 GbE
EX9200

EX4600
Aggregation

Performance

10 GbE
EX4550

1 GbE
EX4300
Access

EX3400

EX3300 Logical Scale

EX4200
EX2300-C EX2300 Modular

Hardware Resiliency
EX2200-C EX2200

117
117
Ports © 2016 Juniper Networks, Inc. All rights reserved.
EXシリーズ・バーチャルシャーシ
2台以上、10台以下のEX/QFXシリーズをソフトウェアの⼒で
1台のシャーシシステムとしてエミュレーションする仮想化スイッチング・テクノロジー

Virtual Chassis

  ・ ハイパフォーマンス

  ・広帯域バックプレーン
10 Slots
  ・ シャーシ型スイッチと同等の信頼性
  ・ シャーシ型スイッチと同等のHA機能
 (GRES/NSR/NSB)
  ・シンプルなL2/L3ネットワークデザイン
・容易な管理性 Switch to
Manage

 (Single Console/NSSU)
・物理的な制約からの解放
= 1!
Route Engine ~320Gbps

backplane
Line Card Admin

シャーシ型スイッチのメリットをすべて実現した上で、仮想シャーシならではの新たな価値を提供
118
118 © 2016 Juniper Networks, Inc. All rights reserved.
各種EXシリーズにおけるVC機能の⽐較
EX2200-VC Lite EX2300-VC Lite EX3300-VC EX3400-VC EX4200/4550-VC EX4300/4600-VC

Branch; Branch; Campus access;


Target Market Campus access;
small campus small campus Campus access Campus access aggregation;
(Dominant) data center TOR
access access datacenter TOR

Marketing
Virtual Chassis-Lite Virtual Chassis-Lite Virtual Chassis Virtual Chassis Virtual Chassis Virtual Chassis
Name

2x40GbE or/and  4x40GbE and/or


Uplinks Up to 4x1GbE Up to 4x10GbE Up to 4x10GbE 128G or 2x10GbE
4x10GbE Nx10GbE

Backplane
Up to 8 Gbps Up to 80 Gbps Up to 80 Gbps Up to 160 Gbps + 128 Gbps 320 Gbps +
Speed

HA Capability No Partial Yes Yes Yes Yes Yes

License for
Base(12.3以降) 要License Base Base Base Base
Virtual Chassis

LCD No No Yes No Yes Yes

Up to 10 mixed Up to 10 mixed
Virtual Chassis
Up to 4 Up to 4 Up to 10 Up to 10 Virtual Chassis with Virtual Chassis with
Members
EX4200/4500 EX4300/4600

119
119 © 2016 Juniper Networks, Inc. All rights reserved.
QFX-Series Multiple Fabric Architecture
for Datacenter ToR
Virtual Chassis Fabric

Up to 20 members
Qfabric/
Virtual Chassis JUNOS Fusion

Juniper Up to 10 members Up to 128 members

Architectures

IP Fabric
MC-LAG w/ Overlay

Open
Architectures L3 Fabric

… QFX5100

120
120 © 2016 Juniper Networks, Inc. All rights reserved.
QFXシリーズ・ラインナップ
Datacenter Switching Portfolio

MODULAR
QFX10008 QFX10016
Up to 480 X 100 GE Ports

SPINE
QFX5110-32Q

FIXED
QFX5100-24Q QFX10002-72
QFX5110-48S QFX10002-36

LEAF
QFX5200
QFX5100
HIGH DENSITY HIGH DENSITY HIGH DENSITY
40GbE High Density 40/100GbE
10GbE 10/25/40/50/100GbE

121
121 © 2016 Juniper Networks, Inc. All rights reserved.
LAB.1 JUNOSの基本的な操作・設定

122
Ethernet Switching "EX/QFX" course
Topology (Lab.1:基本操作) – グループ1 §  管理⽤IP(me0)
: 192.168.1.x/24
EX3400 Group1
.1 .2 •  Tokyo-1: .1
Tokyo-1 Nagoya-1 •  Nagoya-1:.2
ge-0/0/2 ge-0/0/1 ge-0/0/1 ge-0/0/2 •  Osaka-1: .3
Tokyo-1 Nagoya-1
•  Fukuoka-1:.4

ge-0/0/0 ge-0/0/10 ge-0/0/0 ge-0/0/10

ge-0/0/0 ge-0/0/10 ge-0/0/0 ge-0/0/10

ge-0/0/2 ge-0/0/2

Osaka-1 ge-0/0/1 ge-0/0/1 Fukuoka-1


.3 .4

123
123 © 2016 Juniper Networks, Inc. All rights reserved.
Ethernet Switching "EX/QFX" course
Topology (Lab.1:基本操作) – グループ2 §  管理⽤IP(me0)
: 192.168.1.x/24
EX3400 Group1
.5 .6 •  Tokyo-2: .5
Tokyo-2 Nagoya-2 •  Nagoya-2:.6
ge-0/0/2 ge-0/0/1 ge-0/0/1 ge-0/0/2 •  Osaka-2: .7
Tokyo-1 Nagoya-1
•  Fukuoka-2:.8

ge-0/0/0 ge-0/0/10 ge-0/0/0 ge-0/0/10

ge-0/0/0 ge-0/0/10 ge-0/0/0 ge-0/0/10

ge-0/0/2 ge-0/0/2

Osaka-2 ge-0/0/1 ge-0/0/1 Fukuoka-2


.7 .8

124
124 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOSへのログイン
初期設定状態のEXにアカウントʼrootʼでログインします。
cliコマンドでJUNOSのOperationalモードを起動します。

–  rootアカウントはserial console、またはssh接続時のみ使⽤可能です。
–  今回は事前にIPアドレス, rootパスワード, ssh, telnetを設定済みです。
•  Root Password: Juniper

–  Tera TermからSSHv2接続で接続してください。

--- JUNOS 9.3S1.6 built 2009-05-28 13:53:44 UTC


root@Amenistic:RE:0% cli
root>

125
125 © 2016 Juniper Networks, Inc. All rights reserved.
Operationalモードのshowコマンド実⾏
構成やバージョンなど基本情報の確認を実施します。
–  Active configurationを表⽰
root> show configuration

–  ハードウェア情報を表⽰
root> show chassis hardware

–  ソフトウェアバージョンの確認
root> show version

–  インタフェースのステータス⼀覧の表⽰
root> show interface terse

–  ルーティングテーブル表⽰
root> show route

–  MACアドレステーブル表⽰
root> show ethernet-switching table

–  サポートを受ける際に必要な機器情報(RSI)を⼀括取得
root> request support information

※出⼒が⼀画⾯に⼊らない場合、 | no-more オプションを追加すると最後まで表⽰されます


126 © 2016 Juniper Networks, Inc. All rights reserved.
rootアカウントのパスワード設定 (設定済)
Configuration Modeに⼊り、設定変更の準備を⾏います。
下記の⼿順でrootアカウントにパスワードを設定します。
–  root password: Juniper

root> configure
root# set system root-authentication plain-text-password
(改⾏後パスワード⼊⼒)
root# commit

※rootパスワード設定は必須です。設定が存在しないとcommitに失敗します。

127 © 2016 Juniper Networks, Inc. All rights reserved.


管理インタフェース(me0)へのアドレス付与(設定済)
管理インタフェース(me0)に対して管理⽤アドレスを付与します。
–  アドレス192.168.1.xx/24(xx = Topologyで指定された第4オクテット)を付与する

# set interface me0 unit 0 family inet address 192.168.1.xx/24

EX3400 rear view

me0

show interfacesコマンドで、設定したme0インタフェースのconfigを確認します。

{master:0}[edit]
root# show interfaces

128 © 2016 Juniper Networks, Inc. All rights reserved.


新規アカウント作成
管理⽤アカウント”lab”を以下の設定で作成します。
Username Password Class
lab lab123 super-user

commit完了後、⼀度rootユーザのセッションをログアウトします。
root# set system login user lab class super-user
root# set system login user lab authentication plain-text-password
(改⾏後パスワード⼊⼒)
root# commit and-quit
root> exit
root@% exit

telnetで、作成したアカウントを使って正常にログインできることを確認します。
login: lab
Password:

--- JUNOS 14.1X53-D15.2 built 2014-12-20 23:22:48 UTC


{master:0}
lab@>

129 © 2016 Juniper Networks, Inc. All rights reserved.


サービスの起動とホスト名の設定
サービスの起動
–  デフォルトでは各種サービスが起動していないため、追加で設定します。
(telnet, ssh のみ事前に設定済み)
–  ftp, httpで機器にアクセスできるようにします。
lab# set system services ftp
lab# set system services web-management http

ホスト名の作成
–  Topologyを参照して、各⾃がログインしている機器のホスト名を設定します。
lab# set system host-name Tokyo-1

変更したconfigの差分を確認
–  Active configと⽐較して、設定が正しく追加されたことを確認しcommitします。
lab# show | compare
lab# commit

130 © 2016 Juniper Networks, Inc. All rights reserved.


サービス起動の確認

FTPによるアクセス
–  Windowsからコマンドプロンプトを⽴ち上げFTPでアクセスできることを確認します。
•  ftp 192.168.1.xx
•  Rootを使⽤してログイン
•  Lsコマンドでユーザディレクトリを表⽰できることを確認
–  表⽰されない場合、Windows FirewallでFTP許可が必要

ブラウザからWeb GUI(J-Web)へのアクセス
–  ブラウザからアクセスし、J-Webの画⾯が表⽰されることを確認します。
•  http://192.168.1.xx/
–  root、または作成したユーザ(lab)を使⽤してログイン

131 © 2016 Juniper Networks, Inc. All rights reserved.


Configurationの確認
ここまでで設定したconfiguration全体を確認します。
① Operationalモードから確認
稼働中のActive configを表⽰します。
lab@Tokyo-1> show configuration
同じConfigを異なる形式で表⽰
lab@Tokyo-1> show configuration | display set

② Configurationモードから確認
編集中のcandidate configを表⽰します。
commit後に設定変更をしていなければ、Active configと同じ内容が表⽰されます。

lab@Tokyo-1> configure
Entering configuration mode

[edit]
lab@Tokyo-1# show
lab@Tokyo-1# show | display set 同じConfigを異なる形式で表⽰

132 © 2016 Juniper Networks, Inc. All rights reserved.


Operationalモードのコマンドを表⽰
Configurationモードから、Operationalモードのコマンドを実⾏します。

① Configurationモードに⼊ります
lab@Tokyo-1> configure

② show interfacesコマンドを実⾏
以下の2つのコマンドを実⾏し、表⽰される内容を確認します。
lab@Tokyo-1# show interfaces
lab@Tokyo-1# run show interfaces

Operational Mode Configuration Mode

run

show interfaces show interfaces

133 © 2016 Juniper Networks, Inc. All rights reserved.


Operationalモードのコマンドを表⽰
Configurationモードから、Operationalモードのコマンドを実⾏します。

① Configurationモードに⼊ります
lab@Tokyo-1> configure

② show interfacesコマンドを実⾏
以下の2つのコマンドを実⾏し、表⽰される内容を確認します。
lab@Tokyo-1# show interfaces
lab@Tokyo-1# run show interfaces

Operational Mode Configuration Mode

run

show interfaces show interfaces

134 © 2016 Juniper Networks, Inc. All rights reserved.


commit confirmed
誤った設定をしてしまった場合でも設定が⾃動で元に戻ることを確認します。

①コマンドプロンプトからping 192.168.1.xx -tを実⾏しておきます


②管理インタフェースの設定を削除
me0の設定を削除します。 ※commitはまだしないこと
lab@Tokyo-1# delete interfaces me0
lab@Tokyo-1# show | compare

③commit confirmed
commit confirmedオプションを使って、1分後に設定が戻るようにcommitします。
commit完了メッセージが表⽰された後、アクセス不能になりTera Termが切断されます。
lab@Tokyo-1# commit confirmed 1

④pingが応答が返ってきたら再度labでログインし、設定が戻っていることを確認
削除したme0の設定がもとに戻っていることを確認します。
lab@Tokyo-1> show configuration interfaces me0

135 © 2016 Juniper Networks, Inc. All rights reserved.


Configurationをファイルに保存
次のLabを始める前に、saveコマンドでconfiguration fileをsaveします。 
file listコマンドで正常にsaveできたことを確認します。

lab@Tokyo-1# save lab1-end_YYMMDD


Wrote 213 lines of configuration to 'lab1-end_YYMMDD'

{master:0}[edit]
lab@Tokyo-1# exit
Exiting configuration mode

lab@Tokyo-1> file list

/var/home/lab/:
.ssh/
lab1-end_YYMMDD

136 © 2016 Juniper Networks, Inc. All rights reserved.


LAB.2 Interfaceの設定
Link Aggregation/Vlan/IRB

137
Ethernet Switching "EX/QFX" course
Topology (Lab.2:インタフェースの設定)
各インタフェースの設定するIPアドレスの第4オクテット(x.x.x.X)に設定

例:Tokyo-X の場合の IP アドレス設定


.1 .2
ge-0/0/0 (ae0)
Tokyo-X Nagoya-X
ge-0/0/1 (irb.20) 10.2.1.1 ge-0/0/2 ge-0/0/1 ge-0/0/1 ge-0/0/2
Tokyo-1
irb.100 irb.20 Nagoya-1irb.200
irb.20
ge-0/0/2 (irb.100) 172.16.1.1 10.2.1.0/24
irb.10 (VLAN ID:20) irb.40
ge-0/0/10 (ae0)
ge-0/0/0 ge-0/0/10 ge-0/0/0 ge-0/0/10
ae0 (irb.10) 10.1.1.1

10.1.1.0/24 10.4.1.0/24
(VLAN ID:10) (VLAN ID:40) 172.16.2.0/24
172.16.1.0/24
(VLAN ID:100) ae0 ae0 (VLAN ID:200)

ge-0/0/0 ge-0/0/10 ge-0/0/0 ge-0/0/10


irb.10 10.3.1.0/24 irb.40
ge-0/0/2 (VLAN ID:30) ge-0/0/2
irb.100 irb.30 irb.30 irb.200
ge-0/0/1
Osaka-X ge-0/0/1 Fukuoka-X
.3 .4
各インタフェースの設定するIPアドレスの第4オクテット(x.x.x.X)に設定
138
138 © 2016 Juniper Networks, Inc. All rights reserved.
LAG(Link Aggregation Group)の作成 ①
LAG(Link Aggregation Group)を作成します。
–  LAGの設定準備
# set chassis aggregated-devices ethernet device-count 1

–  LAGの作成(ae0)
# set interfaces ae0 unit 0 family ethernet-switching

–  LAGに参加させるメンバーIFのdefault protocol-family (ethernet-switching)を削除


# delete interfaces ge-0/0/0 unit 0
# delete interfaces ge-0/0/10 unit 0

–  LAGへのinterface追加
# set interfaces ge-0/0/0 ether-options 802.3ad ae0
# set interfaces ge-0/0/10 ether-options 802.3ad ae0

*LAGの場合、論理インタフェースプロパティはaeインタフェースに対して設定します。
メンバーIFには設定しない(メンバーIFは論理IFを持たない)ことに留意してください。

139
139 © 2016 Juniper Networks, Inc. All rights reserved.
LAG(Link Aggregation Group)の作成 ②
LAGにLACPを設定します。
–  LACPオプションの追加し、commitします。
# set interfaces ae0 aggregated-ether-options lacp active periodic fast

LAGの正常性を確認します。
–  LAGの状態を確認
> show interfaces ae0
> show interface terse

•  ae0がAdmin up, Link upのステータスであること

–  LACPの状態を確認
> show lacp interfaces ae0

•  LACP protocolが以下の状態になっていること
–  Receive State: Current
–  Mux State: Collecting distributing

140
140 © 2016 Juniper Networks, Inc. All rights reserved.
VLANを作成し、アクセスポートを設定
VLANを作成し、インタフェースへの適⽤を⾏います。
–  VLAN作成
•  Topologyを参照し、機器が所属するVLAN を作成する
lab@Tokyo# set vlans vlan10 vlan-id 10
lab@Tokyo# set vlans vlan20 vlan-id 20
lab@Tokyo# set vlans vlan100 vlan-id 100

–  インタフェースをaccess portに設定し、VLANに参加させる
lab@Tokyo# set interface ae0 unit 0 family ethernet-switching interface-mode access
lab@Tokyo# set interface ae0 unit 0 family ethernet-switching vlan members vlan10

lab@Tokyo# set interface ge-0/0/1 unit 0 family ethernet-switching interface-mode access


lab@Tokyo# set interface ge-0/0/1 unit 0 family ethernet-switching vlan members vlan20

lab@Tokyo# set interface ge-0/0/2 unit 0 family ethernet-switching interface-mode access


lab@Tokyo# set interface ge-0/0/2 unit 0 family ethernet-switching vlan members vlan100

141
141 © 2016 Juniper Networks, Inc. All rights reserved.
Vlan & Interface : Sample Configuration
Tokyo set vlans vlan10 vlan-id 10
set vlans vlan20 vlan-id 20
set vlans vlan100 vlan-id 100

set interfaces ae0 unit 0 family ethernet-switching interface-mode access


set interfaces ae0 unit 0 family ethernet-switching vlan members vlan10
set interfaces ge-0/0/1 unit 0 family ethernet-switching interface-mode access
set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members vlan20
set interfaces ge-0/0/2 unit 0 family ethernet-switching interface-mode access
set interfaces ge-0/0/2 unit 0 family ethernet-switching vlan members vlan100

Nagoya set vlans vlan20 vlan-id 20


set vlans vlan40 vlan-id 40
set vlans vlan200 vlan-id 200

set interfaces ge-0/0/1 unit 0 family ethernet-switching interface-mode access


set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members vlan20
set interfaces ae0 unit 0 family ethernet-switching interface-mode access
set interfaces ae0 unit 0 family ethernet-switching vlan members vlan40
set interfaces ge-0/0/2 unit 0 family ethernet-switching interface-mode access
set interfaces ge-0/0/2 unit 0 family ethernet-switching vlan members vlan200

142
142 © 2016 Juniper Networks, Inc. All rights reserved.
Vlan & Interface : Sample Configuration
Osaka set vlans vlan10 vlan-id 10
set vlans vlan30 vlan-id 30
set vlans vlan100 vlan-id 100

set interfaces ae0 unit 0 family ethernet-switching interface-mode access


set interfaces ae0 unit 0 family ethernet-switching vlan members vlan10
set interfaces ge-0/0/1 unit 0 family ethernet-switching interface-mode access
set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members vlan30
set interfaces ge-0/0/2 unit 0 family ethernet-switching interface-mode access
set interfaces ge-0/0/2 unit 0 family ethernet-switching vlan members vlan100

Fukuoka set vlans vlan30 vlan-id 30


set vlans vlan40 vlan-id 40
set vlans vlan200 vlan-id 200

set interfaces ge-0/0/1 unit 0 family ethernet-switching interface-mode access


set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members vlan30
set interfaces ae0 unit 0 family ethernet-switching interface-mode access
set interfaces ae0 unit 0 family ethernet-switching vlan members vlan40
set interfaces ge-0/0/2 unit 0 family ethernet-switching interface-mode access
set interfaces ge-0/0/2 unit 0 family ethernet-switching vlan members vlan200

143
143 © 2016 Juniper Networks, Inc. All rights reserved.
VLANにIRBインタフェースを追加
VLANにIRB(Integrated Routing and Bridging=L3 vlan interface)を設定します。
VLANインタフェースにアドレスを追加
§  Topologyを参照し、該当するVLAN interfaceを作成してアドレスを設定する
lab@Tokyo# set interfaces irb unit 10 family inet address 10.1.1.x/24
lab@Tokyo# set interfaces irb unit 20 family inet address 10.2.1.x/24
lab@Tokyo# set interfaces irb unit 100 family inet address 172.16.1.x/24

§  VLANに対してL3インタフェースをひもづける
lab@Tokyo# set vlans vlan10 l3-interface irb.10
lab@Tokyo# set vlans vlan20 l3-interface irb.20
lab@Tokyo# set vlans vlan100 l3-interface irb.100

RSTPのdisable
§  デフォルトで動作しているRSTPは必要なくなったため、設定を削除する
lab@Tokyo# delete protocols rstp

144
144 © 2016 Juniper Networks, Inc. All rights reserved.
IRB : Sample Configuration
Tokyo set vlans vlan10 l3-interface irb.10
set vlans vlan20 l3-interface irb.20
set vlans vlan100 l3-interface irb.100

set interfaces irb unit 10 family inet address 10.1.1.1/24


set interfaces irb unit 20 family inet address 10.2.1.1/24
set interfaces irb unit 100 family inet address 172.16.1.1/24

delete protocols rstp

Nagoya
set vlans vlan20 l3-interface irb.20
set vlans vlan40 l3-interface irb.40
set vlans vlan200 l3-interface irb.200

set interfaces irb unit 20 family inet address 10.2.1.2/24


set interfaces irb unit 40 family inet address 10.4.1.2/24
set interfaces irb unit 200 family inet address 172.16.2.2/24

delete protocols rstp

145
145 © 2016 Juniper Networks, Inc. All rights reserved.
IRB : Sample Configuration
Osaka set vlans vlan10 l3-interface irb.10
set vlans vlan30 l3-interface irb.30
set vlans vlan100 l3-interface irb.100

set interfaces irb unit 10 family inet address 10.1.1.3/24


set interfaces irb unit 30 family inet address 10.3.1.3/24
set interfaces irb unit 100 family inet address 172.16.1.3/24

delete protocols rstp

Fukuoka
set vlans vlan30 l3-interface irb.30
set vlans vlan40 l3-interface irb.40
set vlans vlan200 l3-interface irb.200

set interfaces irb unit 30 family inet address 10.3.1.4/24


set interfaces irb unit 40 family inet address 10.4.1.4/24
set interfaces irb unit 200 family inet address 172.16.2.4/24

delete protocols rstp

146
146 © 2016 Juniper Networks, Inc. All rights reserved.
インタフェース/VLAN/LACP動作確認
インタフェース, VLAN, LACPの確認コマンドで正常性を確認します。
> show interfaces (terse)
> show ethernet-switching interfaces
> show vlans (detail)
> show lacp interfaces

隣接機器に対してpingを実施し、応答があることを確認します。
•  ping [隣接機器のIRB IPアドレス]
–  Ctrl+Cで停⽌

147
147 © 2016 Juniper Networks, Inc. All rights reserved.
※参考: VLANを作成し、トランクポートを設定する場合
VLANを作成し、インタフェースへの適⽤を⾏います。
–  VLAN作成
•  VLAN を作成する
lab@Tokyo# set vlans vlan10 vlan-id 10
lab@Tokyo# set vlans vlan20 vlan-id 20
lab@Tokyo# set vlans vlan100 vlan-id 100

–  インタフェースをtrunk portに設定し、複数のVLANを参加させる
lab@Tokyo# set interface ae0 unit 0 family ethernet-switching interface-mode trunk
lab@Tokyo# set interface ae0 unit 0 family ethernet-switching vlan members vlan10
lab@Tokyo# set interface ae0 unit 0 family ethernet-switching vlan members vlan20
lab@Tokyo# set interface ae0 unit 0 family ethernet-switching vlan members vlan100

※本トレーニングコースのラボ構成にはTrunk Portの設定は出てきませんので、
ここでは参考までに設定の⽅法を記載しています。実機には投⼊しないでください。
148
148 © 2016 Juniper Networks, Inc. All rights reserved.
※参考: Legacy Layer2 Switchingモデルの場合
Legacy L2 Switchingモデル(SRX100〜650、EX2200〜EX4550など)の場合、
⼀部、L2設定周りのCLIが異なり、以下のような設定⽅法となります。

set vlans vlan10 vlan-id 10


set vlans vlan20 vlan-id 20
set vlans vlan100 vlan-id 100

set interfaces ae0 unit 0 family ethernet-switching port-mode access


set interfaces ae0 unit 0 family ethernet-switching vlan members vlan10
set interfaces ge-0/0/1 unit 0 family ethernet-switching port-mode access
set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members vlan20
set interfaces ge-0/0/2 unit 0 family ethernet-switching port-mode access
set interfaces ge-0/0/2 unit 0 family ethernet-switching vlan members vlan100

set vlans vlan10 l3-interface vlan.10


set vlans vlan20 l3-interface vlan.20
set vlans vlan100 l3-interface vlan.100

set interfaces vlan unit 10 family inet address 10.1.1.1/24


set interfaces vlan unit 20 family inet address 10.2.1.1/24
set interfaces vlan unit 100 family inet address 172.16.1.1/24

delete protocols rstp

149
149 © 2016 Juniper Networks, Inc. All rights reserved.
LAB.3 Routingの設定
OSPF / Redistribute Static

150
Ethernet Switching "EX/QFX" course Loopback address
(全グループ共通)

Topology (Lab.3:ルーティングの設定) Tokyo: 1.1.1.1/32 Nagoya: 2.2.2.2/32


Osaka: 3.3.3.3/32 Fukuoka: 4.4.4.4/32

1.1.1.1/32 2.2.2.2/32
.1 .2
Tokyo-X Nagoya-X
ge-0/0/2 ge-0/0/1 ge-0/0/1 ge-0/0/2
Tokyo-1 irb.20 Nagoya-1irb.200
irb.20
Passive irb.100
10.2.1.0/24 Passive
irb.10 (VLAN ID:20) irb.40
ge-0/0/0 ge-0/0/10 ge-0/0/0 ge-0/0/10

10.1.1.0/24 10.4.1.0/24
(VLAN ID:10) (VLAN ID:40)
172.16.1.0/24
ae0
OSPF ae0
172.16.2.0/24
(VLAN ID:100) (VLAN ID:200)
Area 0.0.0.0

ge-0/0/0 ge-0/0/10 ge-0/0/0 ge-0/0/10


irb.10 10.3.1.0/24 irb.40
ge-0/0/2 (VLAN ID:30) ge-0/0/2
irb.30 irb.30
Passive irb.100 irb.200 Passive
ge-0/0/1
Osaka-X ge-0/0/1 Fukuoka-X
.3 .4
3.3.3.3/32 4.4.4.4/32

151
151 © 2016 Juniper Networks, Inc. All rights reserved.
OSPFでのルーティング
OSPFの設定を⾏います。
–  Loopbackアドレス(lo0)を設定する
lab@Tokyo# set interfaces lo0 unit 0 family inet address 1.1.1.1/32

–  Router-idを設定する
lab@Tokyo# set routing-options router-id 1.1.1.1

–  OSPFに参加させたいインタフェースを追加する
lab@Tokyo# set protocols ospf area 0 interface lo0.0
– lab@Tokyo# set protocols ospf area 0 interface irb.10
lab@Tokyo# set protocols ospf area 0 interface irb.20

–  Passiveインタフェースを設定する
lab@Tokyo# set protocols ospf area 0 interface irb.100 passive

152
152 © 2016 Juniper Networks, Inc. All rights reserved.
OSPF : Sample Configuration
Tokyo set
set
interfaces lo0 unit 0 family inet address 1.1.1.1/32
routing-options router-id 1.1.1.1
set protocols ospf area 0 interface lo0.0
set protocols ospf area 0 interface irb.10
set protocols ospf area 0 interface irb.20
set protocols ospf area 0 interface irb.100 passive

Nagoya set
set
interfaces lo0 unit 0 family inet address 2.2.2.2/32
routing-options router-id 2.2.2.2
set protocols ospf area 0 interface lo0.0
set protocols ospf area 0 interface irb.20
set protocols ospf area 0 interface irb.40
set protocols ospf area 0 interface irb.200 passive

Osaka set
set
interfaces lo0 unit 0 family inet address 3.3.3.3/32
routing-options router-id 3.3.3.3
set protocols ospf area 0 interface lo0.0
set protocols ospf area 0 interface irb.10
set protocols ospf area 0 interface irb.30
set protocols ospf area 0 interface irb.100 passive

Fukuoka set
set
interfaces lo0 unit 0 family inet address 4.4.4.4/32
routing-options router-id 4.4.4.4
set protocols ospf area 0 interface lo0.0
set protocols ospf area 0 interface irb.30
set protocols ospf area 0 interface irb.40
set protocols ospf area 0 interface irb.200 passive

153
153 © 2016 Juniper Networks, Inc. All rights reserved.
OSPFの動作確認①
OSPFのネイバーのステータスを確認
lab@Tokyo> show ospf neighbor

DR/BDRの確認
lab@Tokyo> show ospf interface

OSPF経由で学習した経路を表⽰
lab@Tokyo> show route

Loopbackアドレスを送信元にしてping, tracerouteを実⾏し全体に
疎通できることを確認します
lab@Tokyo> ping <宛先address> source <⾃機のLo0 address>
lab@Tokyo> traceroute <宛先address>

154
154 © 2016 Juniper Networks, Inc. All rights reserved.
OSPFの動作確認②
OSPF経由で学習した経路のみを表⽰
lab@Tokyo> show route protocol ospf

OSPFデータベース(AREAごと)
  Tokyo>show ospf database area 0

ルータがアドバタイズしているLSAを表⽰
  Tokyo>show ospf database router advertising-router <対向router-id> detail

155
155 © 2016 Juniper Networks, Inc. All rights reserved.
OSPFでのルーティング
Static RouteのOSPFへのRedistributeを⾏います。
–  DummyのStatic Routeを設定する
lab@Tokyo# set routing-options static route 9.9.9.X discard

–  Static RouteをExportするPolicyを作成する
lab@Tokyo# set policy-options policy-statement EXPORT-OSPF from protocol static
lab@Tokyo# set policy-options policy-statement EXPORT-OSPF then accept

–  OSPFにExport Policyを適⽤する
lab@Tokyo# set protocols ospf export EXPORT-OSPF

156
156 © 2016 Juniper Networks, Inc. All rights reserved.
LAB.4 Firewall Filter (ACL) の設定

157
①各EXで図のようにEXからEXへ、

Ethernet Switching "EX/QFX" course telnetアクセスを禁⽌してください

②その後、telnetアクセスを許可するフィ
Topology (Lab.4:アクセスリストの設定) ルターを追加してください

③me0にfilteringをかけて、
FTPアクセスを禁⽌してください

.1 .2
Tokyo-X Nagoya-X
ge-0/0/2 ge-0/0/1 ge-0/0/1 ge-0/0/2
Tokyo-1
irb.100 irb.20 Nagoya-1irb.200
irb.20
10.2.1.0/24
irb.10 (VLAN ID:20) irb.40
ge-0/0/0 ge-0/0/10 ge-0/0/0 ge-0/0/10

10.1.1.0/24 10.4.1.0/24
(VLAN ID:10) (VLAN ID:40) 172.16.2.0/24
172.16.1.0/24
(VLAN ID:100) ae0 ae0 (VLAN ID:200)

ge-0/0/0 ge-0/0/10 ge-0/0/0 ge-0/0/10


irb.10 10.3.1.0/24 irb.40
ge-0/0/2 (VLAN ID:30) ge-0/0/2
irb.100 irb.30 irb.30 irb.200
ge-0/0/1
Osaka-X ge-0/0/1 Fukuoka-X
.3 .4

158
158 © 2016 Juniper Networks, Inc. All rights reserved.
Firewall Filterチェック順序
•  Firewall Filterのチェック順序
§  Port → VLAN → Routerの順序にてFFを実⾏し、Egressは逆の⼿順にてFFを実⾏する
•  RouterのFFは、同⼀VLAN内のswitchパケットに適⽤できない
ge-1/0/5
Input Output

Rx Packet
Router FF Router FF Router FF

Port FF
Switch VLAN FF
VLAN FF VLAN FF

VLAN FF
Port FF
Port FF

Router FF Tx Packet
ge-1/0/0 ge-1/0/1 ge-1/0/3 ge-1/0/4

159
159 © 2016 Juniper Networks, Inc. All rights reserved.
Firewall Filter設定

Port/VLAN-based FF Router-based FF

firewall { firewall {
family ethernet-switching { family inet {
filter <filter-name> { filter <filter-name> {
term <term-name> { term <term-name> {
from { from {
<match conditions>; } <match conditions>;
} }
then <actions defined>; then <actions defined>;
} }
term implicit-rule { term implicit-rule {
then discard; then discard;
} }
} }
} }
} }

パケットは、termの上位からルックアップされる
マッチしたtermのactionを実⾏してぬける
最後に暗黙のdeny(implicit-rule)が隠れている

160
160 © 2016 Juniper Networks, Inc. All rights reserved.
①Firewall Filterを使⽤してtelnetを制御
Firewall Filterを設定します。
set firewall family ethernet-switching filter deny_telnet term t10 from ip-protocol tcp
set firewall family ethernet-switching filter deny_telnet term t10 from destination-port telnet
set firewall family ethernet-switching filter deny_telnet term t10 then discard
set firewall family ethernet-switching filter deny_telnet term t10 then count telnet_count
set firewall family ethernet-switching filter deny_telnet term t20 then accept

Filterをae0インタフェースへ適⽤します。
set interfaces ae0 unit 0 family ethernet-switching filter input deny_telnet

Filterが有効なことを確認するため、telnetで隣接機器にアクセスします。
lab@Tokyo> telnet 10.1.1.3
Trying 10.1.1.3...
[Ctrl+Cで停⽌]

telnet以外の通信(ping, OSPF)は依然可能なことを確認します。
Filterでdiscardされたtelnetのカウンタを確認します。
> show firewall

161
161 © 2016 Juniper Networks, Inc. All rights reserved.
②Firewall Filterを使⽤して管理インタフェースを制御
Firewall Filterを設定する
set firewall family inet filter deny_ftp term t10 from protocol tcp
set firewall family inet filter deny_ftp term t10 from destination-port ftp
set firewall family inet filter deny_ftp term t10 then discard
set firewall family inet filter deny_ftp term t10 then count ftp_count
set firewall family inet filter deny_ftp term t20 then accept

Filterをインタフェースへ適⽤する
set interfaces lo0 unit 0 family inet filter input deny_ftp
set interfaces me0 unit 0 family inet filter input deny_ftp

コマンドプロンプトからFTPで管理IPアドレスにアクセスできなくなったことを確認します。
Filterでdiscardされたtelnetのカウンタを確認します。
> show firewall

※EX, QFXシリーズ⾃⾝への通信を制御する場合、lo0およびme0(EX)・em0(QFX)へFFを適⽤する必要があります。
※SRX, MXシリーズ⾃⾝への通信を制御する場合、lo0のみにFirewall Filterを適⽤することで制御可能となります。
 (管理インタフェースfxp0への適⽤は不要)

162
162 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassisとは、

163
ジュニパーのイーサネット・ファブリック
ジュニパーの解決策:
ソフトウェアの⼒で仮想的にシャーシ型スイッチをエミュレート

仮想シャーシ型スイッチ シャーシ型スイッチをソフトウェアでエミュレートすることで
(イーサネット・ファブリック) ボックス型スイッチにシャーシ型スイッチと同等のメリットを付与し、
さらに物理的な制約を受けない仮想シャーシならではのメリットを提供
レガシーな
シャーシ型スイッチ


エ ンジ L2/L3 Protocol HA
グ・
ティン & ISSU !!!
ルー

リッ
ァブ
・フ
ング
ッチ Devices to Manage
スイ

L2/L3 Local Switching !!! = 1 !!!

ネットワーク管理者

164
164 © 2016 Juniper Networks, Inc. All rights reserved.
旧来のシャーシ型スイッチとVirtual Chassis技術
シャーシ型スイッチのメリット
ü  ⾼信頼性ハードウェア
–  冗⻑ルーティングエンジン Max 480Gbps Backplane
Per line-card Virtual Chassis
–  冗⻑スイッチファブリック
–  冗⻑電源ユニット
LAG 1
–  冗⻑ファントレイ
ü  管理の簡便性
–  シングルイメージ RE 0
–  単⼀のコンフィグファイル
RE 1 10 Slots
–  単⼀のマネージメントIPアドレス
ü  パフォーマンスとスケーリング
–  ハイパフォーマンス
–  ⼤容量のバックプレーン
–  モジュラー型構成

LAG 2
ü Virtual Chassisによる更なるメリット:
§  物理配置の柔軟性
§  低消費電⼒
§  最⼩構成からスタート可能
Max 10 RU
§  必要最低限のラックスペース確保

165
165 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassisのトポロジー
最⼤10メンバーまでであれば、仮想バックプレーンによる接続を使⽤した⾃由なトポ
ロジーでL2/L3ファブリックを構成することが可能

Braid Ring ※接続⽅法は、筐体間の距離に応じて


Copper (DAC/QSFP-DAC)かFiberから選択

Spine & Leaf Combination

166
166 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassisの仮想バックプレーン
前⾯・背⾯のファイバー・イーサネット・ポートを⾃由に
仮想バックプレーンに変換してVCを構成することが可能

EX3400シリーズ QFX5100シリーズ

EX4300シリーズ

10G*N Gbps 仮想バックプレーン(VCポート)

40G*N Gbps 仮想バックプレーン(VCポート)

167
167 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual ChassisのHigh Availability機能
Master REに障害が発⽣しても無停⽌でプロトコル継続運⽤が可能な
Non Stop Routing(NSR)およびNon Stop Bridging(NSB)

OSPF・BGP neighbor
Member3 :LC 3 (L3 Protocol)

Kernel、FowardingTable、interface info
L3 Protocol State & L2 Protocol State
Member2:RE 0
Master RE

Member1 :LC 2

Member0 :RE 1
Backup RE

LACP・xSTP neighbor
RE間で各種プロトコルのステータスをコピーし、フェイルオーバーに備えることで (L2 Protocol)
障害時におけるL2/L3プロトコルへの影響を最⼩化

168
168 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual ChassisのOSバージョンアップ
Non Stop Software Upgrade(NSSU)により管理者は、コマンド⼀⾏で
システムダウンタイムを約1秒以内の想定※でOSのバージョンアップを実⾏

request system software


non-stop-upgrade !!!
Member3 :LC 3
Reboot
3rd

Member2:RE 0
Master RE Reboot
4th

ネットワーク管理者 Member1 :LC 2


Reboot
2nd

Member0 :RE 1
Backup RE Reboot
1st

管理者によるUpgradeコマンドの発呼後、各RE、Linecardと順に再起動して新OSを反映するため、
ラインカード跨ぎのインタフェースの保護構成を取ることとNSR/NSBとの併⽤でOSアップグレード時の影響を最⼩化することが可能

※すべての環境で1秒以内のダウンタイムを保証するものではありません。環境に応じた事前の検証をお勧めします。

169
169 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassis Mixed Mode
異なるメディアスピードのラインカードをVirtual Chassis内で収容可能なため
1GbE から 10GbE サーバーへのシームレスな移⾏をサポート
Devices to Manage

= 1 !!!

ネットワーク管理者

EX4300 EX4300 QFX5100 QFX5100

1GbE servers 10GbE servers 40GbE storages

※EX3300,EX3400ではMixed Mode Virtual Chassisはサポートされません。

170
170 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassisの使⽤例@DCネットワーク :その1
コアVCと10 member Braid Ring VCによる2階層構成(コスト重視構成)

DC Switches to Manage
The Internet Interconnect = 3 !!!
(MPLS)

Service Gateway DC Edge Router


(SRX) (MX)

ネットワーク管理者
Load-Balancer
Core Switch
(QFX5100 VC)

40GbE*N LAG 40GbE*N LAG


Access Switch Access Switch
( EX4300 VC) ( QFX5100 VC)

10 member Braid Ring VC 10 member Braid Ring VC


Per Row Per Row

異なるLCへの 異なるLCへの
NIC Teaming LAG

1G Server 10G Server

1G POD 10G POD

171
171 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassisの使⽤例@DCネットワーク :その2
コアVCと2 member VCによる2階層構成(パフォーマンス重視構成)

DC L2/L3冗⻑プロトコルの管理は必要なし!
The Internet e.g. xSTP,MC-LAG,TRILL,VRRP,OSPF,,,
Interconnect
(MPLS)

Service Gateway DC Edge Router


(SRX) (MX)

ネットワーク管理者
Load-Balancer Core Switch
(QFX5100 VC)

10GbE*N LAG 40GbE*N LAG


2〜10 member VCs
2〜10 member VCs
per Rack
per Rack

Access Switch Access Switch


( EX4300 VCs) ( QFX5100
VCs)

… …
異なるLCへの 異なるLCへの
NIC Teaming LAG
1G Server 10G Server

1G POD 10G POD

172
172 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassisの使⽤例@DCネットワーク :その3
管理セグメントのシンプル化 ZTPやオーケストレーションなど、
⾃動化の配備には管理セグメントの整備が重要!

Core Switch
(QFX5100 VC)

ネットワーク管理者

Access Switch
( QFX5100 VCs) …

1GbB Management Network


Management Switch
( EX3400 VC)

10 member Braid Ring VC


Per Row

10G POD

173
173 © 2016 Juniper Networks, Inc. All rights reserved.
中⼩エンタープライズ (450ユーザ位まで)における
キャンパスを⼀つのEX3400 Virtual Chassisで収容する例
Building 1 Building 2 Building 3 Building 4

10Gig 10Gig 10Gig

EX3400 EX3400 EX3400 EX3400


Virtual Chassis Virtual Chassis Virtual Chassis Virtual Chassis
x2 x2 x2 x2

Closet 1A Closet 2A Closet 3A Closet 4A

EX3300
Virtual Chassis

Core
EX3400 Virtual Chassis

§  Virtual Chassis を複数のワイヤリングクローゼット、ビル間で構築することで、


§  キャンパスNWを1台のスイッチで収容するソリューション
§  アップリンクポートの削減
§  最⼤100km (62.5 miles) までをVirtual Chaissの10GbEバックプレーンで収容
§  必要管理デバイス数の削減
§  STP を排除したネットワークデザイン
§  High Availability Virtual Chassis
§  VRRPや複雑なルーティング、VLANの管理が不要

174
174 © 2016 Juniper Networks, Inc. All rights reserved.
EX4600 Virtual Chassis をキャンパスにおける
Aggregation/Coreスイッチとして使⽤する例
Building 1 Building 2

EX4300 EX3400 EX3400 EX3400


Virtual Virtual Virtual Virtual
Chassis Chassis Chassis Chassis
x10 x10 x10 x10

Closet 1A Closet 1B Closet 2A Closet 2B

STP VRRP
EX4600
Virtual Chassis Core
EX4600 Virtual Chassis §  既存のアグリゲーション/コア・スイッチと⽐較して
圧倒的なコストパフォーマンス
§  10GbE LAGによるワイヤリングクローゼットからのアップリンク §  コストは1/8 に
§  多数の3400バーチャル・シャーシを冗⻑性を持って収容 §  パフォーマンスは4倍に
§  STP を排除したネットワークデザイン
§  VRRPや複雑なルーティング、VLANの管理が不要

175
175 © 2016 Juniper Networks, Inc. All rights reserved.
距離が離れたキャンパスネットワークを
1セットのVirtual Chassisで収容する例
Campus-C Campus-D Campus-E Campus-F

EX4300 EX4300 EX4300 EX4300


x2 x2 x2 x2

Virtual Chassis

EX4600 EX4600

Campus-A Campus-B

EX4600 & EX4300 〜x00km


Mixed Virtual Chassis
Virtual Integrated Remote Campus
§  距離が離れたキャンパスネットワークを⼀
台の仮想シャーシで集約することが可能

176
176 © 2016 Juniper Networks, Inc. All rights reserved.
まとめ:Virtual Chassisによるメリット

最⼤で10台のスイッチまでを Industry-
⼀つの仮想シャーシとして設定、管理運⽤が可能 only

Industry-
物理的に離れたデバイスであっても論理的に統合可能 only

異なるプラットフォーム間でのバーチャルシャーシ接続 Industry-
only
(e.g. QFX5100 + EX4300)

コア、1G/10G/40Gアクセス、マネジメント Industry-
規模やサービスレベルに応じた様々なVCを提供 only

これにより拡張し続けるデータセンターのネットワークをシンプルに管理運⽤することが可能に!
177
Virtual Chassis Deep Dive

178
Virtual Chassis™ Backplane Cabling
Option 1 – Dedicated Virtual Chassis Option 2 – Dedicated Virtual Chassis
Daisy-Chained Ring Braided Ring

5m 23 m

•  Longest Virtual Chassis cable spans the entire §  Longest Virtual Chassis cable spans three switches
Virtual Chassis •  VCの⾼さ、幅を 約23mまで拡張する接続⽅法
–  もっともシンプルな接続⽅法
–  VCの⾼さ・幅はVCケーブルの最⼤⻑5m以内

179
179 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassis™ Backplane Cabling
Option 3 – Extended Virtual Chassis

Up to 80 km
Dedicated Virtual
Chassis Backplane 10GbE or 40GbE Virtual Chassis Extension

Virtual Chassis Location #1 Virtual Chassis Location #2

10GbE or 40GbE Virtual Chassis Extension

•  Extend height and/or width of Virtual Chassis by GbE or 10GbE uplinks


–  オプティックスのサポートする距離まで拡張可能 (70km)
•  Extend Virtual Chassis across:
–  ワイヤリングクローゼットを越えた接続
–  データセンター内ラックを越えた接続
–  データセンターの列を越えた接続、など

180
180 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassis™ Backplane Cabling
Option 4 –Virtual Chassis Mesh

Up to 70 km

10/40GbE Virtual Chassis Extension

•  Extend height and/or width of Virtual Chassis by GbE uplinks


–  オプティックスのサポートする距離まで拡張可能 (80km)
•  Extend Virtual Chassis across:
–  データセンター内ラックを越えた接続
–  データセンターの列を越えた接続
–  データーセンターのWANを越えた接続、など

181
181 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassisの接続⽅法について -1
VCを構成する際には、VCの仮想バックプレーン(VCP)同⼠を接続する必要があります。
プラットフォームによって⼯場出荷時の状態でVCPが設定されているものとそうでないものがあり
ます。

EX3300シリーズ EX4300シリーズ QFX5100シリーズ

ファイバー・ デフォルトのVCP ファイバー・


イーサネットポート デフォルトのVCP (なし) イーサネットポート
(xe-0/1/2~3) デフォルトのVCP
ファイバー・
(et-0/2/2~3)
イーサネットポート

ファイバーのイーサネットポートをVCPにコンバートするコマンドは以下で実⾏可能です。
必要に応じてVCPの設定追加・削除をした上でVC接続を⾏ってください。

request virtual-chassis vc-port set pic-slot <pic-slot> port <port-number> member <member-id>

request virtual-chassis vc-port delete pic-slot <pic-slot> port <port-number> member <member-id>

182
182 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassisのコンポーネント
“Master”, “Backup” および “Linecard”
–  Master switch (active RE)
–  相互接続された VC switchの1つのスイッチがマスターになります。
JUNOSを起動しておりVirtual Chassisの管理を実施します。
•  すべてのvirtual chassisを管理するデーモンおよびコントロールプロトコルを動作させる
•  すべてのインタフェースを管理する、ハードウェアフォワーディングの管理を実施

–  Backup switch (backup RE)


–  相互接続された VC switchの1つのスイッチがバックアップになります。
JUNOSを起動しておりバックアップとしてマスターと連携を実施します。
•  GRES使⽤時は、RE0とハードウェアフォワーディングテーブルの同期をとっている
•  RE0が故障した場合にRE0に変わり、シャーシの管理やインタフェース管理を実施

–  “Linecard” switch (Linecard)


–  その他のメンバーになっているスイッチはすべてラインカードになります。
JUNOSを起動しておりラインカードとして動作している。
•  Non Preprovisioned Modeの場合、マスターかバックアップが故障した場合,ラインカードのひとつが新しいバック
アップとして動作します

183
183 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassisの構成⽅法について-1
VCを構成する際には、
Plug-and-PlayでのVC構成を提供する“Non-Preprovisioned mode”と
最低限の設定投⼊によりVCを構成する“Preprovisioned mode”から選択が可能です。

 Non-preprovisoned Configuration
 - マスター・セレクション・アルゴリズムにより⾃動的にVCを構成することが可能
Master-ship priority値や起動順序により、master/backup/linecardを決定
Master/BackupREは, master-ship priority 255を推奨
 - REの障害時には、Linecard役の中から1台がREに昇格する

 Preprovisoned Configuration
 - 明⽰的にREやLinecardに指定したスイッチを作成することにより、より明⽰的な運⽤の実現とAdvanced Licenseの消費を抑える
ことが可能
  ※ NSSUはPreprovisioned Configurationでのみサポート

184
184 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassisの構成⽅法について-2
より簡易性が求められるネットワークへのデプロイ時には“Non-Preprovisioned mode”でVCを構
成します。“Non-Preprovisioned mode”では予め設定されたルールに基づき、どの筐体が
Routing Engineの役割を担うか⾃動的に計算されてVCが構成されます。
•  マスターRE(RE0)選定
起動するときにはすべてのスイッチで以下項⽬⽐較の元、マスターの選定が⾏われる
Master 選定の優先順位:
1.マスターシップの優先順位が最も⾼い (0-255までの優先順位、デフォルト値は 128)

> set virtual-chassis member <member-id> mastership-priority <priority 1-255>

2.以前動作していたときにマスターに選定されていた
3.起動している時間が⻑い (起動している時間が1分以上違う場合)
4.MAC アドレスの⼩さいほう
※マスターが選定された後、マスターREと同じ選定⽅式により、バックアップREスイッチの選定が実施される

•  Linecard
バーチャル・シャーシを構成する残りのスイッチは、ラインカードとして動作
マスター、バックアップが何らかの理由によりフェイルした場合、マスターREと同じ選定⽅式によりラインカードからバックアップスイッ
チの選定を実施

185
185 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassisの構成⽅法について-3

より⾼いSLAが求められるネットワークへのデプロイ時には“Preprovisioned mode”でのVC構成
を推奨されます。
“Preprovisioned mode”では設定によりシリアルでのハードウェアとRole管理によるより安定し
た運⽤と、OSアップグレード時にミニマムなダウンタイムでの実施完了を期待できる
NSSU(Non Stop Software Upgrade)サービスが提供されます。

set virtual-chassis preprovisioned Preprovisioned modeを宣⾔


set virtual-chassis member 0 role routing-engine
set virtual-chassis member 0 serial-number 111111111111 各筐体毎のシリアルNo.を投⼊
set virtual-chassis member 1 role line-card
set virtual-chassis member 1 serial-number 222222222222
set virtual-chassis member 2 role line-card
set virtual-chassis member 2 serial-number 333333333333
任意の筐体2台でRouting-Engine Roleを宣⾔、
set virtual-chassis member 3 role routing-engine その他の筐体のRoleはすべてLinecard
set virtual-chassis member 3 serial-number 444444444444

186
186 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassisの確認⽅法について-1
lab@lab> show virtual-chassis?

root@Juniper> show virtual-chassis ?


Possible completions:
<[Enter]> Execute this command
active-topology Virtual chassis active topology
device-topology PFE device topology
login
mode Virtual chassis mode information
protocol Show virtual chassis protocol information
status Virtual chassis information
vc-path Show virtual-chassis packet path
vc-port Virtual chassis port information
| Pipe through a command
{master:0}

187
187 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassisの確認⽅法について-2
“show virtual-chassis status”コマンドにて構成されたVCの状態を確認することが可能です。
root> show virtual-chassis status

Virtual Chassis ID: 0019.e255.3740


Mastership Neighbor List
Member ID Status Serial No Model priority Role ID Interface
0 (FPC 0) Prsnt BM0208124253 ex4200-24t 128 Master* 1 vcp-0
2 vcp-1 Non-Preprovisioned Modeの場合、Defaultではすべ
1 (FPC 1) Prsnt BM0208124327 ex4200-24t 128 Backup 2 vcp-0 てのメンバーのMastership Priorityは128となる(RE
0 vcp-1 はマニュアルで255に変更することを推奨)
2 (FPC 2) Prsnt BM0208124235 ex4200-24t 128 Linecard 0 vcp-0
1 vcp-1
Member ID for next new member: 3 (FPC 3)

root> show virtual-chassis status

Preprovisioned Virtual Chassis


Virtual Chassis ID: 0019.e255.3740
Mastership Neighbor List
Member ID Status Serial No Model priority Role ID Interface
0 (FPC 0) Prsnt BM0208124253 ex4200-24t 129 Master* 1 vcp-0 Preprovisioned Modeの場合、REのMastership
2 vcp-1 Priorityが129となり、
1 (FPC 1) Prsnt BM0208124327 ex4200-24t 129 Backup 2 vcp-0 LinecardのMastership Priorityは0となる
0 vcp-1
2 (FPC 2) Prsnt BM0208124235 ex4200-24t 0 Linecard 0 vcp-0
1 vcp-1

188
188 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassisの確認⽅法について-3
“show virtual-chassis vc-port”コマンドにてVCバックプレーンの状態を確認することが可能です。
root@Juniper> show virtual-chassis vc-port
fpc0:
--------------------------------------------------------------------------
Interface Type Trunk Status Speed Neighbor
or ID (mbps) ID Interface
PIC / Port
vcp-0 Dedicated 2 Up 32000 1 vcp-1
vcp-1 Dedicated 1 Up 32000 9 vcp-0
1/0 Configured -1 Up 1000 1 vcp-255/1/1
1/1 Configured -1 Up 1000 3 vcp-255/1/0

fpc1:
--------------------------------------------------------------------------
Interface Type Trunk Status Speed Neighbor
or ID (mbps) ID Interface
PIC / Port
vcp-0 Dedicated 2 Up 32000 2 vcp-1
vcp-1 Dedicated 1 Up 32000 0 vcp-0
1/0 Configured -1 Up 1000
1/1 Configured -1 Up 1000 0 vcp-255/1/0

fpc2:
--------------------------------------------------------------------------

189
189 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassis Mixed Mode
QFX5100,EX4600,EX4300などにおいては、異なるメディアのプラットフォームを1台の
VCとして構成させることも可能です。

その場合はVCに組み込む前に以下のコマンドでVCのMixed Modeを宣⾔して機器をReboot
する必要があります。
Mixed Mode VCはVCを構成するメンバー全ての筐体で宣⾔する必要が有ります。

request virtual-chassis mode mixed


request system reboot

QFX5100 EX4600
EX4300

190
190 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassisへのアクセスについて -1
Virtual Chassisを構成すると、複数台のスイッチが1台の仮想シャーシ型スイッチとして動作しま
す。VCへのアクセスはConsole接続経由とネットワーク経由と⼆種類の選択肢がありますが、そ
れぞれ以下の様な概念で動作しています。

・コンソールアクセス
ネットワーク管理者は任意のラインカード上のコンソールポートに接続すると、接続コネクショ
ンが内部的にMaster REにリダイレクトされる。つまり物理的な場所を気にする必要なくREにア
クセスすることが可能です。

Member2 :LC 2 Master RE

Console

Member3 :LC 3
ネットワーク管理者 Backup RE

Member4 :LC 4

191
191 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassisへのアクセスについて -2
・ネットワークアクセス
仮想管理アドレスであるVME(Virtual Management Ethernet)にIPアドレスを付与することで
Master REがVMEアドレスへのアクセス要求に返答を⾏います。これによりひとつのIPアドレス
で仮想シャーシへのネットワークアクセスが提供されます。
set interface vme unit 0 family inet address <address/mask>

ケーブリングはMaster REになりうる2つの筐体でのみリンクアップさせておけば他は不要です。
管理セグメント

SSH,Telnet,FTP,etc… mgmt
Member2 :LC 2 Master RE

Member3 :LC 3 mgmt


ネットワーク管理者 Backup RE

Member4 :LC 4

192
192 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual ChassisのHA機能について
Routing Engine(RE)の障害時に出来る限り⾼速な切り替わりを提供するためには、以下の4⾏
の設定投⼊をしておく必要があります。
VCの初期構成時点で使⽤しているL2/L3プロトコルの種類に限らずこの4⾏の設定は無条件に投⼊
しておくことをおすすめします。

EX3400/4300/EX4600/QFX5100シリーズ
KernelやInterface、L2/L3テーブルをRE間で同期

set chassis redundancy graceful-switchover L3のプロトコルステータスをRE間で同期


set routing-options nonstop-routing
set protocols layer2-control nonstop-bridging L2のプロトコルステータスをRE間で同期
set system commit synchronize
おまじない

EX3300シリーズ

set chassis redundancy graceful-switchover


set routing-options nonstop-routing
set ethernet-switching-options nonstop-bridging
set system commit synchronize

193
193 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassis バックプレーン増強について
同⼀VCメンバー間で複数の仮想バックプレーン(VCP)が接続されたことをVCが認識すると、
その間は⾃動的にLAGが構成され、バックプレーン帯域がリンク数*Nへと増強されていきます。
この際、設定は特に必要ありません。

194
194 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassisに関するドキュメント
以下にVirtual Chassisを解説する各種資料がありますので、必要に応じてご参照ください。

・Links
https://www.juniper.net/techpubs/en_US/junos14.1/information-products/pathway-
pages/qfx-series/virtual-chassis.pdf

https://www.juniper.net/techpubs/en_US/junos14.1/topics/concept/virtual-chassis-ex-
qfx-series-mixed-understanding.html

・Whitepaper
http://www.juniper.net/us/en/local/pdf/whitepapers/2000427-en.pdf

・Day One Books


http://hydra.ck.polsl.pl/~helot/ipad/DayOne-Book/
Configuring%20EX%20Series%20Switches.pdf

195
195 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassisに関するドキュメント
•  Virtual Chassis for Cloud Builders
hHp://www.slideshare.net/JuniperJapan/vc4-cb-201505

Virtual Chassisの使い⽅や内部動作詳細を⽇本語で解説!

196
196 © 2016 Juniper Networks, Inc. All rights reserved.
LAB.5 Virtual Chassis の設定

197
Ethernet Switching "EX/QFX" course
Topology (Lab.5:Virtual Chassisを構成)

EX3400 Rear View

Tokyo

● ●
VCP(Factory Default)
Nagoya

Osaka

0 1 2 3
Fukuoka 10GbE VCP
(xe-0/2/0-1) (xe-0/2/2-3 configured)

※EX3400シリーズは⼯場出荷状態では2つの40GbEインタフェースがVC Portとしてデフォルトで設定されています。
本トレーニングではケーブルの都合上、4つの10GbEインターフェイスのうち⽼番の2ポートをVC Portとして事前設定してあります。

198
198 © 2016 Juniper Networks, Inc. All rights reserved.
VC事前確認①
VCを構成する前に、単体のEXで以下のことを事前確認してください。
•  Member-idが”0”であること
•  Member ID for next new memberが”1” であること
•  Mixed modeが”N”または”NA”となっていること
•  Master priorityが”128”であること
> show virtual-chassis
Virtual Chassis ID: 2d90.26d8.22f2
Virtual Chassis Mode: Enabled
Mstr Mixed Neighbor List
Member ID Status Serial No Model prio Role Mode ID Interface
0 (FPC 0) Prsnt BR0208392392 ex4200-24t 128 Master* N

Member ID for next new member: 1 (FPC 1)

•  Config上にvirtual-chassisに関連する設定が何も⼊っていないこと
# show virtual-chassis

EXのJunos SWバージョンが他のメンバーと同⼀であること
199
199 © 2016 Juniper Networks, Inc. All rights reserved.
VC事前確認② EX3400

VCに使⽤するポートの設定を確認します。
• 2つのポート2/2, 2/3がVC Portに設定されていること
• TypeがConfiguredと表⽰されていること
• StatusがAbsent, またはDownであること

lab@EX3400> show virtual-chassis vc-port


fpc0:
--------------------------------------------------------------------------
Interface Type Trunk Status Speed Neighbor
or ID (mbps) ID Interface
PIC / Port
2/2 Configured Absent
2/3 Configured Absent

200
200 © 2016 Juniper Networks, Inc. All rights reserved.
①VC Basic Setup (non pre-provisioned)
・Tokyo以外のスイッチで、電源をOFFにします。

root> request system halt at now

・(Tokyoのみ)VC管理⽤インタフェースとしてme0の設定をvmeに移しておきます。

# rename interfaces me0 to vme


# commit

・TokyoとNagoyaのVC Portを接続し、Nagoyaの電源をONにします。
TokyoがMasterに選定されますので、TokyoのIPアドレスに接続しなおします。

・同様に、Osaka、Fukuokaをそれぞれ順に接続し、電源を起動します。

201
201 © 2016 Juniper Networks, Inc. All rights reserved.
①VC基本構成確認

以下のコマンドでVCのステータスを確認します。

> show virtual-chassis status


> show virtual-chassis vc-port
> show virtual-chassis login

以下のコマンドでVCメンバーの機器にログインできます。
> request session member <member-id>

202
202 © 2016 Juniper Networks, Inc. All rights reserved.
②mastership priorityの変更 (non pre-provisioned)
•  Mastership Priorityを変更して、任意のEXをMaster RE、Backup REに指定します。
•  以下の設定はMasterとなっているスイッチで実⾏してください。
0
Master Priority =255

2
Master Priority =255

root# set virtual-chassis member 0 mastership-priority 255


root# set virtual-chassis member 2 mastership-priority 255
Root# commit synchronize

203
203 © 2016 Juniper Networks, Inc. All rights reserved.
②mastership priorityの変更 (non pre-provisioned)
  Mastership Priorityが変更され、ステータスが更新されたことを確認します。
root> show virtual-chassis
root> show virtual-chassis vc-port statistics extensive

  TokyoとNagoya間のVCケーブルを抜去し、ステータスやVCポートの遷移を確認します。
root> show virtual-chassis

0
Master Priority =255

2
Master Priority =255

204
204 © 2016 Juniper Networks, Inc. All rights reserved.
③Virtual Chassisのリセット
•  VCを解体して、4台の個別なスイッチに戻す
•  VCPケーブルを抜き、各スイッチでステータスを確認 0
Pre-Master RE
member-id 0

1 Pre line-card
member-id 1

2 Pre-Backup RE
member-id 2

3 Pre line-card
member-id 3

解体後、で以下コマンドを実⾏して各種VC情報を消去(以下はBackup-RE の例)

root> request virtual-chassis reactivate


root> request virtual-chassis recycle member-id 0
root> request virtual-chassis recycle member-id 1
root> request virtual-chassis recycle member-id 3
root> request virtual-chassis renumber member-id 1 new-member-id 0

205
205 © 2016 Juniper Networks, Inc. All rights reserved.
④Pre-provisioning configuration 0
Role = Routing Engine

•  VCをPreprovision Configurationで構成する
•  Master REに以下の設定を投⼊後、各メンバーの 1
VCポートを接続

3 Role = Routing Engine

root# set virtual-chassis preprovisioned


root# set virtual-chassis member 0 role routing-engine
root# set virtual-chassis member 0 serial-number xxxxxxxxxxxx
root# set virtual-chassis member 1 role line-card
root# set virtual-chassis member 1 serial-number xxxxxxxxxxxx
root# set virtual-chassis member 2 role line-card
root# set virtual-chassis member 2 serial-number xxxxxxxxxxxx
root# set virtual-chassis member 3 role routing-engine
root# set virtual-chassis member 3 serial-number xxxxxxxxxxxx

シリアル番号は適宜修正をしてください。
206
206 © 2016 Juniper Networks, Inc. All rights reserved.
⑤Virtual Chassis HA
•  RE間のテーブルやプロトコルの同期設定を⾏うことで、RE障害のダウンタイムを軽減する

0
Role = Routing Engine

3
Role = Routing Engine

root# set chassis redundancy graceful-switchover


root# set routing-options nonstop-routing
root# set protocols layer2-control nonstop-bridging
root# set system commit synchronize

207
207 © 2016 Juniper Networks, Inc. All rights reserved.
⑤Virtual Chassis HA
•  OSPFの設定をVC-1、VC-2に投⼊した後に、Master REをHaltしてNSRの効果を確認する

VC-1 (192.168.1.1) VC-2 (192.168.1.5)

Lo0 1.1.1.1 Lo0 2.2.2.2

0 0
Role = Routing Engine Role = Routing Engine
1 Ae0(ge-1/0/23) Ae0(ge-1/0/23) 1
Ae0(ge-2/0/23) Ae0(ge-2/0/23)
2 2
Role = Routing Engine 3 Ae0 10.1.1.x/24 3 Role = Routing Engine

208
208 © 2016 Juniper Networks, Inc. All rights reserved.
⑤Virtual Chassis HA
•  設定サンプル
VC-1 (192.168.1.1)

set chassis aggregated-devices ethernet device-count 1


set interfaces ge-1/0/23 ether-options 802.3ad ae0
set interfaces ge-2/0/23 ether-options 802.3ad ae0
set interfaces ae0 unit 0 family inet address 10.1.1.1/24
set interfaces lo0 unit 0 family inet address 1.1.1.1/32
set routing-options router-id 1.1.1.1
set protocols ospf area 0.0.0.0 interface ae0.0
set protocols ospf area 0.0.0.0 interface lo0.0

VC-2 (192.168.1.5)

set chassis aggregated-devices ethernet device-count 1


set interfaces ge-1/0/23 ether-options 802.3ad ae0
set interfaces ge-2/0/23 ether-options 802.3ad ae0
set interfaces ae0 unit 0 family inet address 10.1.1.2/24
set interfaces lo0 unit 0 family inet address 2.2.2.2/32
set routing-options router-id 2.2.2.2
set protocols ospf area 0.0.0.0 interface ae0.0
set protocols ospf area 0.0.0.0 interface lo0.0

209
209 © 2016 Juniper Networks, Inc. All rights reserved.
⑤Virtual Chassis HA
•  確認⽅法
(VC-1のMaster REをRebootしたときに、対向のVC-2側のOSPF neighborが切れないことを確認)
VC-1 (192.168.1.1)

{master:0}[edit]
root@Tokyo-1# run request system reboot member 0 at now
Reboot the system at now? [yes,no] (no) yes

VC-2 (192.168.1.5)

{master:0}[edit]
root@Tokyo-2# run show ospf neighbor detail
Address Interface State ID Pri Dead
10.1.1.1 ae0.0 Full 1.1.1.1 128 38
Area 0.0.0.0, opt 0x52, DR 10.1.1.2, BDR 10.1.1.1
Up 00:03:24, adjacent 00:03:24

210
210 © 2016 Juniper Networks, Inc. All rights reserved.
⑥Virtual Chassis の⽬視での確認⽅法
•  Virtual Chassisの状態はStatus LEDを⽬視することで状態の確認を⾏うことが可能です。

QFX5100の場合 SYS (System)

•  消灯:システムがパワーオフ、もしくはHalt状態
•  点灯:JUNOSがスイッチ上で動作している状態
•  点滅:以下のうちどれかの状態
•  Virtual Chassis(VC)のメンバースイッチ
•  Virtual Chassis Fabric(VCF)のメンバースイッチ

MST (Master)

•  消灯:VC/VCFのLinecardとして動作
•  点灯:以下のうちどれかの状態
•  スタンドアローンスイッチ
•  VCのMaster REスイッチ
•  VCFのMaster REスイッチ
•  点滅:以下のうちどれかの状態
•  VCのBackup REスイッチ
•  VCFのBackup REスイッチ

211
211 © 2016 Juniper Networks, Inc. All rights reserved.
⑥Virtual Chassis の⽬視での確認⽅法
•  Virtual Chassisの状態はStatus LEDを⽬視することで状態の確認を⾏うことが可能です。

EX3400/EX4300の場合 SYS (System)

•  点灯:JUNOSがスイッチ上で動作している状態
•  点滅:スイッチが起動中の状態
•  消灯:システムがパワーオフ、もしくはHalt状態

MST (Master)

•  Standaloneの場合
•  消灯:システムがパワーオフ、もしくはHalt状態
•  点灯:JUNOSがスイッチ上で動作している状態

•  Virtual Chassisの場合
•  点灯:VCのMaster REスイッチ
•  点滅:VCのBackup REスイッチ
•  消灯:VCのLinecardスイッチ、もしくはHalt状態

212
212 © 2016 Juniper Networks, Inc. All rights reserved.
TIPs to be JUNOS Experts

213
俳句の表⽰
検証作業やトラブルシュートに疲れたときには、JUNOSに前向きな気持ちの⾔葉を
表⽰させ、管理者の気持ちを和らげることが可能です
root> show version and haiku

root> show version and haiku root> show version and haiku root> show version and haiku
Model: ex2200-c-12p-2g Model: ex2200-c-12p-2g Model: ex2200-c-12p-2g
Junos: 14.1X53-D25.2 Junos: 14.1X53-D25.2 Junos: 14.1X53-D25.2
JUNOS EX Software Suite [14.1X53-D25.2] JUNOS EX Software Suite [14.1X53-D25.2] JUNOS EX Software Suite [14.1X53-D25.2]
JUNOS FIPS mode utilities [14.1X53-D25.2] JUNOS FIPS mode utilities [14.1X53-D25.2] JUNOS FIPS mode utilities [14.1X53-D25.2]
JUNOS Online Documentation [14.1X53-D25.2] JUNOS Online Documentation [14.1X53-D25.2] JUNOS Online Documentation [14.1X53-D25.2]
JUNOS EX 2200 Software Suite [14.1X53-D25.2] JUNOS EX 2200 Software Suite [14.1X53-D25.2] JUNOS EX 2200 Software Suite [14.1X53-D25.2]
JUNOS Web Management Platform Package JUNOS Web Management Platform Package JUNOS Web Management Platform Package
[14.1X53-D25.2] [14.1X53-D25.2] [14.1X53-D25.2]

Look, mama, no hands! Juniper babies Weeks of studying,


Only one finger typing. The next generation starts Days of lab exercises:
Easy: commit scripts. Gotta get more sleep JNCIE.

※コマンドを打つ度、異なった前向きなポエムが表⽰される

214
214 © 2016 Juniper Networks, Inc. All rights reserved.
設定のコピー
•  copy コマンドにより特定の設定をコピーすることが可能
ge-0/0/1の設定をge-0/0/0へコピー

root# copy interfaces ge-0/0/1 to ge-0/0/0

root# show interfaces root# show interfaces


ge-0/0/1 { ge-0/0/0 {
unit 0 { unit 0 {
family inet { family inet {
address address
192.168.1.1/26; 192.168.1.1/26;
ge-0/0/1 {
unit 0 {
family inet {
address
192.168.1.1/26;

215
215 © 2016 Juniper Networks, Inc. All rights reserved.
設定の書き換え
•  rename コマンドにより設定したvariable やエレメントを書き換えることも可能
ge-0/0/0のaddressを192.168.2.1/26へ変更

root# rename interfaces ge-0/0/0 unit 0 family inet address 192.168.1.1/26 to address 192.168.2.1/26

root# show interfaces root# show interfaces


ge-0/0/0 { ge-0/0/0 {
unit 0 { unit 0 {
family inet { family inet {
address address
192.168.1.1/26; 192.168.2.1/26;
ge-0/0/1 { ge-0/0/1 {
unit 0 { unit 0 {
family inet { family inet {
address address
192.168.1.1/26; 192.168.1.1/26;

216
216 © 2016 Juniper Networks, Inc. All rights reserved.
設定の項⽬の置換
•  replace コマンドにより設定内の⽂字列を置換することも可能
ge-0/0/0のaddressを192.168.2.1/26へ変更

root# replace pattern /26 with /24

root# show interfaces root# show interfaces


ge-0/0/0 { ge-0/0/0 {
unit 0 { unit 0 {
family inet { family inet {
address address
192.168.2.1/26; 192.168.2.1/24;
ge-0/0/1 { ge-0/0/1 {
unit 0 { unit 0 {
family inet { family inet {
address address
192.168.1.1/26; 192.168.1.1/24;

217
217 © 2016 Juniper Networks, Inc. All rights reserved.
activate/deactivate
•  deactivateコマンドを使うことで、設定の⼀部を削除することなく無効にするこ
とが可能なので、障害時の切り分けなどに便利

192.168.1.2/24を無効化
root# deactivate interfaces ge-0/0/1 unit 0 family inet address 192.168.1.2/24

root# show interfaces root# show interfaces


ge-0/0/1 { ge-0/0/1 {
unit 0 { unit 0 {
family inet { family inet {
address 192.168.1.1/24; address 192.168.1.1/24;
address 192.168.1.2/24; inactive: address 192.168.1.2/24;

192.168.1.2/24の無効化を解除(有効化)

root# activate interfaces ge-0/0/1 unit 0 family inet address 192.168.1.2/24

218
218 © 2016 Juniper Networks, Inc. All rights reserved.
wildcard range set/delete -1
•  wildcard rangeコマンドを使⽤することで、インタフェースなど複数の対象に
対して同じ設定内容を適⽤することが簡単に可能
root# show interfaces

root#

root# wildcard range set interfaces ge-0/0/[0-3,5,!2] mtu 9000

[0-3, 5, !2] ⇒ 0〜3と5、ただし2は除く

root# show interfaces


ge-0/0/0 { mtu 9000; }
ge-0/0/1 { mtu 9000; }
ge-0/0/3 { mtu 9000; }
ge-0/0/5 { mtu 9000; }

ge-0/0/0-1,3,5のMTU設定が⼀括で投⼊されている

219
219 © 2016 Juniper Networks, Inc. All rights reserved.
wildcard range set/delete -2
•  同様にDeleteも可能

root# show interfaces


ge-0/0/0 { mtu 9000; }
ge-0/0/1 { mtu 9000; }
ge-0/0/3 { mtu 9000; }
ge-0/0/5 { mtu 9000; }

root# wildcard range delete interfaces ge-0/0/[0-1] mtu

root# show interfaces


ge-0/0/3 { mtu 9000; }
ge-0/0/5 { mtu 9000; }

220
220 © 2016 Juniper Networks, Inc. All rights reserved.
interface-range -1
•  interface-rangeを使⽤することで、複数のインタフェースをグループ化して
共通の設定を⾏う事が可能。この設定はwildcardと異なりコンフィグ内に保持
される為、⼀度作成してしまえば様々な設定に対する繰り返しの利⽤が可能
root# show interfaces

root#

root# set interfaces interface-range CLIENTS member-range ge-0/0/0 to ge-0/0/1


root# set interfaces interface-range CLIENTS member ge-0/0/3
root# set interfaces interface-range CLIENTS mtu 9000

root# show interfaces


interface-range CLIENTS {
member ge-0/0/3;
member-range ge-0/0/0 to ge-0/0/1;
CLIENTSというメンバーに⼊っている、 mtu 9000;
ge-0/0/0-1,3のMTUを⼀括設定 }

221
221 © 2016 Juniper Networks, Inc. All rights reserved.
interface-range -2
•  Range内の個別インタフェース毎に特有の設定を追加することも可能
root# show interfaces
interface-range CLIENTS {
member ge-0/0/3;
member-range ge-0/0/0 to ge-0/0/1;
mtu 9000;
}

root# set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.1/24

root# show interfaces


interface-range clients {
member ge-0/0/3;
member-range ge-0/0/0 to ge-0/0/1;
CLIENTSというメンバー共通でない mtu 9000;
設定をIF単体に設定設定 }
ge-0/0/0 {
unit 0 {
family inet {
address 10.0.0.1/24;
}
}
}
222
222 © 2016 Juniper Networks, Inc. All rights reserved.
階層間の移動 -1
同じ階層の設定を複数作成する際は階層を移動することで作成する構⽂を省略する
ことが可能です

例1: FWフィルタの設定(topの階層から設定)
# show firewall [edit]
family inet{ set firewall family inet filter FW-FILTER term BLOCK from source-address 10.10.10.0/24
filter FW-FILTER{ set firewall family inet filter FW-FILTER term BLOCK from destination-address 192.168.1.0/24
term BLOCK{ set firewall family inet filter FW-FILTER term BLOCK from dscp cs5
from{ set firewall family inet filter FW-FILTER term BLOCK from port https
set firewall family inet filter FW-FILTER term BLOCK from port http
source-address{
10.10.10.0/24;
}
destination-address{
192.168.1.0/24; ※設定を投⼊する際は繰り返しset firewall family…fromと⼊⼒する必要がある
}
dscp cs5;
port[ https http ];
}
}
}
}

223
223 © 2016 Juniper Networks, Inc. All rights reserved.
階層間の移動 -2
例2: FWフィルタの設定(firewall filter FW-FILTER term BLOCK fromの階層から設定)

# show firewall
[edit firewall family inet filter FW-FILTER term BLOCK from]
family inet {
filter FW-FILTER { set source-address 10.10.10.0/24
term BLOCK { set destination-address 192.168.1.0/24
from { set dscp cs5
source-address { set port https
10.10.10.0/24; set from port http
}
destination-address {
192.168.1.0/24;
}
dscp cs5;
port [ https http ];
} ※設定を投⼊する際はfirewall family…fromまでを省略して⼊⼒することができる
}
}
} ※コマンド⼊⼒時、set や delete、show の前に top や up <階層数> を⼊れると
 今いる階層から移動せずに今いる階層を無視して⼊⼒・表⽰することができる

224
224 © 2016 Juniper Networks, Inc. All rights reserved.
階層間の移動 -3
•  階層間は、editコマンドで移動することができます
•  exit:直前にいたレベルに戻ります
•  TOPでEXITを実⾏すると、Operationalモードに戻ります
•  OperationalモードでEXITを実⾏すると、システムからLogoutします
•  Shellモードから`cli`でOperationalモードに移動した場合は、Shellモードに戻ります

•  up:⼀つ上のレベルに移動します
•  top:最上位のレベルに移動します
# show firewall
Editで階層を指定

Top family inet{


Topで最上位へ

filter FW-FILTER{
upで⼀つ上へ

term BLOCK{
from{
source-address{
10.10.10.0/24;
Down }
destination-address{
192.168.1.0/24;
}
dscp cs5;
port[ https http ];
※top edit や up <階層数> edit と⼊れると1回の⼊⼒で }
 今いる階層から任意の階層に移動することができる }
}
}
225
225 © 2016 Juniper Networks, Inc. All rights reserved.
Automatic Configuration Archival
•  Automatic Configuration Archival機能を使⽤することで、⾃動的に最新のコ
ンフィグをリモートのFTP/SCPサーバにバックアップすることが可能
•  アップロードのタイミングは、コミットの度もしくは⼀定時間毎のいずれか、
あるいは両⽅を選択可能

1. コミットの度にリモートのサーバにコンフィグをバックアップする設定:

user@Junos# set system archival configuration transfer-on-commit


user@Junos# set system archival configuration archive-sites ftp:// loginname:loginpassword@FTP-
server-ip/directory

2. ⼀定時間おきにリモートのサーバにコンフィグをバックアップする設定:
(例: 1440分 = 24時間おき)
[
user@Junos# set system archival configuration transfer-interval 1440
user@Junos# set system archival configuration archive-sites ftp:// loginname:loginpassword@FTP-
server-ip/directory

226
226 © 2016 Juniper Networks, Inc. All rights reserved.
annotate
•  annotateコマンドを使うと、⾃由に注釈をつけることが可能、
テスト時・運⽤時などに便利
今いる階層の直下にあるコンフィグアイテムが対象、注釈内容はコンフィグアイテムの上部に/* XXXX */と書かれる

root# annotate interfaces ge-0/0/0 “borrowed the cable directory from Yoshida-san”

[edit routing-instances cust-1]


[edit] lab# up
lab# edit routing-instances
[edit routing-instances]
[edit routing-instances] lab# show
lab# annotate cust-1 "L3VPN test" /* L3VPN test */
cust-1 {
[edit routing-instances] instance-type vrf;
lab# edit cust-1 interface ge-0/0/0.101;
interface ge-0/0/1.101;
[edit routing-instances cust-1] route-distinguisher 192.168.1.1:1001;
lab# annotate protocols vrf-target target:64512:1001;
Don'tForgetInjectDirectRoute vrf-table-label;
/* Don'tForgetInjectDirectRoute */
protocols {
bgp {
※コメント内容にスペース(空⽩)が含まれるときはコメント両端を引⽤符(" ")でくくる group cust-1 {
※コメントを消すときは annotate xxxx "" というように引⽤符("")で上書きする description "Receive-Routes 1000"
※show configuration | display set では表⽰されない
※コンフィグを張り付けるときに直接 /* xxxx */ 構⽂を挿⼊できる (snip)

227
227 © 2016 Juniper Networks, Inc. All rights reserved.
機器の初期化
Junos機器を初期化する⼿法は主に以下の3つ
•  Configuration modeで load factory-default
•  実⾏すると、Candidate Configurationにデフォルトの設定がロードされる
•  実際に初期設定に戻すには、rootパスワードの設定とCommitが必要となる
•  設定のみを戻したいときに有効で、ログや過去のConfig(rollback)などは削除されない
•  Operation modeで request system zeroize
•  実⾏すると、全ての設定やログ、ユーザの作成したファイルが削除され、再起動する
•  システムファイルは削除されない
•  USBメモリやCFからのFormat install
•  USBメモリやCFにJunosイメージを書き込み、ブートローダーからJunosを再インストー
ルする
•  システムファイルを含むディスク上の全てのデータが削除され、新たにJunosがインス
トールされる
•  実⾏⽅法は機種によって異なり、JTACから指⽰された場合を除き、⼀般的に使⽤する必
要はない

228
228 © 2016 Juniper Networks, Inc. All rights reserved.
コントロールパケットのキャプチャ
以下のコマンドを使⽤することにより、コントロールパケット(REが受信するパケット)をキャ
プチャする事が可能
root> monitor traffic interface xe-1/2/0.0
verbose output suppressed, use <detail> or <extensive> for full protocol decode
Address resolution is ON. Use <no-resolve> to avoid any reverse lookup delay.
Address resolution timeout is 4s.
Listening on xe-1/2/0.0, capture size 96 bytes

11:39:06.772930 Out IP truncated-ip - 11 bytes missing! 192.168.1.1.bgp > 192.168.1.2.32794: P


635171747:635171766(19) ack 995070346 win 16384 <nop,nop,timestamp 3971359530 2610569>: BGP,
length: 19
11:39:06.803191 In IP 192.168.1.2.32794 > 192.168.1.1.bgp: . ack 19 win 5360 <nop,nop,timestamp
2637232 3971359530>

•  このコマンドでキャプチャできるパケットは、PFEで処理されずREで処理されるパケットに限られる
•  ICMP Echo(ping)等、PFEによってオフロード処理されるパケットは表⽰されないので注意
•  パケット内容の詳細まで確認したい場合は extensive オプションなどを使⽤する

229
229 © 2016 Juniper Networks, Inc. All rights reserved.
groups/apply-groups
設定の⼀部をgroupという形で切り出し、apply-groupsで任意の階層に適⽤する事が可能
•  例: 全てのOSPFインタフェースのHello-IntervalとDead-Intervalを変更
root# show groups
OSPF_COMMON { インタフェース名やエリア名、IPアドレス # show protocols ospf | display inheritance
protocols { 等のユーザが⾃由⼊⼒する値は<*>とする area 0.0.0.0 {
ospf { と全てに適⽤される interface st0.1 {
area <*> { ##
interface <st*> { ## '5' was inherited from group 'OSPF_COMMON'
hello-interval 5; 特定のインタフェースのみに適⽤したい場合 ##
dead-interval 20; などは、<st*> といったように⼀部の⽂字 hello-interval 5;
} 列を指定することも可能 ##
} ## '20' was inherited from group 'OSPF_COMMON'
} ##
} dead-interval 20;
} ⾃動的に共通設定が適⽤される }
interface st0.2 {
root# show protocols ospf ##
apply-groups OSPF_COMMON; ## '5' was inherited from group 'OSPF_COMMON'
area 0.0.0.0 { ##
interface st0.1; hello-interval 5;
interface st0.2; ##
interface lo0.0 { ## '20' was inherited from group 'OSPF_COMMON'
passive; ##
} dead-interval 20;
} }
interface lo0.0 {
passive;
}
}

※CommitしてもConfigはきちんとグループ化されたままとなる
実際に適⽤される設定を確認したい場合は、 show configuration | display inheritance コマンドを使⽤する

230
230 © 2016 Juniper Networks, Inc. All rights reserved.
prefix-list / apply-path
設定に含まれるIPアドレスから⾃動的にリストを⽣成し、Firewall Filterに適⽤することが可能
root# show protocols bgp root# show policy-options | display inheritance
group GROUP-A { prefix-list BGP-PEERS {
neighbor 1.1.1.1;
neighbor 2.2.2.2;
##
} ## apply-path was expanded to:
## 1.1.1.1/32;
root# show interfaces ## 2.2.2.2/32;
ge-0/0/0 { unit 0 { family inet { ##
address 1.1.1.0/30; apply-path "protocols bgp group <*> neighbor
} } } <*>";
ge-0/0/1 { unit 0 { family inet {
address 2.2.2.0/30; }
} } } prefix-list LOCALNETS {
fxp0 { unit 0 { family inet { IPアドレスが ##
address 192.168.1.10/24;
} } }
⾃動的コピーされる ## apply-path was expanded to:
## 1.1.1.0/30;
## 2.2.2.0/30;
root# show policy-options
prefix-list BGP-PEERS { ##
apply-path "protocols bgp group <*> neighbor <*>"; apply-path "interfaces <ge-*> unit <*>
} family inet address <*>";
prefix-list LOCALNETS { }
apply-path "interfaces <ge-*> unit <*> family inet
address <*>";
}

※実際に適⽤される設定を確認したい場合は、 show configuration | display inheritance コマンドを使⽤する

231
231 © 2016 Juniper Networks, Inc. All rights reserved.
show configuration groups junos-defaults
暗黙の初期コンフィグを確認することが可能
user@host> show configuration groups junos-defaults
#
# Defines the default for dynamic-profiles
#
dynamic-profiles {
<*> {
variables {
junos-interface-unit {
internal;
valid-path "interface_unit_number|unit-number unit interface interface-set";
}
junos-interface-ifd-name {
internal;
valid-path "interface_name|interface-name interface interface-set|underlying-
interface";
}
junos-underlying-interface-unit {
internal;
valid-path "interface_unit_number|unit-number unit interface interface-set";
}
junos-underlying-interface {
internal;
valid-path underlying-interface;
}
junos-subscriber-ip-address {
internal;
valid-path "source address inet|address demux-source inet|address source-address
from term fast-update-filter inet|address destination-address from term fast-update-filter inet|
destination route";
}
(snip)

232
232 © 2016 Juniper Networks, Inc. All rights reserved.
オンライン・マニュアル
•  豊富な機能の help コマンド
•  help topic : プロトコルや機能の⼀般的な説明を表⽰
•  help reference : プロトコルや機能の設定⽅法を表⽰(コマンド・レファレンス)
•  help syslog : syslog メッセージの説明

mike@juniper1> help topic interfaces address


Configuring the Interface Address
You assign an address to an interface by specifying the address when configuring the
protocol family. For the inet family, you configure the interface's IP address. For the
iso family, you configure one or more addresses for the loopback interface. For the ccc,
tcc, mpls, tnp, and vpls families, you never configure an address.

233
233 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOS : help topic
コマンドの概要を確認することが可能

user@host> help topic ospf dead-interval


Modifying the Router Dead Interval

If a router does not receive a hello packet from a neighbor within a fixed
amount of time, the router modifies its topological database to indicate
that the neighbor is nonoperational. The time that the router waits is
called the router dead interval. By default, this interval is 40 seconds
(four times the default hello interval).
To modify the router dead interval, include the dead-interval statement.
This interval must be the same for all routers on a shared network.
dead-interval seconds;
For a list of hierarchy levels at which you can include this statement,
see the statement summary section for this statement.

234
234 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOS : help reference
•  コマンドのオンラインマニュアルを参照することが可能

  user@host> help reference oam action


  action (OAM)
  Syntax
  action {
  syslog (OAM Action);
  link-down;
  send-critical-event;
  }
  Hierarchy Level
  [edit protocols oam ethernet link-fault-management action-profile]
  Release Information
  Statement introduced in JUNOS Release 8.5.
  …
  Description
  Define the action or actions to be taken when the OAM fault event occurs.
  Usage Guidelines
  See Specifying the Actions to Be Taken for Link-Fault Management Events.

235
235 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOS : help apropos
•  確実に覚えていないコマンド(うろ覚えの場合など)を⽂字列で検索することが可能
user@host# help apropos vstp ConfiguraNon mode
set logical-systems <name> protocols vstp
VLAN Spanning Tree Protocol options
set logical-systems <name> protocols vstp disable
Disable VSTP
set protocols vstp
VLAN Spanning Tree Protocol options
set protocols vstp disable
Disable VSTP

user@host# > help apropos vstp OperaNon mode


help topic stp vstp
VLAN Spanning Tree Protocol instance configuration
help topic stp vstp-requirements
Requirements, limitations for VLAN Spanning Tree Protocol
help reference stp vstp
VLAN Spanning Tree Protocol configuration
help reference stp vlan-vstp
VLAN configuration for VLAN Spanning Tree Protocol

236
236 © 2016 Juniper Networks, Inc. All rights reserved.
CLI:Trace/充実したdebug機能
例: OSPF Trace-opNon
注⽬したいパケットタイプを細かく指定することが可能

lab@Router# set protocols ospf traceoptions flag ?


•  JUNOSでは,プロトコル別に Possible completions:
all Trace everything
Trace-optionsを⾮常に細かく database-description Trace database description packets
設定可能です。 error Trace errored packets
event Trace OSPF state machine events
•  このTraceの出⼒先はファイル flooding Trace LSA flooding
出⼒、あるいはmonitorコマン general
hello
Trace general events
Trace hello packets
ドでReal-timeに画⾯にてモニ lsa-ack Trace LSA acknowledgement packets
タ表⽰ lsa-request
lsa-update
Trace LSA request packets
Trace LSA update packets
•  トラブルシューティングに役 normal Trace normal events
packet-dump Dump the contents of selected packet types
⽴つ情報を的確に抜き出すこ packets Trace all OSPF packets
とができます policy Trace policy processing
route Trace routing information
spf Trace SPF calculations
state Trace state transitions
task Trace routing protocol task processing
timer Trace routing protocol timer processing

237
237 © 2016 Juniper Networks, Inc. All rights reserved.
CLI:monitor/リアルタイムにトラフィックを監視
•  monitorコマンドで現在のI/F別トラフィック状況を⾒ることが出来ます
•  表⽰はAUTOリフレッシュされるため、継続的なモニタリングが可能
•  トラフィックの傾向や障害箇所の特定に役⽴ちます

10.0b2     Seconds: 13 Time: 14:50:48


Interface Link Input packets (pps) Output packets (pps)
ge-0/0/0 Up 54175 (4) 4126 (0)
ge-0/0/1 Down 399 (0) 37 (0)
ge-0/0/2 Up 5110 (1) 4224 (0)
ge-0/0/3 Down 0 (0) 0 (0)
ge-0/0/4 Down 0 (0) 0 (0)
ge-0/0/5 Down 0 (0) 0 (0)
ge-0/0/6 Down 0 (0) 0 (0)

Bytes=b, Clear=c, Delta=d, Packets=p, Quit=q or ESC, Rate=r, Up=^U, Down=^D

238
238 © 2016 Juniper Networks, Inc. All rights reserved.
rescue configuration
•  基本となるconfigurationを予め定義(保存)することが可能
保存⽅法: > request system configuration rescue save
削除⽅法: > request system configuration rescue delete
•  Rescue configurationの反映⽅法
•  Rollbackコマンドからのロード
# rollback rescue
root# rollback rescue
load complete
root# commit

•  ハードウェアからのロード
•  SRXシリーズはRESET CONFIGボタンを押すことで •  ⼀部のEXシリーズはLCDパネルでメンテナンスモードを
ハードウェアからロードすることができます。 操作することでハードウェアからロードすることができます。
※15秒以上押し続けるとfactory defaultがロードされます

例:
SRX300 例: EX3300

239
239 © 2016 Juniper Networks, Inc. All rights reserved.
vSRX on your laptop ~PCで始めるvSRX~
•  仮想Router/FirewallであるvSRXをLaptop PC上で動作させるための指南書
http://www.slideshare.net/JuniperJapan/vsrx-laptop-201505

実際のデバイスと同様の設定作成や仕様確認をPC上で実施することが可能!

240
240 © 2016 Juniper Networks, Inc. All rights reserved.
Appendix

241
Appendix A
Virtual Chassis Fabric

242
Virtual Chassis Fabricとは
2台以上20台以下のQFX5100シリーズ/EX4300 スイッチを接続することで
仮想的に1台のシャーシ型システムとして動作させるL2/L3 イーサネット
ファブリックテクノロジー
Devices to Manage

= 1 !!!
Routing Engine

ネットワーク管理者

Line Card
Routing Engine
Line Card

シャーシ型スイッチのメリットをすべて実現した上で、仮想シャーシならではの新たな価値を提供

243
243 © 2016 Juniper Networks, Inc. All rights reserved.
旧来のシャーシ型スイッチとVirtual Chassis技術
シャーシ型スイッチのメリット
ü  ⾼信頼性ハードウェア LAG 1
–  冗⻑ルーティングエンジン
–  冗⻑スイッチファブリック
–  冗⻑電源ユニット
–  冗⻑ファントレイ
ü  管理の簡便性
–  シングルイメージ
–  単⼀のコンフィグファイル
–  単⼀のマネージメントIPアドレス
ü  パフォーマンスとスケーリング
–  ハイパフォーマンス
–  ⼤容量のバックプレーン
–  モジュラー型構成

LAG 2

ü Virtual Chassis による更なるメリット:


§  物理配置の柔軟性 ü Virtual Chassis Fabricによる更なるメリット:
§  低消費電⼒ §  10 Member ⇒ 20 Memberまでのサポート
§  最⼩構成からスタート可能 §  Intelligent Bandwidth Allocation
§  必要最低限のラックスペース §  Bi-directional Multicast Distribution Trees
§  FCoE Transit (DCBX Support, QFX Only)

244
Architectural Choice
– Virtual Chassis Fabric vs. Virtual Chassis
Virtual Chassis Virtual Chassis Fabric

•  Ring、Tree、Mesh、Spine & Leafなど⾃由なトポロ •  Spine & Leafトポロジー構成


ジーで構成が可能 •  SpineにはQFX5100が必要
•  EX3300〜MXまで様々なHWでサポート •  LeafはQFX5100,EX4300などから選択が可能
•  最⼤で10メンバーまで •  最⼤で20メンバーまで(Max 4 Spine & 28 Leafs)
•  バージョンアップ時にはNSSUをサポート •  バージョンアップ時にはNSSUをサポート

Fat Tree High-Performance Mesh

Spine & Leaf

Braid Ring

245
245 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassis Fabricの構成オプション
2 or 4 Spine Node Deployments
2 Spine Nodes 4 Spine Nodes
40GbE 40GbE
1 X Switch to Manage 1 X Switch to Manage

1 2 1 2 3 4
QFX5100-24Q QFX5100-24Q

QFX5100-24Q
8 X uplinks QFX5100-96S
2 X uplinks QFX5100-48S

10GbE 10GbE 10GbE 10GbE 10GbE


10GbE 10GbE 10GbE 10GbE 10GbE

1 2 3 4 28
1 2 3 4 30

•  30 x 10GbE racks •  28 x 10GbE racks


•  1440 x 10GbE ports 6:1 OS •  2688 x 10GbE ports 3:1 OS

246
246 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassis Fabricをサポートするプラットフォーム
10/40GbE Spine Nodes

QFX5100-48S QFX5100-24Q
(10GbE) (40GbE)

1/10/40GbE Leaf Nodes

QFX5100-48S (10GbE) QFX5100-96S (10GbE) QFX5100-24Q (40GbE)

QFX3500 (10GbE) QFX5100-48T (10G-T) QFX3600 (40GbE)

EX4300 (1GbE)

最⼤ 20 Members
247
247
(2x Spine + 18x Leaf or 4x Spine + 16x Leaf)
© 2016 Juniper Networks, Inc. All rights reserved.
Mixed Speed Fabric(1G to 40G)
異なるメディアスピードのスイッチをVirtual Chassis Fabric内で収容可能なため
1GbE から 10GbE, 40GbE 環境へのシームレスな移⾏をサポート
Devices to Manage

= 1 !!!

ネットワーク管理者

EX4300 EX4300 QFX5100-48S/48T QFX5100-24Q

1GbE Servers 10GbE Servers 40GbE Storages

248
248 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassis Fabricの使⽤例(1)@DCネットワーク
4x spine, 16x leaf による1G & 10G Mixed VCF構成 (Max 16 racks per VCF)
DC
The Internet Interconnect
(MPLS) Switches to Manage

Service Gateway
= 1 !!! For ~28 Racks
(SRX)

Load-Balancer DC Edge Router


(MX)

Spine Switch
(QFX5100-24Q x4) ネットワーク管理者

Access Switch
( EX4300-48T x8) Access Switch
( QFX5100-48T x8)

異なるLCへの 異なるLCへの
NIC Teaming LAG
1G Server 10G Server

1G POD 10G POD

249
249 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassis Fabricの使⽤例(2)@DCネットワーク
奇数ラック、偶数ラックでのVCF分割による⾼可⽤設計 (Max 60 racks per 2x VCFs)
DC
Service Gateway The Internet Interconnect
(SRX)
(MPLS) Switches to Manage
Load-Balancer = 3 !!! For ~60 racks

DC Edge Router
(MX)

Core VC Switch
(QFX5100-24Q x2)
ネットワーク管理者
`
Spine Switch for Odd VCF Spine Switch for Even VCF
(QFX5100-24Q x2) (QFX5100-24Q x2)

Access Switch
( EX4300-48T x10) Access Switch
( QFX5100-48T x10)

異なるVCFへの
VCFまたぎの Teaming
Clustering
Cluster Important
Server Server

250
250 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassis Fabricの構成⽅法について -1

QFX5100/EX4300の出荷時の状態では、スイッチの動作モードはVCモードとなっており、その
ままではVCFを構成することができません。
VCFを構成するにあたっては、VCFのライセンスを投⼊後、以下のコマンドを使⽤して、スイッチ
をVirtual Chassis Fabricモードに変更する必要があります。

  > request virtual-chassis mode fabric

251
251 © 2016 Juniper Networks, Inc. All rights reserved.
Virtual Chassis Fabricの構成⽅法について -2
VCFを構成する際には、
Plug-and-PlayでのVCF構成を提供する“Non-Preprovisioned mode”と、
Spineについての設定のみを投⼊する”Auto-Provisioned mode”、
最低限の設定投⼊によりVCを構成する“Preprovisioned mode”から選択が可能です。

⼀般的により⾼いSLAが求められるデータセンターへのデプロイ時には“Preprovisioned
mode”でのVCF構成を推奨します。これによりシリアルでのハードウェア管理による、より安定
した運⽤と、OSアップグレード時におけるNSSUサービスが提供されます。

  # set virtual-chassis preprovisioned Preprovisioned modeを宣⾔


  # set virtual-chassis member 0 role routing-engine
  # set virtual-chassis member 0 serial-number 111111111111
  # set virtual-chassis member 1 role routing-engine
各筐体毎のシリアルNo.を投⼊
  # set virtual-chassis member 1 serial-number 222222222222
  # set virtual-chassis member 2 role line-card
  # set virtual-chassis member 2 serial-number 333333333333
  # set virtual-chassis member 3 role line-card Spineとして動作させる2〜4台の筐体をRouting-Engineとする
  # set virtual-chassis member 3 serial-number 444444444444 その他の筐体のRoleはすべてLine-card

  …
252
252 © 2016 Juniper Networks, Inc. All rights reserved.
Appendix B
Multi-Chassis LAG

253
Juniperの提供する冗⻑化技術
筐体を跨いだLink Aggregation(LAG)が組める技術として、
主に以下のアーキテクチャを提供しています。

MC-LAG Virtual Chassis Virtual Chassis Fabric


20台までを、
仮想的な1台のシャー型
スイッチとして管理

10台までを、
仮想的な1台のシャー型
スイッチとして管理

管理負荷を下げつつ、ハイパフォー
スパニングツリーなどを使⽤せずに マンスな転送を実現するSpine-Leaf
管理の負荷を下げつつ、柔軟なデ
標準化プロトコルでL2冗⻑を構成し 型のファブリックトポロジーを構成
ザインを実現したい⽅
たい⽅ したい⽅に

254
254 © 2016 Juniper Networks, Inc. All rights reserved.
アーキテクチャ選択
MC-LAG vs Virtual Chassis
それぞれが独⽴し
MC-LAG て動き、MAC、I/
Fの状態を交換 Virtual Chassis
REはHot-stanby
Configも常に同期

Active Active

1 2 1 10

MC-LAG Virtual Chassis


コントロールプレーン Active-Active Active-Standby

データプレーン Active-Active Active-Active

管理 2台別々 10台まで
1台として管理
スイッチ台数が増え
設定同期 ⼿動(※Roadmap) ⾃動 てくると、管理⾯で
差が出てきます。
対向デバイスから⾒たL2ネイバー 1台に⾒える 1台に⾒える

対向デバイスから⾒たL3ネイバー 2台に⾒える 1台に⾒える

バージョンアップ 1台ずつ(ISSU) NSSU/ISSU(※Roadmap)


255
255 © 2016 Juniper Networks, Inc. All rights reserved.
MC-LAG対応プラットフォーム
MXシリーズ QFXシリーズ EX9200 EX4600シリーズ EX4300シリーズ その他のEXシリーズ

MC-LAG

Active/Active構成

Active/Standby構成

VRRPとの組合せ

L2VPN(MPLS)との
組合せ

VPLSとの組合せ

256
256 © 2016 Juniper Networks, Inc. All rights reserved.
MC-LAG基本構成
•  MC-LAGを構成する上での基本
MC-LAGを構成するスイッチはどちらもActive (Master/Backup等の関係では無
い)ので、ここではNode1、Node2と呼びます。

ICCP
Node1 Node2

•  Node1・2の間はMACアドレスやLinkの
ステータスを同期しています。
(ICCP)
•  MC-LAGにつながるLAG機器とはLACPで
LACP
ステータスを交換します。

257
257 © 2016 Juniper Networks, Inc. All rights reserved.
MC-LAG基本構成

Node1 Node2

•  スイッチTOR1から⾒るとMC-LAGは単なる
LAGにしか⾒えません。
•  LACPで⾒ても、どちらのMACも同じMAC
LACP
が⾒えます。
et-0/0/48.0 et-0/0/49.0

TOR1

TOR1でのLACPのステータス出⼒例
  LACP info: Role System System Port Port Port
  priority identifier priority number key
  et-0/0/48.0 Actor 127 54:1e:56:69:4e:00 127 1 3
et-0/0/48.0 Partner 127 00:00:ae:00:00:02 127 2 1002
(Node1)

  et-0/0/49.0 Actor 127 54:1e:56:69:4e:00 127 2 3


et-0/0/49.0 Partner 127 00:00:ae:00:00:02 127 32770 1002
(Node2)

258
258 © 2016 Juniper Networks, Inc. All rights reserved.
⽤語の整理
•  MC-LAGは各ベンダーで⽤語が異なりますが、ジュニパーでは以下の⽤語を使⽤します。

ICCP
•  ICCP(Inter-chassis control protocol):
Node1 Node2 MACやLinkの状態をNode間で共有する為の制御通信
⽤途で、TCPセッションにより確⽴されます。

ICL
•  ICL(Inter-Chassis Link):
スイッチ間の物理Link。ICL-PLとも⾔います。
出来る限りここをLAGで構成するデザインが推奨です。

S-Link MC-AE •  MC-AE(またはMC-links):


MC-links
スイッチまたぎのLAGを指します。
AEはAggregated Ethernetの略です。

•  S-LINK(Single-homed Link):
冗⻑されてないLinkです。既存の収容、NW移⾏やメ
ンテ等で⼀時的にこの構成になりえます。

259
259 © 2016 Juniper Networks, Inc. All rights reserved.
⽤語の整理(つづき)
•  出来る限り、ICCPの接続⽤途で管理セグメントも使いましょう。

管理⽤セグメント
•  ICCPが切れてしまう状況は、Sprit Brainという絶
ICCP 対に避けたい状況です。
Node1 Node2
•  ICLのバックアップとして、管理セグメントを使った
ICCPのやりとりができます。(backup-liveness-
detection)
ICL
•  ただし、ユーザパケットは転送しません。あくまで
Sprit状態を避ける為のラストリゾートです。

S-Link MC-AE
MC-links

ICL故障発⽣時の動作の詳細は以下で確認できます。
https://www.juniper.net/techpubs/en_US/junos15.1/topics/concept/
lag-multichassis-feature-summary.html#jd0e106

260
260 © 2016 Juniper Networks, Inc. All rights reserved.
L3の冗⻑構成は?
デフォルトGWの冗⻑について
VRRP⽅式の構成例
•  ⽅式は2つあります。
別セグメント 別セグメント
–  VRRP over IRB⽅式
•  Node同⼠でVRRPを構成 Irb.2 Irb.2

–  MAC Sync⽅式 Irb.1


Irb.1
•  Node同⼠で同じIP、MACを構成 実IP 192.168.1.253/24
仮想IP 192.168.1.254 実IP 192.168.1.252/24

•  Juniperでは以下の理由からVRRP⽅式を推奨 (2)VRRP Backup


しています。 側でもパケットを
フォワーディング
1.  TOR1からみると結局UplinkはLAGなので、トラ TOR1
フィックは分散できる。 (1)LAGのハッシュ
2.  VRRP Backup側でも受け取ったユーザトラ Default GW により分散
フィックは転送できる実装の為、ICLを通ったり、 192.168.1.254
Uplinkが偏ったりしない。
3.  MAC Sync⽅式では、Routing Protocolが話せ
ない。(あくまでNode間で同期しているのは
MC-LAG関連情報だけなのです)

261
261 © 2016 Juniper Networks, Inc. All rights reserved.
設定⽅法;
設定項⽬ Node1 Node2 備考

•  基礎となる設定 Device-count 10 10 必要なMC-LAG数+1を設定

switch-options 16384 16384 2台とも同じ値にする


service-id
ICCP⽤I/F irb.4000 irb.4000 irb + unit 番号
(とりあえずVlan-idと⼀緒がおす
すめ)
ICCP
Node1 ICCP⽤Vlan 4000 4000 渡りのLAGにこのVlanを所属させ
Node2
et-0/0/22

et-0/0/23 ICCP⽤IPアドレス 192.168.254.26/24 192.168.254.27/24 ICCPだけで使いますので/30とか


et-0/0/0 et-0/0/0 でも可

※Node1の設定例
Node1設定コマンド
  set chassis aggregated-devices ethernet device-count 10
  set switch-options service-id 16384
  set interfaces irb unit 4000 family inet address 192.168.254.26/24
  set vlans VLAN4000 vlan-id 4000
  set vlans VLAN4000 l3-interface irb.4000

例はNode1の設定例ですが、IRBのアドレス値を変えれば、Node2⽤の設定となります。
どちらか⼀⽅にだけ投⼊する設定はありません。
262
262 © 2016 Juniper Networks, Inc. All rights reserved.
設定⽅法;
設定項⽬ Node1 Node2 備考
•  基礎設定その2 ICCP⽤IPアドレス 192.168.254.26/24 192.168.254.27/24 VLAN4000だけで使いますので/
30とかでも可
ICL InterceのID ae0 ae0 aeはaggregated-ethernetの略で、
LAG⽤仮想I/F名
ae0に所属させる物 et-0/0/22 et-0/0/22
理I/F et-0/0/23 et-0/0/23
ICCP
Node1 その他 LACP Fastモード LACP Fastモード LACPとVlan4000をae0に設定
Node2 Vlan4000 Vlan4000
et-0/0/22

et-0/0/23
et-0/0/0 ae0 et-0/0/0
※Node1の設定例

set multi-chassis multi-chassis-protection 192.168.254.27 interface ae0


Node1設定コマンド

                           Node2のアドレスを設定
  set interfaces et-0/0/22 ether-options 802.3ad ae0
  set interfaces et-0/0/23 ether-options 802.3ad ae0
  set interfaces ae0 aggregated-ether-options lacp active periodic fast
  set interfaces ae0 unit 0 family ethernet-switching interface-mode trunk
  set interfaces ae0 unit 0 family ethernet-switching vlan members VLAN4000

263
263 © 2016 Juniper Networks, Inc. All rights reserved.
設定⽅法;
設定項⽬ Node1 Node2 備考

•  基礎設定その3 ICCP⽤IPアドレス 192.168.254.26/24 192.168.254.27/24 VLAN4000だけで使いますので/


30とかでも可
session- 100 100 ICCPセッション確⽴までの時間
establishment- (秒)
hold-time
管理⽤セグメント
BFD minimum- 1000 1000 お互いのICCP間で⾏うBFD死活監
interval 視の間隔(msec) 1000以上にして
ICCP Node2
ください
Node1
BFD multiplier 3 3 回数
et-0/0/22 minimum-interval x multiplier =
ダウンまでの時間
et-0/0/23
et-0/0/0 ae0 et-0/0/0 backup-liveness- 172.27.113.26 172.27.113.27 管理I/Fに付与したIPアドレスを指
detection 定

※Node1の設定例

  set protocols iccp local-ip-addr 192.168.254.26


  set protocols iccp peer 192.168.254.27 session-establishment-hold-time 100
  set protocols iccp peer 192.168.254.27 liveness-detection minimum-interval 1000
  set protocols iccp peer 192.168.254.27 liveness-detection multiplier 3
  set protocols iccp peer 192.168.254.27 backup-liveness-detection backup-peer-ip 172.27.113.27

264
264 © 2016 Juniper Networks, Inc. All rights reserved.
設定⽅法;
•  接続が間違えていなければ次のようにみえるはずです。

•  基本設定の確認   lab@node1# run show iccp


  Redundancy Group Information for peer 192.168.254.27
  TCP Connection : Established
  Liveliness Detection : Up

ICCP Node2 Backup liveness peer status: Up


Node1

et-0/0/22   Client Application: MCSNOOPD


et-0/0/23
et-0/0/0 ae0 et-0/0/0
  Client Application: l2ald_iccpd_client

  Client Application: lacpd

•  よくあるうっかりミス:そもそもLAG(ae0)がUpしていない。
▶最初に使⽤するLAGの数を登録する必要があります。

  set chassis aggregated-devices ethernet device-count 10

  10とするとae0〜ae9までI/Fが作られます。

265
265 © 2016 Juniper Networks, Inc. All rights reserved.
設定項⽬ Node1 Node2 備考

設定⽅法; LAG I/F名

LACP system-id
ae1

00:00:ae:00:00:01
ae1

00:00:ae:00:00:01 同じ値を設定します。LAG毎に変
更します。
•  MC-Linksの設定 LACP admin-key 1001 1001 同じ値を設定します。
LAG毎に変更します。
•  次にTORスイッチを収容する
mc-ae mc-ae-id 1001 1001 同じ値を設定します。
LAGを設定します。 LAG毎に変更します。
mc-ae chassis-id 0 1 Node毎に変えます。

mc-ae status-control Active standby

Node1 Node2 mc-ae init-delay-time 60 60 I/FがUpとなってからLACPが


distributingになるまでの時間です。
et-0/0/22 電源投⼊時など、ProtocolがUpす
et-0/0/23 るまでの時間待たせることができ
et-0/0/0 et-0/0/0 ます。
ae1

※Node1の設定例
  set interfaces et-0/0/0 ether-options 802.3ad ae1
  set interfaces ae1 aggregated-ether-options lacp active periodic fast
  set interfaces ae1 aggregated-ether-options lacp system-id 00:00:ae:00:00:01
  set interfaces ae1 aggregated-ether-options lacp admin-key 1001
  set interfaces ae1 aggregated-ether-options mc-ae mc-ae-id 1001
  set interfaces ae1 aggregated-ether-options mc-ae chassis-id 0
  set interfaces ae1 aggregated-ether-options mc-ae mode active-active
  set interfaces ae1 aggregated-ether-options mc-ae status-control active
  set interfaces ae1 aggregated-ether-options mc-ae init-delay-time 60
266
266 © 2016 Juniper Networks, Inc. All rights reserved.
設定⽅法;
•  MC-Linksの確認

対向との設定が合っていて、正しく接続されていれば、次の様に表⽰されます。

  lab@node1# run show interfaces mc-ae id 1001


Node1 Node2   Member Link : ae1
et-0/0/22   Current State Machine's State: mcae active state
et-0/0/23   Local Status : active
et-0/0/0 et-0/0/0
ae1   Local State : up
  Peer Status : active
  Peer State : up
  Logical Interface : ae1.0
  Topology Type : bridge
  Local State : up
  Peer State : up
  Peer Ip/MCP/State : 192.168.254.27 ae0.0 up

267
267 © 2016 Juniper Networks, Inc. All rights reserved.
設定⽅法;
•  Mc-linksへのVlanの組み込み
•  VLAN1001をae1に追加します。ICL(ae0)にも追加するのを忘れないでください。

Node1 Node2
設定項⽬ Node1 Node2 備考
et-0/0/22
Vlan名 V1001 V1001
et-0/0/23
et-0/0/0 ae0 et-0/0/0
Vlan-id 1001 1001
ae1

※Node1の設定例
  set vlans v1001 vlan-id 1001
  set interfaces ae1 unit 0 family ethernet-switching interface-mode trunk
  set interfaces ae1 unit 0 family ethernet-switching vlan members v1001
  set interfaces ae1 unit 0 family ethernet-switching storm-control default
  set interfaces ae0 unit 0 family ethernet-switching vlan members v1001

268
268 © 2016 Juniper Networks, Inc. All rights reserved.
設定⽅法;
•  [Option]L3 Routing(Default Gateway)の設定
•  Vlan1001にサーバのデフォルトゲートウェイとなるアドレスを設定します。

設定項⽬ Node1 Node2 備考


実IP 192.168.1.253/24
Node2 I/F名 irb unit 1001 irb unit 1001
Node1 仮想IP 192.168.1.254
実IP 192.168.1.252/24
実IP 192.168.1.253/24 192.168.1.252/24
et-0/0/22

et-0/0/23 仮想IP 192.168.1.254 192.168.1.254


et-0/0/0 et-0/0/0
ae1 Priority 200 100

Accept-data 設定する 設定する

※Node1の設定例
  set vlans v1001 l3-interface irb.1001
  set interfaces irb unit 1001 family inet address 192.168.1.253/24 vrrp-group 1 virtual-address 192.168.1.254
  set interfaces irb unit 1001 family inet address 192.168.1.253/24 vrrp-group 1 priority 100
  set interfaces irb unit 1001 family inet address 192.168.1.253/24 vrrp-group 1 accept-data

269
269 © 2016 Juniper Networks, Inc. All rights reserved.
設定⽅法;
•  L3 Routing(Default Gateway)の確認

•  Default Gatewayアドレスが冗⻑されているか確認します。
Node1
実IP 192.168.1.253/24
仮想IP 192.168.1.254 Node2 •  下記の様になっていない場合
実IP 192.168.1.252/24 –  ICL(ae0)にVLAN1001が設定されているか確認して下さい。
et-0/0/22

et-0/0/23
et-0/0/0 ae0 et-0/0/0
ae1
Node1
  {master:0}[edit]
  lab@node1# run show vrrp
  Interface State Group VR state VR Mode Timer Type Address
  irb.1001 up 1 master Active A 0.359 lcl 192.168.1.253
  vip 192.168.1.254

Node2
  lab@node2# run show vrrp
  Interface State Group VR state VR Mode Timer Type Address
  irb.1001 up 1 backup Active D 2.718 lcl 192.168.1.252
  vip 192.168.1.254
  mas 192.168.1.253

270
270 © 2016 Juniper Networks, Inc. All rights reserved.
Appendix C
Zero Touch Provisioning

271
ZTP(Zero-touch Provisioning)とは
•  DCにToRスイッチを新設するオペレーションは簡単だが、⼤量のスイッチ
を展開することを考慮すると⼿間は膨⼤
•  ZTPとは、スイッチの初期導⼊時においてJUNOSのバージョンとコンフィ
グを⾃動でプロビジョニングする機能 (Junos 12.2よりサポート)
•  主に海外のOTT, DC事業者などにおいて広く使われている

272
272 © 2016 Juniper Networks, Inc. All rights reserved.
ZTPと従来のオペレーションとの⽐較

Legacy
Ops
起動して
ネットワークに OSバージョン
開梱 コンソールからセッ 初期設定 サービスイン
接続 アップ・ダウン
トアップ

ネットワークに
開梱 ZTP サービスイン
接続して起動

ZTP

膨⼤な数のToRを設置しなくてはいけないDC等の場合には、
ZTPによるOPEXの削減効果は絶⼤!

273
273 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOS ZTP Overview – Components
⾃動的なプロビジョニングを前提としたDC向けイーサネット・スイッチの実装

• ⾃動的なOSアップグレード – 管理者の⼿をわずらわせない実装
• ⾃動的なベースコンフィグレーションの投⼊ – 管理者の⼿をわずらわせない実装
• JUNOS12.2よりすべてのJuniperスイッチ(EX,QFX,OCX)でサポート

⼯場出荷状態のスイッチ

• Zeroized configuration - <request system zeroize>


• 管理ネットワークに接続して電源を投⼊するだけ

DHCP Server:

• ⾃動プロビジョニングの動作を指定
• OSイメージと設定ファイルの配備場所を指定

HTTP/FTP/TFTP Server

• OSイメージと設定ファイルの格納場所

Physical Connectivity
Clients Servers

LAN Network
OR Servers (DHCP,
Mgmt Network FTP, TFTP etc)
Juniper QFX/EX Switch with
Factory Default Configuration
274
274 © 2016 Juniper Networks, Inc. All rights reserved.
ZTPのコンポーネント
§   ゼロタッチ:装置にコンソールなどでのログインが不要
§  電源を⼊れるだけ!
§   ⽤意するのはDHCPサーバとファイルサーバの2つ
§   ネットワーク経由で⾃動的にOSや設定情報を装置に転送し反映
§   ⼯場出荷状態で動作するため特別な設定は不要

- 装置にIPアドレスを付与
- TFTPサーバのアドレスを通知
- 取得すべきConfigファイル名を通知

DHCPサーバ

EX/QFXスイッチ - Configファイル
-OSファイル

ファイルサーバ

275
275 © 2016 Juniper Networks, Inc. All rights reserved.
動作シーケンス
§  スイッチはシリアルとMACアドレスを含むDHCPリクエストを送信 
§  DHCP OptionでTFTPサーバのIPアドレスとOS/Configのファイル名を通知

- 装置にIPアドレスを付与
1. デフォルト設定で起動 - TFTPサーバのアドレスを通知
- 取得すべきConfigファイル名を通知
ZTPスタート! 2. DHCP Discover/Request

DHCPサーバ
3. DHCP Offer/ACK
(ファイルサーバ+ファイル名)

EX/QFXスイッチ
- Configファイル
4. File Request -OSファイル
(指定されたファイル名)

6. ダウンロードしたファイルで 5. Download files


ファイルサーバ
OSとConfigを書き換えcommit (TFTP/FTP/HTTP)

276
276 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOS ZTP の流れ
スイッチはDHCPサーバからIPア
スイッチが Auto image
ドレス、DGW、FTP/TFTP AIUプロセスがJunos Imageと
installation (AIU) プロセスを開
Server、Junos Image と Config fileをダウンロード
始する
Configのファイル名を受け取る

指定されたバー
新しいOSイメージをインストー ジョンのOSが既
ブートアップ完了後、スイッチ ル に⼊っている
がDHCPリクエストをアクティブ NO か?
リンクから送信する

新しい設定をCommit
YES

スイッチをネットワークに接続
して、電源を投⼊する (⼯場出
荷状態のスイッチ) 再起動 新しい設定をCommit

START END

277
277 © 2016 Juniper Networks, Inc. All rights reserved.
筐体の識別
DHCPサーバの設定 筐体背⾯⼜は底⾯のシールに筐体のMACが記載
ddns-update-style none;
opNon opNon-66 code 66 = string;
opNon space NEW_OP;
opNon NEW_OP.config-file-name code 1 = text; 筐体のMACアドレス
opNon NEW_OP-encapsulaNon code 43 = encapsulate NEW_OP;

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.1 192.168.1.200;
default-lease-Nme 6000;
max-lease-Nme 7200;
opNon routers 192.168.1.1;
opNon subnet-mask 255.255.255.0;

host switch1 {
hardware ethernet 2c:6b:f5:3a:6e:41;
fixed-address 192.168.1.11;
opNon NEW_OP.config-file-name "switch1.cfg";
opNon opNon-66 "192.168.1.100";
  }

host switch2 { 筐体のMACアドレスに+1したものを設定に記述
hardware ethernet 64:87:88:B7:45:81;
fixed-address 192.168.1.12;
opNon NEW_OP.config-file-name "switch2.cfg";
opNon opNon-66 "192.168.1.100";
}
}

278
278 © 2016 Juniper Networks, Inc. All rights reserved.
JUNOS ZTP
– DHCP Server Configuration(サンプル)
Vendor Specific options
option space NEW_OP;
(Auto image upgradeに
option NEW_OP.image-file-name code 0 = text;
option NEW_OP.config-file-name code 1 = text; 必要)
option NEW_OP-encapsulation code 43 = encapsulate NEW_OP;

group {
option tftp-server-name "17.176.31.71";
option log-servers 17.176.31.72; Syslog and NTP servers
option ntp-servers 17.176.31.73;
option NEW_OP.image-file-name "/images/jinstall-qfx.tgz";
option NEW_OP.transfer-mode "ftp";
投⼊されるOSイメージ
host tor-qfx5100-1 {
hardware ethernet 88:e0:f3:71:a0:82; シンボリックリンクを指定
fixed-address 172.16.31.19; することも可能
option host-name "tor-qfx5100-1";
option NEW_OP.config-file-name “tor-qfx5100-1.config";
}
host tor-qfx5100-1 { Auto configurationで指定
hardware ethernet f8:c0:01:c6:96:81; される設定ファイル
fixed-address 172.16.31.20;
option host-name “tor-qfx5100-2";
option NEW_OP.config-file-name “tor-qfx5100-2.config";
} MACアドレスから IPアド
} レスおよびシステムのホス
トネームへのマッピング

279
279 © 2016 Juniper Networks, Inc. All rights reserved.
ZTPが提供するもの

効率 ⼀貫性 可⽤性

Any EX & QFX Switches Any EX & QFX Switches Any EX & QFX Switches

導⼊にかかる 機器故障時の
時間を削減 設定ミスの削減 交換にかかる時間を削減

280
280 © 2016 Juniper Networks, Inc. All rights reserved.
ZTP + Script

MACアドレス/Serialベースではなく、ネットワークの情報を元にConfigを投⼊

ZTP
Clients
①Fetch ba スイッチXのポートYと繋がっている
se configu
ration (w/S ポートにはXXXを追加!
cript)
③Fetch ad
with Neigh ditional configuration
bor inform
ation
②LLDP等

Port Y Config
Server
Switch X

Simple Sample: https://github.com/jeremyschulman/jctyztp


281
281 © 2016 Juniper Networks, Inc. All rights reserved.
Thank you

282
283

You might also like