1
2

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.

SoftLayerのVyOS/VyattaでGRE接続 -> Static RoutingでNW間を接続

Last updated at Posted at 2017-06-21

#1. はじめに
SoftLayerのVyOS/VyattaでGRE接続の続きです。
今回は、Static Routingで172.16.0.0/24と172.16.1.0.24の間を接続したいと思います。ネットワークが2つしかないなら、Static Routingで十分でしょうね。

vyos_gre.jpg

#2. Static Routingの設定

vyostok1では、172.16.1.0/24へは192.168.0.1経由でアクセスします。
vyoshkg1では、172.16.0.0/24へは192.168.0.2経由でアクセスします。

static_routingの設定
#vyostok1
vyos@vyostok1# set protocols static route 172.16.1.0/24 next-hop 192.168.0.2
vyos@vyostok1# commit

#vyoshkg1
vyos@vyoshkg1# set protocols static route 172.16.0.0/24 next-hop 192.168.0.1
vyos@vyoshk1g# commit
static_routingの確認
vyos@vyostok1:~$ show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
       I - ISIS, B - BGP, > - selected route, * - FIB route

S>* 0.0.0.0/0 [1/0] via 161.202.86.1, eth1
S>* 10.0.0.0/8 [1/0] via 10.132.75.65, eth0
C>* 10.132.75.64/26 is directly connected, eth0
C>* 127.0.0.0/8 is directly connected, lo
C>* 161.202.xx.xx/27 is directly connected, eth1
C>* 172.16.0.0/24 is directly connected, eth0
S>* 172.16.1.0/24 [1/0] via 192.168.0.2, tun0
C>* 192.168.0.0/30 is directly connected, tun0


vyos@vyoshkg1:~$ show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
       I - ISIS, B - BGP, > - selected route, * - FIB route

S>* 0.0.0.0/0 [1/0] via 119.81.163.33, eth1
S>* 10.0.0.0/8 [1/0] via 10.111.147.65, eth0
C>* 10.111.147.64/26 is directly connected, eth0
C>* 119.81.xx.xx/29 is directly connected, eth1
C>* 127.0.0.0/8 is directly connected, lo
S>* 172.16.0.0/24 [1/0] via 192.168.0.1, tun0
C>* 172.16.1.0/24 is directly connected, eth0
C>* 192.168.0.0/30 is directly connected, tun0

これでネットワークが繋がりました。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?