GRE Keepalive 시간 구성
GRE(Generic Routing Encapsulation) 터널 인터페이스에는 터널이 다운되었을 때를 감지하는 메커니즘이 내장되어 있지 않습니다. Keepalive 메시지는 GRE 터널 인터페이스가 터널이 다운된 시점을 감지하는 데 도움이 됩니다. 아래 항목에서는 GRE keepalive 시간의 작동 및 구성에 대해 설명합니다.
GRE Keepalive 시간 이해하기
GRE(Generic Routing Encapsulation) 터널 인터페이스에는 터널이 다운되었을 때를 감지하는 메커니즘이 내장되어 있지 않습니다. keepalive 메시지를 탐지 메커니즘으로 사용하도록 설정할 수 있습니다.
Keepalive 시간은 ATM-over-ADSL 인터페이스에 대해서만 구성할 수 있으며, Junos OS 릴리스 15.1X49-D10부터 SRX300, SRX320, SRX340, SRX345, SRX380 및 SRX550HM에서 더 이상 지원되지 않습니다. Keepalive 시간은 다른 인터페이스에 대해 기본적으로 활성화됩니다.
Keepalives는 물리적 또는 논리적 인터페이스에서 구성할 수 있습니다. 물리적 인터페이스에 구성된 경우, keepalives는 물리적 인터페이스의 일부인 모든 논리적 인터페이스에 전송됩니다. 개별 논리적 인터페이스에 구성된 경우, keepalives는 해당 논리적 인터페이스로만 전송됩니다. keepalive를 구성하는 것 외에도 보류 시간을 구성해야 합니다.
계층 수준에서 명령문과 hold-time
명령문을 모두 keepalive-time
포함하여 일반 라우팅 캡슐화(GRE) 터널 인터페이스에서 keepalives를 [edit protocols oam gre-tunnel interface interface-name]
구성할 수 있습니다.
GRE 인터페이스에서 keepalives가 올바르게 작동하려면 계층 수준에서도 [edit interfaces interface-name unit unit]
문을 포함해야 family inet
합니다. 이 명령문을 포함하지 않으면 인터페이스가 다운된 것으로 표시됩니다.
또한보십시오
GRE Keepalive 시간 구성
Keepalive 시간은 ATM-over-ADSL 인터페이스에 대해서만 구성할 수 있으며, Junos OS 릴리스 15.1X49-D10부터 SRX300, SRX320, SRX340, SRX345, SRX380 및 SRX550HM에서 더 이상 지원되지 않습니다.
GRE 터널 인터페이스에 대한 Keepalive 시간 및 보류 시간 구성
계층 수준에서 명령문과 hold-time
명령문을 모두 keepalive-time
포함하여 일반 라우팅 캡슐화(GRE) 터널 인터페이스에서 keepalives를 [edit protocols oam gre-tunnel interface interface-name]
구성할 수 있습니다.
GRE 인터페이스에서 keepalives가 올바르게 작동하려면 계층 수준에서도 [edit interfaces interface-name unit unit]
문을 포함해야 family inet
합니다. 이 명령문을 포함하지 않으면 인터페이스가 다운된 것으로 표시됩니다.
GRE 터널 인터페이스를 구성하려면 다음을 수행합니다.
GRE 터널 인터페이스의 keepalive 시간을 구성하려면 다음을 수행합니다.
GRE 터널 인터페이스의 계층 수준에서 OAM(Operation, Administration, and Maintenance) 프로토콜을
[edit protocols]
구성합니다.[edit] user@host# edit protocols oam
OAM 프로토콜에 대한 GRE 터널 인터페이스 옵션을 구성합니다.
[edit protocols oam] user@host# edit gre-tunnel interface interface-name
GRE 터널 인터페이스의 keepalive 시간을 1초에서 50초로 구성합니다.
[edit protocols oam gre-tunnel interface interface-name] user@host# set keepalive-time seconds
보류 시간을 5초에서 250초까지 구성합니다. 보류 시간은 keepalive 시간의 두 배 이상이어야 합니다.
[edit protocols oam gre-tunnel interface interface-name] user@host# set hold-time seconds
GRE Keepalive 시간 구성 표시
GRE 터널 인터페이스에 keepalive 시간 정보 표시
목적
keepalive 시간 및 보류 시간 매개변수가 구성되고 보류 시간이 만료되면 GRE 터널 인터페이스의 현재 상태 정보를 표시합니다.
행동
GRE 터널 인터페이스(예: gr-3/3/0.3)에서 현재 상태 정보를 확인하려면 및 show interfaces gr-3/3/0.3 extensive
작동 명령을 실행합니다show interfaces gr-3/3/0.3 terse
.
gr-3/3/0.3 간결한 인터페이스 표시
user@host> show interfaces gr-3/3/0.3 terse Interface Admin Link Proto Local Remote gr-3/3/0.3 up up inet 200.1.3.1/24 mpls
show interfaces gr-3/3/0.3 광범위
user@host> show interfaces gr-3/3/0.3 extensive Logical interface gr-3/3/0.3 (Index 73) (SNMP ifIndex 594) (Generation 900) Flags: Point-To-Point SNMP-Traps 0x4000 IP-Header 10.1.19.11:10.1.19.12:47:df:64:0000000000000000 Encapsulation: GRE-NULL Gre keepalives configured: On, Gre keepalives adjacency state: down ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Traffic statistics: Input bytes : 15629992 Output bytes : 15912273 Input packets: 243813 Output packets: 179476 Local statistics: Input bytes : 15322586 Output bytes : 15621359 Input packets: 238890 Output packets: 174767 Transit statistics: Input bytes : 307406 0 bps Output bytes : 290914 0 bps Input packets: 4923 0 pps Output packets: 4709 0 pps Protocol inet, MTU: 1476, Generation: 1564, Route table: 0 Flags: Sendbcast-pkt-to-re Addresses, Flags: Dest-route-down Is-Preferred Is-Primary ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Destination: 200.1.3/24, Local: 200.1.3.1, Broadcast: 200.1.3.255, Generation: 1366 Protocol mpls, MTU: 1464, Maximum labels: 3, Generation: 1565, Route table: 0
보류 시간이 만료되는 경우:
인터페이스가 트래픽을 보내거나 받을 수 없더라도 GRE 터널은 작동 상태를 유지합니다.
Link
상태는 이고Up
은Gre keepalives adjacency state
Down
입니다.
의미
보류 시간이 만료되면 keepalive 시간 및 보류 시간 매개변수가 있는 GRE 터널 인터페이스의 현재 상태 정보가 예상대로 표시됩니다.
예: GRE 구성
GRE(Generic Routing Encapsulation)는 네트워크를 통해 패킷을 전송하는 데 사용되는 IP 캡슐화 프로토콜입니다. 정보는 GRE 터널을 통해 한 네트워크에서 다른 네트워크로 전송됩니다. GRE는 페이로드를 GRE 패킷으로 캡슐화합니다. 이 GRE 패킷은 외부 프로토콜(전달 프로토콜)로 캡슐화됩니다. GRE 터널 엔드포인트는 패킷을 대상으로 라우팅하기 위해 페이로드를 GRE 터널로 전달합니다. 엔드포인트에 도달한 후 GRE 캡슐화가 제거되고 페이로드가 최종 목적지로 전송됩니다. GRE의 주요 용도는 IP 네트워크를 통해 비 IP 패킷을 전달하는 것입니다. 그러나 GRE는 IP 클라우드를 통해 IP 패킷을 전송하는 데에도 사용됩니다.
요구 사항
-
GRE(gr-) 인터페이스를 구성합니다. gr- 인터페이스에는 로컬 주소와 대상 주소가 포함되어 있습니다. 구성되자마자 나타납니다. gr- 인터페이스에서 IP 주소를 구성할 수도 있습니다.
-
대상 서브넷에 도달하는 경로를 구성합니다(엔드 투 엔드 연결). gr- 인터페이스를 통해 정적 경로를 구성하거나 OSPF와 같은 IGP(Interior Gateway Protocol)를 사용할 수 있습니다.
개요
GRE 터널은 완전히 상태 비저장(stateless)으로 설계되었으므로, 각 터널 엔드포인트는 원격 터널 엔드포인트의 상태 또는 가용성에 대한 정보를 유지하지 않습니다. 일반적으로 GRE 터널 인터페이스는 구성되자마자 작동하며, 유효한 터널 소스 주소 또는 작동 중인 인터페이스가 있는 한 작동 상태를 유지합니다.
구성
기본적으로 로컬 서브넷 인터페이스는 IPv4 주소가 10.10.11.1/24인 ge-0/0/0입니다. 대상 서브넷은 10.10.10.0/24이고 터널 엔드포인트 IPv4 인터페이스는 10.10.10.1/24입니다.
GRE 구성은 SRX 시리즈 방화벽의 터널 인터페이스 간의 기본 구성을 보여줍니다.

대상 하위 집합에 도달하기 위한 경로 구성
단계별 절차
gr- 인터페이스를 통해 또는 IGP를 사용하여 정적 경로를 구성할 수 있습니다.
-
로컬 서브넷 인터페이스 ge-0/0/0 인터페이스를 구성합니다.
[edit interfaces] user@host# set interfaces ge-0/0/0 unit 0 family inet address 10.10.11.1/24
-
인터페이스 ge-0/0/1을 구성합니다.
[edit interfaces] user@host# set interfaces ge-0/0/1 unit 0 family inet address 10.1.12.1/24
-
gr- 터널 엔드포인트를 구성하고 터널 엔드포인트에 대한 소스 주소, 대상 주소 및 패밀리를 inet으로 지정합니다.
[edit interfaces] user@host# set interfaces gr-0/0/0 unit 0 tunnel source 10.1.12.1 destination 10.1.23.1 user@host# set interfaces gr-0/0/0 unit 0 family inet address 192.168.1.1/24
-
구성된 인터페이스는 계층 수준의 보안 영역에 바인딩됩니다
[edit security]
.show zones
명령을 사용하여 영역을 봅니다. 다음과 같이 영역을 구성합니다.[edit security zones security-zones trust]] user@host# set host-inbound-traffic system-services all user@host# set host-inbound-traffic protocols all user@host# set interfaces gr-0/0/0.0 user@host# set zones zone names protocols all
[edit security zones security-zones untrust]] user@host# set host-inbound-traffic system-services all user@host# set host-inbound-traffic protocols all
-
명령을 사용하여
show
계층 수준에서[edit interfaces]
구성된 인터페이스를 봅니다.[edit interfaces] user@host# set routing options static route 10.10.10.0/24 next hop gr-0/0/0.0
-
정적 경로를 정의하지 않으려는 경우, OSPF는 모든 내부 경로를 수신하기 위해 측면과 내부 서브넷 양쪽의 gr-0/0/0 인터페이스 간에 패시브 인접 라우터로 구성될 수 있습니다. 계층 수준에서 OSPF를
[edit protocols]
구성하고 명령을 사용하여show
확인합니다.[edit protocols] user@host# set protocols ospf area 0.0.0.0 interface gr-0/0/0.0
결과
구성 모드에서 명령을 입력하여 show
디바이스의 구성을 확인합니다. 출력이 의도한 구성을 표시하지 않으면, 이 예의 구성 지침을 반복하여 수정합니다.
정적 경로를 사용하는 GRE 구성:
[edit interfaces] root@SRX-1# show ge-0/0/0 { unit 0 { family inet { address 10.10.11.1/24; } } } gr-0/0/0 { unit 0 { tunnel { source 10.1.12.1; destination 10.1.23.1; } family inet { address 192.168.1.1/24; } } } ge-0/0/1 { unit 0 { family inet { address 10.1.12.1/24; } } } [edit security] root@SRX-1# show zones { security-zone trust { host-inbound-traffic { system-services { all; } protocols { all; } } interfaces { gr-0/0/0.0; } } } root@SRX-1# show routing-options static { route 10.10.10.0/24 next-hop gr-0/0/0.0; }
양쪽의 인터페이스 gr-0/0/0과 내부 서브넷 간에 패시브 이웃으로 구성된 OSPF를 사용하는 GRE 구성:
[edit protocols] root@SRX-1# show ospf { area 0.0.0.0 { interface gr-0/0/0.0; interface ge-0/0/0.0 { passive; } } }
확인
SRX 시리즈 방화벽에서 GRE의 구성이 성공적인지 확인하려면 다음 작업을 수행하십시오.
GRE 인터페이스 검증
목적
GRE 인터페이스가 작동 중인지 확인합니다.
행동
show interfaces
계층 수준에서 [edit interfaces]
명령을 실행합니다.
show interfaces gr-0/0/0 terse [edit interfaces] Interface Admin Link Proto Local Remote gr-0/0/0 up up gr-0/0/0.0 up up inet 192.168.1.1/24
경로 확인
목적
GRE 터널 인터페이스를 통해 대상 네트워크의 경로에 연결할 수 있는지 확인합니다.
행동
show route forwarding-table matching 10.10.10.0/24
계층 수준에서 [edit interfaces]
명령을 실행합니다.
[edit interfaces] user@router# run show route forwarding-table matching 10.10.10.0/24 Routing table: default.inet Internet: .... Destination Type RtRef Next hop Type Index NhRef Netif 10.10.10.0/24 user 0 ucst 595 2 gr-0/0/0.0
GRE 터널을 통한 트래픽 검증
목적
트래픽을 대상 서브넷으로 보내고 GRE 인터페이스가 작동 중인지 확인합니다.
행동
show interfaces gr-0/0/0 extensive
작동 명령을 실행합니다. 또한 패킷이 gr- 인터페이스를 통해 나가고 있는지 확인합니다.
user@host> show interfaces gr-0/0/0 extensive Physical interface: gr-0/0/0, Enabled, Physical link is Up Interface index: 134, SNMP ifIndex: 40, Generation: 17 Type: GRE, Link-level type: GRE, MTU: Unlimited, Speed: 800mbps Hold-times : Up 0 ms, Down 0 ms Device flags : Present Running Interface flags: Point-To-Point SNMP-Traps Statistics last cleared: 2005-08-05 21:39:41 UTC (00:00:47 ago) Traffic statistics: Input bytes : 8400 0 bps Output bytes : 8400 0 bps Input packets: 100 0 pps Output packets: 100 0 pps Logical interface gr-0/0/0.0 (Index 72) (SNMP ifIndex 28) (Generation 17) Flags: Point-To-Point SNMP-Traps 16384 IP-Header 10.1.12.1:10.1.23.1:47:df:64:0000000000000000 Encapsulation: GRE-NULL Traffic statistics: Input bytes : 8400 Output bytes : 8400 Input packets: 100 Output packets: 100 Local statistics: Input bytes : 0 Output bytes : 0 Input packets: 0 Output packets: 0 Transit statistics: Input bytes : 8400 0 bps Output bytes : 8400 0 bps Input packets: 100 0 pps Output packets: 100 0 pps Protocol inet, MTU: 1476, Generation: 25, Route table: 0 Flags: None Addresses, Flags: Is-Primary Destination: Unspecified, Local: 192.168.0.1, Broadcast: Unspecified, Generation: 30
예: IPsec 터널을 통한 GRE 구성
요구 사항
개요
GRE 터널은 최소한의 보안을 제공하는 반면 IPsec 터널은 기밀성, 데이터 인증 및 무결성 보증 측면에서 강화된 보안을 제공합니다. 또한 IPsec은 멀티캐스트 패킷을 직접 지원할 수 없습니다. 그러나 캡슐화된 GRE 터널을 먼저 사용하는 경우 IPsec 터널을 사용하여 멀티캐스트 패킷에 보안을 제공할 수 있습니다. IPsec 터널을 통한 GRE에서는 모든 라우팅 트래픽(IP 및 비 IP)을 통해 라우팅할 수 있습니다. 원래 패킷(IP/non-IP)이 GRE로 캡슐화되면 GRE 터널에서 정의한 IP 헤더(일반적으로 터널 인터페이스 IP 주소)가 있습니다. IPsec 프로토콜은 IP 패킷을 이해할 수 있습니다. 따라서 GRE 패킷을 캡슐화하여 IPsec을 통해 GRE로 만듭니다.
IPsec을 통한 GRE 구성과 관련된 기본 단계는 다음과 같습니다.
경로 기반 IPsec 터널을 구성합니다.
GRE 터널을 구성합니다.
gr- 인터페이스를 통해 대상을 원격 서브넷으로 하는 정적 경로를 구성합니다.
st0 인터페이스를 다음 홉으로 사용하여 GRE 엔드포인트에 대한 정적 경로를 구성합니다.
구성
이 예에서 기본 구성은 로컬 서브넷 인터페이스가 ge-0/0/0이고 IPv4 주소는 10.10.11.1/24입니다. 대상 서브넷은 10.10.10.0/24입니다. gr-0/0/0 인터페이스 터널 엔드포인트는 로컬 루프백 IPv4 주소가 172.20.1.1이고 원격 루프백 IPv4 주소가 172.20.1.2인 양쪽의 루프백 주소입니다. gr-0/0/0, st0 및 lo0 인터페이스는 보안 영역에 바인딩되고 그에 따라 정책이 생성됩니다.
IPsec 터널을 통한 GRE 인터페이스 구성
단계별 절차
인터페이스 이름이 ge-0/0/0이고 패밀리가 inet으로 설정된 계층 수준에서 GRE
[set interfaces interface-name unit unit-number]
를 구성합니다.[edit interfaces] user@host# set interfaces ge-0/0/0 unit 0 family inet address 10.10.11.1/24
gr- 터널 엔드포인트를 구성하고 터널 엔드포인트에 대한 소스 주소, 대상 주소 및 패밀리를 inet으로 지정합니다.
[edit interfaces] user@host# set interfaces gr-0/0/0 unit 0 tunnel source 172.20.1.1 destination 172.20.1.2 user@host# set interfaces gr-0/0/0 unit 0 family inet 192.168.1.1/24
마찬가지로 lo0 및 st0 인터페이스를 inet으로 패밀리 세트를 구성합니다.
[edit interfaces] user@host# set interfaces lo0 unit 0 family inet address 172.20.1.1/32
[edit interfaces] user@host# set interfaces st0 unit 0 family inet
GRE 인터페이스를 보안 영역으로 구성합니다.
show zones
명령을 사용하여 구성된 터널 인터페이스 lo0 및 st0이 표시되는 영역을 볼 수 있습니다.[edit security zones security-zones trust]] user@host# set host-inbound-traffic system-services all user@host# set host-inbound-traffic protocols all user@host# set interfaces gr-0/0/0.0 user@host# set zones zone names protocols all user@host# set interfaces lo0.0 user@host# set interfaces st0.0
[edit security zones security-zones untrust]] user@host# set host-inbound-traffic system-services all user@host# set host-inbound-traffic protocols all user@host# set interfaces gr-0/0/0.0.1 user@host# set interfaces lo0.0 user@host# set interfaces st0.0
결과
구성 모드에서 명령을 입력하여 show
인터페이스 구성을 확인합니다. 구성된 인터페이스는 계층 수준의 보안 영역에 바인딩됩니다 [edit security]
. show zones
명령을 사용하여 구성된 인터페이스(gr-, st0.0 및 lo0)가 표시되는 영역을 확인합니다. 출력이 의도한 구성을 표시하지 않으면, 이 예의 구성 지침을 반복하여 수정합니다.
GRE 인터페이스 구성을 위한 매개변수:
user@host> show interfaces ge-0/0/0 { unit 0 { family inet { address 10.10.11.1/24; } } } gr-0/0/0 { unit 0 { tunnel { source 172.20.1.1; destination 172.20.1.2; } family inet { address 192.168.1.1/24; } } } lo0 { unit 0 { family inet { address 172.20.1.1/32; } } } st0 { unit 0 { family inet; } } [edit] root@Juniper# show routing-options { static { route 10.10.10.0/24 next-hop gr-0/0/0.0; route 172.20.1.2/32 next-hop st0.0; } }
보안 영역이 있는 GRE 인터페이스를 구성하기 위한 매개 변수:
[edit security] root@Juniper# show zones { security-zone trust { host-inbound-traffic { system-services { all; } protocols { all; } } interfaces { gr-0/0/0.0; lo0.0; st0.0; } } }
예: 터널 대상이 라우팅 인스턴스에 있는 경우 GRE 터널 구성
요구 사항
개요
터널 대상이 기본 라우팅 인스턴스 또는 기본이 아닌 라우팅 인스턴스에 있을 때 GRE 터널을 구성할 수 있습니다. GRE 터널을 구성하려면 터널 소스 및 터널 대상 주소를 정의해야 합니다. 터널 대상이 라우팅 인스턴스에 있고 둘 이상의 라우팅 인스턴스가 있는 경우, 올바른 라우팅 인스턴스와 구성된 터널 대상 주소에 도달하는 데 사용할 라우팅 테이블을 지정해야 합니다.
터널 대상 주소는 기본적으로 기본 라우팅 테이블 "inet.0"을 사용하여 연결할 수 있는 것으로 간주됩니다.
구성
이 예에서는 두 개의 인스턴스가 있는 SRX 시리즈 방화벽의 gr- 인터페이스 간에 GRE 터널을 구성할 수 있습니다. 터널 대상이 기본 라우팅 인스턴스에 있을 때와 터널 대상이 기본이 아닌 라우팅 인스턴스에 있을 때의 인스턴스입니다.
터널 대상이 기본 라우팅 인스턴스에 있는 경우 GRE 터널 구성
이 예에서는 기본 라우팅 인스턴스를 사용하여 터널 대상에 도달합니다. 이 때문에 라우팅 테이블 inet.0이 기본적으로 사용됩니다.
단계별 절차
터널의 소스 및 대상 주소를 지정합니다.
[edit interfaces] user@host# set interfaces gr-0/0/0 unit 0 tunnel source 172.16.0.1 destination 10.10.1.2 user@host# set interfaces gr-0/0/0 unit 0 family inet 192.168.100.1/30;
inet으로 설정된 제품군으로 ge- 인터페이스 및 lo0 인터페이스를 구성합니다.
[edit interfaces] user@host# set interfaces ge-0/0/0 unit 0 family inet address 172.30.73.56/24 user@host# set interfaces lo0 unit 0 family inet address 172.16.0.1/32
-
GRE 구성 항목에 언급된 라우팅 옵션에 대한 GRE 터널 인터페이스를 구성합니다.
터널 대상이 기본이 아닌 라우팅 인스턴스에 있는 경우 GRE 터널 구성
기본이 아닌 라우팅 인스턴스의 경우 gr-0/0/0 인터페이스를 이미 구성했는지 확인합니다.
단계별 절차
gr-0/00 인터페이스 및 제품군이 inet으로 설정된 GRE 터널을 구성합니다.
[edit interfaces] user@host# set interfaces gr-0/00 unit 0 family inet address
터널의 소스 및 대상 주소를 지정합니다.
[edit interfaces] user@host# set interfaces gr-0/0/0 unit 0 tunnel source 172.16.0.1 tunnel destination 10.10.1.2 family inet 192.168.100.1/30;
inet으로 설정된 제품군으로 ge- 인터페이스 및 lo0 인터페이스를 구성합니다.
[edit interfaces] user@host# set interfaces ge-0/0/0 unit 0 family inet address 172.30.73.56/24 user@host# set interfaces lo0 unit 0 family inet address 172.16.0.1/32
터널 인터페이스에 사용되는 라우팅 인스턴스를 구성합니다.
[edit routing-instances] user@host# set routing-instances test instance-type virtual-router user@host# set routing-instances test routing-options static route 10.10.1.2/32 next-hop 172.30.73.57 user@host# set routing-instances test interface ge-0/0/0.0
GRE 터널 인터페이스에 대한 routing-instance를 구성합니다.
[edit interfaces] user@host# set interfaces gr-0/0/0 unit 0 tunnel routing-instance destination test
터널 대상에 대한 정적 경로를 추가합니다.
[edit interfaces] user@host# set routing-options static route 10.10.1.2/32 next-table test.inet.0
메모:SRX 시리즈 방화벽이 패킷 모드인 경우, inet.0에서 터널 대상에 도달할 수 있도록 정적 경로를 구성할 필요가 없습니다. 그러나 gr-0/0/0 인터페이스에서 올바른 라우팅 인스턴스를 지정해야 합니다.
결과
구성 모드에서 명령을 입력하여 show
디바이스의 구성을 확인합니다. 출력이 의도한 구성을 표시하지 않으면, 이 예의 구성 지침을 반복하여 수정합니다.
터널 대상이 기본 라우팅 인스턴스에 있는 경우:
interfaces { gr-0/0/0 { unit 0 { tunnel { source 172.16.0.1; destination 10.10.1.2; } family inet { address 192.168.100.1/30; } } } ge-0/0/0 { unit 0 { family inet { address 172.30.73.56/24; } } } lo0 { unit 0 { family inet { address 172.16.0.1/32; } } } ... } routing-options { static { route 10.10.1.2/32 next-hop 172.30.73.57; # Tunnel destination is reachable from default routing-instance ... } } routing-instances { test { instance-type virtual-router; interface gr-0/0/0.0; routing-options { ... } } }
터널 대상이 기본이 아닌 라우팅 인스턴스에 있는 경우:
interfaces { gr-0/0/0 { unit 0 { tunnel { source 172.16.0.1; destination 10.10.1.2; routing-instance { destination test; # Routing-instance to reach tunnel destination } } family inet { address 192.168.100.1/30; } } } ge-0/0/0 { unit 0 { family inet { address 172.30.73.56/24; } } } lo0 { unit 0 { family inet { address 172.16.0.1/32; } } } ... } routing-options { static { route 10.10.1.2/32 next-table test.inet.0; # Tunnel destination is reachable via test.inet.0 ... } } routing-instances { test { instance-type virtual-router; interface ge-0/0/0; routing-options { static { route 10.10.1.2/32 next-hop 172.30.73.57; # Tunnel destination is reachable from non-default routing-instance ... } } } }
확인
정적 경로 사용 확인
목적
정적 경로가 사용되는지 확인합니다.
행동
명령어를 실행하세요 show route forwarding table
.
user@host> show route forwarding-table table test No Title Routing table: test.inet Internet: Enabled protocols: Bridging, Destination Type RtRef Next hop Type Index NhRef Netif default perm 0 rjct 597 1 0.0.0.0/32 perm 0 dscd 590 1 10.10.1.2/32 user 1 172.30.73.57 hold 598 4 ge-0/0/0.0 172.16.0.1.10.10.1.2.47/72 dest 0 locl 617 1 172.30.73.0/24 intf 0 rslv 588 1 ge-0/0/0.0 172.30.73.0/32 dest 0 172.30.73.0 recv 586 1 ge-0/0/0.0 172.30.73.56/32 intf 0 172.30.73.56 locl 587 2 172.30.73.56/32 dest 0 172.30.73.56 locl 587 2 172.30.73.57/32 dest 0 172.30.73.57 hold 598 4 ge-0/0/0.0 172.30.73.255/32 dest 0 172.30.73.255 bcst 585 1 ge-0/0/0.0 224.0.0.0/4 perm 0 mdsc 596 1 224.0.0.1/32 perm 0 224.0.0.1 mcst 600 1 255.255.255.255/32 perm 0 bcst 601 1
기본 인스턴스에서 사용되는 정적 경로 확인
목적
정적 경로가 기본 인스턴스에 사용되는지 확인합니다.
행동
명령어를 실행하세요 show route forwarding table
.
user@host> show route forwarding-table matching 10.10.1.2 Routing table: default.inet Internet: Enabled protocols: Bridging, Destination Type RtRef Next hop Type Index NhRef Netif 10.10.1.2/32 user 0 rtbl 604 3