본문 바로가기

네트워크 공부

2월 신입 집체교육 - 1일차 (2)

Stream: 응용 프로그램 단위 단위 데이터의 흐름

TCP : 스트리밍을 Segmentation해서 segment 만듦. ip packet 단위로 쪼갬 (1500byte)
IP : Packet
L2 : Frame


Rouging protocol
-Static
-Dynamic
Routing table에서 C는 Connected, L은 Local 이 두개 다 routing protocol이라 할 수 있다.




Static Routing 실습 LAB

직접 connect된 네트워크 대역 빼고 다 명시해줘야 함.
router 2,3,4,5 쪽은 ISP라 치고 실습
끝 단 라우터는 고객이라 치겠음




<R1>

interface Loopback0
ip address 1.1.1.1 255.255.255.255
interface Ethernet0/0
 ip address 1.1.12.1 255.255.255.0
 ip route 0.0.0.0 0.0.0.0 1.1.12.2


<R2>

interface Loopback0
 ip address 2.2.2.2 255.255.255.255
interface Ethernet0/0
 ip address 1.1.12.2 255.255.255.0
interface Ethernet0/1
 ip address 1.1.23.2 255.255.255.0
interface Ethernet0/2
 ip address 1.1.24.2 255.255.255.0
 ip route 1.1.35.0 255.255.255.0 1.1.23.3
ip route 1.1.45.0 255.255.255.0 1.1.24.4
ip route 1.1.56.0 255.255.255.0 1.1.23.3
ip route 1.1.56.0 255.255.255.0 1.1.24.4

<R3>

interface Loopback0
 ip address 3.3.3.3 255.255.255.255
interface Ethernet0/0
 ip address 1.1.23.3 255.255.255.0
interface Ethernet0/1
 ip address 1.1.35.3 255.255.255.0
 ip route 1.1.12.0 255.255.255.0 1.1.23.2
ip route 1.1.56.0 255.255.255.0 1.1.35.5

<R4>

interface Loopback0
 ip address 4.4.4.4 255.255.255.255
interface Ethernet0/0
 ip address 1.1.24.4 255.255.255.0
interface Ethernet0/1
 ip address 1.1.45.4 255.255.255.0
 ip route 1.1.12.0 255.255.255.0 1.1.24.2
ip route 1.1.56.0 255.255.255.0 1.1.45.5

<R5>

interface Loopback0
 ip address 5.5.5.5 255.255.255.255
interface Ethernet0/0
 ip address 1.1.35.5 255.255.255.0
interface Ethernet0/1
 ip address 1.1.45.5 255.255.255.0
interface Ethernet0/2
 ip address 1.1.56.5 255.255.255.0
 ip route 1.1.12.0 255.255.255.0 1.1.45.4
ip route 1.1.12.0 255.255.255.0 1.1.35.3
ip route 1.1.23.0 255.255.255.0 1.1.35.3
ip route 1.1.24.0 255.255.255.0 1.1.45.4

<R6>

interface Loopback0
 ip address 6.6.6.6 255.255.255.255
interface Ethernet0/0
 ip address 1.1.56.6 255.255.255.0
 ip route 1.1.35.0 255.255.255.0 1.1.56.5
ip route 1.1.45.0 255.255.255.0 1.1.56.5


루프백도 다 static route 해줬는데 귀찮아서 생략함
뭔가 안된다 싶을 땐

show ip route 해서 라우팅 테이블 확인하기.
빠진 대역 없는지, 다 같은 라우팅 테이블을 갖고 있는지 !!



1) R2에서 R5로 보낼 땐 longest match 조정
2) R2->R6 AD 값 조정 해보기
값 조정해서 윗쪽(?)으로만 패킷이 흐르는 지 확인



R2 맨 처음 라우팅 테이블

AD 값 조정 후 ( ip route 6.6.6.6 255.255.255.255 1.1.24.4 10)

위로만 흐르는 것을 확인..

위에 라인 절체시켰을 때

후 순위 route인 아래쪽으로 루트 통해 흐르는 것 확인 가능





longest match를 이용한 floating static route 조정 위해
ip route 5.5.5.0 255.255.255.0 1.1.24.4 (아래 1.1.24.4 서브넷을 1.1.23.3/32 보다 낮게 24bit로) 설정

이렇게 설정하면 5.5.5.5로 R2에서 ping 했을 때 longest match 값이 높은 쪽인 1.1.23.3로 흐르고, 그 포트를 절체 시엔 1.1.24.4로 흐르는 것을 확인해보면 된다.

절체 시에도 후순위 루트로 통신이 잘 되는 것을 확인했음