겉바속촉

[보안] Static, Dynamic 연습 (feat.router 4개) 본문

IT 일기 (상반기)/네트워크 및 시스템 보안

[보안] Static, Dynamic 연습 (feat.router 4개)

겉바속촉 2021. 1. 25. 03:46
728x90
반응형

 

 

Static

 

Router(config)#ip route [목적지네트워크] [서브넷마스크] [보낼곳]

 

해당 네트워크 대역의 통신을 어느 인터페이스에 보낼지 등록

맨 뒤 값은 라우터의 ip로 변경 가능.

 

EX> Router(config)#ip route 192.168.10.0 255.255.255.0 fastEthernet 0/0

      

 

 

 

Dynamic

 

Router(config)#route rip

Router(config-router)#network 192.168.10.0

Router(config-router)#network 192.168.20.0

 

내가 알고있는 네트워크를 적어 네트워크 대역을 옆에 알려주는 것.

 

 

 

 


 

 

 

Static 실습

 

 

준비물 : router 4개, pc 2개

 

 

그리고 다음과 같이 주소를 할당해줄 예정입니다.

 

 

 

 

 

pc설정

 

왼쪽 pc

 

 

오른쪽 pc

 

 

 

 

router 설정

 

첫번째 router ip

 

저의 Router1을 보면 Fa0/0, Fa0/1 순서대로 연결해줄 예정입니다.

0/0 --> 10.1이랑 연결

0/1 --> 20.1이랑 연결

 

 

Router(config)#int
Router(config)#interface f
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.10.1 255.255.255.0
Router(config-if)#no shut
Router(config-if)#exit
Router(config)#
Router(config)#interface f
Router(config)#interface fastEthernet 0/1
Router(config-if)#ip address 192.168.20.1 255.255.255.0
Router(config-if)#no shut

Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

Router(config-if)#exit

 

do show run 명령으로 연결된 것 확인

 

 

 

 

 

첫번째 router static라우팅 설정

 

Router(config)#ip route 192.168.50.0 255.255.255.0 192.168.20.2

 

 

 

 

두번째 router ip 설정

 

 

저의 Router2를 보면 Fa0/0, Fa0/1 순서대로 연결해줄 예정입니다.

0/0 --> 20.2이랑 연결

0/1 --> 30.1이랑 연결

 

 

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#
Router(config)#inte
Router(config)#interface fa
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.20.2 255.255.255.0
Router(config-if)#no shut

Router(config-if)#
%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)#
Router(config)#int
Router(config)#interface fa
Router(config)#interface fastEthernet 0/1
Router(config-if)#ip address 192.168.30.1 255.255.255.0
Router(config-if)#no sh

Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

Router(config-if)#exit

 

 

연결 확인

 

 

두번째 router static라우팅 설정

Router(config)#ip route 192.169.10.0 255.255.255.0 192.168.20.1
Router(config)#ip route 192.169.50.0 255.255.255.0 192.168.30.2

 

 

 

 

 

세번째 router ip 설정

 

저의 Router3를 보면 Fa0/0, Fa0/1 순서대로 연결해줄 예정입니다.

0/0 --> 30.2이랑 연결

0/1 --> 40.1이랑 연결

 

 

 

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#
Router(config)#interfa
Router(config)#interface fa
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.30.2 255.255.255.0
Router(config-if)#no sh

Router(config-if)#
%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)#
Router(config)#inte
Router(config)#interface f
Router(config)#interface fastEthernet 0/1
Router(config-if)#ip address 192.168.40.1 255.255.255.0
Router(config-if)#no sh

Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

Router(config-if)#exit

 

연결 확인

 

 

 

세번째 router static라우팅 설정

 

Router(config)#ip route 192.168.10.0 255.255.255.0 192.168.30.1
Router(config)#ip route 192.168.50.0 255.255.255.0 192.168.40.2

 

 

 

네번째 router ip 설정

 

 

저의 Router4를 보면 Fa0/0, Fa0/1 순서대로 연결해줄 예정입니다.

0/0 --> 40.2이랑 연결

0/1 --> 50.1이랑 연결

 

 

 

Router>en
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#
Router(config)#in
Router(config)#interface f
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.40.2 255.255.255.0
Router(config-if)#no shut

Router(config-if)#
%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)#
Router(config)#int
Router(config)#interface f
Router(config)#interface fastEthernet 0/1
Router(config-if)#ip address 192.168.50.1 255.255.255.0
Router(config-if)#no shut

Router(config-if)#
%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 static라우팅 설정

Router(config)#ip route 192.168.10.0 255.255.255.0 192.168.40.1

 

 

 

PC에서 Ping 테스트

 

 

왼쪽 pc -> 오른쪽 pc

 

오른쪽 pc -> 왼쪽 pc

 

 

 

 

 

 

728x90
반응형