Presentation is loading. Please wait.

Presentation is loading. Please wait.

7장. OSPF 중부대학교 정보보호학과 이병천 교수.

Similar presentations


Presentation on theme: "7장. OSPF 중부대학교 정보보호학과 이병천 교수."— Presentation transcript:

1 7장. OSPF 중부대학교 정보보호학과 이병천 교수

2 OSPF란? OSPF 특징 Open Shortest Path First 프로토콜 RFC 2328 표준에 정의
계층화된 라우팅 동작 수행 중대규모 네트워크에 가장 많이 사용되는 프로토콜 멀티캐스트 주소 이용하여 라우팅 정보 업데이트 , 프로토콜 번호 89번 이용 경로 상태에 변화가 생기면 변화된 부분만 업데이트 업데이트할 내용이 없더라도 30분 간격으로 라우팅 업데 이트 정보를 교환 – 링크상태재생(Link-State Refresh)

3 OSPF란? 특징 OSPF에서는 모든 라우터가 동일한 네트워크 토폴로지 데이터베이스를 기반으로 경로를 계산하기 때문에 라 우팅 루프가 발생하지 않는다. 네트워크 변화 시에만 라우팅 정보를 전송하기 때문에 라우팅 트래픽의 양을 줄일 수 있다. 플러딩을 통해 데이터베이스 갱신 속도를 높일 수 있게 되었다. 플러딩이란 갱신 정보를 인접 라우터로 전송하 고, 인접 라우터는 다시 자신의 인접 라우터로 갱신 정 보를 즉시 전달하여 갱신 정보가 네트워크 전역으로 신 속하게 전달되는 과정을 말한다.

4 OSPF란? 특징 라우팅 결정을 위한 메트릭 비교
링크 상태 라우팅 프로토콜: 목적지까지의 비용(cost)이 가장 적게 소요되는 경로를 최적의 경로로 설정 최단경로우선 알고리즘(Dijkstra 알고리즘) 이용 (152~155쪽 참조) 라우팅 결정을 위한 메트릭 비교 RIP: 홉 수 EIGRP: 대역폭, 지연값 OSPF: 링크의 비용 (정해진 기준 대역폭을 실제 대역폭으 로 나눈 값)

5 최단 경로 찾기

6 OSPF의 패킷 유형 5가지 패킷 유형을 사용

7 OSPF 패킷 헤더 포맷 OSPF의 인증 유형 AuType 0 : 인증 사용하지 않음

8 OSPF 패킷 분석 Hello packet

9 OSPF 패킷 분석 LS Update LS Acknowledgement

10 OSPF의 동작 헬로우 프로토콜을 통해 인접 라우터를 식별, 발견한다.
인접 라우터간의 초기화 과정이 끝나면 경로 정보 데이 터베이스 동기화 과정을 수행하며 이를 데이터베이스 교환 과정(Database Exchange Process)이라 한다. 현 재 링크 상태의 개략적인 내용을 데이터베이스 기술 패 킷(Database Description Packet)에 실어 전송한다. 인접 라우터 간의 동기화 과정이 끝난 이후에는 링크 상태에 변화가 있을 때에만 메트릭 값과 링크 속성에 대한 정보를 전송한다. 이 과정을 링크 상태 광고(LSA: Link State Advertisements)라고 한다.

11 LSA의 종류 Link-State Advertisement LSA의 종류 내용
대표 라우터가 전송하는 LSA를 네트워크 LSA라 하며, 범위는 영역 내로 제한된다. 요약 링크 LSA 영역 경계 라우터가 영역간의 경로 정보 전달을 위해 생성된다. AS 외부 링크 LSA AS 경계 라우터에 의해 생성되며 다른 AS의 경로에 대한 정보를 전송한다.

12 OSPF의 계층 구조 백본영역 Area 0 일반영역

13 OSPF의 계층 구조 계층구조란? 백본 영역, 일반 영역의 2계층 구조로 나눔
OSPF는 AS 내에서 계층적 라우팅을 수행하기 위해 AS를 다 수의 영역(Area)으로 나누고 각 영역은 독립적으로 OSPF를 수행한다. 라우터의 브로드캐스팅은 영역 내로 제한되어 있어 영역 외 부로는 라우팅 정보 패킷이 전달되지 않는다. 영역간의 정보 전달은 오직 영역 경계 라우터(Area Border Router)를 통해서만 수행된다. OSPF 상위 계층 영역을 백본 영역(Backbone Area)이라 하 며 백본 영역은 모든 영역 경계 라우터와 그 외 영역을 가지 지 않는 라우터들로 구성된다. 백본 영역에서는 영역 간의 라우팅 정보 전달이 이루어진다.

14 OSPF의 계층 구조 장점 패킷 플러딩 범위를 영역 내로 줄여서 데이터베이스를 줄 이고 빠른 SPF(Shortest Path First) 알고리즘 수행이 가 능 전체 네트워크에 대한 유지, 관리, 확장이 용이 하나의 영역에 50~100개 정도의 라우터 이용

15 네이버 맺기 OSPF는 헬로우 패킷을 인접 라우터에 보내 네이버 (neighbor) 관계를 맺는다.
네이버를 맺을 수 있는 조건 동일한 영역에 속해야 함 동일한 hello interval 및 dead interval 값을 가져야 함. 네트워크 토폴로지 유형에 따라 자동으로 바뀜 OSPF인증은 동일하게 설정되어야 함 모든 네이버에게 라우팅 테이블을 교환하지는 않음. 네이 버를 맺고 라우팅 테이블을 교환하는 네이버를 adjacent neighbor라고 함

16 OSPF의 Hello, Dead Interval
네트워크 토폴로지 Hello Interval Dead Interval Point-to-point, Broadcast 10 40 NBMA(Non-broadcast Multiple Access), Point-to-multipoint, Point-to-nonbroadcast (Frame-relay, X.25, ATM등) 30 120

17 헬로 패킷 헤더

18 OSPF 기본 네트워크 토폴로지 라우터 기본 설정은 교재 참조

19 OSPF 설정 OSPF 설정 스크립트 예제 R1(config)#router ospf Process-ID
R1(config-router)#router-id 라우터아이디 R1(config-router)#network 네트워크주소 와일드카드 마스크 area 영역아이디 예제 R1(config)#router ospf 1 R1(config-router)#router-id R1(config-router)#network area 0

20 OSPF 설정 R1(config)#router ospf 7 R1(config-router)#router-id 1.1.1.1
R1(config-router)#network a 0 R1(config-router)#network a 0 R1(config-router)#network a 0 R1(config-router)#network a 0 R2(config)#router ospf 7 R2(config-router)#router-id R2(config-router)#network a 0 R2(config-router)#network a 0 R2(config-router)#network a 0 R2(config-router)#network a 0 R3(config)#router ospf 7 R3(config-router)#router-id R3(config-router)#network a 0 R3(config-router)#network a 0 R3(config-router)#network a 0 R3(config-router)#network a 0

21 OSPF 설정 Process-ID: 1~65535 사이의 임의의 숫자 와일드카드마스크 Area-ID (영역아이디) 라우터아이디
서브넷마스크의 반대 개념 32비트 주소값 중에서 연속하지 않은 비트들도 지정 가능 Area-ID (영역아이디) 단일영역 OSPF 다중영역 OSPF 라우터아이디 라우터를 나타내는 고유값 논리적 인터페이스가 물리적 인터페이스보다 안정적이므로 루 프백 인터페이스를 라우터아이디로 사용 루프백 인터페이스가 없다면 활성화된 인터페이스 주소 중에 서 가장 높은 값을 가지는 주소를 라우터아이디로 사용

22 설정 결과 확인 R1#show ip protocols Routing Protocol is "ospf 7"
Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Router ID Number of areas in this router is 1. 1 normal 0 stub 0 nssa Maximum path: 4 Routing for Networks: area 0 area 0 area 0 area 0 Routing Information Sources: Gateway Distance Last Update :19:36 :19:37 :19:37 Distance: (default is 110)

23 설정 결과 확인 R1#debug ip ospf events OSPF events debugging is on R1#
01:57:40: OSPF: Rcv hello from area 0 from Serial0/3/ 01:57:40: OSPF: End of hello processing 01:57:48: OSPF: Rcv hello from area 0 from Serial0/3/ 01:57:48: OSPF: End of hello processing 01:57:50: OSPF: Rcv hello from area 0 from Serial0/3/ 01:57:50: OSPF: End of hello processing 01:57:58: OSPF: Rcv hello from area 0 from Serial0/3/ 01:57:58: OSPF: End of hello processing

24 네이버 확인 R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface FULL/ :00: Serial0/3/0 FULL/ :00: Serial0/3/1 R2#show ip ospf neighbor FULL/ :00: Serial0/3/0 FULL/ :00: Serial0/3/1 R3#show ip ospf neighbor FULL/ :00: Serial0/3/0 FULL/ :00: Serial0/3/1

25 인터페이스 확인 R1#show ip ospf interface
Serial0/3/1 is up, line protocol is up Internet address is /24, Area 0 Process ID 7, Router ID , Network Type POINT-TO-POINT, Cost: 64 Transmit Delay is 1 sec, State POINT-TO-POINT, Priority 0 No designated router on this network No backup designated router on this network Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:04 Index 3/3, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 1, maximum is 1 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 1 , Adjacent neighbor count is 1 Adjacent with neighbor Suppress hello for 0 neighbor(s) Serial0/3/0 is up, line protocol is up Internet address is /24, Area 0 Process ID 7, Router ID , Network Type POINT-TO-POINT, Cost: 64 Transmit Delay is 1 sec, State POINT-TO-POINT, Priority 0 No designated router on this network No backup designated router on this network Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:04 Index 4/4, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 1, maximum is 1 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 1 , Adjacent neighbor count is 1 Adjacent with neighbor Suppress hello for 0 neighbor(s)

26 라우팅 테이블 확인 R1#show ip route Gateway of last resort is not set
/24 is subnetted, 1 subnets C is directly connected, Loopback0 /32 is subnetted, 1 subnets O [110/65] via , 01:51:18, Serial0/3/0 /32 is subnetted, 1 subnets O [110/65] via , 01:51:18, Serial0/3/1 C /24 is directly connected, FastEthernet0/0 O /24 [110/65] via , 01:51:18, Serial0/3/1 O /24 [110/65] via , 01:51:18, Serial0/3/0 C /24 is directly connected, Serial0/3/0 C /24 is directly connected, Serial0/3/1 O /24 [110/128] via , 01:51:18, Serial0/3/1 [110/128] via , 01:51:18, Serial0/3/0

27 대역폭에 따른 비용 인터페이스 유형 및 대역폭 (Link type and bandwidth) 비용(cost) 56 Kbps
1785 64 Kbps 1562 128 Kbps 781 T1(1.544 Mbps) 64 E1(2.048 Mbps) 48 Ethernet(10 Mbps) 10 Ethernet(100 Mbps) 1 65 = 64+1 128 = 64+64

28 DR과 BDR 선정 LSA 플러딩 문제 라우터의 구분
DR (Designated Router) --- 반장 BDR (Backup Designated Router) --- 부반장 DROthers : DR, BDR을 제외한 모든 라우터

29 NBMA(Non-broadcast Multiple Access)
DR과 BDR 동작 방식 동작방식 DROthers 라우터들은 자신의 LSA 정보를 의 멀티캐스트 주소로 DR, BDR에게 전송 DR 라우터는 LSA 정보를 의 멀티캐스트 주소 를 통해 DROthers에게 전송 DR이 동작하지 않는 경우 BDR이 DR이 되어 역할을 수행 LSA 플러딩 트래픽을 크게 줄일 수 있음 점대점 네트워크에서는 DR/BDR을 선정하지 않음 네트워크 유형 DR/BRD 선정 여부 Point-To-Point X Broadcast O NBMA(Non-broadcast Multiple Access)

30 브로드캐스트 네트워크 토폴로지

31 라우터 설정 Router(config)#hostname R1 R1(config)#int lo 0
R1(config-if)#ip addr R1(config-if)#exit R1(config)#int fa0/0 R1(config-if)#ip addr R1(config-if)#no shutdown R1(config)# R1(config)#router ospf 1 R1(config-router)#router-id R1(config-router)#network a 0 R1(config-router)#network a 0 R1(config-router)#exit Router(config)#hostname R2 R2(config)#int lo 0 R2(config-if)#ip addr R2(config-if)#exit R2(config)#int fa0/0 R2(config-if)#ip addr R2(config-if)#no shutdown R2(config)# R2(config)#router ospf 1 R2(config-router)#router-id R2(config-router)#network a 0 R2(config-router)#network R2(config-router)#exit Router(config)#hostname R3 R3(config)#int lo 0 R3(config-if)#ip addr R3(config-if)#exit R3(config)#int fa0/0 R3(config-if)#ip addr R3(config-if)#no shutdown R3(config)# R3(config)#router ospf 1 R3(config-router)#router-id R3(config-router)#network a 0 R3(config-router)#network a 0 R3(config-router)#exit Router(config)#hostname R4 R4(config)#int lo 0 R4(config-if)#ip addr R4(config-if)#exit R4(config)#int fa0/0 R4(config-if)#ip addr R4(config-if)#no shutdown R4(config)# R4(config)#router ospf 1 R4(config-router)#network a 0 R4(config-router)#network a 0 R4(config-router)#exit

32 DR/BDR 선정 결과 DR/BDR이 한번 선정된 이후에는 해당 DR/BDR에 문제가 발생하지 않는 한 상태를 계속 유지
R1#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface FULL/BDR :00: FastEthernet0/0 WAY/DROTHER 00:00: FastEthernet0/0 FULL/DR :00: FastEthernet0/0 DR/BDR이 한번 선정된 이후에는 해당 DR/BDR에 문제가 발생하지 않는 한 상태를 계속 유지 특정 라우터를 DR로 선정하려면 DR로 선출될 라우터를 먼저 설정

33 OSPF 우선순위를 이용한 선정 Ip ospf priority 명령 이용 DR/BDR 재선정 결과
R1(config)#int fa0/0 R1(config-if)#ip ospf priority 255  최고 우선 R2(config)#int fa0/0 R2(config-if)#ip ospf priority 254 모든 라우터의 ospf 프로세스를 재시작 R4#clear ip ospf process Reset ALL OSPF processes? [no]: y R4#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface FULL/BDR :00: FastEthernet0/0 FULL/DR :00: FastEthernet0/0 WAY/DROTHER 00:00: FastEthernet0/0

34 디폴트 정적 경로 설정 R1(config)#ip route 0.0.0.0 0.0.0.0 loopback 0
R1(config)#router ospf 1 R1(config-router)#default-information originate R3#show ip route Gateway of last resort is to network /32 is subnetted, 1 subnets O [110/2] via , 00:32:19, FastEthernet0/0 /32 is subnetted, 1 subnets O [110/2] via , 00:32:19, FastEthernet0/0 /24 is subnetted, 1 subnets C is directly connected, Loopback0 /32 is subnetted, 1 subnets O [110/2] via , 00:31:18, FastEthernet0/0 C /24 is directly connected, FastEthernet0/0 O*E /0 [110/1] via , 00:00:50, FastEthernet0/0

35 재분배(redistribution) 라우팅 재분배
전체 네트워크를 하나의 라우팅 프로토콜만으로 운영하 는 것은 어려울 수 있음. 다중 프로토콜을 사용하는 네트워크를 상호 연결하기 위 해서 프로토콜 간에 라우팅 정보를 재분배 서로 다른 라우팅 프로토콜을 사용하는 영역간의 라우팅 이 가능하도록 설정하는 것 참조

36 재분배(redistribution) 예제 토폴로지

37 재분배(redistribution) RIPv2 - EIGRP 재분배

38 재분배(redistribution) OSPF - EIGRP 재분배

39 재분배(redistribution) RIPv2 – OSPF 재분배

40 재분배(redistribution) RIPv2에서 OSPF, EIGRP 재분배 OSPF에서 RIPv2, EIGRP 재분배
EIGRP에서 RIPv2, OSPF 재분배 R0(config)#router rip R0(config-router)#version 2 R0(config-router)#redistribute ospf 7 metric 4 R0(config-router)#redistribute eigrp 7 metric 4 R0(config)#router ospf 7 R0(config-router)#redistribute eigrp 7 subnets R0(config-router)#redistribute rip subnets R0(config)#router eigrp 7 R0(config-router)#redistribute rip metric R0(config-router)#redistribute ospf 7 metric

41 요약 OSPF 설정 DR/BDR 선정 R1(config)#router ospf 7
R1(config-router)#router-id R1(config-router)#network a 0 R1(config-router)#network a 0 R1(config-router)#network a 0 R1(config-router)#network a 0 R4#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface FULL/BDR :00: FastEthernet0/0 FULL/DR :00: FastEthernet0/0 WAY/DROTHER 00:00: FastEthernet0/0

42 7장 실습과제 실습 1. 라우팅 프로토콜 패킷 분석 실습 2. 기본 네트워크 토폴로지의 OSPF 설정 (그 림 7-4)
와이어샤크를 이용하여 라우팅 프로토콜의 패킷을 찾아 보고 분석하시오. RIP, EIGRP, OSPF 등 고양캠퍼스는 정적경로설정을 사용중이라고 하며, 그러 므로 라우팅 프로토콜 패킷을 찾기 어려움 실습 2. 기본 네트워크 토폴로지의 OSPF 설정 (그 림 7-4) 실습 3. 브로드캐스트 네트워크 토폴로지의 OSPF 설정 (그림 7-5)

43 7장 실습과제 실습 4. 다음의 토폴로지를 OSPF로 라우팅 설정하 시오. DR, BDR로 선출된 라우터는 어떤 것인가?

44 7장 실습과제 실습 5. 다음과 같이 서로 다른 4개 영역을 가진 계층적 네트워크를 OSPF로 라우팅 설정하시오.
백본 네트워크는 area 0로 설정해야 함

45 7장 실습과제 실습 6. 재분배 기술을 이용하여 다음 세가지 라우 팅 프로토콜을 이용하는 네트워크들을 하나의 라 우터로 연결하고 상호 연동하도록 설정하시오. RIPv2 EIGRP OSPF


Download ppt "7장. OSPF 중부대학교 정보보호학과 이병천 교수."

Similar presentations


Ads by Google