vMX on AWS 및 logical 시스템으로 간단한 웹 학습 환경 만들기
· JUNOS o GNS3 사용(시뮬레이터)
• 가상화 환경에서 vMX 또는 vSRX 사용
실기 중의 오라
이번에 AWS에서 vMX를 시작하여 logical system 기능을 사용하여 네트워크를 학습합니다!소개할게요.
개시하다
vMX는 Juniper Networks에서 제작한 가상 라우터입니다.비야타 같은 것은 BGP/MPLS 등을 필두로 풍부한 기능에 대응한다.
이른바 로지컬 시스템이란 매우 난폭하게 말하면 공유기에서 가상으로 공유기를 만드는 기능이다.vMX는 최대 15개까지 제작이 가능하기 때문에 하나의 vMX 안에서 상당한 규모의 네트워크를 구성할 수 있다.
나는 이 학습 방법의 장점이 다음과 같다고 생각한다.
· AWS를 이용하여 컴퓨터에서 학습할 수 있다
• 실제 기기는 필요 없고 방이 작아도 좋다
· MX 시리즈의 JUNOS를 사용하면 상당히 복잡한 기능을 검증할 수 있다
• 이미지 파일을 가져올 필요가 없음
잠깐만요.개인적으로는 브라우저와 터미널 도구만 준비를 완성할 수 있는 것이 매력이다.
단점으로 저층(L2 등)의 기능이 대부분 이뤄지지 않는데 EC2 실례 이용료 등이 필요한가.
특히 L2 주변을 잘 검증하려면 다른 방법을 연구할 필요가 있다.
돈에 관해서는 필요할 때만 실례를 가동하면 그렇게 많은 돈을 쓰지 않는다.
추정 독자
인터넷을 배우고 싶은 사람
· 준OS 조작을 아는 입문자
vMX 인스턴스 생성
다음 단계에 따라 vMX 인스턴스를 생성할 수 있습니다.(거의 AWS 작업)
EC2 대시보드 화면에서 클릭하여 인스턴스를 만듭니다.
AWS Marketplace에서 vMX Virtual Router(BYOL)를 선택합니다.
BYOL 버전이 아니면 별도의 라이센스 비용을 지불해야 하니 주의하세요.
다음 화면이 있습니다. Continue를 클릭하십시오.
인스턴스 유형을 선택합니다.
일반적으로 사용 시 요구되는 물동량에 따라 규격을 높여야 하지만 이번에는 외부와의 통신이 거의 없기 때문에 선택할 수 있는 최저 규격의 실례 유형을 선택한다.
그래도xlarge가 상당히 크기 때문에 사용하지 않을 때는 실례를 멈추십시오.
필요한 수의 인터페이스를 상세하게 설정하는 실례를 추가합니다.
그렇긴 하지만 관리용 포트(fxp0)만 있으면 되지만, 왠지 인터페이스를 연결하지 않으면 vFP가 작동하지 않기 때문에 하나를 더 추가합니다.
스토리지 및 보안 그룹이 제대로 설정되고 시작됩니다.
왜 처음 시동을 걸 때 시동이 끝날 때까지 상당한 시간이 걸리는지 참을성 있게 기다려야 한다.(20~30분 정도)
일어선 후 외부에서 액세스하려면 Elastic IP 주소를 인스턴스의 eth0과 연결합니다.
이렇게 vMX 인스턴스가 완성됩니다.
vMX 액세스
시작하자마자 jnpr 사용자 이름으로 SSH에 액세스합니다.
터미널 도구를 사용하여 만들 때 지정한 키를 사용하여 전역 IP 주소에 접근합니다.$ ssh [email protected] -i .ssh/vmx.pem
vMX 설정 개요
vMX가 투입된 구성에 대해 설명합니다.
일반 설정
vMX에서 원격 접속 사용을 위한 최소한의 구성
루트 암호 설정
기본 설정이 없기 때문에 설정합니다.(이렇게 하지 않으면 commiit 통과 불가)[edit]
jnpr# set system root-authentication plain-text-password
New password: <<< パスワード入力
Retype new password: <<< パスワード再入力
[edit]
jnpr# commit
네트워크 서비스 모드 변경
vMX를 변경해야 할지 모르겠지만 넷워크 서비스 모드는 enhanced-ip로 변경해야 합니다.[edit]
jnpr# set chassis network-services enhanced-ip
[edit]
jnpr# commit
• 투입평가용 허가증
Juniper 공식 웹 사이트부터 60일간 평가판 라이선스를 받아 스키를 타고, vMX를 투입한다.jnpr> request system license add terminal
[Type ^D at a new line to end input,
enter blank line between each license key]
###
ここにライセンスキー張り付けて Ctl + D
###
E435890758: successfully added
add license complete (no errors)
jnpr> show system license
License usage:
Licenses Licenses Licenses Expiry
Feature name used installed needed
scale-subscriber 0 10 0 permanent
scale-l2tp 0 1000 0 permanent
scale-mobile-ip 0 1000 0 permanent
VMX-BANDWIDTH 500000 500000 0 18 days
VMX-SCALE 3 3 0 18 days
vmx-subscriber-accounting 0 1 0 60 days
vmx-subscriber-authentication 0 1 0 60 days
vmx-subscriber-address-assignment 0 1 0 60 days
vmx-service-dc 0 1 0 60 days
vmx-service-accounting 0 1 0 60 days
vmx-subscriber-secure-policy 0 1 0 60 days
vmx-service-qos 0 1 0 60 days
vmx-service-ancp 0 1 0 60 days
vmx-service-cbsp 0 1 0 60 days
Licenses installed:
License identifier: E435890758
License version: 4
Software Serial Number: 20180209
Customer ID: vMX-JuniperEval
Features:
vmx-bandwidth-500g - vmx-bandwidth-500g
count-down, Original validity: 60 days
vmx-feature-premium - vmx-feature-premium
count-down, Original validity: 60 days
검증만 한다면 기본적으로 기본 상태를 유지하면 된다.
필요에 따라 Syslog와 로그인한 사용자의 추가 등을 변경하십시오.
로그 시스템 설정
Logical 시스템을 사용하는 것은 매우 간단합니다. [edit logical-Systems XXX] 이 단계의 설정에서 일반적인 JUNOS 설정을 실시합니다.
이렇게 되면 각종 과정이 분리돼 마치 내부에서 가상으로 공유기를 만든 것 같다.jnpr> configure
Entering configuration mode
[edit]
jnpr# edit logical-systems Router1
[edit logical-systems Router1]
jnpr#
알림이 [edit logical-systems Router1]로 바뀌었기 때문에 여기에 다양한 설정을 투입합니다.
Logical Tunnel 인터페이스 구성
Logical system을 만드는 것은 어렵지 않지만, Logical system 사이를 연결하려면 일반과 다른 방법을 알아야 한다.이를 위해서는 공유기 내부에 가상 인터페이스를 만들어 연결해야 한다.
이 용도로 사용되는 가상 인터페이스는 Logical Tunnel 인터페이스라고 하며 JUNOS에 lt-x/x/x로 표시됩니다.
이것을 이용하기 위해서는 우선 다음 명령 vMX를 사용하여 터널 서비스를 유효하게 합니다.[edit]
jnpr# set chassis fpc 0 pic 0 tunnel-services bandwidth 1g
[edit]
jnpr# commit
이렇게 하면 vMX에 lt 인터페이스를 만들 수 있다.jnpr> show interfaces terse
Interface Admin Link Proto Local Remote
ge-0/0/0 up up
...(中略)...
lt-0/0/10 up up
다음은 Logical system 아래에 lt 인터페이스를 설정합니다.
lt인터페이스의 논리적 유닛을 분할하여 그 자체를 하나의 인터페이스로 간주하여 사용할 수 있다.
예를 들어 다음과 같이 설정합니다.[edit]
jnpr# edit logical-systems Router1
[edit logical-systems Router1]
jnpr# set interfaces lt-0/0/10 unit 10 encapsulation ethernet
[edit logical-systems Router1]
jnpr# set interfaces lt-0/0/10 unit 10 peer-unit 11 family inet address 10.0.0.0/31
[edit logical-systems Router1]
jnpr# commit
commit complete
주의해야 할 것은, 반드시 encapsulation과per-unit를 설정해야 한다는 것이다.
설정이 적용되면 새로운 가상 인터페이스를 만들 것입니다.[edit logical-systems Router1]
jnpr# run show interfaces terse |match lt
lt-0/0/10 up up
lt-0/0/10.10 up down inet 10.0.0.0/31
예를 들어 Logical system 두 대를 연결해 Ping을 시도해보면 아래가 이렇게 된다.[edit]
jnpr# edit logical-systems Router1
[edit logical-systems Router1]
jnpr# set interfaces lt-0/0/10 unit 10 encapsulation ethernet
[edit logical-systems Router1]
jnpr# set interfaces lt-0/0/10 unit 10 peer-unit 11 family inet address 10.0.0.0/31
[edit logical-systems Router1]
jnpr# top edit logical-systems Router2
[edit logical-systems Router2]
jnpr# set interfaces lt-0/0/10 unit 11 encapsulation ethernet
[edit logical-systems Router2]
jnpr# set interfaces lt-0/0/10 unit 11 peer-unit 10 family inet address 10.0.0.1/31
[edit logical-systems Router2]
jnpr# commit
commit complete
[edit logical-systems Router2]
jnpr# run ping 10.0.0.1 logical-system Router1
PING 10.0.0.1 (10.0.0.1): 56 data bytes
64 bytes from 10.0.0.1: icmp_seq=0 ttl=62 time=24.111 ms
64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=1.085 ms
64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=1.062 ms
64 bytes from 10.0.0.1: icmp_seq=3 ttl=64 time=1.255 ms
^C
--- 10.0.0.1 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.062/6.878/24.111/9.950 ms
설정 예
다음 4대의 라우터를 복사하여 L3VPN이 작업을 구성하는지 확인할 때의 설정 예제를 참조하십시오.
L3 이상의 기능이라면 여러 가지 게임을 할 수 있기 때문에 온라인으로 배우게 하려는 분들에게는 추천할 수 있다고 생각합니다.
[edit]
jnpr@ip-172-31-5-127# show logical-systems | display set
# P1 ルータの設定
set logical-systems P1 interfaces lt-0/0/10 unit 1 encapsulation ethernet
set logical-systems P1 interfaces lt-0/0/10 unit 1 peer-unit 0
set logical-systems P1 interfaces lt-0/0/10 unit 1 family inet address 10.0.0.1/31
set logical-systems P1 interfaces lt-0/0/10 unit 1 family mpls
set logical-systems P1 interfaces lt-0/0/10 unit 2 encapsulation ethernet
set logical-systems P1 interfaces lt-0/0/10 unit 2 peer-unit 3
set logical-systems P1 interfaces lt-0/0/10 unit 2 family inet address 10.0.0.2/31
set logical-systems P1 interfaces lt-0/0/10 unit 2 family mpls
set logical-systems P1 interfaces lo0 unit 2 family inet address 10.255.255.2/32
set logical-systems P1 protocols mpls interface lt-0/0/10.1
set logical-systems P1 protocols mpls interface lt-0/0/10.2
set logical-systems P1 protocols bgp family inet-vpn unicast
set logical-systems P1 protocols bgp group internal type internal
set logical-systems P1 protocols bgp group internal local-address 10.255.255.2
set logical-systems P1 protocols bgp group internal neighbor 10.255.255.1
set logical-systems P1 protocols bgp group internal neighbor 10.255.255.3
set logical-systems P1 protocols bgp group internal neighbor 10.255.255.4
set logical-systems P1 protocols ospf area 0.0.0.0 interface lt-0/0/10.1 interface-type p2p
set logical-systems P1 protocols ospf area 0.0.0.0 interface lo0.2
set logical-systems P1 protocols ospf area 0.0.0.0 interface lt-0/0/10.2 interface-type p2p
set logical-systems P1 protocols ldp interface lt-0/0/10.1
set logical-systems P1 protocols ldp interface lt-0/0/10.2
set logical-systems P1 routing-options router-id 10.255.255.2
set logical-systems P1 routing-options autonomous-system 65000
# P2 ルータの設定
set logical-systems P2 interfaces lt-0/0/10 unit 3 encapsulation ethernet
set logical-systems P2 interfaces lt-0/0/10 unit 3 peer-unit 2
set logical-systems P2 interfaces lt-0/0/10 unit 3 family inet address 10.0.0.3/31
set logical-systems P2 interfaces lt-0/0/10 unit 3 family mpls
set logical-systems P2 interfaces lt-0/0/10 unit 4 encapsulation ethernet
set logical-systems P2 interfaces lt-0/0/10 unit 4 peer-unit 5
set logical-systems P2 interfaces lt-0/0/10 unit 4 family inet address 10.0.0.4/31
set logical-systems P2 interfaces lt-0/0/10 unit 4 family mpls
set logical-systems P2 interfaces lo0 unit 3 family inet address 10.255.255.3/32
set logical-systems P2 protocols mpls interface lt-0/0/10.3
set logical-systems P2 protocols mpls interface lt-0/0/10.4
set logical-systems P2 protocols bgp family inet-vpn unicast
set logical-systems P2 protocols bgp group internal type internal
set logical-systems P2 protocols bgp group internal local-address 10.255.255.3
set logical-systems P2 protocols bgp group internal neighbor 10.255.255.1
set logical-systems P2 protocols bgp group internal neighbor 10.255.255.2
set logical-systems P2 protocols bgp group internal neighbor 10.255.255.4
set logical-systems P2 protocols ospf area 0.0.0.0 interface lt-0/0/10.3 interface-type p2p
set logical-systems P2 protocols ospf area 0.0.0.0 interface lo0.3
set logical-systems P2 protocols ospf area 0.0.0.0 interface lt-0/0/10.4 interface-type p2p
set logical-systems P2 protocols ldp interface lt-0/0/10.3
set logical-systems P2 protocols ldp interface lt-0/0/10.4
set logical-systems P2 routing-options router-id 10.255.255.3
set logical-systems P2 routing-options autonomous-system 65000
# PE1 ルータの設定
set logical-systems PE1 interfaces lt-0/0/10 unit 0 encapsulation ethernet
set logical-systems PE1 interfaces lt-0/0/10 unit 0 peer-unit 1
set logical-systems PE1 interfaces lt-0/0/10 unit 0 family inet address 10.0.0.0/31
set logical-systems PE1 interfaces lt-0/0/10 unit 0 family mpls
set logical-systems PE1 interfaces lt-0/0/10 unit 10 encapsulation ethernet
set logical-systems PE1 interfaces lt-0/0/10 unit 10 peer-unit 11
set logical-systems PE1 interfaces lt-0/0/10 unit 10 family inet address 10.0.0.9/30
set logical-systems PE1 interfaces lo0 unit 1 family inet address 10.255.255.1/32
set logical-systems PE1 protocols mpls interface lt-0/0/10.0
set logical-systems PE1 protocols bgp family inet-vpn unicast
set logical-systems PE1 protocols bgp group internal type internal
set logical-systems PE1 protocols bgp group internal local-address 10.255.255.1
set logical-systems PE1 protocols bgp group internal export test
set logical-systems PE1 protocols bgp group internal neighbor 10.255.255.2
set logical-systems PE1 protocols bgp group internal neighbor 10.255.255.3
set logical-systems PE1 protocols bgp group internal neighbor 10.255.255.4
set logical-systems PE1 protocols ospf area 0.0.0.0 interface lt-0/0/10.0 interface-type p2p
set logical-systems PE1 protocols ospf area 0.0.0.0 interface lo0.1
set logical-systems PE1 protocols ldp interface lt-0/0/10.0
set logical-systems PE1 policy-options policy-statement test term 1 from protocol static
set logical-systems PE1 policy-options policy-statement test term 1 then accept
set logical-systems PE1 routing-instances VRF1 instance-type vrf
set logical-systems PE1 routing-instances VRF1 interface lt-0/0/10.10
set logical-systems PE1 routing-instances VRF1 route-distinguisher 65000:1
set logical-systems PE1 routing-instances VRF1 vrf-target target:65000:1
set logical-systems PE1 routing-instances VRF1 protocols bgp group CE type external
set logical-systems PE1 routing-instances VRF1 protocols bgp group CE neighbor 10.0.0.10 peer-as 100
set logical-systems PE1 routing-options router-id 10.255.255.1
set logical-systems PE1 routing-options autonomous-system 65000
# PE2 ルータの設定
set logical-systems PE2 interfaces lt-0/0/10 unit 5 encapsulation ethernet
set logical-systems PE2 interfaces lt-0/0/10 unit 5 peer-unit 4
set logical-systems PE2 interfaces lt-0/0/10 unit 5 family inet address 10.0.0.5/31
set logical-systems PE2 interfaces lt-0/0/10 unit 5 family mpls
set logical-systems PE2 interfaces lt-0/0/10 unit 20 encapsulation ethernet
set logical-systems PE2 interfaces lt-0/0/10 unit 20 peer-unit 21
set logical-systems PE2 interfaces lt-0/0/10 unit 20 family inet address 10.0.0.21/30
set logical-systems PE2 interfaces lo0 unit 4 family inet address 10.255.255.4/32
set logical-systems PE2 protocols mpls interface lt-0/0/10.5
set logical-systems PE2 protocols bgp family inet-vpn unicast
set logical-systems PE2 protocols bgp group internal type internal
set logical-systems PE2 protocols bgp group internal local-address 10.255.255.4
set logical-systems PE2 protocols bgp group internal export test
set logical-systems PE2 protocols bgp group internal neighbor 10.255.255.1
set logical-systems PE2 protocols bgp group internal neighbor 10.255.255.2
set logical-systems PE2 protocols bgp group internal neighbor 10.255.255.3
set logical-systems PE2 protocols ospf area 0.0.0.0 interface lo0.4
set logical-systems PE2 protocols ospf area 0.0.0.0 interface lt-0/0/10.5 interface-type p2p
set logical-systems PE2 protocols ldp interface lt-0/0/10.5
set logical-systems PE2 policy-options policy-statement test term 1 from protocol static
set logical-systems PE2 policy-options policy-statement test term 1 then accept
set logical-systems PE2 routing-instances VRF1 instance-type vrf
set logical-systems PE2 routing-instances VRF1 interface lt-0/0/10.20
set logical-systems PE2 routing-instances VRF1 route-distinguisher 65000:1
set logical-systems PE2 routing-instances VRF1 vrf-target target:65000:1
set logical-systems PE2 routing-instances VRF1 protocols bgp group CE type external
set logical-systems PE2 routing-instances VRF1 protocols bgp group CE neighbor 10.0.0.22 peer-as 100
set logical-systems PE2 routing-options router-id 10.255.255.4
set logical-systems PE2 routing-options autonomous-system 65000
# カスタマールータ見立ての routing-instance の設定
[edit]
jnpr@ip-172-31-5-127# show routing-instances | display set
set routing-instances CE1 instance-type virtual-router
set routing-instances CE1 interface lt-0/0/10.11
set routing-instances CE1 interface lo0.10
set routing-instances CE1 routing-options static route 0.0.0.0/0 next-hop 10.0.0.9
set routing-instances CE1 routing-options router-id 10.255.255.10
set routing-instances CE1 routing-options autonomous-system 100
set routing-instances CE1 protocols bgp group external type external
set routing-instances CE1 protocols bgp group external export ce1-export
set routing-instances CE1 protocols bgp group external neighbor 10.0.0.9 peer-as 65000
set routing-instances CE2 instance-type virtual-router
set routing-instances CE2 interface lt-0/0/10.21
set routing-instances CE2 interface lo0.20
set routing-instances CE2 routing-options static route 0.0.0.0/0 next-hop 10.0.0.21
set routing-instances CE2 routing-options router-id 10.255.255.20
set routing-instances CE2 routing-options autonomous-system 100
set routing-instances CE2 protocols bgp group external type external
set routing-instances CE2 protocols bgp group external export ce2-export
set routing-instances CE2 protocols bgp group external neighbor 10.0.0.21 peer-as 65000
Reference
이 문제에 관하여(vMX on AWS 및 logical 시스템으로 간단한 웹 학습 환경 만들기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/nozomale/items/f677ef38c98a09f17ab9
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
다음 단계에 따라 vMX 인스턴스를 생성할 수 있습니다.(거의 AWS 작업)
EC2 대시보드 화면에서 클릭하여 인스턴스를 만듭니다.
AWS Marketplace에서 vMX Virtual Router(BYOL)를 선택합니다.
BYOL 버전이 아니면 별도의 라이센스 비용을 지불해야 하니 주의하세요.
다음 화면이 있습니다. Continue를 클릭하십시오.
인스턴스 유형을 선택합니다.
일반적으로 사용 시 요구되는 물동량에 따라 규격을 높여야 하지만 이번에는 외부와의 통신이 거의 없기 때문에 선택할 수 있는 최저 규격의 실례 유형을 선택한다.
그래도xlarge가 상당히 크기 때문에 사용하지 않을 때는 실례를 멈추십시오.
필요한 수의 인터페이스를 상세하게 설정하는 실례를 추가합니다.
그렇긴 하지만 관리용 포트(fxp0)만 있으면 되지만, 왠지 인터페이스를 연결하지 않으면 vFP가 작동하지 않기 때문에 하나를 더 추가합니다.
스토리지 및 보안 그룹이 제대로 설정되고 시작됩니다.
왜 처음 시동을 걸 때 시동이 끝날 때까지 상당한 시간이 걸리는지 참을성 있게 기다려야 한다.(20~30분 정도)
일어선 후 외부에서 액세스하려면 Elastic IP 주소를 인스턴스의 eth0과 연결합니다.
이렇게 vMX 인스턴스가 완성됩니다.
vMX 액세스
시작하자마자 jnpr 사용자 이름으로 SSH에 액세스합니다.
터미널 도구를 사용하여 만들 때 지정한 키를 사용하여 전역 IP 주소에 접근합니다.$ ssh [email protected] -i .ssh/vmx.pem
vMX 설정 개요
vMX가 투입된 구성에 대해 설명합니다.
일반 설정
vMX에서 원격 접속 사용을 위한 최소한의 구성
루트 암호 설정
기본 설정이 없기 때문에 설정합니다.(이렇게 하지 않으면 commiit 통과 불가)[edit]
jnpr# set system root-authentication plain-text-password
New password: <<< パスワード入力
Retype new password: <<< パスワード再入力
[edit]
jnpr# commit
네트워크 서비스 모드 변경
vMX를 변경해야 할지 모르겠지만 넷워크 서비스 모드는 enhanced-ip로 변경해야 합니다.[edit]
jnpr# set chassis network-services enhanced-ip
[edit]
jnpr# commit
• 투입평가용 허가증
Juniper 공식 웹 사이트부터 60일간 평가판 라이선스를 받아 스키를 타고, vMX를 투입한다.jnpr> request system license add terminal
[Type ^D at a new line to end input,
enter blank line between each license key]
###
ここにライセンスキー張り付けて Ctl + D
###
E435890758: successfully added
add license complete (no errors)
jnpr> show system license
License usage:
Licenses Licenses Licenses Expiry
Feature name used installed needed
scale-subscriber 0 10 0 permanent
scale-l2tp 0 1000 0 permanent
scale-mobile-ip 0 1000 0 permanent
VMX-BANDWIDTH 500000 500000 0 18 days
VMX-SCALE 3 3 0 18 days
vmx-subscriber-accounting 0 1 0 60 days
vmx-subscriber-authentication 0 1 0 60 days
vmx-subscriber-address-assignment 0 1 0 60 days
vmx-service-dc 0 1 0 60 days
vmx-service-accounting 0 1 0 60 days
vmx-subscriber-secure-policy 0 1 0 60 days
vmx-service-qos 0 1 0 60 days
vmx-service-ancp 0 1 0 60 days
vmx-service-cbsp 0 1 0 60 days
Licenses installed:
License identifier: E435890758
License version: 4
Software Serial Number: 20180209
Customer ID: vMX-JuniperEval
Features:
vmx-bandwidth-500g - vmx-bandwidth-500g
count-down, Original validity: 60 days
vmx-feature-premium - vmx-feature-premium
count-down, Original validity: 60 days
검증만 한다면 기본적으로 기본 상태를 유지하면 된다.
필요에 따라 Syslog와 로그인한 사용자의 추가 등을 변경하십시오.
로그 시스템 설정
Logical 시스템을 사용하는 것은 매우 간단합니다. [edit logical-Systems XXX] 이 단계의 설정에서 일반적인 JUNOS 설정을 실시합니다.
이렇게 되면 각종 과정이 분리돼 마치 내부에서 가상으로 공유기를 만든 것 같다.jnpr> configure
Entering configuration mode
[edit]
jnpr# edit logical-systems Router1
[edit logical-systems Router1]
jnpr#
알림이 [edit logical-systems Router1]로 바뀌었기 때문에 여기에 다양한 설정을 투입합니다.
Logical Tunnel 인터페이스 구성
Logical system을 만드는 것은 어렵지 않지만, Logical system 사이를 연결하려면 일반과 다른 방법을 알아야 한다.이를 위해서는 공유기 내부에 가상 인터페이스를 만들어 연결해야 한다.
이 용도로 사용되는 가상 인터페이스는 Logical Tunnel 인터페이스라고 하며 JUNOS에 lt-x/x/x로 표시됩니다.
이것을 이용하기 위해서는 우선 다음 명령 vMX를 사용하여 터널 서비스를 유효하게 합니다.[edit]
jnpr# set chassis fpc 0 pic 0 tunnel-services bandwidth 1g
[edit]
jnpr# commit
이렇게 하면 vMX에 lt 인터페이스를 만들 수 있다.jnpr> show interfaces terse
Interface Admin Link Proto Local Remote
ge-0/0/0 up up
...(中略)...
lt-0/0/10 up up
다음은 Logical system 아래에 lt 인터페이스를 설정합니다.
lt인터페이스의 논리적 유닛을 분할하여 그 자체를 하나의 인터페이스로 간주하여 사용할 수 있다.
예를 들어 다음과 같이 설정합니다.[edit]
jnpr# edit logical-systems Router1
[edit logical-systems Router1]
jnpr# set interfaces lt-0/0/10 unit 10 encapsulation ethernet
[edit logical-systems Router1]
jnpr# set interfaces lt-0/0/10 unit 10 peer-unit 11 family inet address 10.0.0.0/31
[edit logical-systems Router1]
jnpr# commit
commit complete
주의해야 할 것은, 반드시 encapsulation과per-unit를 설정해야 한다는 것이다.
설정이 적용되면 새로운 가상 인터페이스를 만들 것입니다.[edit logical-systems Router1]
jnpr# run show interfaces terse |match lt
lt-0/0/10 up up
lt-0/0/10.10 up down inet 10.0.0.0/31
예를 들어 Logical system 두 대를 연결해 Ping을 시도해보면 아래가 이렇게 된다.[edit]
jnpr# edit logical-systems Router1
[edit logical-systems Router1]
jnpr# set interfaces lt-0/0/10 unit 10 encapsulation ethernet
[edit logical-systems Router1]
jnpr# set interfaces lt-0/0/10 unit 10 peer-unit 11 family inet address 10.0.0.0/31
[edit logical-systems Router1]
jnpr# top edit logical-systems Router2
[edit logical-systems Router2]
jnpr# set interfaces lt-0/0/10 unit 11 encapsulation ethernet
[edit logical-systems Router2]
jnpr# set interfaces lt-0/0/10 unit 11 peer-unit 10 family inet address 10.0.0.1/31
[edit logical-systems Router2]
jnpr# commit
commit complete
[edit logical-systems Router2]
jnpr# run ping 10.0.0.1 logical-system Router1
PING 10.0.0.1 (10.0.0.1): 56 data bytes
64 bytes from 10.0.0.1: icmp_seq=0 ttl=62 time=24.111 ms
64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=1.085 ms
64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=1.062 ms
64 bytes from 10.0.0.1: icmp_seq=3 ttl=64 time=1.255 ms
^C
--- 10.0.0.1 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.062/6.878/24.111/9.950 ms
설정 예
다음 4대의 라우터를 복사하여 L3VPN이 작업을 구성하는지 확인할 때의 설정 예제를 참조하십시오.
L3 이상의 기능이라면 여러 가지 게임을 할 수 있기 때문에 온라인으로 배우게 하려는 분들에게는 추천할 수 있다고 생각합니다.
[edit]
jnpr@ip-172-31-5-127# show logical-systems | display set
# P1 ルータの設定
set logical-systems P1 interfaces lt-0/0/10 unit 1 encapsulation ethernet
set logical-systems P1 interfaces lt-0/0/10 unit 1 peer-unit 0
set logical-systems P1 interfaces lt-0/0/10 unit 1 family inet address 10.0.0.1/31
set logical-systems P1 interfaces lt-0/0/10 unit 1 family mpls
set logical-systems P1 interfaces lt-0/0/10 unit 2 encapsulation ethernet
set logical-systems P1 interfaces lt-0/0/10 unit 2 peer-unit 3
set logical-systems P1 interfaces lt-0/0/10 unit 2 family inet address 10.0.0.2/31
set logical-systems P1 interfaces lt-0/0/10 unit 2 family mpls
set logical-systems P1 interfaces lo0 unit 2 family inet address 10.255.255.2/32
set logical-systems P1 protocols mpls interface lt-0/0/10.1
set logical-systems P1 protocols mpls interface lt-0/0/10.2
set logical-systems P1 protocols bgp family inet-vpn unicast
set logical-systems P1 protocols bgp group internal type internal
set logical-systems P1 protocols bgp group internal local-address 10.255.255.2
set logical-systems P1 protocols bgp group internal neighbor 10.255.255.1
set logical-systems P1 protocols bgp group internal neighbor 10.255.255.3
set logical-systems P1 protocols bgp group internal neighbor 10.255.255.4
set logical-systems P1 protocols ospf area 0.0.0.0 interface lt-0/0/10.1 interface-type p2p
set logical-systems P1 protocols ospf area 0.0.0.0 interface lo0.2
set logical-systems P1 protocols ospf area 0.0.0.0 interface lt-0/0/10.2 interface-type p2p
set logical-systems P1 protocols ldp interface lt-0/0/10.1
set logical-systems P1 protocols ldp interface lt-0/0/10.2
set logical-systems P1 routing-options router-id 10.255.255.2
set logical-systems P1 routing-options autonomous-system 65000
# P2 ルータの設定
set logical-systems P2 interfaces lt-0/0/10 unit 3 encapsulation ethernet
set logical-systems P2 interfaces lt-0/0/10 unit 3 peer-unit 2
set logical-systems P2 interfaces lt-0/0/10 unit 3 family inet address 10.0.0.3/31
set logical-systems P2 interfaces lt-0/0/10 unit 3 family mpls
set logical-systems P2 interfaces lt-0/0/10 unit 4 encapsulation ethernet
set logical-systems P2 interfaces lt-0/0/10 unit 4 peer-unit 5
set logical-systems P2 interfaces lt-0/0/10 unit 4 family inet address 10.0.0.4/31
set logical-systems P2 interfaces lt-0/0/10 unit 4 family mpls
set logical-systems P2 interfaces lo0 unit 3 family inet address 10.255.255.3/32
set logical-systems P2 protocols mpls interface lt-0/0/10.3
set logical-systems P2 protocols mpls interface lt-0/0/10.4
set logical-systems P2 protocols bgp family inet-vpn unicast
set logical-systems P2 protocols bgp group internal type internal
set logical-systems P2 protocols bgp group internal local-address 10.255.255.3
set logical-systems P2 protocols bgp group internal neighbor 10.255.255.1
set logical-systems P2 protocols bgp group internal neighbor 10.255.255.2
set logical-systems P2 protocols bgp group internal neighbor 10.255.255.4
set logical-systems P2 protocols ospf area 0.0.0.0 interface lt-0/0/10.3 interface-type p2p
set logical-systems P2 protocols ospf area 0.0.0.0 interface lo0.3
set logical-systems P2 protocols ospf area 0.0.0.0 interface lt-0/0/10.4 interface-type p2p
set logical-systems P2 protocols ldp interface lt-0/0/10.3
set logical-systems P2 protocols ldp interface lt-0/0/10.4
set logical-systems P2 routing-options router-id 10.255.255.3
set logical-systems P2 routing-options autonomous-system 65000
# PE1 ルータの設定
set logical-systems PE1 interfaces lt-0/0/10 unit 0 encapsulation ethernet
set logical-systems PE1 interfaces lt-0/0/10 unit 0 peer-unit 1
set logical-systems PE1 interfaces lt-0/0/10 unit 0 family inet address 10.0.0.0/31
set logical-systems PE1 interfaces lt-0/0/10 unit 0 family mpls
set logical-systems PE1 interfaces lt-0/0/10 unit 10 encapsulation ethernet
set logical-systems PE1 interfaces lt-0/0/10 unit 10 peer-unit 11
set logical-systems PE1 interfaces lt-0/0/10 unit 10 family inet address 10.0.0.9/30
set logical-systems PE1 interfaces lo0 unit 1 family inet address 10.255.255.1/32
set logical-systems PE1 protocols mpls interface lt-0/0/10.0
set logical-systems PE1 protocols bgp family inet-vpn unicast
set logical-systems PE1 protocols bgp group internal type internal
set logical-systems PE1 protocols bgp group internal local-address 10.255.255.1
set logical-systems PE1 protocols bgp group internal export test
set logical-systems PE1 protocols bgp group internal neighbor 10.255.255.2
set logical-systems PE1 protocols bgp group internal neighbor 10.255.255.3
set logical-systems PE1 protocols bgp group internal neighbor 10.255.255.4
set logical-systems PE1 protocols ospf area 0.0.0.0 interface lt-0/0/10.0 interface-type p2p
set logical-systems PE1 protocols ospf area 0.0.0.0 interface lo0.1
set logical-systems PE1 protocols ldp interface lt-0/0/10.0
set logical-systems PE1 policy-options policy-statement test term 1 from protocol static
set logical-systems PE1 policy-options policy-statement test term 1 then accept
set logical-systems PE1 routing-instances VRF1 instance-type vrf
set logical-systems PE1 routing-instances VRF1 interface lt-0/0/10.10
set logical-systems PE1 routing-instances VRF1 route-distinguisher 65000:1
set logical-systems PE1 routing-instances VRF1 vrf-target target:65000:1
set logical-systems PE1 routing-instances VRF1 protocols bgp group CE type external
set logical-systems PE1 routing-instances VRF1 protocols bgp group CE neighbor 10.0.0.10 peer-as 100
set logical-systems PE1 routing-options router-id 10.255.255.1
set logical-systems PE1 routing-options autonomous-system 65000
# PE2 ルータの設定
set logical-systems PE2 interfaces lt-0/0/10 unit 5 encapsulation ethernet
set logical-systems PE2 interfaces lt-0/0/10 unit 5 peer-unit 4
set logical-systems PE2 interfaces lt-0/0/10 unit 5 family inet address 10.0.0.5/31
set logical-systems PE2 interfaces lt-0/0/10 unit 5 family mpls
set logical-systems PE2 interfaces lt-0/0/10 unit 20 encapsulation ethernet
set logical-systems PE2 interfaces lt-0/0/10 unit 20 peer-unit 21
set logical-systems PE2 interfaces lt-0/0/10 unit 20 family inet address 10.0.0.21/30
set logical-systems PE2 interfaces lo0 unit 4 family inet address 10.255.255.4/32
set logical-systems PE2 protocols mpls interface lt-0/0/10.5
set logical-systems PE2 protocols bgp family inet-vpn unicast
set logical-systems PE2 protocols bgp group internal type internal
set logical-systems PE2 protocols bgp group internal local-address 10.255.255.4
set logical-systems PE2 protocols bgp group internal export test
set logical-systems PE2 protocols bgp group internal neighbor 10.255.255.1
set logical-systems PE2 protocols bgp group internal neighbor 10.255.255.2
set logical-systems PE2 protocols bgp group internal neighbor 10.255.255.3
set logical-systems PE2 protocols ospf area 0.0.0.0 interface lo0.4
set logical-systems PE2 protocols ospf area 0.0.0.0 interface lt-0/0/10.5 interface-type p2p
set logical-systems PE2 protocols ldp interface lt-0/0/10.5
set logical-systems PE2 policy-options policy-statement test term 1 from protocol static
set logical-systems PE2 policy-options policy-statement test term 1 then accept
set logical-systems PE2 routing-instances VRF1 instance-type vrf
set logical-systems PE2 routing-instances VRF1 interface lt-0/0/10.20
set logical-systems PE2 routing-instances VRF1 route-distinguisher 65000:1
set logical-systems PE2 routing-instances VRF1 vrf-target target:65000:1
set logical-systems PE2 routing-instances VRF1 protocols bgp group CE type external
set logical-systems PE2 routing-instances VRF1 protocols bgp group CE neighbor 10.0.0.22 peer-as 100
set logical-systems PE2 routing-options router-id 10.255.255.4
set logical-systems PE2 routing-options autonomous-system 65000
# カスタマールータ見立ての routing-instance の設定
[edit]
jnpr@ip-172-31-5-127# show routing-instances | display set
set routing-instances CE1 instance-type virtual-router
set routing-instances CE1 interface lt-0/0/10.11
set routing-instances CE1 interface lo0.10
set routing-instances CE1 routing-options static route 0.0.0.0/0 next-hop 10.0.0.9
set routing-instances CE1 routing-options router-id 10.255.255.10
set routing-instances CE1 routing-options autonomous-system 100
set routing-instances CE1 protocols bgp group external type external
set routing-instances CE1 protocols bgp group external export ce1-export
set routing-instances CE1 protocols bgp group external neighbor 10.0.0.9 peer-as 65000
set routing-instances CE2 instance-type virtual-router
set routing-instances CE2 interface lt-0/0/10.21
set routing-instances CE2 interface lo0.20
set routing-instances CE2 routing-options static route 0.0.0.0/0 next-hop 10.0.0.21
set routing-instances CE2 routing-options router-id 10.255.255.20
set routing-instances CE2 routing-options autonomous-system 100
set routing-instances CE2 protocols bgp group external type external
set routing-instances CE2 protocols bgp group external export ce2-export
set routing-instances CE2 protocols bgp group external neighbor 10.0.0.21 peer-as 65000
Reference
이 문제에 관하여(vMX on AWS 및 logical 시스템으로 간단한 웹 학습 환경 만들기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/nozomale/items/f677ef38c98a09f17ab9
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
$ ssh [email protected] -i .ssh/vmx.pem
vMX가 투입된 구성에 대해 설명합니다.
일반 설정
vMX에서 원격 접속 사용을 위한 최소한의 구성
루트 암호 설정
기본 설정이 없기 때문에 설정합니다.(이렇게 하지 않으면 commiit 통과 불가)
[edit]
jnpr# set system root-authentication plain-text-password
New password: <<< パスワード入力
Retype new password: <<< パスワード再入力
[edit]
jnpr# commit
네트워크 서비스 모드 변경vMX를 변경해야 할지 모르겠지만 넷워크 서비스 모드는 enhanced-ip로 변경해야 합니다.
[edit]
jnpr# set chassis network-services enhanced-ip
[edit]
jnpr# commit
• 투입평가용 허가증Juniper 공식 웹 사이트부터 60일간 평가판 라이선스를 받아 스키를 타고, vMX를 투입한다.
jnpr> request system license add terminal
[Type ^D at a new line to end input,
enter blank line between each license key]
###
ここにライセンスキー張り付けて Ctl + D
###
E435890758: successfully added
add license complete (no errors)
jnpr> show system license
License usage:
Licenses Licenses Licenses Expiry
Feature name used installed needed
scale-subscriber 0 10 0 permanent
scale-l2tp 0 1000 0 permanent
scale-mobile-ip 0 1000 0 permanent
VMX-BANDWIDTH 500000 500000 0 18 days
VMX-SCALE 3 3 0 18 days
vmx-subscriber-accounting 0 1 0 60 days
vmx-subscriber-authentication 0 1 0 60 days
vmx-subscriber-address-assignment 0 1 0 60 days
vmx-service-dc 0 1 0 60 days
vmx-service-accounting 0 1 0 60 days
vmx-subscriber-secure-policy 0 1 0 60 days
vmx-service-qos 0 1 0 60 days
vmx-service-ancp 0 1 0 60 days
vmx-service-cbsp 0 1 0 60 days
Licenses installed:
License identifier: E435890758
License version: 4
Software Serial Number: 20180209
Customer ID: vMX-JuniperEval
Features:
vmx-bandwidth-500g - vmx-bandwidth-500g
count-down, Original validity: 60 days
vmx-feature-premium - vmx-feature-premium
count-down, Original validity: 60 days
검증만 한다면 기본적으로 기본 상태를 유지하면 된다.필요에 따라 Syslog와 로그인한 사용자의 추가 등을 변경하십시오.
로그 시스템 설정
Logical 시스템을 사용하는 것은 매우 간단합니다. [edit logical-Systems XXX] 이 단계의 설정에서 일반적인 JUNOS 설정을 실시합니다.
이렇게 되면 각종 과정이 분리돼 마치 내부에서 가상으로 공유기를 만든 것 같다.
jnpr> configure
Entering configuration mode
[edit]
jnpr# edit logical-systems Router1
[edit logical-systems Router1]
jnpr#
알림이 [edit logical-systems Router1]로 바뀌었기 때문에 여기에 다양한 설정을 투입합니다.Logical Tunnel 인터페이스 구성
Logical system을 만드는 것은 어렵지 않지만, Logical system 사이를 연결하려면 일반과 다른 방법을 알아야 한다.이를 위해서는 공유기 내부에 가상 인터페이스를 만들어 연결해야 한다.
이 용도로 사용되는 가상 인터페이스는 Logical Tunnel 인터페이스라고 하며 JUNOS에 lt-x/x/x로 표시됩니다.
이것을 이용하기 위해서는 우선 다음 명령 vMX를 사용하여 터널 서비스를 유효하게 합니다.
[edit]
jnpr# set chassis fpc 0 pic 0 tunnel-services bandwidth 1g
[edit]
jnpr# commit
이렇게 하면 vMX에 lt 인터페이스를 만들 수 있다.jnpr> show interfaces terse
Interface Admin Link Proto Local Remote
ge-0/0/0 up up
...(中略)...
lt-0/0/10 up up
다음은 Logical system 아래에 lt 인터페이스를 설정합니다.lt인터페이스의 논리적 유닛을 분할하여 그 자체를 하나의 인터페이스로 간주하여 사용할 수 있다.
예를 들어 다음과 같이 설정합니다.
[edit]
jnpr# edit logical-systems Router1
[edit logical-systems Router1]
jnpr# set interfaces lt-0/0/10 unit 10 encapsulation ethernet
[edit logical-systems Router1]
jnpr# set interfaces lt-0/0/10 unit 10 peer-unit 11 family inet address 10.0.0.0/31
[edit logical-systems Router1]
jnpr# commit
commit complete
주의해야 할 것은, 반드시 encapsulation과per-unit를 설정해야 한다는 것이다.설정이 적용되면 새로운 가상 인터페이스를 만들 것입니다.
[edit logical-systems Router1]
jnpr# run show interfaces terse |match lt
lt-0/0/10 up up
lt-0/0/10.10 up down inet 10.0.0.0/31
예를 들어 Logical system 두 대를 연결해 Ping을 시도해보면 아래가 이렇게 된다.[edit]
jnpr# edit logical-systems Router1
[edit logical-systems Router1]
jnpr# set interfaces lt-0/0/10 unit 10 encapsulation ethernet
[edit logical-systems Router1]
jnpr# set interfaces lt-0/0/10 unit 10 peer-unit 11 family inet address 10.0.0.0/31
[edit logical-systems Router1]
jnpr# top edit logical-systems Router2
[edit logical-systems Router2]
jnpr# set interfaces lt-0/0/10 unit 11 encapsulation ethernet
[edit logical-systems Router2]
jnpr# set interfaces lt-0/0/10 unit 11 peer-unit 10 family inet address 10.0.0.1/31
[edit logical-systems Router2]
jnpr# commit
commit complete
[edit logical-systems Router2]
jnpr# run ping 10.0.0.1 logical-system Router1
PING 10.0.0.1 (10.0.0.1): 56 data bytes
64 bytes from 10.0.0.1: icmp_seq=0 ttl=62 time=24.111 ms
64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=1.085 ms
64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=1.062 ms
64 bytes from 10.0.0.1: icmp_seq=3 ttl=64 time=1.255 ms
^C
--- 10.0.0.1 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.062/6.878/24.111/9.950 ms
설정 예
다음 4대의 라우터를 복사하여 L3VPN이 작업을 구성하는지 확인할 때의 설정 예제를 참조하십시오.
L3 이상의 기능이라면 여러 가지 게임을 할 수 있기 때문에 온라인으로 배우게 하려는 분들에게는 추천할 수 있다고 생각합니다.
[edit]
jnpr@ip-172-31-5-127# show logical-systems | display set
# P1 ルータの設定
set logical-systems P1 interfaces lt-0/0/10 unit 1 encapsulation ethernet
set logical-systems P1 interfaces lt-0/0/10 unit 1 peer-unit 0
set logical-systems P1 interfaces lt-0/0/10 unit 1 family inet address 10.0.0.1/31
set logical-systems P1 interfaces lt-0/0/10 unit 1 family mpls
set logical-systems P1 interfaces lt-0/0/10 unit 2 encapsulation ethernet
set logical-systems P1 interfaces lt-0/0/10 unit 2 peer-unit 3
set logical-systems P1 interfaces lt-0/0/10 unit 2 family inet address 10.0.0.2/31
set logical-systems P1 interfaces lt-0/0/10 unit 2 family mpls
set logical-systems P1 interfaces lo0 unit 2 family inet address 10.255.255.2/32
set logical-systems P1 protocols mpls interface lt-0/0/10.1
set logical-systems P1 protocols mpls interface lt-0/0/10.2
set logical-systems P1 protocols bgp family inet-vpn unicast
set logical-systems P1 protocols bgp group internal type internal
set logical-systems P1 protocols bgp group internal local-address 10.255.255.2
set logical-systems P1 protocols bgp group internal neighbor 10.255.255.1
set logical-systems P1 protocols bgp group internal neighbor 10.255.255.3
set logical-systems P1 protocols bgp group internal neighbor 10.255.255.4
set logical-systems P1 protocols ospf area 0.0.0.0 interface lt-0/0/10.1 interface-type p2p
set logical-systems P1 protocols ospf area 0.0.0.0 interface lo0.2
set logical-systems P1 protocols ospf area 0.0.0.0 interface lt-0/0/10.2 interface-type p2p
set logical-systems P1 protocols ldp interface lt-0/0/10.1
set logical-systems P1 protocols ldp interface lt-0/0/10.2
set logical-systems P1 routing-options router-id 10.255.255.2
set logical-systems P1 routing-options autonomous-system 65000
# P2 ルータの設定
set logical-systems P2 interfaces lt-0/0/10 unit 3 encapsulation ethernet
set logical-systems P2 interfaces lt-0/0/10 unit 3 peer-unit 2
set logical-systems P2 interfaces lt-0/0/10 unit 3 family inet address 10.0.0.3/31
set logical-systems P2 interfaces lt-0/0/10 unit 3 family mpls
set logical-systems P2 interfaces lt-0/0/10 unit 4 encapsulation ethernet
set logical-systems P2 interfaces lt-0/0/10 unit 4 peer-unit 5
set logical-systems P2 interfaces lt-0/0/10 unit 4 family inet address 10.0.0.4/31
set logical-systems P2 interfaces lt-0/0/10 unit 4 family mpls
set logical-systems P2 interfaces lo0 unit 3 family inet address 10.255.255.3/32
set logical-systems P2 protocols mpls interface lt-0/0/10.3
set logical-systems P2 protocols mpls interface lt-0/0/10.4
set logical-systems P2 protocols bgp family inet-vpn unicast
set logical-systems P2 protocols bgp group internal type internal
set logical-systems P2 protocols bgp group internal local-address 10.255.255.3
set logical-systems P2 protocols bgp group internal neighbor 10.255.255.1
set logical-systems P2 protocols bgp group internal neighbor 10.255.255.2
set logical-systems P2 protocols bgp group internal neighbor 10.255.255.4
set logical-systems P2 protocols ospf area 0.0.0.0 interface lt-0/0/10.3 interface-type p2p
set logical-systems P2 protocols ospf area 0.0.0.0 interface lo0.3
set logical-systems P2 protocols ospf area 0.0.0.0 interface lt-0/0/10.4 interface-type p2p
set logical-systems P2 protocols ldp interface lt-0/0/10.3
set logical-systems P2 protocols ldp interface lt-0/0/10.4
set logical-systems P2 routing-options router-id 10.255.255.3
set logical-systems P2 routing-options autonomous-system 65000
# PE1 ルータの設定
set logical-systems PE1 interfaces lt-0/0/10 unit 0 encapsulation ethernet
set logical-systems PE1 interfaces lt-0/0/10 unit 0 peer-unit 1
set logical-systems PE1 interfaces lt-0/0/10 unit 0 family inet address 10.0.0.0/31
set logical-systems PE1 interfaces lt-0/0/10 unit 0 family mpls
set logical-systems PE1 interfaces lt-0/0/10 unit 10 encapsulation ethernet
set logical-systems PE1 interfaces lt-0/0/10 unit 10 peer-unit 11
set logical-systems PE1 interfaces lt-0/0/10 unit 10 family inet address 10.0.0.9/30
set logical-systems PE1 interfaces lo0 unit 1 family inet address 10.255.255.1/32
set logical-systems PE1 protocols mpls interface lt-0/0/10.0
set logical-systems PE1 protocols bgp family inet-vpn unicast
set logical-systems PE1 protocols bgp group internal type internal
set logical-systems PE1 protocols bgp group internal local-address 10.255.255.1
set logical-systems PE1 protocols bgp group internal export test
set logical-systems PE1 protocols bgp group internal neighbor 10.255.255.2
set logical-systems PE1 protocols bgp group internal neighbor 10.255.255.3
set logical-systems PE1 protocols bgp group internal neighbor 10.255.255.4
set logical-systems PE1 protocols ospf area 0.0.0.0 interface lt-0/0/10.0 interface-type p2p
set logical-systems PE1 protocols ospf area 0.0.0.0 interface lo0.1
set logical-systems PE1 protocols ldp interface lt-0/0/10.0
set logical-systems PE1 policy-options policy-statement test term 1 from protocol static
set logical-systems PE1 policy-options policy-statement test term 1 then accept
set logical-systems PE1 routing-instances VRF1 instance-type vrf
set logical-systems PE1 routing-instances VRF1 interface lt-0/0/10.10
set logical-systems PE1 routing-instances VRF1 route-distinguisher 65000:1
set logical-systems PE1 routing-instances VRF1 vrf-target target:65000:1
set logical-systems PE1 routing-instances VRF1 protocols bgp group CE type external
set logical-systems PE1 routing-instances VRF1 protocols bgp group CE neighbor 10.0.0.10 peer-as 100
set logical-systems PE1 routing-options router-id 10.255.255.1
set logical-systems PE1 routing-options autonomous-system 65000
# PE2 ルータの設定
set logical-systems PE2 interfaces lt-0/0/10 unit 5 encapsulation ethernet
set logical-systems PE2 interfaces lt-0/0/10 unit 5 peer-unit 4
set logical-systems PE2 interfaces lt-0/0/10 unit 5 family inet address 10.0.0.5/31
set logical-systems PE2 interfaces lt-0/0/10 unit 5 family mpls
set logical-systems PE2 interfaces lt-0/0/10 unit 20 encapsulation ethernet
set logical-systems PE2 interfaces lt-0/0/10 unit 20 peer-unit 21
set logical-systems PE2 interfaces lt-0/0/10 unit 20 family inet address 10.0.0.21/30
set logical-systems PE2 interfaces lo0 unit 4 family inet address 10.255.255.4/32
set logical-systems PE2 protocols mpls interface lt-0/0/10.5
set logical-systems PE2 protocols bgp family inet-vpn unicast
set logical-systems PE2 protocols bgp group internal type internal
set logical-systems PE2 protocols bgp group internal local-address 10.255.255.4
set logical-systems PE2 protocols bgp group internal export test
set logical-systems PE2 protocols bgp group internal neighbor 10.255.255.1
set logical-systems PE2 protocols bgp group internal neighbor 10.255.255.2
set logical-systems PE2 protocols bgp group internal neighbor 10.255.255.3
set logical-systems PE2 protocols ospf area 0.0.0.0 interface lo0.4
set logical-systems PE2 protocols ospf area 0.0.0.0 interface lt-0/0/10.5 interface-type p2p
set logical-systems PE2 protocols ldp interface lt-0/0/10.5
set logical-systems PE2 policy-options policy-statement test term 1 from protocol static
set logical-systems PE2 policy-options policy-statement test term 1 then accept
set logical-systems PE2 routing-instances VRF1 instance-type vrf
set logical-systems PE2 routing-instances VRF1 interface lt-0/0/10.20
set logical-systems PE2 routing-instances VRF1 route-distinguisher 65000:1
set logical-systems PE2 routing-instances VRF1 vrf-target target:65000:1
set logical-systems PE2 routing-instances VRF1 protocols bgp group CE type external
set logical-systems PE2 routing-instances VRF1 protocols bgp group CE neighbor 10.0.0.22 peer-as 100
set logical-systems PE2 routing-options router-id 10.255.255.4
set logical-systems PE2 routing-options autonomous-system 65000
# カスタマールータ見立ての routing-instance の設定
[edit]
jnpr@ip-172-31-5-127# show routing-instances | display set
set routing-instances CE1 instance-type virtual-router
set routing-instances CE1 interface lt-0/0/10.11
set routing-instances CE1 interface lo0.10
set routing-instances CE1 routing-options static route 0.0.0.0/0 next-hop 10.0.0.9
set routing-instances CE1 routing-options router-id 10.255.255.10
set routing-instances CE1 routing-options autonomous-system 100
set routing-instances CE1 protocols bgp group external type external
set routing-instances CE1 protocols bgp group external export ce1-export
set routing-instances CE1 protocols bgp group external neighbor 10.0.0.9 peer-as 65000
set routing-instances CE2 instance-type virtual-router
set routing-instances CE2 interface lt-0/0/10.21
set routing-instances CE2 interface lo0.20
set routing-instances CE2 routing-options static route 0.0.0.0/0 next-hop 10.0.0.21
set routing-instances CE2 routing-options router-id 10.255.255.20
set routing-instances CE2 routing-options autonomous-system 100
set routing-instances CE2 protocols bgp group external type external
set routing-instances CE2 protocols bgp group external export ce2-export
set routing-instances CE2 protocols bgp group external neighbor 10.0.0.21 peer-as 65000
Reference
이 문제에 관하여(vMX on AWS 및 logical 시스템으로 간단한 웹 학습 환경 만들기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/nozomale/items/f677ef38c98a09f17ab9텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)