作業環境
- 型番:SRX100H2
- バージョン:12.1X44-D45
IP アドレスの設定
IP アドレスはインターフェースに対して作成した論理インターフェースを対象に設定します。設定コマンドは以下の通りで、unit <番号>
の部分で論理インターフェースを指定します。
set interfaces <IF名> unit <番号> family inet address <アドレス>/<マスク長>
unit <番号>
:論理インターフェース番号。0,1,2,… を指定
例:以下の通り設定する場合
- 対象インターフェース:fe-0/0/7
- 論理インターフェース番号:0
- IP アドレス:10.20.30.10/24
[edit]
root@SRX# set interfaces fe-0/0/7 unit 0 family inet address 10.20.30.10/24
DHCP クライアントの設定
DHCP で IP アドレス等の情報を取得する場合は以下の様に設定します。
set interfaces <IF名> unit <番号> family inet dhcp-client
さらに、対象インターフェースが所属するゾーンについて DHCP 通信を許可するよう設定します。
set security zones security-zone <ゾーン名> interfaces <IF名> host-inbound-traffic system-services dhcp
例:untrust ゾーンに所属する fe-0/0/0.0 に対して DHCP クライアントの設定をする場合
[edit]
root@SRX# set interfaces fe-0/0/0 unit 0 family inet dhcp-client
[edit]
root@SRX# set security zones security-zone untrust interfaces fe-0/0/0.0 host-inbound-traffic system-services dhcp
ゾーンへの論理インターフェースの割り当て
set security zones security-zone <ゾーン名> interfaces <IF名>
例:以下の通り設定する場合
- 対象インターフェース:fe-0/0/7.0
- 割当先ゾーン:trust
[edit]
root@SRX# set security zones security-zone trust interfaces fe-0/0/7.0
物理インターフェースの Speed/Duplex の設定
Speed/Duplex の設定は以下コマンドで物理インターフェースに対して行います。
set interfaces <IF名> speed <SPEED>
SPEED
:100m、10m、1g などを指定- デフォルトでは
auto
set interfaces <IF名> link-mode <DUPLEX>
DUPLEX
:full-duplex、half-duplex から指定- デフォルトでは
auto
例:以下の通り設定する場合
- 対象インターフェース:fe-0/0/0
- Speed:100MB
- Duplex:全二重
[edit]
root@SRX# set interfaces fe-0/0/0 speed 100m
[edit]
root@SRX# set interfaces fe-0/0/0 link-mode full-duplex
確認コマンド
show interfaces terse
- 物理/論理 IF 一覧の表示
root@SRX> show interfaces terse
Interface Admin Link Proto Local Remote
fe-0/0/0 up up
fe-0/0/0.0 up up inet 10.1.10.8/24
gr-0/0/0 up up
ip-0/0/0 up up
lt-0/0/0 up up
mt-0/0/0 up up
sp-0/0/0 up up
sp-0/0/0.0 up up inet
sp-0/0/0.16383 up up inet 10.0.0.1 --> 10.0.0.16
10.0.0.6 --> 0/0
128.0.0.1 --> 128.0.1.16
128.0.0.6 --> 0/0
fe-0/0/1 up down
fe-0/0/1.0 up down eth-switch
fe-0/0/2 up down
fe-0/0/2.0 up down eth-switch
fe-0/0/3 up down
fe-0/0/3.0 up down eth-switch
fe-0/0/4 up down
fe-0/0/4.0 up down eth-switch
fe-0/0/5 up down
fe-0/0/5.0 up down eth-switch
fe-0/0/6 up down
fe-0/0/6.0 up down eth-switch
fe-0/0/7 up down
fe-0/0/7.0 up down inet 10.20.30.10/24
gre up up
ipip up up
irb up up
lo0 up up
lo0.16384 up up inet 127.0.0.1 --> 0/0
lo0.16385 up up inet 10.0.0.1 --> 0/0
10.0.0.16 --> 0/0
128.0.0.1 --> 0/0
128.0.0.4 --> 0/0
128.0.1.16 --> 0/0
lo0.32768 up up
lsi up up
mtun up up
pimd up up
pime up up
pp0 up up
ppd0 up up
ppe0 up up
st0 up up
tap up up
vlan up up
vlan.0 up down inet 192.168.1.1/24
show interfaces
- IF 情報を表示
root@SRX> show interfaces fe-0/0/0
Physical interface: fe-0/0/0, Enabled, Physical link is Up
Interface index: 134, SNMP ifIndex: 508
Link-level type: Ethernet, MTU: 1514, Link-mode: Full-duplex, Speed: 100mbps,
BPDU Error: None, MAC-REWRITE Error: None, Loopback: Disabled,
Source filtering: Disabled, Flow control: Enabled
Device flags : Present Running
Interface flags: SNMP-Traps Internal: 0x0
CoS queues : 8 supported, 8 maximum usable queues
Current address: 88:a2:5e:0c:33:40, Hardware address: 88:a2:5e:0c:33:40
Last flapped : 2020-12-07 10:44:51 JST (03:03:18 ago)
Input rate : 0 bps (0 pps)
Output rate : 0 bps (0 pps)
Active alarms : None
Active defects : None
Interface transmit statistics: Disabled
Logical interface fe-0/0/0.0 (Index 70) (SNMP ifIndex 511)
Flags: SNMP-Traps 0x0 Encapsulation: ENET2
Input packets : 3119
Output packets: 639
Security: Zone: untrust
Allowed host-inbound traffic : dhcp tftp
Protocol inet, MTU: 1500
Flags: Sendbcast-pkt-to-re
Addresses, Flags: Is-Preferred Is-Primary
Destination: 10.1.10/24, Local: 10.1.10.8, Broadcast: 10.1.10.255
show interfaces brief
- IF 情報を簡易表示
root@SRX> show interfaces brief fe-0/0/0
Physical interface: fe-0/0/0, Enabled, Physical link is Up
Link-level type: Ethernet, MTU: 1514, Speed: 100mbps, Loopback: Disabled,
Source filtering: Disabled, Flow control: Enabled
Device flags : Present Running
Interface flags: SNMP-Traps Internal: 0x0
Logical interface fe-0/0/0.0
Flags: SNMP-Traps 0x0 Encapsulation: ENET2
Security: Zone: untrust
Allowed host-inbound traffic : dhcp tftp
inet 10.1.10.8/24
show interfaces detail
- IF 詳細情報を表示
参考資料

24.InterfacesのCLI設定 Juniper SRX日本語マニュアル
JuniperSRX日本語マニュアル(24)InterfacesのCLI設定2017年5月ジュニパーネットワークス株式会社はじめにInterfacesのCLI設定について説明します。※手順内容は「SRX300」、JUNOS「15.1X49-D75」にて確認を実施しております。Interfac...
ネットワークエンジニアのメモ
iPhone、iPad、スマホ、Cisco、Network
―――――――――――――