FutureNet

NXR,VXRシリーズ

運用管理編

8. メール送信設定

8-2. WWAN接続・切断時のメール送信設定

WWAN回線の接続・切断状態の変化をメールで通知する設定例です。

 

【 WWAN接続・切断時のメール通知対応機種 】
NXR-610X5G,NXR-G180/L-CA,NXR-G240/L-CA,NXR-G260/L-CA,NXR-G110/L-CA,NXR-G100/L-CA(2022/4現在)
最新の対応状況は、各製品の更新履歴やユーザーズガイドをご確認ください。

 

コンテンツ
構成図 設定例 設定例解説 端末の設定例 補足 付録

 

【 構成図 】

  • wwan0インタフェース接続時、指定した宛先にメールを送信します。なお、メール本文にはwwan0インタフェースのIPアドレスが記載されます。
    (☞) WWAN切断時、メールサーバへの経路がない等の理由でメール送信できない場合、メール送信に失敗し、切断時のメールは宛先に届きません。
  • この設定例で使用しているルータは、NXR-G110/L-CAです。

 

【 設定例 】

nxrg110#configure terminal
nxrg110(config)#mail server 1
nxrg110(config-mail-server)#server authentication [認証方式]
nxrg110(config-mail-server)#server smtp address [SMTPサーバ]
nxrg110(config-mail-server)#server smtp port [ポート番号]
nxrg110(config-mail-server)#username [SMTPサーバ用ユーザID] password [SMTPサーバ用パスワード]
nxrg110(config-mail-server)#exit
nxrg110(config)#interface ethernet 0
nxrg110(config-if)#ip address 192.168.10.1/24
nxrg110(config-if)#exit
nxrg110(config)#interface wwan 0
nxrg110(config-wwan)#ip masquerade
nxrg110(config-wwan)#ip spi-filter
nxrg110(config-wwan)#ip tcp adjust-mss auto
nxrg110(config-wwan)#wwan username [WWAN接続用ユーザID] password [WWAN接続用パスワード]
nxrg110(config-wwan)#wwan authentication chap
nxrg110(config-wwan)#mobile apn [APN] cid 1 pdp-type ip
nxrg110(config-wwan)#mail send server 1
nxrg110(config-wwan)#mail send to [宛先メールアドレス]
nxrg110(config-wwan)#mail send from [送信元メールアドレス]
nxrg110(config-wwan)#exit
nxrg110(config)#mobile error-recovery-reset
nxrg110(config)#mobile 1 carrier [キャリア]
nxrg110(config)#exit
nxrg110#clear mobile 1
nxrg110#configure terminal
nxrg110(config)#dns
nxrg110(config-dns)#service enable
nxrg110(config-dns)#exit
nxrg110(config)#exit
nxrg110#save config

 

【 設定例解説 】

1. <メールサーバ設定>
nxrg110(config)#mail server 1

メールサーバ番号を指定します。

nxrg110(config-mail-server)#server authentication [認証方式]

SMTPサーバの認証方式を設定します。

nxrg110(config-mail-server)#server smtp address [SMTPサーバ]

SMTPサーバを設定します。

nxrg110(config-mail-server)#server smtp port [ポート番号]

SMTPのポート番号を設定します。

nxrg110(config-mail-server)#username [SMTPサーバ用ユーザID] password [SMTPサーバ用パスワード]

SMTPサーバ用ユーザID,パスワードを設定します。

 

2. <LAN側(ethernet0)インタフェース設定>
nxrg110(config)#interface ethernet 0
nxrg110(config-if)#ip address 192.168.10.1/24

ethernet0インタフェースのIPアドレスを設定します。

 

3. <WAN側(wwan0)インタフェース設定>
nxrg110(config)#interface wwan 0

wwan0インタフェースを設定します。
(☞) wwan0インタフェースはデフォルトでDHCPクライアントが設定されています。

nxrg110(config-wwan)#ip masquerade
nxrg110(config-wwan)#ip spi-filter

IPマスカレード、ステートフルパケットインスペクションを有効にします。

nxrg110(config-wwan)#ip tcp adjust-mss auto

TCP MSSの調整機能をオートに設定します。

nxrg110(config-wwan)#wwan username [WWAN接続用ユーザID] password [WWAN接続用パスワード]

WWAN接続用ユーザID,パスワードを設定します。

nxrg110(config-wwan)#wwan authentication chap

WWAN接続用の認証方式を設定します。

nxrg110(config-wwan)#mobile apn [APN] cid 1 pdp-type ip

APN,CID,PDPタイプを設定します。

nxrg110(config-wwan)#mail send server 1

メールサーバとして先ほど設定したメールサーバ1を設定します。

nxrg110(config-wwan)#mail send to [宛先メールアドレス]

宛先メールアドレスを設定します。

nxrg110(config-wwan)#mail send from [送信元メールアドレス]

送信元メールアドレスを設定します。

 

4. <モバイルエラーリカバリー設定>
nxrg110(config)#mobile error-recovery-reset

内蔵通信モジュールとの通信に重大な問題が発生する可能性が高いと判断した場合、内蔵通信モジュールのリセットを行うように設定します。

 

5. <モバイルキャリア設定>
nxrg110(config)#mobile 1 carrier [キャリア]

mobile1のキャリアを設定します。
(☞) キャリア設定は「clear mobile 1」コマンドによるモバイルリセットを行うことで反映されます。

 

6. <DNS設定>
nxrg110(config)#dns
nxrg110(config-dns)#service enable

DNSサービスを有効にします。

 

7. <設定の保存>
nxrg110#save config

設定内容を保存します。

 

【 端末の設定例 】

IPアドレス 192.168.10.100
サブネットマスク 255.255.255.0
デフォルトゲートウェイ 192.168.10.1
DNSサーバ

 

【 補足 】

一部機種では、メール送信の暗号化機能をサポートしています。
詳細は各設定例をご参照ください。

 

【 付録 】