0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

vSRXで2拠点間の複数VLANをVPLSで接続してみる(MP-BGPなし)

Last updated at Posted at 2020-05-18

概要

vSRX 2台をPE、Arista(vEOS) 2台をCEと見立てて、2拠点間のマルチテナントネットワークをVPLSで接続します。
キレイな構成図ではありませんが、メモなので大目に見てください。
WS000000.JPG

各ユーザにVLANを割り当てAristaにaccessポートで接続し、vSRXにはTrunkポートで接続することで、vSRXのVPLSインスタンスに紐づけます。

前提条件

No 項目
1 JUNOSバージョン 20.1R1.11
2 仮想環境 VMware Workstation 15
3 ホストOS Windows 10
4 ユーザAのVLAN 100
5 ユーザBのVLAN 200

全体の流れ

おおまかに下記の流れで設定していきます

  1. Packetモードへ変更
  2. インタフェース設定
  3. OSPF設定
  4. MPLS設定
  5. VPLS設定

vSRX03の設定

Packetモードへ変更

vSRXを使っているのでFlowモードからPacketモードへ変更します(いつもCommitを忘れてRebootしてしまうので注意)

# set security forwarding-options family mpls mode packet-based
# commit
# run request system reboot

インタフェースにIPアドレスを割り当て

MPLSに使用するインタフェースにIPアドレスを設定します

# set interfaces ge-0/0/0 unit 0 family inet address 192.168.10.3/24
# set interfaces lo0 unit 0 family inet address 1.1.1.3/32

ルータIDを設定

ルータIDはいつもlo0インタフェースに合わせてます

# set routing-options router-id 1.1.1.3

OSPF設定

# set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
# set protocols ospf area 0.0.0.0 interface lo0.0

MPLS設定

# set protocols ldp interface ge-0/0/0.0
# set protocols ldp interface lo0.0

# set protocols rsvp interface ge-0/0/0.0
# set protocols rsvp interface lo0.0

# set protocols mpls no-cspf
# set protocols mpls label-switched-path VSRX03-VSRX04 to 1.1.1.4
# set protocols mpls interface ge-0/0/0.0
# set interfaces ge-0/0/0 unit 0 family mpls

VPLS設定

flexible-vlan-taggingを指定するとcommit時にエラーとなるため「vlan-tagging」を指定しています。今回の構成はサブインタフェースごとに設定が異なる訳ではないのでokということで。

# set interfaces ge-0/0/1 vlan-tagging
# set interfaces ge-0/0/1 encapsulation flexible-ethernet-services

# set interfaces ge-0/0/1 unit 100 encapsulation vlan-vpls
# set interfaces ge-0/0/1 unit 100 vlan-id 100
# set interfaces ge-0/0/1 unit 100 family vpls

# set interfaces ge-0/0/1 unit 200 encapsulation vlan-vpls
# set interfaces ge-0/0/1 unit 200 vlan-id 200
# set interfaces ge-0/0/1 unit 200 family vpls

VPLSインスタンス設定

set routing-instances VPLS100 instance-type vpls
set routing-instances VPLS100 interface ge-0/0/1.100
set routing-instances VPLS100 protocols vpls vpls-id 100
set routing-instances VPLS100 protocols vpls neighbor 1.1.1.4
set routing-instances VPLS100 protocols vpls no-tunnel-services

set routing-instances VPLS200 instance-type vpls
set routing-instances VPLS200 interface ge-0/0/1.200
set routing-instances VPLS200 protocols vpls vpls-id 200
set routing-instances VPLS200 protocols vpls neighbor 1.1.1.4
set routing-instances VPLS200 protocols vpls no-tunnel-services

vSRX04の設定

vSRX04のConfigを貼り付けておきます

admin@vsrx04> show configuration | display set | no-more
set version 20200319.130545_builder.r1095278
set system host-name vsrx04
set system root-authentication encrypted-password "$6$eJb5pR8a$rBxWsqOEMPJHr39am5emmRoMUtQUJ0i9xKE30H9ebT7Oj.PDFt1IjsmU/yF7HvsWumEeZxLHnNTBwMcOALyli0"
set system login user admin uid 2000
set system login user admin class super-user
set system login user admin authentication encrypted-password "$6$0iIn8zxU$pGJ7mM1hxFs5NFbgt/jEp33EmzUiYmQFW7S936VYGzoSLRNyMnWTmZ1vKP3Q/DHFlz7N8tn.gGWz80HWebF5F/"
set system services ssh
set system services web-management http interface fxp0.0
set system time-zone Asia/Tokyo
set system name-server 8.8.8.8
set system name-server 8.8.4.4
set system syslog user * any emergency
set system syslog file messages any any
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set system license autoupdate url https://ae1.juniper.net/junos/key_retrieval
set system ntp server 133.243.238.243
set security forwarding-options family mpls mode packet-based
set interfaces ge-0/0/0 unit 0 family inet address 192.168.10.4/24
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces ge-0/0/1 vlan-tagging
set interfaces ge-0/0/1 encapsulation flexible-ethernet-services
set interfaces ge-0/0/1 unit 100 encapsulation vlan-vpls
set interfaces ge-0/0/1 unit 100 vlan-id 100
set interfaces ge-0/0/1 unit 100 family vpls
set interfaces ge-0/0/1 unit 200 encapsulation vlan-vpls
set interfaces ge-0/0/1 unit 200 vlan-id 200
set interfaces ge-0/0/1 unit 200 family vpls
set interfaces fxp0 unit 0 family inet dhcp
set interfaces lo0 unit 0 family inet address 1.1.1.4/32
set routing-instances VPLS100 protocols vpls no-tunnel-services
set routing-instances VPLS100 protocols vpls vpls-id 100
set routing-instances VPLS100 protocols vpls neighbor 1.1.1.3
set routing-instances VPLS100 interface ge-0/0/1.100
set routing-instances VPLS100 instance-type vpls
set routing-instances VPLS200 protocols vpls no-tunnel-services
set routing-instances VPLS200 protocols vpls vpls-id 200
set routing-instances VPLS200 protocols vpls neighbor 1.1.1.3
set routing-instances VPLS200 interface ge-0/0/1.200
set routing-instances VPLS200 instance-type vpls
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface lo0.0
set protocols ldp interface ge-0/0/0.0
set protocols ldp interface lo0.0
set protocols mpls no-cspf
set protocols mpls label-switched-path VSRX04-VSRX03 to 1.1.1.3
set protocols mpls interface ge-0/0/0.0
set protocols rsvp interface ge-0/0/0.0
set protocols rsvp interface lo0.0
set routing-options router-id 1.1.1.4

これで、両拠点のVLAN 100に接続した仮想マシンが通信できるようになりました。

0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?