2015年4月6日月曜日

AristaでのVRF設定

■目的
 Arista-SWでVRFの設定をしてみる。
基本的にCiscoと同じ設定なので備忘録として記載する。

■内容
以下コマンドでVRF設定が可能

①まずはvrfの定義をする
vrf definition vrf1
   rd 65000:1

vrf definition vrf2
   rd 65000:2

②インターフェースVLANにVRFの指定をする
interface Vlan301
   vrf forwarding vrf1
   ip address 30.0.1.254/24

interface Vlan401
   vrf forwarding vrf2
   ip address 40.0.1.254/24

③VRF指定でルーティングを記載する
ip route vrf vrf1 40.0.1.0/24 30.0.2.1
ip route vrf vrf2 30.0.1.0/24 40.0.12.1

④IProutingでvrfの指定をする
ip routing
ip routing vrf vrf1

ip routing vrf vrf2


①Arista#sh vrf
  Vrf        RD            Protocols       State      Interfaces
---------- ------------- --------------- ------------- -------------------
   vrf1       65000:1       ipv4            routing    Vlan301, Vlan302,
                                                       Vlan303, Vlan304,
                                                       Vlan305,
   vrf2       65000:2       ipv4            routing    Vlan401, Vlan402,
                                                       Vlan403, Vlan404,
                                                       Vlan405,
test-arista#sh ip route vrf vrf1
Codes: C - connected, S - static, K - kernel,
       O - OSPF, IA - OSPF inter area, E1 - OSPF external type 1,
       E2 - OSPF external type 2, N1 - OSPF NSSA external type 1,
       N2 - OSPF NSSA external type2, B I - iBGP, B E - eBGP,
       R - RIP, I - ISIS, A B - BGP Aggregate, A O - OSPF Summary

Gateway of last resort is not set

 C      30.0.1.0/24 is directly connected, Vlan301
 C      30.0.2.0/24 is directly connected, Vlan302
 C      30.0.3.0/24 is directly connected, Vlan303
 C      30.0.4.0/24 is directly connected, Vlan304
 C      30.0.5.0/24 is directly connected, Vlan305
 S      40.0.11.0/24 [1/0] via 30.0.12.1, Vlan312
 S      40.0.21.0/24 [1/0] via 192.168.207.250, Vlan2007

test-arista#sh ip route vrf vrf2
Codes: C - connected, S - static, K - kernel,
       O - OSPF, IA - OSPF inter area, E1 - OSPF external type 1,
       E2 - OSPF external type 2, N1 - OSPF NSSA external type 1,
       N2 - OSPF NSSA external type2, B I - iBGP, B E - eBGP,
       R - RIP, I - ISIS, A B - BGP Aggregate, A O - OSPF Summary

Gateway of last resort is not set

 S      30.0.1.0/24 [1/0] via 40.0.12.1, Vlan412
 S      30.0.11.0/24 [1/0] via 40.0.12.1, Vlan412
 S      30.0.21.0/24 [1/0] via 192.168.203.250, Vlan2003
 C      40.0.1.0/24 is directly connected, Vlan401
 C      40.0.2.0/24 is directly connected, Vlan402
 C      40.0.3.0/24 is directly connected, Vlan403
 C      40.0.4.0/24 is directly connected, Vlan404
 C      40.0.5.0/24 is directly connected, Vlan405

test-arista#ping vrf vrf2 192.168.204.1
PING 192.168.204.1 (192.168.204.1) 72(100) bytes of data.
^C
--- 192.168.204.1 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

test-arista#ping vrf vrf2 192.168.204.254
PING 192.168.204.254 (192.168.204.254) 72(100) bytes of data.
80 bytes from 192.168.204.254: icmp_req=1 ttl=64 time=0.065 ms
80 bytes from 192.168.204.254: icmp_req=2 ttl=64 time=0.016 ms
80 bytes from 192.168.204.254: icmp_req=3 ttl=64 time=0.014 ms
80 bytes from 192.168.204.254: icmp_req=4 ttl=64 time=0.017 ms
80 bytes from 192.168.204.254: icmp_req=5 ttl=64 time=0.012 ms

--- 192.168.204.254 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.012/0.024/0.065/0.021 ms, ipg/ewma 0.056/0.044 ms
test-arista#


■終わり
Ciscoとほぼ一緒

私の体験が誰かの生産性向上に役立っていただけることを祈って

0 件のコメント:

コメントを投稿