例:EXシリーズスイッチのポート、VLAN、およびルータートラフィック用のファイアウォールフィルターの設定
この例では、スイッチ上のポート、ネットワーク上のVLAN、スイッチ上のLayer 3インターフェイスを出入りするトラフィックを制御するために、ファイアウォールフィルターを構成して適用する方法を示します。ファイアウォールフィルターは、パケットフローの特定の処理ポイントでパケットの転送または拒否を決定するルールを定義します。
要件
この例では、以下のソフトウェアおよびハードウェアコンポーネントを使用しています:
EXシリーズスイッチ向けJunos OSリリース9.0またはそれ以降
ジュニパーネットワークスEX3200-48Tスイッチ2台:1つはアクセススイッチとして使用し、もう1つは分散型スイッチとして使用します。
ジュニパーネットワークスEX-UM-4SFPアップリンクモジュール1台
ジュニパーネットワークスJ-シリーズルーター1台
この例でファイアウォールフィルターを構成して適用する前に、必ず以下を確認してください。
ファイアウォールフィルターの概念、ポリシー、およびCoSについて理解していること
分散型スイッチにアップリンクモジュールがインストールされていること。EX3200スイッチにアップリンクモジュールをインストールするを参照してください。
概要
この構成例では、ファイアウォールフィルターを構成して適用し、パケットの内容を評価して、すべての voice-vlan、employee-vlan、および guest-vlan トラフィックを処理するEXシリーズスイッチを送信元および宛先とするパケットをいつ破棄、転送、分類、カウント、および分析するかを決定するルールを提供する方法を示します。表 1 は、この例でEXシリーズスイッチ用に構成されたファイアウォールフィルターを示します。
| コンポーネント | 目的/説明 |
|---|---|
ポートファイアウォールフィルター、 |
このファイアウォールフィルターは、2つの役割を果たします。
このファイアウォールフィルターは、アクセススイッチ上のポートインターフェイスに適用されます。 |
VLANファイアウォールフィルター、 |
不正なデバイスがHTTPセッションを使用して、VoIPコール用のコール登録、アドミッション、およびコールステータスを管理するゲートキーバーデバイスを模倣することを防止します。TCPまたはUDPポートのみが使用され、ゲートキーパーのみがHTTPを使用します。つまり、TCPポート上のすべての このファイアウォールフィルターは、アクセス スイッチ上のVLANインターフェイスに適用されます。 |
VLANファイアウォールフィルター、 |
企業サブネット宛ての このファイアウォールフィルターは、アクセススイッチ上のvlanインターフェイスに適用されます。 |
VLANファイアウォールフィルター、 |
ゲスト(非従業員)が、 このファイアウォールフィルターは、アクセス スイッチ上のVLANインターフェイスに適用されます。 |
ルーターのファイアウォールフィルター、 |
このファイアウォールフィルターは、分散型スイッチ上のルーティングポート(レイヤー3 ップリンクモジュール)に適用されます。 |
図 1 は、スイッチ上のポート、VLAN、およびレイヤー3のルーティングファイアウォールフィルターのアプリケーションを示しています。

ネットワークトポロジー
この構成例のトポロジーは、アクセスレイヤーに1台のEX-3200-48Tスイッチ、分散型レイヤーに1台のEX-3200-48Tで構成されています。分散型スイッチのアップリンクモジュールは、J-シリーズルーターへのレイヤー3接続をサポートするように構成されています。
EXシリーズスイッチは、VLANメンバーシップをサポートするように構成されています。表 2 は、VLAN用のVLAN構成コンポーネントを示しています。
VLAN名 |
VLAN ID |
VLANサブネットと使用可能なIPアドレス |
VLANの説明 |
|---|---|---|---|
|
|
|
従業員VoIPトラフィックに使用する音声VLAN |
|
|
|
VLANスタンドアロンPC、VoIP電話のハブを介してネットワークに接続されたPC、無線アクセスポイント、およびプリンター。このVLANには、音声VLANが完全に含まれています。2つのVLAN( |
|
|
|
ゲストのデータデバイス(PC)のVLAN。このシナリオは、ロビーや会議室などの訪問者に開放しているエリアを企業が設けており、訪問者は自分のPCをウェブや自社のVPNに接続するためにプラグインできるハブがあることを想定しています。 |
|
|
|
企業のセキュリティカメラ用のVLAN。 |
EXシリーズスイッチのポートは、パワーオーバーイーサネット(PoE)をサポートしており、ポートに接続されているVoIP電話にネットワーク接続と電力の両方を提供します。表 3 は、VLANに割り当てられたスイッチポートとスイッチポートに接続されたデバイスのIPとMACアドレスを示しています:
スイッチとポート番号 |
VLANメンバーシップ |
IPとMACアドレス |
ポートデバイス |
|---|---|---|---|
ge-0/0/0, ge-0/0/1 |
|
IPアドレス: MACアドレス: |
それぞれが1台のPCに接続された2台のVoIP電話。 |
ge-0/0/2, ge-0/0/3 |
|
|
プリンター、ワイヤレスアクセスポイント |
ge-0/0/4, ge-0/0/5 |
|
|
訪問者がPCをつなげることができる2つのハブ。ロビーや会議室など、訪問者に開放されている場所に設置されたハブ |
ge-0/0/6, ge-0/0/7 |
|
|
2台のセキュリティ カメラ |
ge-0/0/9 |
|
IPアドレス: MACアドレス: |
ゲートキーパーデバイス。ゲートキーパーは、VoIP電話の通話登録、アドミッション、および通話ステータスを管理します。 |
ge-0/1/0 |
IPアドレス: |
ルーターへのレイヤー3接続。これはスイッチのアップリンクモジュール上のポートです |
音声トラフィックを優先し、TCPとICMPトラフィックのレートを制限するイングレスポートファイアウォールフィルターを構成する
ポート、VLAN、およびルーターインターフェイスのファイアウォールフィルターの構成と適用を行うには、次のタスクを実行します:
手順
CLIクイック構成
音声トラフィックを優先し、employee-vlan サブネット宛てのパケットのレートを制限するポートファイアウォールフィルターを素早く構成して適用するには、以下のコマンドをコピーして、スイッチ端末ウィンドウにペーストします:
[edit]
set firewall policer tcp-connection-policer if-exceeding burst-size-limit 30k bandwidth-limit 1m
set firewall policer tcp-connection-policer then discard
set firewall policer icmp-connection-policer if-exceeding burst-size-limit 30k bandwidth-limit 1m
set firewall policer icmp-connection-policer then discard
set firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp term voip-high from source-mac-address 00.00.5E.00.53.01
set firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp term voip-high from source-mac-address 00.00.5E.00.53.02
set firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp term voip-high from protocol udp
set firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp term voip-high then forwarding-class expedited-forwarding
set firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp term voip-high then loss-priority low
set firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp term network-control from precedence net-control
set firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp term network-control then forwarding-class network-control
set firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp term network-control then loss-priority low
set firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp term tcp-connection from destination-address 192.0.2.16/28
set firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp term tcp-connection from protocol tcp
set firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp term tcp-connection then policer tcp-connection-policer
set firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp term tcp-connection then count tcp-counter
set firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp term tcp-connection then forwarding-class best-effort
set firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp term tcp-connection then loss-priority high
set firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp term icmp-connection from destination-address 192.0.2.16/28
set firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp term icmp-connection from protocol icmp
set firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp term icmp-connection then policer icmp-connection-policer
set firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp term icmp-connection then count icmp-counter
set firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp term icmp-connection then forwarding-class best-effort
set firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp term icmp-connection then loss-priority high
set firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp term best-effort then forwarding-class best-effort
set firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp term best-effort then loss-priority high
set interfaces ge-0/0/0 description "voice priority and tcp and icmp traffic rate-limiting filter at ingress port"
set interfaces ge-0/0/0 unit 0 family ethernet-switching filter input ingress-port-voip-class-limit-tcp-icmp
set interfaces ge-0/0/1 description "voice priority and tcp and icmp traffic rate-limiting filter at ingress port"
set interfaces ge-0/0/1 unit 0 family ethernet-switching filter input ingress-port-voip-class-limit-tcp-icmp
set class-of-service schedulers voice-high buffer-size percent 15
set class-of-service schedulers voice-high priority high
set class-of-service schedulers net-control buffer-size percent 10
set class-of-service schedulers net-control priority high
set class-of-service schedulers best-effort buffer-size percent 75
set class-of-service schedulers best-effort priority low
set class-of-service scheduler-maps ethernet-diffsrv-cos-map forwarding-class expedited-forwarding scheduler voice-high
set class-of-service scheduler-maps ethernet-diffsrv-cos-map forwarding-class network-control scheduler net-control
set class-of-service scheduler-maps ethernet-diffsrv-cos-map forwarding-class best-effort scheduler best-effort ステップバイステップでの手順
音声トラフィックを優先し、employee-vlan サブネット宛てのパケットのレートを制限するポートファイアウォールフィルターを構成して適用するには:
ポリサー
tcp-connection-policerおよびicmp-connection-policerを定義します:[edit] user@switch# set firewall policer tcp-connection-policer if-exceeding burst-size-limit 30k bandwidth-limit 1m user@switch# set firewall policer tcp-connection-policer then discard user@switch# set firewall policer icmp-connection-policer if-exceeding burst-size-limit 30k bandwidth-limit 1m user@switch# set firewall policer icmp-connection-policer then discard
ファイアウォールフィルター
ingress-port-voip-class-limit-tcp-icmpを定義します:[edit firewall] user@switch# set family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp
条件
voip-highを定義します:[edit firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp ] user@switch# set term voip-high from source-mac-address 00.00.5E.00.53.01 user@switch# set term voip-high from source-mac-address 00.00.5E.00.53.02 user@switch# set term voip-high from protocol udp user@switch# set term voip-high then forwarding-class expedited-forwarding user@switch# set term voip-high then loss-priority low
条件
network-controlを定義します:[edit firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp ] user@switch# set term network-control from precedence net-control user@switch# set term network-control then forwarding-class network-control user@switch# set term network-control then loss-priority low
TCPトラフィックのレートへの制限を構成する条件
tcp-connectionを定義します:[edit firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp] user@switch# set term tcp-connection from destination-address 192.0.2.16/28 user@switch# set term tcp-connection from protocol tcp user@switch# set term tcp-connection then policer tcp-connection-policer user@switch# set term tcp-connection then count tcp-counter user@switch# set term tcp-connection then forwarding-class best-effort user@switch# set term tcp-connection then loss-priority high
ICMPトラフィックのレートへの制限を構成する条件
icmp-connectionを定義します:[edit firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp] user@switch# set term icmp-connection from destination-address 192.0.2.16/28 user@switch# set term icmp-connection from protocol icmp user@switch# set term icmp-connection then policer icmp-policer user@switch# set term icmp-connection then count icmp-counter user@switch# set term icmp-connection then forwarding-class best-effort user@switch# set term icmp-connection then loss-priority high
ファイアウォールフィルターで他のどの条件にも一致しないすべてのパケットに暗示的に一致させるため、一致条件なしの条件
best-effortを定義します:[edit firewall family ethernet-switching filter ingress-port-voip-class-limit-tcp-icmp] user@switch# set term best-effort then forwarding-class best-effort user@switch# set term best-effort then loss-priority high
ファイアウォールフィルター
ingress-port-voip-class-limit-tcp-icmpを、employee-vlan用のポートインターフェイスへの入力フィルターとして適用します:[edit interfaces] user@switch# set ge-0/0/0 description "voice priority and tcp and icmp traffic rate-limiting filter at ingress port" user@switch# set ge-0/0/0 unit 0 family ethernet-switching filter input ingress-port-voip-class-limit-tcp-icmp user@switch# set ge-0/0/1 description "voice priority and tcp and icmp traffic rate-limiting filter at ingress port" user@switch# set ge-0/0/1 unit 0 family ethernet-switching filter input ingress-port-voip-class-limit-tcp-icmp
異なるスケジューラ向けに必要なパラメーターを構成します。
注:スケジューラのパラメーターを構成する場合、ネットワークトラフィックパターンと一致する数値を定義します。
[edit class-of-service] user@switch# set schedulers voice-high buffer-size percent 15 user@switch# set schedulers voice-high priority high user@switch# set schedulers network—control buffer-size percent 10 user@switch# set schedulers network—control priority high user@switch# set schedulers best-effort buffer-size percent 75 user@switch# set schedulers best-effort priority low
スケジューラマップでスケジューラに転送クラスを割り当てます:
[edit class-of-service] user@switch# set scheduler-maps ethernet-diffsrv-cos-map user@switch# set scheduler-maps ethernet-diffsrv-cos-map forwarding-class expedited-forwarding scheduler voice-high user@switch# set scheduler-maps ethernet-diffsrv-cos-map forwarding-class network-control scheduler net-control user@switch# set scheduler-maps ethernet-diffsrv-cos-map forwarding-class best-effort scheduler best-effort
送信インターフェイスにスケジューラマップを関連付けます:
[edit class-of-service] user@switch# set interfaces ge–0/1/0 scheduler-map ethernet-diffsrv-cos-map
結果
設定の結果の表示:
user@switch# show
firewall {
policer tcp-connection-policer {
if-exceeding {
bandwidth-limit 1m;
burst-size-limit 30k;
}
then {
discard;
}
}
policer icmp-connection-policer {
if-exceeding {
bandwidth-limit 1m;
burst-size-limit 30k;
}
then {
discard;
}
}
family ethernet-switching {
filter ingress-port-voip-class-limit-tcp-icmp {
term voip-high {
from {
destination-mac-address 00.00.5E.00.53.01;
destination-mac-address 00.00.5E.00.53.02;
protocol udp;
}
then {
forwarding-class expedited-forwarding;
loss-priority low;
}
}
term network-control {
from {
precedence net-control ;
}
then {
forwarding-class network-control;
loss-priority low;
}
}
term tcp-connection {
from {
destination-address 192.0.2.16/28;
protocol tcp;
}
then {
policer tcp-connection-policer;
count tcp-counter;
forwarding-class best-effort;
loss-priority high;
}
}
term icmp-connection
from {
protocol icmp;
}
then {
policer icmp-connection-policer;
count icmp-counter;
forwarding-class best-effort;
loss-priority high;
}
}
term best-effort {
then {
forwarding-class best-effort;
loss-priority high;
}
}
}
}
}
interfaces {
ge-0/0/0 {
description "voice priority and tcp and icmp traffic rate-limiting filter at ingress port";
unit 0 {
family ethernet-switching {
filter {
input ingress-port-voip-class-limit-tcp-icmp;
}
}
}
}
ge-0/0/1 {
description "voice priority and tcp and icmp traffic rate-limiting filter at ingress port";
unit 0 {
family ethernet-switching {
filter {
input ingress-port-voip-class-limit-tcp-icmp;
}
}
}
}
}
scheduler-maps {
ethernet-diffsrv-cos-map {
forwarding-class expedited-forwarding scheduler voice-high;
forwarding-class network-control scheduler net-control;
forwarding-class best-effort scheduler best-effort;
}
}
interfaces {
ge/0/1/0 {
scheduler-map ethernet-diffsrv-cos-map;
}
}
VLANイングレスファイアウォールフィルターを構成して、不正デバイスによるVoIPトラフィックの妨害を阻止する
ポート、VLAN、およびルーターインターフェイスのファイアウォールフィルターの構成と適用を行うには、次のタスクを実行します:
手順
CLIクイック構成
voice-vlan のVLANファイアウォール フィルターを素早く構成し、VoIPトラフィックを管理するゲートキーパーデバイスを模倣して、HTTPセッションを使用する不正デバイスを阻止するには、以下のコマンドをコピーして、スイッチの端末ウィンドウにペーストします。
[edit]
set firewall family ethernet-switching filter ingress-vlan-rogue-block term to-gatekeeper from destination-address 192.0.2.14
set firewall family ethernet-switching filter ingress-vlan-rogue-block term to-gatekeeper from destination-port 80
set firewall family ethernet-switching filter ingress-vlan-rogue-block term to-gatekeeper then accept
set firewall family ethernet-switching filter ingress-vlan-rogue-block term from-gatekeeper from source-address 192.0.2.14
set firewall family ethernet-switching filter ingress-vlan-rogue-block term from-gatekeeper from source-port 80
set firewall family ethernet-switching filter ingress-vlan-rogue-block term from-gatekeeper then accept
set firewall family ethernet-switching filter ingress-vlan-rogue-block term not-gatekeeper from destination-port 80
set firewall family ethernet-switching filter ingress-vlan-rogue-block term not-gatekeeper then count rogue-counter
set firewall family ethernet-switching filter ingress-vlan-rogue-block term not-gatekeeper then discard
set vlans voice-vlan description "block rogue devices on voice-vlan"
set vlans voice-vlan filter input ingress-vlan-rogue-block ステップバイステップでの手順
voice-vlan 上でVLANファイアウォールフィルターを構成および適用して、VoIPトラフィックを管理するゲートキーパーデバイスを模倣してHTTPセッションを使用する不正デバイスを阻止するには:
ファイアウォールフィルター
ingress-vlan-rogue-blockを定義して、許可および制限したいトラフィックのフィルター条件を指定します:[edit firewall] user@switch# set family ethernet-switching filter ingress-vlan-rogue-block
条件
to-gatekeeperを定義して、ゲートキーパーの宛先IPアドレスと一致するパケットを受け入れます:[edit firewall family ethernet-switching filter ingress-vlan-rogue-block] user@switch# set term to-gatekeeper from destination-address 192.0.2.14 user@switch# set term to-gatekeeper from destination-port 80 user@switch# set term to-gatekeeper then accept
条件
from-gatekeeperを定義して、ゲートキーパーの送信元IPアドレスと一致するパケットを受け入れるようにします:[edit firewall family ethernet-switching filter ingress-vlan-rogue-block] user@switch# set term from-gatekeeper from source-address 192.0.2.14 user@switch# set term from-gatekeeper from source-port 80 user@switch# set term from-gatekeeper then accept
条件
not-gatekeeperを定義して、TCPポート上のすべてのvoice-vlanトラフィックがゲートキーパーデバイスに向けられるようにします:[edit firewall family ethernet-switching filter ingress-vlan-rogue-block] user@switch# set term not-gatekeeper from destination-port 80 user@switch# set term not-gatekeeper then count rogue-counter user@switch# set term not-gatekeeper then discard
VoIP電話のVLANインターフェイスに入力フィルターとして、
ingress-vlan-rogue-blockファイアウォールフィルターを適用します:[edit] user@switch# set vlans voice-vlan description "block rogue devices on voice-vlan" user@switch# set vlans voice-vlan filter input ingress-vlan-rogue-block
結果
設定の結果の表示:
user@switch# show
firewall {
family ethernet-switching {
filter ingress-vlan-rogue-block {
term to-gatekeeper {
from {
destination-address 192.0.2.14/32
destination-port 80;
}
then {
accept;
}
}
term from-gatekeeper {
from {
source-address 192.0.2.14/32
source-port 80;
}
then {
accept;
}
}
term not-gatekeeper {
from {
destination-port 80;
}
then {
count rogue-counter;
discard;
}
}
}
vlans {
voice-vlan {
description "block rogue devices on voice-vlan";
filter {
input ingress-vlan-rogue-block;
}
}
}
従業員VLAN上のエグレストラフィックをカウント、監視、および分析するVLANファイアウォールフィルターを構成する
ポート、VLAN、およびルーターインターフェイスのファイアウォールフィルターの構成と適用を行うには、次のタスクを実行します:
手順
CLIクイック構成
VLANインターフェイスにファイアウォールフィルターを構成および適用し、employee-vlan エグレストラフィックをフィルタリングします。企業サブネット宛ての従業員トラフィックは許容されますが、監視はおこないません。ウェブを宛先とする従業員トラフィックは、カウントおよび分析されます。
VLANファイアウォールフィルターを素早く構成して適用するには、以下のコマンドをコピーして、スイッチの端末ウィンドウにペーストします:
[edit]
set firewall family ethernet-switching filter egress-vlan-watch-employee term employee-to-corp from destination-address 192.0.2.16/28
set firewall family ethernet-switching filter egress-vlan-watch-employee term employee-to-corp then accept
set firewall family ethernet-switching filter egress-vlan-watch-employee term employee-to-web from destination-port 80
set firewall family ethernet-switching filter egress-vlan-watch-employee term employee-to-web then count employee-web-counter
set firewall family ethernet-switching filter egress-vlan-watch-employee term employee-to-web then analyzer employee-monitor
set vlans employee-vlan description "filter at egress VLAN to count and analyze employee to Web traffic"
set vlans employee-vlan filter output egress-vlan-watch-employee ステップバイステップでの手順
ウェブを宛先とする employee-vlan トラフィックをカウントして分析するには、エグレスポートファイアウォールフィルターを構成および適用します:
ファイアウォールフィルター
egress-vlan-watch-employeeを定義します:[edit firewall] user@switch# set family ethernet-switching filter egress-vlan-watch-employee
条件
employee-to-corpを定義することで、企業サブネットを宛先とするすべてのemployee-vlanトラフィックを受け入れますが、監視はおこないません:[edit firewall family ethernet-switching filter egress-vlan-watch-employee] user@switch# set term employee-to-corp from destination-address 192.0.2.16/28 user@switch# set term employee-to-corp then accept
条件
employee-to-webを定義することで、ウェブを宛先とするすべてのemployee-vlanトラフィックのカウントと監視を行います:[edit firewall family ethernet-switching filter egress-vlan-watch-employee] user@switch# set term employee-to-web from destination-port 80 user@switch# set term employee-to-web then count employee-web-counter user@switch# set term employee-to-web then analyzer employee-monitor
注:変更された手順については、「例:EXシリーズスイッチでの従業員のリソース使用をローカル監視するためのポートミラーリングを構成するに、
employee-monitorアナライザの構成に関する情報が掲載されています。VoIP電話のポートインターフェイスへの出力フィルターとしてファイアウォールフィルター
egress-vlan-watch-employeeを適用します:[edit] user@switch# set vlans employee-vlan description "filter at egress VLAN to count and analyze employee to Web traffic" user@switch# set vlans employee-vlan filter output egress-vlan-watch-employee
結果
設定の結果の表示:
user@switch# show
firewall {
family ethernet-switching {
filter egress-vlan-watch-employee {
term employee-to-corp {
from {
destination-address 192.0.2.16/28
}
then {
accept;
}
}
term employee-to-web {
from {
destination-port 80;
}
then {
count employee-web-counter:
analyzer employee-monitor;
}
}
}
}
}
vlans {
employee-vlan {
description "filter at egress VLAN to count and analyze employee to Web traffic";
filter {
output egress-vlan-watch-employee;
}
}
}
VLANファイアウォールフィルターを構成して、ゲストVLAN上でゲストから従業員へのトラフィックおよびピアツーピアアプリケーションを制限する
ポート、VLAN、およびルーターインターフェイスのファイアウォールフィルターの構成と適用を行うには、次のタスクを実行します:
手順
CLIクイック構成
次の例では、最初のフィルター条件では、ゲストが他のゲストと話をすることは許可されますが、employee-vlan の従業員と話をすることは許可されません。2つ目のフィルター条件では、ゲストがウェブにアクセスすることは許可しますが、guest-vlan上のピアツーピアアプリケーションは使用できないようにします。
ゲストから従業員へのトラフィックを制限するために、VLANファイアウォールフィルターを素早く構成し、ゲストが employee-vlan 上の従業員または従業員ホストと話したり、または、guest-vlan 上のピアツーピアアプリケーションの使用を試みたりすることをブロックするには、以下のコマンドをコピーして、スイッチの端末ウィンドウにペーストします:
[edit]
set firewall family ethernet-switching filter ingress-vlan-limit-guest term guest-to-guest from destination-address 192.0.2.33/28
set firewall family ethernet-switching filter ingress-vlan-limit-guest term guest-to-guest then accept
set firewall family ethernet-switching filter ingress-vlan-limit-guest term no-guest-employee-no-peer-to-peer from destination-mac-address 00.05.5E.00.00.DF
set firewall family ethernet-switching filter ingress-vlan-limit-guest term no-guest-employee-no-peer-to-peer then accept
set vlans guest-vlan description "restrict guest-to-employee traffic and peer-to-peer applications on guest VLAN"
set vlans guest-vlan forwarding-options filter input ingress-vlan-limit-guest ステップバイステップでの手順
guest-vlan 上でのゲストから従業員へのトラフィック、およびピアツーピアアプリケーションを制限するために、VLANファイアウォールフィルターを構成および適用します:
ファイアウォールフィルター
ingress-vlan-limit-guestを定義します:[edit firewall] set firewall family ethernet-switching filter ingress-vlan-limit-guest条件
guest-to-guestを定義することで、guest-vlan上のゲストが他のゲストと通信することは許可されますが、employee-vlanの従業員との通信は許可されません:[edit firewall family ethernet-switching filter ingress-vlan-limit-guest] user@switch# set term guest-to-guest from destination-address 192.0.2.33/28 user@switch# set term guest-to-guest then accept
条件
no-guest-employee-no-peer-to-peerを定義することで、guest-vlan上のゲストにウェブへのアクセスが許可されますが、guest-vlan上のピアツーピアの使用は許可されません。注:destination-mac-addressは、デフォルトのゲートウェイであり、VLAN内のあらゆるホストに対するネクストホップルーターとなります。[edit firewall family ethernet-switching filter ingress-vlan-limit-guest] user@switch# set term no-guest-employee-no-peer-to-peer from destination-mac-address 00.05.5E.00.00.DF user@switch# set term no-guest-employee-no-peer-to-peer then accept
ファイアウォールフィルター
ingress-vlan-limit-guestを、guest-vlan用のインターフェイスの入力フィルターとして適用します。[edit] user@switch# set vlans guest-vlan description "restrict guest-to-employee traffic and peer-to-peer applications on guest VLAN" user@switch# set vlans guest-vlan forwarding-options filter input ingress-vlan-limit-guest
結果
設定の結果の表示:
user@switch# show
firewall {
family ethernet-switching {
filter ingress-vlan-limit-guest {
term guest-to-guest {
from {
destination-address 192.0.2.33/28;
}
then {
accept;
}
}
term no-guest-employee-no-peer-to-peer {
from {
destination-mac-address 00.05.5E.00.00.DF;
}
then {
accept;
}
}
}
}
}
vlans {
guest-vlan {
description "restrict guest-to-employee traffic and peer-to-peer applications on guest VLAN";
filter {
input ingress-vlan-limit-guest;
}
}
}
企業サブネットを宛先とするエグレストラフィックに優先度を付与するルーターファイアウォールフィルターを構成する
ポート、VLAN、およびルーターインターフェイスのファイアウォールフィルターの構成と適用を行うには、次のタスクを実行します:
手順
CLIクイック構成
ルーティングポート(レイヤー3アップリンクモジュール)にファイアウォールフィルターを素早く構成して、employee-vlan トラフィックをフィルタリングし、企業サブネットを宛先とするトラフィックに最高の転送クラス優先度を付与するには、以下のコマンドをコピーして、スイッチの端末ウィンドウにペーストします:
[edit]
set firewall family inet filter egress-router-corp-class term corp-expedite from destination-address 192.0.2.16/28
set firewall family inet filter egress-router-corp-class term corp-expedite then forwarding-class expedited-forwarding
set firewall family inet filter egress-router-corp-class term corp-expedite then loss-priority low
set firewall family inet filter egress-router-corp-class term not-to-corp then accept
set interfaces ge-0/1/0 description "filter at egress router to expedite destined for corporate network"
set ge-0/1/0 unit 0 family inet address 203.0.113.0
set interfaces ge-0/1/0 unit 0 family inet filter output egress-router-corp-class ステップバイステップでの手順
ルーティングポート(レイヤー3アップリンクモジュール)にファイアウォールフィルターを構成して適用し、企業サブネットを宛先とする employee-vlan トラフィックに最高の優先度を付与します。
ファイアウォールフィルター
egress-router-corp-classを定義します:[edit] user@switch# set firewall family inet filter egress-router-corp-class
条件
corp-expediteを定義します:[edit firewall] user@switch# set family inet filter egress-router-corp-class term corp-expedite from destination-address 192.0.2.16/28 user@switch# set family inet filter egress-router-corp-class term corp-expedite then forwarding-class expedited-forwarding user@switch# set family inet filter egress-router-corp-class term corp-expedite then loss-priority low
条件
not-to-corpを定義します:[edit firewall] user@switch# set family inet filter egress-router-corp-class term not-to-corp then accept
レイヤー3のルーターへの接続を提供するスイッチのアップリンクモジュール上で、ポートへの出力フィルターとしてファイアウォールフィルター
egress-router-corp-classを適用します:[edit interfaces] user@switch# set ge-0/1/0 description "filter at egress router to expedite employee traffic destined for corporate network" user@switch# set ge-0/1/0 unit 0 family inet address 203.0.113.0 user@switch# set ge-0/1/0 unit 0 family inet filter output egress-router-corp-class
結果
設定の結果の表示:
user@switch# show
firewall {
family inet {
filter egress-router-corp-class {
term corp-expedite {
from {
destination-address 192.0.2.16/28;
}
then {
forwarding-class expedited-forwarding;
loss-priority low;
}
}
term not-to-corp {
then {
accept;
}
}
}
}
}
interfaces {
ge-0/1/0 {
unit 0 {
description "filter at egress router interface to expedite employee traffic destined for corporate network";
family inet {
source-address 203.0.113.0
filter {
output egress-router-corp-class;
}
}
}
}
}
検証
ファイアウォールフィルターが正常に動作していることを確認するには、以下のタスクを実行します:
ファイアウォールフィルターとポリサーの動作を検証する
目的
スイッチ上で構成されたファイアウォールフィルターとポリサーの動作状態を検証します。
アクション
以下の動作モードコマンドを使用します。
user@switch> show firewall Filter: ingress-port-voip-class-limit-tcp-icmp Counters: Name Packets icmp-counter 0 tcp-counter 0 Policers: Name Packets icmp-connection-policer 0 tcp-connection-policer 0 Filter: ingress-vlan-rogue-block Filter: egress-vlan-watch-employee Counters: Name Packets employee-web—counter 0
意味
show firewall コマンドは、スイッチ上で構成されたファイアウォールフィルター、ポリサー、およびカウンターの名前を表示します。出力フィールドには、構成されたすべてのカウンターのバイト数とパケット数、およびすべてのポリサーのパケット数が表示されます。
スケーラーとスケジューラーマップの動作確認
目的
スイッチ上でスケーラーとスケジューラーマップが動作していることを確認します。
アクション
以下の動作モードコマンドを使用します。
user@switch> show class-of-service scheduler-map
Scheduler map: default, Index: 2
Scheduler: default-be, Forwarding class: best-effort, Index: 20
Transmit rate: 95 percent, Rate Limit: none, Buffer size: 95 percent,
Priority: low
Drop profiles:
Loss priority Protocol Index Name
Low non-TCP 1 default-drop-profile
Low TCP 1 default-drop-profile
High non-TCP 1 default-drop-profile
High TCP 1 default-drop-profile
Scheduler: default-nc, Forwarding class: network-control, Index: 22
Transmit rate: 5 percent, Rate Limit: none, Buffer size: 5 percent,
Priority: low
Drop profiles:
Loss priority Protocol Index Name
Low non-TCP 1 default-drop-profile
Low TCP 1 default-drop-profile
High non-TCP 1 default-drop-profile
High TCP 1 default-drop-profileScheduler map: ethernet-diffsrv-cos-map, Index: 21657
Scheduler: best-effort, Forwarding class: best-effort, Index: 61257
Transmit rate: remainder, Rate Limit: none, Buffer size: 75 percent,
Priority: low
Drop profiles:
Loss priority Protocol Index Name
Low non-TCP 1 <default-drop-profile>
Low TCP 1 <default-drop-profile>
High non-TCP 1 <default-drop-profile>
High TCP 1 <default-drop-profile>
Scheduler: voice-high, Forwarding class: expedited-forwarding, Index: 3123
Transmit rate: remainder, Rate Limit: none, Buffer size: 15 percent,
Priority: high
Drop profiles:
Loss priority Protocol Index Name
Low non-TCP 1 <default-drop-profile>
Low TCP 1 <default-drop-profile>
High non-TCP 1 <default-drop-profile>
High TCP 1 <default-drop-profile>
Scheduler: net-control, Forwarding class: network-control, Index: 2451
Transmit rate: remainder, Rate Limit: none, Buffer size: 10 percent,
Priority: high
Drop profiles:
Loss priority Protocol Index Name
Low non-TCP 1 <default-drop-profile>
Low TCP 1 <default-drop-profile>
High non-TCP 1 <default-drop-profile>
High TCP 1 <default-drop-profile>
意味
構成されたスケジューラーとスケジューラーマップに関する統計を表示します。