본문 바로가기

CCNA 기초

IP Routing - Static routing & router0, 1




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 ### R1 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)#end
%SYS-5-CONFIG_I: Configured from console by console

Router#show ip int brief
Interface              IP-Address      OK? Method Status                Protocol
 
FastEthernet0/0        10.1.12.1       YES manual up                    up
 
FastEthernet0/1        10.1.1.1        YES manual up                    up
 
Vlan1                  unassigned      YES manual administratively down down
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
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 R1
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)#end
%SYS-5-CONFIG_I: Configured from console by console

Router#show ip int brief
Interface              IP-Address      OK? Method Status                Protocol
 
FastEthernet0/0        10.1.12.2       YES manual up                    up
 
FastEthernet0/1        10.1.2.1        YES manual up                    up
 
Vlan1                  unassigned      YES manual administratively down down
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
C       10.1.12.0 is directly connected, FastEthernet0/0


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

설정 확인

Router 0 에서 ping확인

Router#ping 10.1.2.1


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 7/8/9 ms

Router 1 에서 ping확인
Router#ping 10.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 7/10/19 ms

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

- 참고

IP route를 입력해주지않으면 통신이 되지 않는다. 그 이유는 아래의 Layer영역에서 Layer 2,1 영역에 대한 정보가 없기 때문인데

IP route를 해주면 아래와 같이 경로가 추가 되기 때문에 통신이 가능해진다.







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

IP Routing - default rounting  (0) 2008.12.02
IP Routing - Static routing  (0) 2008.12.02
IP Routing - Static routing & router0, 1, 2  (0) 2008.12.01
VTP 설정하기  (0) 2008.12.01
VLAN과 Trunk 기본 설정  (0) 2008.12.01
CCNA 기초 - L2 이더 채널 설정 및 확인  (0) 2008.11.30