ip route 0.0.0.0 0.0.0.0 g0/1
ip route 0.0.0.0 0.0.0.0 1.1.1.1
명령어
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/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
R1 default routing=================
ip route 0.0.0.0 0.0.0.0 12.1.1.2
R2 default routing=================
ip route 0.0.0.0 0.0.0.0 12.1.1.1
R2 static routing==================
ip route 3.3.3.0 255.255.255.0 23.1.1.3
R3 default routing=================
ip route 0.0.0.0 0.0.0.0 23.1.1.2
결과