Virtual Routerの設定
JuniperのJ-Netコミュニティ日本語版にてSRXのVirtual Routerが可能か話題に上がっていたのでVirtual Routerを設定してみました
下記コマンドにてバーチャルルータのルーティングインスタンスを作成
set routing-instances <インスタンス名> instance-type virtual-router
作成したインスタンスにインターフェースをアサインしていく形で設定できますね
set routing-instances <インスタンス名> interface <インターフェース名>
ちなみにvrfは"set routing-instances <インスタンス名> instance-type vrf"です
リモートラボ検証環境で作ったコンフィグファイルを貼り付けておきます
[edit]
root@M40-1# show | no-more
## Last changed: 2010-08-14 10:57:48 UTC
version 10.0R1.8;
/* 2010/08/13 */
system {
host-name M40-1;
root-authentication {
encrypted-password "$1$5GF/SjEl$AZ8jGfR/Ln5rEix1KlkO91"; ## SECRET-DATA
}
login {
user Juniper {
uid 2001;
class super-user;
authentication {
encrypted-password "$1$X972PvyC$Nb9KzEIyHvhvptKE8OoDT0"; ## SECRET-DATA
}
}
}
syslog {
user * {
any emergency;
}
file messages {
any notice;
authorization info;
}
file interactive-commands {
interactive-commands any;
}
}
}
interfaces {
fxp0 {
unit 0 {
family inet {
address 10.0.0.254/24;
}
}
}
fxp1 {
unit 0 {
family inet {
address 10.0.1.254/24;
}
}
}
fxp2 {
unit 0 {
family inet {
address 10.0.2.254/24;
}
}
}
fxp3 {
unit 0 {
family inet {
address 10.0.3.254/24;
}
}
}
}
routing-instances {
vr1 {
instance-type virtual-router;
interface fxp0.0;
interface fxp2.0;
}
vr2 {
instance-type virtual-router;
interface fxp1.0;
interface fxp3.0;
}
}
[edit]
root@M40-1#
|
[edit]
Juniper@M40-2# show
## Last changed: 2010-08-15 01:12:07 UTC
version 9.3R4.4;
system {
host-name M40-2;
root-authentication {
encrypted-password "$1$sv6ia7vp$xLJkuk2v0OjVUz0zLnXiW1"; ## SECRET-DATA
}
login {
user Juniper {
uid 2000;
class super-user;
authentication {
encrypted-password "$1$oEOKFHM3$S5XwJ3EIKSB3VqPNqpMkn/"; ## SECRET-DATA
}
}
}
}
interfaces {
fxp0 {
unit 0 {
family inet {
address 10.0.0.253/24;
}
}
}
fxp1 {
unit 0 {
family inet {
address 10.0.1.253/24;
}
}
}
inactive: fxp2 {
unit 0;
}
inactive: fxp3 {
unit 0;
}
}
routing-instances {
vr1 {
instance-type virtual-router;
interface fxp0.0;
routing-options {
static {
route 10.0.2.0/24 next-hop 10.0.0.254;
}
}
}
vr2 {
instance-type virtual-router;
interface fxp1.0;
routing-options {
static {
route 10.0.3.0/24 next-hop 10.0.1.254;
}
}
}
}
[edit]
Juniper@M40-2#
|
CiscoR-1#show run Building configuration... Current configuration : 1223 bytes ! version 12.4 service timestamps debug datetime msec localtime show-timezone year service timestamps log datetime msec localtime show-timezone year no service password-encryption ! hostname CiscoR-1 ! boot-start-marker boot-end-marker ! logging message-counter syslog ! no aaa new-model ! ! dot11 syslog ip source-route ! ! ! ! ip cef no ipv6 cef ! multilink bundle-name authenticated ! ! ! ! ! ! archive log config hidekeys ! ! ! ! ! interface BRI0 no ip address encapsulation hdlc shutdown ! interface FastEthernet0 ip address 10.0.2.253 255.255.255.0 duplex auto speed auto no cdp enable ! interface FastEthernet1 no ip address duplex auto speed auto no cdp enable ! interface FastEthernet2 ! interface FastEthernet3 shutdown ! interface FastEthernet4 shutdown ! interface FastEthernet5 shutdown ! interface FastEthernet6 shutdown ! interface FastEthernet7 shutdown ! interface FastEthernet8 shutdown ! interface FastEthernet9 shutdown ! interface Vlan1 no ip address ! ip forward-protocol nd ip route 0.0.0.0 0.0.0.0 10.0.2.254 no ip http server no ip http secure-server ! ! ! ! ! ! ! ! ! control-plane ! ! line con 0 exec-timeout 0 0 logging synchronous line aux 0 line vty 0 4 login ! end CiscoR-1# |
CiscoR-2#sh run Building configuration... Current configuration : 1246 bytes ! version 12.4 service timestamps debug datetime msec localtime show-timezone year service timestamps log datetime msec localtime show-timezone year no service password-encryption ! hostname CiscoR-2 ! boot-start-marker boot-end-marker ! logging message-counter syslog ! no aaa new-model ! ! dot11 syslog ip source-route ! ! ! ! ip cef no ipv6 cef ! multilink bundle-name authenticated ! ! ! ! ! ! archive log config hidekeys ! ! ! ! ! interface BRI0 no ip address encapsulation hdlc shutdown ! interface FastEthernet0 ip address 10.0.3.253 255.255.255.0 duplex auto speed auto no cdp enable ! interface FastEthernet1 ip address 192.168.1.1 255.255.255.0 duplex auto speed auto no cdp enable ! interface FastEthernet2 ! interface FastEthernet3 shutdown ! interface FastEthernet4 shutdown ! interface FastEthernet5 shutdown ! interface FastEthernet6 shutdown ! interface FastEthernet7 shutdown ! interface FastEthernet8 shutdown ! interface FastEthernet9 shutdown ! interface Vlan1 no ip address ! ip forward-protocol nd ip route 0.0.0.0 0.0.0.0 10.0.3.254 no ip http server no ip http secure-server ! ! ! ! ! ! ! ! ! control-plane ! ! line con 0 exec-timeout 0 0 logging synchronous line aux 0 line vty 0 4 login ! end CiscoR-2# |
(2010/08/20編集)
Junosのコンフィグにいろいろゴミが入っていたので編集しました
一般公開しているのでいろいろな人が触るから気をつけないとね。。
タグ
2010年8月15日 | コメント/トラックバック(6) | トラックバックURL |
カテゴリー:JUNOS
トラックバック&コメント
トラックバック
コメント






SRXはsub-interfaceは切れますか?
可能なら、理論上1台のSRX210で8台擬似できて、JNCIPラボに対応できる計算ですが、どうでしょうか?
ぜん吉さん コメントありがとうございます
動作未確認なのですが、SRX100で下記の設定投入/commitは可能でした
set interfaces fe-0/0/0 vlan-tagging
set interfaces fe-0/0/0 unit 1 vlan-id 1
set interfaces fe-0/0/0 unit 1 family inet address 10.0.1.254/24
set interfaces fe-0/0/0 unit 2 vlan-id 2
set interfaces fe-0/0/0 unit 2 family inet address 10.0.2.254/24
set interfaces fe-0/0/0 unit 3 vlan-id 3
set interfaces fe-0/0/0 unit 3 family inet address 10.0.3.254/24
手抜きですみません とりあえず1次回答です
VR内での通信
VRの設定非常に参考になりました。
ちなみに、VRを2個作成して内部で通信したり
ダイナミックルーティングとかも動かすことは
可能なのでしょうか?
まささん コメントありがとうございます
JUNOSのVRについてですが、個々のVRにてダイナミックルーティングを設定可能です。
しかし、それぞれ別のルーティングテーブルで管理されまので内部通信はできません。
SSGのVRのようにルーティングテーブルを共有したり情報をコピーするする場合はVRFを使用します。
記事内に書いている下のコマンドです
“set routing-instances instance-type vrf”
このあたりの設定/動作はまたブログで更新しますので少しお時間をください。
razan さん
ご連絡ありがとうございます。
色々と調べていたところジュニパールーターでは
Logical Routerという考え方があることが分かりました。
こちらを使って15個の仮想ルーターを設定すれば
内部の通信ができると思っています。
問題はVLANタグで同じ物理インタフェース
例えば(FE0/0/0.1 , Fe0/0/0.2)に同一のVLANを割り当てられない
点です。これを仮想ルーターにどう関連づけるかが
よく分かっておりません。
まささん コメントありがとうございます
Logcal Routerについて、恥ずかしながらそのような設定があることに気づいておりませんでした。
わたし自身もLogcal Routerなるものに興味が出てきましたので、年明けにでも少し調べてみたいと思います。
有益な情報がありましたらブログ上で情報共有させていただきます
それではよいお年を