관리 메뉴

개발 노트

14주차 Subnetting_Examples_OSPF 본문

학부 공부 : 21.03.02~06.20/인터넷 이론 및 실습

14주차 Subnetting_Examples_OSPF

hayoung.dev 2021. 6. 5. 04:19

switch 0

Switch>enable
Switch#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#ip routing
Switch(config)#int g
Switch(config)#int gigabitEthernet i
Switch(config)#int gigabitEthernet 1/0/1
Switch(config-if)#ip address 211.114.122.5 255.255.255.252
                      ^
% Invalid input detected at '^' marker.
	
Switch(config-if)#no s
Switch(config-if)#no swi
Switch(config-if)#no switchport 
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/1, changed state to up

Switch(config-if)#ip address 211.114.122.5 255.255.255.252
Switch(config-if)#int g
Switch(config-if)#int gigabitEthernet 1/0/2
Switch(config-if)#no switchport 
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/2, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/2, changed state to up

Switch(config-if)#ip address 211.114.122.21 255.255.255.252
Switch(config-if)#int gigabitEthernet 1/0/3
Switch(config-if)#no switchport 
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/3, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/3, changed state to up

Switch(config-if)#ip address 211.114.122.17 255.255.255.252
Switch(config-if)#exit
Switch(config)#router ospf 1
Switch(config-router)#network 211.114.122.4 0.0.0.3 area 0
Switch(config-router)#network 211.114.122.20 0.0.0.3 area 2
Switch(config-router)#network 211.114.122.16 0.0.0.3 area 1
Switch(config-router)#^Z
Switch#
%SYS-5-CONFIG_I: Configured from console by console

Switch#show run
Building configuration...

Current configuration : 1761 bytes
!
version 16.3.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
!
!
!
!
no ip cef
ip routing
!
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet1/0/1
 no switchport
 ip address 211.114.122.5 255.255.255.252
 duplex auto
 speed auto
!
interface GigabitEthernet1/0/2
 no switchport
 ip address 211.114.122.21 255.255.255.252
 duplex auto
 speed auto
!
interface GigabitEthernet1/0/3
 no switchport
 ip address 211.114.122.17 255.255.255.252
 duplex auto
 speed auto
!
interface GigabitEthernet1/0/4
!
interface GigabitEthernet1/0/5
!
interface GigabitEthernet1/0/6
!
interface GigabitEthernet1/0/7
!
interface GigabitEthernet1/0/8
!
interface GigabitEthernet1/0/9
!
interface GigabitEthernet1/0/10
!
interface GigabitEthernet1/0/11
!
interface GigabitEthernet1/0/12
!
interface GigabitEthernet1/0/13
!
interface GigabitEthernet1/0/14
!
interface GigabitEthernet1/0/15
!
interface GigabitEthernet1/0/16
!
interface GigabitEthernet1/0/17
!
interface GigabitEthernet1/0/18
!
interface GigabitEthernet1/0/19
!
interface GigabitEthernet1/0/20
!
interface GigabitEthernet1/0/21
!
interface GigabitEthernet1/0/22
!
interface GigabitEthernet1/0/23
!
interface GigabitEthernet1/0/24
!
interface GigabitEthernet1/1/1
!
interface GigabitEthernet1/1/2
!
interface GigabitEthernet1/1/3
!
interface GigabitEthernet1/1/4
!
interface Vlan1
 no ip address
 shutdown
!
router ospf 1
 log-adjacency-changes
 network 211.114.122.4 0.0.0.3 area 0
 network 211.114.122.20 0.0.0.3 area 2
 network 211.114.122.16 0.0.0.3 area 1
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
!
end

 

switch 1

Switch>enable
Switch#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#ip routing
Switch(config)#int g
Switch(config)#int gigabitEthernet 1/0/1
Switch(config-if)#no sw
Switch(config-if)#no switchport 
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/1, changed state to up

Switch(config-if)#ip address 211.114.122.9 255.255.255.252
Switch(config-if)#int gigabitEthernet 1/0/2
Switch(config-if)#no switchport 
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/2, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/2, changed state to up

Switch(config-if)#ip address 211.114.122.10 255.255.255.252
% 211.114.122.8 overlaps with GigabitEthernet1/0/1
Switch(config-if)#ip address 211.114.122.18 255.255.255.252
Switch(config-if)#int gigabitEthernet 1/0/3
Switch(config-if)#no switchport 
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/3, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/3, changed state to up

Switch(config-if)#ip address 211.114.122.25 255.255.255.252
Switch(config-if)#exit
Switch(config)#router ospf 1
Switch(config-router)#network 211.114.122.8 0.0.0.3 area 1
Switch(config-router)#network 211.114.122.16 0.0.0.3 area 1
Switch(config-router)#network 211.114.122.
00:11:05: %OSPF-5-ADJCHG: Process 1, Nbr 211.114.122.21 on GigabitEthernet1/0/2 from LOADING tonetwork 211.114.122.2
% Incomplete command.
Switch(config-router)#network 211.114.122.2
% Incomplete command.
Switch(config-router)#network 211.114.122.24 0.0.0.3 area 1
Switch(config-router)#show run
                      ^
% Invalid input detected at '^' marker.
	
Switch(config-router)#exit
Switch(config)#show run
                ^
% Invalid input detected at '^' marker.
	
Switch(config)#^Z
Switch#
%SYS-5-CONFIG_I: Configured from console by console

 

show run 결과

 

switch 2

Switch>enable
Switch#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#ip routing
Switch(config)#int g
Switch(config)#int gigabitEthernet 1/0/1
Switch(config-if)#no sw
Switch(config-if)#no switchport 
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/1, changed state to up

Switch(config-if)#ip address 211.114.122.13 255.255.255.252
Switch(config-if)#int gigabitEthernet 1/0/2
Switch(config-if)#no switchport 
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/2, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/2, changed state to up

Switch(config-if)#ip address 211.114.122.26 255.255.255.252
Switch(config-if)#int gigabitEthernet 1/0/3
Switch(config-if)#no switchport 
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/3, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/3, changed state to up

Switch(config-if)#ip address 211.114.122.22 255.255.255.252
Switch(config-if)#exit
Switch(config)#router ospf 1
Switch(config-router)#network 211.114.122.12 0.0.0.3 area 2
Switch(config-router)#network 211.114.122.20 0.0.0.3 area 2
Switch(config-router)#network 211.114.122.24 
00:17:38: %OSPF-5-ADJCHG: Process 1, Nbr 211.114.122.21 on GigabitEthernet1/0/3 from LOADING to FULL, Loading Done
0.0.0.3 area 2
Switch(config-router)#^Z
Switch#
%SYS-5-CONFIG_I: Configured from console by console

 

 

show run 결과

show ip route 결과

6개의 서브넷 라우팅이 올라온 것을 볼 수 있음

반응형