본문 바로가기

CCNA 기초

IP Routing - example 1


Router 4에서는 무슨 일이 일어나는가?




Router 4의 설정

Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int fa 0/0
Router(config-if)#ip add 192.168.1.250 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 se 0/0/0
Router(config-if)#ip add 209.165.100.201 255.255.255.252
Router(config-if)#no sh
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
Router(config-if)#clock rate 64000
Router(config-if)#exit
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up

Router(config)#do ping 192.168.1.20
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.20, timeout is 2 seconds:
Router(config)#.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 47/59/63 ms

Router(config)#do ping 192.168.1.120
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.120, timeout is 2 seconds:
Router(config)#.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 33/55/63 ms

Router(config)#do ping 209.165.100.202
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 209.165.100.202, timeout is 2 seconds:
Router(config)#!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 ms

-----------------------------------------------------------------------------------------------------

Router 5의 설정

Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int se 0/0/0
Router(config-if)#ip add 209.165.100.202 255.255.255.252
Router(config-if)#no sh
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
Router(config-if)#exit
Router(config)#int fa 0/0
Router(config-if)#ip add 209.165.210.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)#do ping 209.165.210.226
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 209.165.210.226, timeout is 2 seconds:
Router(config)#.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 3/24/31 ms

- 참고
각각의 라우터에서는 자기와 연결된 네트워크 대역만 인식을 하기때문에
PC0, Server0에서 Server1로 정보를 전달하면
Router 4에서는 Router 5와 연결된 네트워크 대역으로가는 길을 모르기 때문에

전달받은 정보를 PC0, Server0으로 다시 돌려보낸다. 즉 Router 4, Router 5  의 네트워크 안에서만 통신이 된다.

그러므로 안되는게 정상!!!

한 예로 스택틱을 적용하면 된다.

-----------------------------------------------------------------------------------------------------

추가 설정 - Router 4, Router 5


Router 4

- 209.165.210.0 과의 연결을 위해 정적 라우팅 설정 -
Router(config)#ip route 209.165.210.0 255.255.255.0 209.165.100.202

Router(config)#do 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

C    192.168.1.0/24 is directly connected, FastEthernet0/0
     209.165.100.0/30 is subnetted, 1 subnets
C       209.165.100.200 is directly connected, Serial0/0/0
S    209.165.210.0/24 [1/0] via 209.165.100.202

-----------------------------------------------------------------------------------------------------

Router 5

- 192.168.1.0 과의 연결을 위해 정적 라우팅 설정 -
Router(config)#ip route 192.168.1.0 255.255.255.0 209.165.100.201
Router(config)#exit
%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

S    192.168.1.0/24 [1/0] via 209.165.100.201
     209.165.100.0/30 is subnetted, 1 subnets
C       209.165.100.200 is directly connected, Serial0/0/0
C    209.165.210.0/24 is directly connected, FastEthernet0/0

- 서로의 연결 확인 -
Router#ping 192.168.1.20
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.20, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 78/87/94 ms



'CCNA 기초' 카테고리의 다른 글

IP Routing - example 2  (0) 2008.12.08
라우터에 원격 접속 - Telnet  (0) 2008.12.05
Overload NAT  (0) 2008.12.05
Dynamic NAT(Network Address Translation)  (0) 2008.12.05
Static NAT(Network Address Translation)  (0) 2008.12.05
ACL(Access List) - Extended Access List  (0) 2008.12.05