1. 라우터 설정

설명 Q1--> pc2는 pc1과 연결이 되어야한다 어떻게 설정을 해주면 좋을까? A1--> ip를 넣어준 후 , ping pc1 ip를 연결해본다 ip 192.168.0.1 255.255.255.0 192.168.0.254 ip 192.168.0.2 255.255.255.0 192.168.0.254 ping 192.168.0.1 (pc2에서) ping 192.168.0.2 (pc1에서) Q2--> 연결이 안되게 만들어라 A2--> 제일 쉬운 방법은 IP를 완전 다른걸 준다 예시로 2번째 PC에 IP를 192.168.1.2를 넣는다. (동네가 완전 틀려지는) 192.168을 같은 동네 0.1~ 0.254 까지 범위로 줄 수 있다. (0이 달라지면 no same subnet으로 오류다) Q3--> VLAN 2번으로 바꿔보아라 A3--> switch를 config하면 VLAN이 보인다 스위치 특징이 VLAN이다 VLAN은 다 1번으로 연결되어있는데 port 2 번을 2번으로 변경 Add - Apply 하면 같은 대역대를 쓰고 있어도 연결X pc1에서 ping 192.168.0.2를 해보면 host(192.168.0.2)not reachable 을 확인 할 수있다. >설명 pc1,2 연결 확인하기 ip 192.168.0.1 255.255.255.0 192.168.0.254 ip 192.168.0.2 255.255.255.0 192.168.0.254 ping 192.168.0.1 (pc2에서) ping 192.168.0.2 (pc1에서)

연결하기

설명 Q 1--> pc1 - 스위치 -라우터1 / R2 - 스위치2 - pc2를 각각 연결해보라 조건은 pc1은 192.168.0.0/24 192.168.0.254 이며 pc2는 192.168.0.0/24 192.168.0.254 이다 PC1> ip 192.168.0.1 255.255.255.0 192.168.0.254 Checking for duplicate address... PC1 : 192.168.0.1 255.255.255.0 gateway 192.168.0.254 PC2> ip 192.168.1.1 255.255.255.0 192.168.1.254 Checking for duplicate address... PC1 : 192.168.1.1 255.255.255.0 gateway 192.168.1.254 R1 명령어 config t interface FastEthernet0/0 ip address 192.168.0.254 255.255.255.0 no shutdown exit interface Serial1/0 ip address 1.1.1.1 255.255.255.252 no shutdown exit ip route 192.168.1.0 255.255.255.0 1.1.1.2 R2 명령어 config t interface FastEthernet0/0 ip address 192.168.1.254 255.255.255.252 no shutdown exit config t interface Serial1/0 ip address 1.1.1.2 255.255.255.252 no shutdown exit ip route 192.168.1.0 255.255.255.0 1.1.1.2

장비실습

설명

사진 적용 코드 <정답>
설명
설명 설명설명설명설명 [R1 한방설정] config t interface FastEthernet0/0 ip address 192.168.0.254 255.255.255.0 no shutdown exit interface Serial1/0 ip address 2.2.2.1 255.255.255.248 no shutdown exit ip route 192.168.1.0 255.255.255.0 2.2.2.2 exit [R2한방설정] config t interface FastEthernet0/0 ip address 192.168.1.254 255.255.255.0 no shutdown exit interface Serial1/0 ip address 2.2.2.2 255.255.255.248 no shutdown exit ip route 192.168.0.0 255.255.255.0 2.2.2.1 exit
하늘색 - 콘솔, 노란색 - 이더넷 1. 시리얼을 통해 접속한다. (Xshell에 접속한다) 2. enable 3. show ip interface brief 각자 다른 인터페이스를 확인 후 인터페이스 수정할 것 4. 라우터와 라우터에 연결된 테이블 (DTE, DCE)확인 후 DCE 구간에 clock rate 64000 적용 할 것 5. 랜케이블을 완성 후 PC에서 라우터에 접속되는지 확인 할 것 각각 맞는 선을 꽂은 후 , Router1부터 연결하여 -->??? 부분을 채워서 복사, 붙여넣기 (오타 적게하려면 복붙이 좋다) 실행시키면 (사진) 결과처럼 연결된 것을 확인 할 수있다. 첫 설정 화면시 no -> enter enable show ip interface brief 실행시킨다. 결과가 나오면 (??에 들어갈 번호를 확인 후 실행) config t interface FastEthernet ??? ip address 192.168.0.254 255.255.255.0 no shutdown exit interface Serial??? ip address 1.1.1.1 255.255.255.252 no shutdown exit ip route 192.168.1.0 255.255.255.0 1.1.1.2

RIP 동적 라우팅 설정

동적 라우팅은 설정은 쉽다 (정적 라우팅은 ip route 192.168.1.0 255.255.255.0 1.1.1.2 R2네트워크에 있는 것을 넣어줬다) 1.0은 1.2로 들어가라고 넣어준거다 동적 라우팅 RIP은 config t router rip version 2 (version1의 문제를 해결한, 기능 개선) -대부분은 version2로 설정해두고 한다,version1은 서브네팅 못하게 설정됨, 2점대 전부를 가지고 하는 것 network 192.168.0.0 netwokr 2.2.2.0 (그래서 직접 설정) show ip protocols show ip route ip [R1 동적 라우팅 설정] config t interface FastEthernet0/0 ip address 192.168.0.254 255.255.255.0 no shutdown exit interface Serial1/0 ip address 2.2.2.1 255.255.255.248 no shutdown exit route rip version 2 network 192.168.0.0 network 2.2.2.0 exit exit [R2 동적 라우팅 설정] config t interface FastEthernet0/0 ip address 192.168.1.254 255.255.255.0 no shutdown exit exit config t interface Serial1/0 ip address 2.2.2.2 255.255.255.248 no shutdown exit route rip version 2 network 192.168.1.0 network 2.2.2.0 exit exit show ip protocols show ip route

메모노트

DNS , 게이트웨이 게이트웨이는 라우터에 있는 0/0이다 (사용자, 관리자 ,설정모드) 설정모드에서 IP 설정해준다. 현장에서 직접 IP적는게 아니라 , 장비 이용해 보고 바꾼다. #2일차 라우터 설정 config t interface FastEthernet0/0 ip address 192.168.0.254 255.255.255.0 no shutdown Q1- pc2는 pc1과 연결이 되어야한다 어떻게 설정을 해주면 좋을까? A- ip를 넣어준 후 , ping pc1 ip를 연결해본다 ip 192.168.0.1 255.255.255.0 192.168.0.254 ip 192.168.0.2 255.255.255.0 192.168.0.254 ping 192.168.0.1 (pc2에서) ping 192.168.0.2 (pc1에서) Q- 연결이 안되게 만들어라 A- 제일 쉬운 방법은 IP를 완전 다른걸 준다 2번째 PC에 iP를 192.168.1.2 를 넣어본다 동네가 완전 틀려지는거라 생각해 192.168은 같은 동네 0.1 ~ 0.254 까지 범위로 줄 수 있다 (0이 달라지면 not same subnet으로 오류) PC2> ip 192.168.0.2 255.255.255.128 192.168.0.254 not same subnet (쪼개졌다.. 동네를 다르게 했다) ->0.254를 0.126로 하는게 좋다 (바꾸면 실행 가능) 254를 사용하는게 좋다 공유기 그대로 두고 서버 바꿀게 넘 많으니까 공유기 번호를 맞춰버리겠다 0.1 ~ 254 까지 마음대로 넣어라?? (충돌은 없게) not same subnt -> 게이트웨이 까지 보내면 해결 쪼개면 0이 아니라 14번 같이 나올 수도 있음 (게이트웨이 마지막 번호가) Q- 같은 대역대로 만들고 A- switch를 config하면 VLAN이 보인다 스위치 특징이 VLAN이다 VLAN은 다 1번으로 연결되어있는데 Q- VLAN 2번으로 바꿔보아라 A- port 2 번을 2번으로 변경 Add - Apply 하면 같은 대역대를 쓰고 있어도 연결X pc1에서 ping 192.168.0.2를 해보면 host(192.168.0.2)not reachable 을 확인 할 수있다. pc1 - 스위치 -라우터1 / R2 - 스위치2 - pc2를 각각 연결해보라 조건은 pc1은 192.168.0.0/24 192.168.0.254 이며 pc2는 192.168.0.0/24 192.168.0.254 이다 PC1> ip 192.168.0.1 255.255.255.0 192.168.0.254 Checking for duplicate address... PC1 : 192.168.0.1 255.255.255.0 gateway 192.168.0.254 PC2> ip 192.168.1.1 255.255.255.0 192.168.1.254 Checking for duplicate address... PC1 : 192.168.1.1 255.255.255.0 gateway 192.168.1.254 R1#config t Enter configuration command s, one per line. End with CNTL/Z. R1(config)#interface FastEt hernet % Incomplete command. R1(config)#interface FastEthernet0/0 R1(config-if)#ip address 192.168.1.254 255.255.255.0 R1(config-if)#no shutdown R1(config-if)# *Jun 24 10:49:14.031: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up R1(config-if)# *Jun 24 10:49:14.031: %ENTITY_ALARM-6-INFO: CLEAR INFO Fa0/0 Physical Port Administrative State Down *Jun 24 10:49:15.031: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up R1(config-if)# R2#config t Enter configuration commands, one per line. End with CNTL/Z. R2(config)#interface FastEthernet0/[~ ^ % Invalid input detected at '^' marker. R2(config)#interface FastEthernet0/0 R2(config-if)#ip address 192.168.0.254 255.255.255.0 R2(config-if)#no shutdown R2(config-if)# R2(config-if)# *Jun 24 10:50:05.859: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up R2(config-if)# *Jun 24 10:50:05.859: %ENTITY_ALARM-6-INFO: CLEAR INFO Fa0/0 Physical Port Administrative State Down *Jun 24 10:50:06.859: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up Q - pc1에서 pc2를 연결해라 A - config t interface FastEthernet0/0 ip address 192.168.0.254 255.255.255.0 no shutdown config t interface Serial1/0 ip address 1.1.1.? 255.255.255.? no shutdown config t interface Serial1/0 ip address 1.1.1.2 no shutdown -> 답이 하나만 있는게 아니다 30이니까 4개씩 한동네에 4명씩 산다 0~3 4~7 8~11 여러개중 하나만 골라서 넣으면된다 . R1을 작은번호, R2큰 번호로 아무범위에서 사용하면 된다. R1에는 1번, R2에는 2번을 넣어준 후 exit 두번 실행 후 빠져나와 show ip interface brief를 봐주면 IP 주소가 설정된것을 확인 할 수 있다. R1(config-if)#ip address 1.1.1.1 255.255.255.252 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#exit R1#sh *Jun 24 11:09:01.723: %SYS-5-CONFIG_I: Configured from console by console R1#show ip interface brief Interface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.1.254 YES manual up up Serial1/0 1.1.1.1 YES manual up up Serial1/1 unassigned YES unset administratively down down Serial1/2 unassigned YES unset administratively down down Serial1/3 unassigned YES unset administratively down down R2(config)#interface serial1/0 R2(config-if)#ip address 1.1.1.2 255.255.255.252 R2(config-if)#no shutdown R2(config-if)#exit R2(config)#exit R2#show ip *Jun 24 11:08:45.367: %SYS-5-CONFIG_I: Configured from console by console R2#show ip interface brief Interface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.0.254 YES manual up up Serial1/0 1.1.1.2 YES manual up up Serial1/1 unassigned YES unset administratively down down Serial1/2 unassigned YES unset administratively down down Serial1/3 unassigned YES unset administratively down down [R1 한방설정] config t interface FastEthernet0/0 ip address 192.168.0.254 255.255.255.0 no shutdown exit interface Serial1/0 ip address 1.1.1.1 255.255.255.252 exit ip route 192.168.1.0 255.255.255.0 1.1.1.2 [R2 한방설정] config t interface FastEthernet0/0 ip address 192.168.1.254 255.255.255.0 no shutdown exit interface Serial1/0 ip address 1.1.1.2 255.255.255.252 exit ip route 192.168.0.0 255.255.255.0 1.1.1.1 이렇게 설정 하여, 라우터두개 이은부분과 라우터에서 스위치2가는 부분의 와이어샤크를 보면 icmp가 뜨는 걸 확인할 수 있다. 정적라우팅 config t interface FastEthernet 0/0 ip address 192.168.0.254 255.255.255.0 no shutdown exit interface Serial1/0 ip address 1.1.1.1 255.255.255.252 no shutdown exit ip r oute 192.168.1.0 255.255.255.0 1.1.1.2 하늘색 콘솔 , 노란색 이더넷 #장비실습 1. 시리얼을 통해 접속한다. 2. enable 3. show ip interface brief 각자 다른 인터페이스를 확인 후 인터페이스 수정할 것 4. 라우터와 라우터에 연결된 테이블 (DTE, DCE)확인 후 DCE 구간에 clock rate 64000 적용 할 것 5. 랜케이블을 완성 후 PC에서 라우터에 접속되는지 확인 할 것 각각 맞는 선을 꽂은 후 , Router1부터 연결하여 첫 설정 화면시 no -> enter enable show ip interface brief 실행시킨다. 결과가 나오면 config t interface FastEthernet ??? ip address 192.168.0.254 255.255.255.0 no shutdown exit interface Serial??? ip address 1.1.1.1 255.255.255.252 no shutdown exit ip r oute 192.168.1.0 255.255.255.0 1.1.1.2 ??? 부분을 채워서 복사, 붙여넣기 (오타 적게하려면 복붙이 좋다) 실행시키면 (사진) 결과처럼 연결된 것을 확인 할 수있다. 3 [R1 한방설정] config t interface FastEthernet0/0 ip address 192.168.0.254 255.255.255.0 no shutdown exit interface Serial1/0 ip address 2.2.2.1 255.255.255.254 exit ip route 192.168.1.0 255.255.255.0 2.2.2.2 [R2 한방설정] config t interface FastEthernet0/0 ip address 192.168.1.254 255.255.255.0 no shutdown exit interface Serial1/0 ip address 2.2.2.2 255.255.255.254 exit ip route 192.168.0.1 255.255.255.0 2.2.2.1 <정답> [R1 한방설정] R1#config t Enter configuration commands, one per line. End with CNTL/Z. R1(config)#interface FastEthernet0/0 R1(config-if)#ip address 192.168.0.254 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#exit R1#config *Jun 24 15:53:04.435: %SYS-5-CONFIG_I: Configured from console by console R1#config t Enter configuration commands, one per line. End with CNTL/Z. R1(config)#interface Serial1/0 R1(config-if)#ip address 2.2.2.1 255.255.255.248 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#ip route 192.168.1.0 255.255.255.0 2.2.2.2 R1(config)#exit R1#show *Jun 24 15:53:31.859: %SYS-5-CONFIG_I: Configured from console by console R1#show ip interface brief Interface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.0.254 YES manual up up Serial1/0 2.2.2.1 YES manual up up Serial1/1 unassigned YES unset administratively down down Serial1/2 unassigned YES unset administratively down down Serial1/3 unassigned YES unset administratively down down R1# R2한방설정 R2#config t Enter configuration commands, one per line. End with CNTL/Z. R2(config)#interface FastEthernet0/0 R2(config-if)#ip address 192.168.1.254 255.255.255.0 R2(config-if)#no shutdown R2(config-if)#exit R2(config)#interface Serial1/0 R2(config-if)#ip address 2.2.2.2 255.255.255.248 R2(config-if)#no shutdown R2(config-if)#exit R2(config)#ip route 192.168.0.0 255.255.255.0 2.2.2.1 R2(config)#exit R2#show *Jun 24 15:53:30.203: %SYS-5-CONFIG_I: Configured from console by console R2#show ip interface brief Interface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.1.254 YES manual up up Serial1/0 2.2.2.2 YES manual up up Serial1/1 unassigned YES unset administratively down down Serial1/2 unassigned YES unset administratively down down Serial1/3 unassigned YES unset administratively down down R2# 정답 실행하며 , 와이어샤크로 확인해보면 핑크줄이 나오며 PC2> ping 192.168.0.1 192.168.0.1 icmp_seq=1 timeout 192.168.0.1 icmp_seq=2 timeout 84 bytes from 192.168.0.1 icmp_seq=3 ttl=62 time=63.285 ms 84 bytes from 192.168.0.1 icmp_seq=4 ttl=62 time=62.317 ms 84 bytes from 192.168.0.1 icmp_seq=5 ttl=62 time=61.760 ms # RIP 홉 수 라우터 몇번 거쳐가는지 수를 알려준다 패킷을 없애버린다 ..? 동적 라우팅이기에 알아서 데이터 주고받는다 , 변화 없어도 30초마다 알려준다 라우터 만개 정도일때 만개 작동 동시에 작동을 해야하는데 대규모 네트워크에서는 계속 30초마다 알려주기에 불필요함 (소규모에서는 쓸만하다) 동적 라우팅은 설정은 쉽다 (정적 라우팅은 ip route 192.168.1.0 255.255.255.0 1.1.1.2 R2네트워크에 있는 것을 넣어줬다) 1.0은 1.2로 들어가라고 넣어준거다 동적 라우팅 RIP은 config t router rip version 2 (version1의 문제를 해결한, 기능 개선) -대부분은 version2로 설정해두고 한다,version1은 서브네팅 못하게 설정됨, 2점대 전부를 가지고 하는 것 network 192.168.0.0 netwokr 2.2.2.0 (그래서 직접 설정) show ip protocols show ip route ip [R1 동적 라우팅 설정] config t interface FastEthernet0/0 ip address 192.168.0.254 255.255.255.0 no shutdown exit interface Serial1/0 ip address 2.2.2.1 255.255.255.248 no shutdown exit route rip version 2 network 192.168.0.0 network 2.2.2.0 exit exit [R2 동적 라우팅 설정] config t interface FastEthernet0/0 ip address 192.168.1.254 255.255.255.0 no shutdown exit exit config t interface Serial1/0 ip address 2.2.2.2 255.255.255.248 no shutdown exit route rip version 2 network 192.168.1.0 network 2.2.2.0 exit exit show ip protocols show ip route ----------------------------------------------- vritual box접속하면 WinServer2022가 있다. 직접 켜지말고 GNS3에 직접 가져와야한다 (항상 전원 꺼짐 상태이여야하며, GNS3가 키는 거다) vms - new list에서 windoow를 고른다 edit network창에서 allow GNS3무조건 체크 pc2대신에 WinServer 2022-1을 연결하여 start -> VirtualBox 실행된다. TCP/IP , UDP/IP 등등 해야함(서비스) end divice끝에는 서버..?(네이버, 구글등) 끝에 서버없으면 실습 못함 윈도우 암호 p@ssw0rd!@123 [R1 한방 설정(OSPF)] config t interface FastEthernet0/0 ip address 192.168.0.254 255.255.255.0 no shutdown exit interface Serial1/0 ip address 3.3.3.1 255.255.255.128 no shutdown exit route rip version 2 network 192.168.0.0 network 2.2.2.0 exit exit [R2 한방 설정(OSPF)] config t interface FastEthernet0/0 ip address 192.168.1.254 255.255.255.0 no shutdown exit exit config t interface Serial1/0 ip address 3.3.3.1 255.255.255.128 no shutdown exit route rip version 2 network 192.168.1.0 network 3.3.3.1 255.255.255.128 exit exit cmd에서 -ping 192.168.1.254 -n 100000