| 
        
       ◆ Juniper EX - VLANの設定(アクセスポートの設定) 
       
       Juniper EXでスイッチポートにVLANを割り当てるためには、以下の4つの手順で設定を行います。 
       
       1. VLANの作成 
       set vlans VLAN名 vlan-id VLAN番号 
       
       2. プロトコルファミリーの設定 
       set interfaces ポート番号 unit 番号 family ethernet-switching 
       
       3. ポートのモード設定( アクセスポート ) 
       set interfaces ポート番号 unit 番号 family ethernet-switching port-mode access 
       
       4. VLANの割り当て 
       set interfaces interface名 unit 番号 family ethernet-switching vlan members VLAN名 
       
       ◆ 設定例 : ge-0/0/1をアクセスポートにして、VLAN10を割り当てる設定例
      
 
        
          
             
             # set vlans V10 vlan-id 10 
             # set interfaces ge-0/0/1 unit 0 family ethernet-switching 
             # 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 V10 
             
             # commit 
             
             | 
           
        
       
       
       
       オプション設定ですが、作成したVLANに対して入力トラフィックのフィルタリング、出力トラフィックの 
       フィルタリングを行いたい場合は以下のfilter設定をします。 
       
       ◆ VLANへの入力トラフィックの制限 
       set vlans VLAN名 filter input フィルタ名 
       set vlans VLAN名 filter output フィルタ名 
       
       フィルタを定義する場合、firewall filterコマンドで事前にファイアウォールフィルタを設定しておいて 
       その定義したファイアウォールフィルタのフィルタ名を上記の「フィルタ名」部分に適用します。 
       
      
      
      
      
       
       
       ◆ Juniper EX - TRUNKの設定(タギングポートの設定) 
       
       Juniper EXでスイッチポートをトランクポートにするためには、以下の3つの手順で設定を行います。なお、 
       set vlans vlan名 vlan-id vlan番号コマンドで、スイッチ上にすでにVLANが作成されていることが前提です。 
       
       1. プロトコルファミリーの設定 
       set interfaces ポート番号 unit 番号 family ethernet-switching 
       
       2. ポートのモード設定( タギングポートの設定 ) 
       set interfaces ポート番号 unit 番号 family ethernet-switching port-mode trunk 
       
       3. トランクポート上で通信許可するVLANの設定 
       set interfaces interface名 unit 番号 family ethernet-switching vlan members VLAN名 | all 
       
       ◆ 設定例 : ge-0/0/2をトランクポートにして、VLAN10とVLAN20のトラフィックを転送させる設定
      
      
 
        
          
             
             # set vlans V10 vlan-id 10 
             # set vlans V20 vlan-id 20 
             
             # set interfaces ge-0/0/2 unit 0 family ethernet-switching 
             # set interfaces ge-0/0/2 unit 0 family ethernet-switching port-mode trunk 
             # set interfaces ge-0/0/2 unit 0 family ethernet-switching vlan members V10 
             # set interfaces ge-0/0/2 unit 0 family ethernet-switching vlan members V20 
             
             # commit 
             
             | 
           
        
       
       
       対向機器がCatalystスイッチで「PVST+」または「rapid-PVST+」が動作している場合、802.1d BPDUは 
       VLAN1宛てに送信されるため、Juniper EX側のTrunkポートのNative VLANを1に設定する必要があります。 
       
      
      
 
        
          
            |  # set interfaces ge-0/0/1 unit 0 family ethernet-switching native-vlan-id
            1 | 
           
        
       
      
       
       
       
       ◆ Juniper EX - ネゴシエーションの設定 
       
       Juniper EXシリーズのスイッチポートのデフォルト設定は「オートネゴシエーション」になっています。 
       オートネゴシエーションを有効化する設定、オートネゴシエーションを無効化する設定は以下の通りです。 
       
       ◆ 設定例 : ge-0/0/1 ポートのオートネゴシエーションを有効化する設定
       
        
          
            |  # set interfaces ge-0/0/1 ether-options auto-negotiation | 
           
        
       
       
       ◆ 設定例 : ge-0/0/2 ポートのオートネゴシエーションを無効化する設定
      
        
          
            |  # set interfaces ge-0/0/2 ether-options no-auto-negotiation | 
           
        
       
       
       
       オートネゴシエーションを無効化した場合、速度とリンクモードを明示的に設定する必要があります。 
       
       ◆ 設定例 : ge-0/0/2 ポートを「100Mbps」と「full-duplex」に固定する設定
      
        
          
             
             # set interfaces ge-0/0/2 ether-options speed 100m 
             # set interfaces ge-0/0/2 ether-options link-mode full-duplex 
             
             | 
           
        
       
       
       ※ 設定後のステータスは「 >show interfaces ge-0/0/2 」コマンドで確認しましょう。 
       
      
      
       |