Mikrotik機器に基づくVLANを使用したオフィス間のネットワーク

ことわざ



それは幸福であり、生産とオフィスは同じ領域にありました(街の外)。 しかし、会社は成長し混雑しました。 市内に事務所を開設することにしました。 会社にはすでに多数の電話回線があり、Panasonic TDA-600 PBXがあったので、オフィスに新しいPBXを設置したくありませんでした。 TDA 600をTDE 600にアップグレードするオプションを選択しました。上司は鉄のソリューションが大好きです。 私は長い間、VLANの個別のシステム(ビデオ監視、wifi、プロセス制御システム)を分散してきたため、電話を別のVLANに配置しました。 別のMikrotikがルーター用に購入されました。



おとぎ話



VLANを転送する必要があるため、ルーティングだけでは不十分です。 選択はEOIP(IP over Ethernet)で決まりました。

オフィスと工場をつなぐ架け橋を設置します(IPは静的です)。 コンソール用のコマンドを作成します。希望する人がいる場合は、写真で解決策を示します。



R1(運用中のルーター)。 ブリッジ用の個別のIPなど、いくつかのIPがあります。たとえば、100.100.100.1とします。



interface eoip add tunnel-id=0 local-address=100.100.100.1 remote-address=200.200.200.2
      
      







R2(オフィス内のルーター)。 IPは唯一のものです。たとえば、200.200.200.2とします。



 interface eoip add tunnel-id=0 remote-address=100.100.100.1
      
      







IPは唯一のものであるため、ローカルIPを指定する必要はありません。



次に、入力インターフェイス(EOIP)と出力(このVLANを接続する必要がある場所(ether2など))に2つのVLANを作成します。 VLANは同じIDを持ち(たとえば100になります)、名前だけが異なります。 これら2つのインターフェイスをブリッジに接続します。



R1。



 interface vlan add name=vlan_out interface=eoip vlan-id=100 interface vlan add name=vlan_in interface=ether2 vlan-id=100 interface bridge add name=vlan100 interface bridge port add bridge=vlan100 interface=vlan_in interface bridge port add bridge=vlan100 interface=vlan_out
      
      







R2。



 interface vlan add name=vlan_in interface=eoip vlan-id=100 interface vlan add name=vlan_out interface=ether2 vlan-id=100 interface bridge add name=vlan100 interface bridge port add bridge=vlan100 interface=vlan_in interface bridge port add bridge=vlan100 interface=vlan_out
      
      







EOIPインターフェイスでネットワークを上げ(アドレスを割り当て)、ルーティングを構成します。



R1。



 ip address add interface=eoip address=10.0.0.1/30 ip route add dst-address=192.168.10.0/24 gateway=10.0.0.2 ( 192.168.10.0/24    )
      
      







R2。



 ip address add interface=eoip address=10.0.0.2/30 ip route add dst-address=192.168.20.0/24 gateway=10.0.0.1 ( 192.168.20.0/24    )
      
      







原則として、すべて。 ネットワーク間のトラフィックが実行され、EOIP上でVLANが透過的に実行されます。



次のオフィスを接続するには、構成を少し調整する必要があります。 外部IPを200.200.100.2にします。 R1では、アドレス10.0.0.1/30には10の番号があり、R2には10.0.0.2/30のアドレスには10の番号があります(ip address printを入力して確認できます)。

R1。



 interface eoip set eoip name=eoip-office1 // ,    interface eoip add tunnel-id=1 name=eoip-office2 local-address=100.100.100.1 remote-address=200.200.100.2 //    ,     interface bridge add name=bridge-office interface bridge port add interface=eoip-office1 bridge=bridge-office interface bridge port add interface=eoip-office2 bridge=bridge-office //    ,     interface vlan set vlan100 interface=bridge-office //  ip adress print ip address set number=10 interface=bridge-office address=10.0.0.1/24 //    
      
      







R2。



 ip address set number=10 address=10.0.0.1/24
      
      







R3-R ... R2と同様に構成します

必要に応じて、この方法に基づいて、リモートオフィス間の直接通信を構成できます(ただし、より正確には、MPLSが使用されるようです)。



All Articles