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
동적 라우팅은 설정은 쉽다
(정적 라우팅은 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
사진 적용 코드
<정답>
[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 동적 라우팅 설정