4일차
라우터 2 설정 config t hostname jjcom2 interface fastethernet0/0 ip address 192.168.2.254 255.255.255.0 no shutdown exit interface fastethernet0/0.2 encapsulation dot1q 2 ip address 192.168.0.254 255.255.255.0 no shutdown exit interface serial 1/0 ip address 1.1.1.37 255.255.255.252 no shutdown exit 한라우터에 연결되어 있을 경우 interface fastethernet0/0.2 형식으로 사용하여 서브 ip를 만들면 됨 하지만 라우터가 두개로 연결되어있을경우 다른 두 라우터가 연결되야 서로 통신을 할수 있다. 1.1.1.0/30 0000 0000 -> 24 1 1000 0000 -> 25 2 1100 0000 -> 26 4 1110 0000 -> 27 8 1111 0000 -> 28 16 1111 1000 -> 29 32 1111 1100 -> 30 64 1111 1110 -> 31 128 1111 1111 -> 32 256 10번째 네트워크를 찾기 1.1.1.4 4 4 4 4 0-3 1번째 4-7 2번째 8-11 3번째 12-15 4번째 16-19 5번째 20-23 6번째 24-27 7번째 28-31 8번째 32-35 9번째 36-39 10번째 37 38 0 0 0 0 0 0 0 0 256 128 64 32 16 8 4 2 라우터의 연결(라우팅 테이블) ip route 192.168.2.0 255.255.255.0 1.1.1.38 반대쪽 ip route 192.168.0.0 255.255.255.0 1.1.1.37 연결후 통신 PC1> ping 192.168.2.1 84 bytes from 192.168.2.1 icmp_seq=1 ttl=62 time=40.498 ms 84 bytes from 192.168.2.1 icmp_seq=2 ttl=62 time=37.647 ms 84 bytes from 192.168.2.1 icmp_seq=3 ttl=62 time=36.678 ms 84 bytes from 192.168.2.1 icmp_seq=4 ttl=62 time=37.662 ms 84 bytes from 192.168.2.1 icmp_seq=5 ttl=62 time=36.603 ms 라우팅 방식 2가지 (동적 라우팅, 정적라우팅) 정적 라우팅 일일이 라우터에 아이피를 지정해서 연결해줘야 한다ex.[R2] config t interface serial1/0 ip address 1.1.1.2 255.255.255.252 no shutdown exit interface serial1/1 ip address 2.2.2.1 255.255.255.252 no shutdown exit ip route 192.168.1.0 255.255.255.0 2.2.2.2 ip route 168.0.0 255.255.255.0 1.1.1.1 동적 라우팅 일일이 ip를 지정하지않고 해당 네트워크 대역에 있으면 연결할수있게 해준다.
[R1] config t hostname R1 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 router rip version2 network 192.168.0.0 network 1.1.1.0 거리벡터 라우팅 프로토콜 RIP1 RIP2 링크 상태 라우팅 프로토콜 OSPF - 중대규모 네트워크에 가장 많이 사용됨 - 라우팅 정보 업데이트 224.0.0.5와 224.0.0.6이 멀티캐스트 - 프로토콜 번호 89번 사용 - 경로 상태에 변화가 생기면 변화된 부분만 업데이트 진행 - 업데이트할 내용이 없더라도 30초 간격으로 링크 상태 업데이트