LoginSignup
4
7

More than 5 years have passed since last update.

ルーター機器(NEC IX2015)によるネットワークの冗長構成

Posted at

背景

山間部のネットワーク構築で、天候が雨天や降雪で悪化すると無線のWiFiでは通信が途切れてしまうので、メタル回線によるバックアップで冗長構成をする場合があります。これを例にネットワークの基本的な冗長構成を紹介します。
IoTとか監視カメラでも今後も使われて行くので、構成機器や回線種類は違っても基本は同じでしょう。

機器構成

  • NEC IX2015 2台

速度は100Mですが中古で安く入手出来るのでお勧めのルーター機器です。
相互接続する場合には、クロスケーブルでないとリンクアップしないので注意。

冗長構成図

ネットワークの冗長構成.png
サブネットは4つで構成します。
メインの接続回線がLink1の172.16.1.0/24になります。ここを無線WiFi接続と想定します。
バックアップの接続回線がLink2の172.16.2.0/24になります。ここをメタル回線接続を想定します。
利用するネットワークはNetwork1の192.168.1.0/24で、対向のネットワークであるNetwork2の192.168.2.0/24と相互接続を維持する冗長構成を構築します。
Link1の接続が途切れた場合にはLink2での接続ルートに切り替えて、復帰した場合にはLink1の接続に戻します。

モニター設定

ネットワークのゲートウェイ設定でメトリック値で優先順位を付けただけでも出来ますが、モニター設定で応答がない場合に明確に該当ルーティングテーブルを止める設定をします。
ここで監視設定するIPアドレスは、対向のルーター側インターフェースにします。
Network1からは対向ルータの192.168.2.1
Network2からは対向ルータの192.168.1.1

IX2015 Network1側設定

hostname ix2015tets_01

ip route 192.168.2.0/24 172.16.1.2
ip route 192.168.2.0/24 172.16.2.2 FastEthernet0/1.0 metric 10
ip dhcp enable
ip ufs-cache enable

watch-group main-watch 10
 event 10 ip unreach-host 192.168.2.1 FastEthernet0/0.0
 action 10 ip shutdown-route 192.168.2.0/24 172.16.1.2

network-monitor main-watch directed-response
network-monitor main-watch enable

ip dhcp profile lan1
  assignable-range 192.168.1.2 192.168.1.10
  default-gateway 192.168.1.1
  dns-server 192.168.1.1

interface FastEthernet0/0.0
  ip address 172.16.1.1/24 
  no shutdown

interface FastEthernet0/1.0
  ip address 172.16.2.1/24 
  no shutdown

interface FastEthernet1/0.0
  ip address 192.168.1.1/24 
  ip dhcp binding lan1
  no shutdown

設定コマンドの詳細については説明を省きますが、モニター設定の要点としては、
action 10 ip shutdown-route [止めるルーティングテーブル]
と明示する所で、インターフェースFastEthernet0/0.0を指定すると動作が違ってくるので注意。

IX2015 Network2側設定

hostname ix2015tets_02

ip route 192.168.1.0/24 172.16.1.1
ip route 192.168.1.0/24 172.16.2.1 FastEthernet0/1.0 metric 10
ip dhcp enable
ip ufs-cache enable

watch-group main-watch 10
 event 10 ip unreach-host 192.168.1.1 FastEthernet0/0.0
 action 10 ip shutdown-route 192.168.1.0/24 172.16.1.1

network-monitor main-watch directed-response
network-monitor main-watch enable

ip dhcp profile lan2
  assignable-range 192.168.2.2 192.168.2.10
  default-gateway 192.168.2.1
  dns-server 192.168.2.1

interface FastEthernet0/0.0
  ip address 172.16.1.2/24 
  no shutdown

interface FastEthernet0/1.0
  ip address 172.16.2.2/24 
  no shutdown

interface FastEthernet1/0.0
  ip address 192.168.2.1/24 
  ip dhcp binding lan2
  no shutdown

Network1側と同じ考え方で設定します。

検証環境

IMG_2163.JPG
- IX2015 2台
- Network2側 ThinkPad X61s OS:Debian GNU/Linux 8 Xfce
- Network1側 ThinkPad X200s OS:Linux Mint 18 MATE
- FE0/0側はクロス変換アダプター使用
- FE0/1側はクロスケーブルを作成して使用

4
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
7