[eve-ng labs.] Junos static routing

주니퍼 스위치 static 라우팅 설정.

작업환경: eve-ng, vEX 스위치

구성은 아래 그림과 같음.

1. Router 설정.

하단 스위치와 연결된 인터페이스에 IP 주소를 설정한다.

[edit]
root# set system host-name vEX-Router

[edit]
root@vEX-Router# set interfaces ge-0/0/0 unit 0 family inet address 10.10.1.1/30

[edit]
root@vEX-Router# set interfaces ge-0/0/1 unit 0 family inet  address 10.10.2.1/30

[edit]
root@vEX-Router# commit
commit complete

각 네트워크로 라우팅을 설정한다.

[edit]
root@vEX-Router# set routing-options static route 172.16.100.0/24  next-hop 10.10.1.2

[edit]
root@vEX-Router# set routing-options static route 172.16.200.0/24  next-hop 10.10.2.2

[edit]
root@vEX-Router# commit
commit complete

2. 스위치 1 설정

라우터와 연결된 인터페이스에 IP 주소 설정.

[edit]
root@vEX-SW-1# set interfaces ge-0/0/0 unit 0 family inet address 10.10.1.2/30

디폴트 라우트 설정.

[edit]
root@vEX-SW-1# set routing-options static route 0.0.0.0/0 next-hop 10.10.1.1

vlan FOX(100)만들고 vlan 인터페이스에 IP 주소 설정.

[edit]
root# set vlans FOX vlan-id 100

[edit]
root@vEX-SW-1# set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members 100

[edit]
root@vEX-SW-1# set vlans FOX l3-interface irb.100

[edit]
root@vEX-SW-1# set interfaces irb unit 100 family inet address 172.16.100.1/24

설정 저장.

[edit]
root@vEX-SW-1# commit
commit complete

3. 스위치 2 설정.

라우터와 연결된 인터페이스(ge-0/0/0)에 IP 주소 설정.

[edit]
root# set interfaces ge-0/0/0 unit 0 family inet address 10.10.2.2/30

디폴트라우터 설정

[edit]
root# set routing-options static route 0.0.0.0/0 next-hop 10.10.2.1

vlan WOLF(200) 만들고 IP 주소 설정.

[edit]
root# set vlans WOLF vlan-id 200

[edit]
root# set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members 200

[edit]
root# set interfaces irb unit 200 family inet address 172.16.200.1/24

설정 저장.

[edit]
root# commit
commit complete

4. 스위치 1의 vlan 100에서, 스위치 2의 vlan 200까지 통신 확인.

스위치1에서, 스위치2까지 traceroute.

root@vEX-SW-1> traceroute 172.16.200.1
traceroute to 172.16.200.1 (172.16.200.1), 30 hops max, 52 byte packets
 1  10.10.1.1 (10.10.1.1)  2.268 ms  2.562 ms  1.967 ms
 2  172.16.200.1 (172.16.200.1)  21.913 ms  13.585 ms  3.785 ms

root@vEX-SW-1>

vlan 200 에서 vlan 100까지 ping 확인.

root@vEX-SW-2> ping count 2 172.16.100.1
PING 172.16.100.1 (172.16.100.1): 56 data bytes
64 bytes from 172.16.100.1: icmp_seq=0 ttl=63 time=3.396 ms
64 bytes from 172.16.100.1: icmp_seq=1 ttl=63 time=2.975 ms

--- 172.16.100.1 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 2.975/3.186/3.396/0.210 ms

라우터에서 라우팅 확인.

root@vEX-Router> show route

inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
Limit/Threshold: 1048576/1048576 destinations
+ = Active Route, - = Last Active, * = Both

10.10.1.0/30       *[Direct/0] 1d 17:56:35
                    >  via ge-0/0/0.0
10.10.1.1/32       *[Local/0] 1d 17:56:35
                       Local via ge-0/0/0.0
10.10.2.0/30       *[Direct/0] 1d 17:56:35
                    >  via ge-0/0/1.0
10.10.2.1/32       *[Local/0] 1d 17:56:35
                       Local via ge-0/0/1.0
172.16.100.0/24    *[Static/5] 1d 17:52:38
                    >  to 10.10.1.2 via ge-0/0/0.0
172.16.200.0/24    *[Static/5] 1d 17:52:38
                    >  to 10.10.2.2 via ge-0/0/1.0

inet6.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
Limit/Threshold: 1048576/1048576 destinations
+ = Active Route, - = Last Active, * = Both

fe80::5200:ff:fe03:0/128
                   *[Local/0] 1d 23:56:33
                       Local via fxp0.0
ff02::2/128        *[INET6/0] 1d 23:57:28
                       MultiRecv

답글 남기기

Your email address will not be published.