Router 0 의 설정
Router # config terminal
Router(config)#int fa 0/0
Router(config-if)#description ### to R1
Router(config-if)#ip address 10.1.12.1 255.255.255.0
Router(config-if)#no sh
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#int fa0/1
Router(config-if)#description ### R0 outside
Router(config-if)#ip address 10.1.1.1 255.255.255.0
Router(config-if)#no sh
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router(config-if)#exit
Router(config)#ip route 10.1.2.0 255.255.255.0 10.1.12.2
Router(config)#ip route 10.1.3.0 255.255.255.0 10.1.12.2 - router 2에 대한 ip route 정보를 새로 추가 해야 한다.
Router(config)#end
%SYS-5-CONFIG_I: Configured from console by console
Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 3 subnets
C 10.1.1.0 is directly connected, FastEthernet0/1
S 10.1.2.0 [1/0] via 10.1.12.2
S 10.1.3.0 [1/0] via 10.1.12.2 - 새롭게 추가된 router 2에 대한 ip route 정보
C 10.1.12.0 is directly connected, FastEthernet0/0
------------------------------------------------------------------------------------------------------------------
Router 1의 설정
Router # config terminal
Router(config)#int fa 0/0
Router(config-if)#description ### to R0
Router(config-if)#ip address 10.1.12.2 255.255.255.0
Router(config-if)#no sh
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#int fa0/1
Router(config-if)#description ### R1 outside
Router(config-if)#ip address 10.1.2.1 255.255.255.0
Router(config-if)#no sh
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router(config-if)#exit
Router(config)#ip route 10.1.1.0 255.255.255.0 10.1.12.1
Router(config)#ip route 10.1.3.0 255.255.255.0 10.1.2.3 - router 2에 대한 ip route 정보를 새로 추가 해야 한다.
Router(config)#end
%SYS-5-CONFIG_I: Configured from console by console
Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 3 subnets
S 10.1.1.0 [1/0] via 10.1.12.1
C 10.1.2.0 is directly connected, FastEthernet0/1
S 10.1.3.0 [1/0] via 10.1.2.3 - 새롭게 추가된 router 2에 대한 ip route 정보
C 10.1.12.0 is directly connected, FastEthernet0/0
------------------------------------------------------------------------------------------------------------------
Router 2의 설정
Router(config)#int fa0/0
Router(config-if)#Description ### to R1
Router(config-if)#ip address 10.1.2.3 255.255.255.0
Router(config-if)#no sh
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#int fa 0/1
Router(config-if)#description ### R2 inside
Router(config-if)#ip address 10.1.3.3 255.255.255.0
Router(config-if)#no sh
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router(config-if)#exit
Router(config)#end
%SYS-5-CONFIG_I: Configured from console by console
Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 2 subnets
C 10.1.2.0 is directly connected, FastEthernet0/0
C 10.1.3.0 is directly connected, FastEthernet0/1
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip route 10.1.1.0 255.255.255.0 10.1.2.1
Router(config)#ip route 10.1.12.0 255.255.255.0 10.1.2.1
Router(config)#end
%SYS-5-CONFIG_I: Configured from console by console
Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 4 subnets
S 10.1.1.0 [1/0] via 10.1.2.1
C 10.1.2.0 is directly connected, FastEthernet0/0
C 10.1.3.0 is directly connected, FastEthernet0/1
S 10.1.12.0 [1/0] via 10.1.2.1
Router#
------------------------------------------------------------------------------------------------------------------
- 참고
라우터의 경우 자신과 직접적으로 연결된 부분만 경로를 인식하기 때문에 새롭게 추가된 라우터가 있는 경우에는 경로를 추가해 주어야 한다.
위의 예제를 기준으로
라우터 0 과 라우터 1의 경우 쉽게 통신이 가능하지만 새롭게 추가된 라우터 2의 경우
라우더 0에 대한 정보가 없고, 라우터 0은 라우터 2에 대한 경로 정보가 없게 된다. 그래서 서로 통신이 불가능 하게 되는데
이를 가능하게 하기 위해서는 수동으로 새로운 경로를 추가해주면 된다.
ip route 10.1.12.0 255.255.255.0 10.1.2.1
10.1.12.0 쪽으로 가는 router 중 가장 처음에 있는 router IP주소 (10.1.2.1)
'CCNA 기초' 카테고리의 다른 글
IP Routing - Dynamic routing RIP 이용 (0) | 2008.12.02 |
---|---|
IP Routing - default rounting (0) | 2008.12.02 |
IP Routing - Static routing (0) | 2008.12.02 |
IP Routing - Static routing & router0, 1 (0) | 2008.12.01 |
VTP 설정하기 (0) | 2008.12.01 |
VLAN과 Trunk 기본 설정 (0) | 2008.12.01 |