int g0/0
ip add 1.1.1.1 255.255.255.0
no sh
ip route 2.2.2.0 255.255.255.0 12.1.1.2
R1에서 R2로, R2에서 R1로 통신할 수 있도록 Static Routing을 하였다.
명령어
R1 ===========================
en
conf t
hostname R1
no ip domain-lookup
int g0/0
ip add 1.1.1.1 255.255.255.0
no sh
int s0/0/0
ip add 12.1.1.1 255.255.255.0
no sh
R2 ===========================
en
conf t
hostname R2
no ip domain-lookup
int g0/0
ip add 2.2.2.1 255.255.255.0
no sh
int s0/0/1
ip add 12.1.1.2 255.255.255.0
no sh
R1 static routing =================
ip route 2.2.2.0 255.255.255.0 12.1.1.2
R2 static routing =================
ip route 1.1.1.0 255.255.255.0 12.1.1.1
결과
다른 네트워크에 있는 PC 3개가 서로 통신할 수 있도록 Static Routing 하였다.
각각 Routing을 두 개씩 해주었다.
명령어
R1 ============================
en
conf t
hostname R1
no ip domain-lookup
int g0/0
ip add 1.1.1.1 255.255.255.0
no sh
int s0/0/0
ip add 12.1.1.1 255.255.255.0
no sh
int s0/1/0
ip add 31.1.1.1 255.255.255.0
no sh
R2 ============================
en
conf t
hostname R2
no ip domain-lookup
int g0/0
ip add 2.2.2.1 255.255.255.0
no sh
int s0/0/0
ip add 12.1.1.2 255.255.255.0
no sh
int s0/0/1
ip add 23.1.1.2 255.255.255.0
no sh
R3 ============================
en
conf t
hostname R3
no ip domain-lookup
int g0/0
ip add 3.3.3.1 255.255.255.0
no sh
int s0/0/1
ip add 23.1.1.3 255.255.255.0
no sh
int s0/1/0
ip add 31.1.1.3 255.255.255.0
no sh
R1 Static Routing =================
ip route 2.2.2.0 255.255.255.0 12.1.1.2
ip route 3.3.3.0 255.255.255.0 31.1.1.3
R2 Static Routing =================
ip route 1.1.1.0 255.255.255.0 12.1.1.1
ip route 3.3.3.0 255.255.255.0 23.1.1.3
R3 Static Routing =================
ip route 1.1.1.0 255.255.255.0 31.1.1.1
ip route 2.2.2.0 255.255.255.0 23.1.1.2
결과