OSPF Hello packet 8 OSPF LS Update LS

  • Slides: 45
Download presentation

OSPF 패킷 분석 � Hello packet 8

OSPF 패킷 분석 � Hello packet 8

OSPF 패킷 분석 LS Update LS Acknowledgement 9

OSPF 패킷 분석 LS Update LS Acknowledgement 9

OSPF의 Hello, Dead Interval 네트워크 토폴로지 Hello Interval Dead Interval Point-to-point, Broadcast 10 40

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 (Framerelay, X. 25, ATM등) 30 120 16

OSPF 설정 � OSPF 설정 스크립트 ◦ R 1(config)#router ospf Process-ID ◦ R 1(config-router)#router-id

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

OSPF 설정 R 1(config)#router ospf 7 R 1(config-router)#router-id 1. 1 R 1(config-router)#network 203. 230.

OSPF 설정 R 1(config)#router ospf 7 R 1(config-router)#router-id 1. 1 R 1(config-router)#network 203. 230. 7. 0 0. 0. 0. 255 a 0 R 1(config-router)#network 203. 230. 10. 0. 0. 255 a 0 R 1(config-router)#network 203. 230. 11. 0 0. 0. 0. 255 a 0 R 1(config-router)#network 1. 1. 1. 0 0. 0. 0. 255 a 0 R 2(config)#router ospf 7 R 2(config-router)#router-id 2. 2 R 2(config-router)#network 203. 230. 9. 0 0. 0. 0. 255 a 0 R 2(config-router)#network 203. 230. 10. 0. 0. 255 a 0 R 2(config-router)#network 203. 230. 12. 0 0. 0. 0. 255 a 0 R 2(config-router)#network 2. 2. 2. 0 0. 0. 0. 255 a 0 R 3(config)#router ospf 7 R 3(config-router)#router-id 3. 3 R 3(config-router)#network 203. 230. 8. 0 0. 0. 0. 255 a 0 R 3(config-router)#network 203. 230. 11. 0 0. 0. 0. 255 a 0 R 3(config-router)#network 203. 230. 12. 0 0. 0. 0. 255 a 0 R 3(config-router)#network 3. 3. 3. 0 0. 0. 0. 255 a 0 20

설정 결과 확인 R 1#show ip protocols Routing Protocol is "ospf 7" Outgoing update

설정 결과 확인 R 1#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 1. 1 Number of areas in this router is 1. 1 normal 0 stub 0 nssa Maximum path: 4 Routing for Networks: 203. 230. 7. 0 0. 0. 0. 255 area 0 203. 230. 10. 0. 0. 255 area 0 203. 230. 11. 0 0. 0. 0. 255 area 0 1. 1. 1. 0 0. 0. 0. 255 area 0 Routing Information Sources: Gateway Distance Last Update 1. 1 110 00: 19: 36 2. 2 110 00: 19: 37 3. 3 110 00: 19: 37 Distance: (default is 110) 22

설정 결과 확인 R 1#debug ip ospf events OSPF events debugging is on R

설정 결과 확인 R 1#debug ip ospf events OSPF events debugging is on R 1# 01: 57: 40: OSPF: Rcv hello from 2. 2 area 0 from Serial 0/3/0 203. 230. 1 01: 57: 40: OSPF: End of hello processing 01: 57: 48: OSPF: Rcv hello from 3. 3 area 0 from Serial 0/3/1 203. 230. 11. 1 01: 57: 48: OSPF: End of hello processing 01: 57: 50: OSPF: Rcv hello from 2. 2 area 0 from Serial 0/3/0 203. 230. 1 01: 57: 50: OSPF: End of hello processing 01: 57: 58: OSPF: Rcv hello from 3. 3 area 0 from Serial 0/3/1 203. 230. 11. 1 01: 57: 58: OSPF: End of hello processing 23

네이버 확인 R 1#show ip ospf neighbor Neighbor ID Pri State 2. 2 0

네이버 확인 R 1#show ip ospf neighbor Neighbor ID Pri State 2. 2 0 FULL/ 3. 3 0 FULL/ - Dead Time Address 00: 38 203. 230. 1 00: 36 203. 230. 11. 1 Interface Serial 0/3/0 Serial 0/3/1 R 2#show ip ospf neighbor Neighbor ID Pri State 1. 1 0 FULL/ 3. 3 0 FULL/ - Dead Time Address 00: 39 203. 230. 10. 2 00: 36 203. 230. 12. 2 Interface Serial 0/3/0 Serial 0/3/1 R 3#show ip ospf neighbor Neighbor ID Pri State 1. 1 0 FULL/ 2. 2 0 FULL/ - Dead Time Address 00: 37 203. 230. 11. 2 00: 37 203. 230. 12. 1 Interface Serial 0/3/0 Serial 0/3/1 24

인터페이스 확인 R 1#show ip ospf interface Serial 0/3/1 is up, line protocol is

인터페이스 확인 R 1#show ip ospf interface Serial 0/3/1 is up, line protocol is up Internet address is 203. 230. 11. 2/24, Area 0 Process ID 7, Router ID 1. 1, 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: 04 Index 3/3, flood queue length 0 Next 0 x 0(0)/0 x 0(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 3. 3 Serial 0/3/0 is up, line protocol is up Suppress hello for 0 neighbor(s) Internet address is 203. 230. 10. 2/24, Area 0 Process ID 7, Router ID 1. 1, 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: 04 Index 4/4, flood queue length 0 Next 0 x 0(0)/0 x 0(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 2. 2 Suppress hello for 0 neighbor(s) 25

라우팅 테이블 확인 R 1#show ip route Gateway of last resort is not set

라우팅 테이블 확인 R 1#show ip route Gateway of last resort is not set C O O C C O 1. 0. 0. 0/24 is subnetted, 1 subnets 1. 1. 1. 0 is directly connected, Loopback 0 2. 0. 0. 0/32 is subnetted, 1 subnets 2. 2 [110/65] via 203. 230. 1, 01: 51: 18, Serial 0/3/0 3. 0. 0. 0/32 is subnetted, 1 subnets 3. 3 [110/65] via 203. 230. 11. 1, 01: 51: 18, Serial 0/3/1 203. 230. 7. 0/24 is directly connected, Fast. Ethernet 0/0 203. 230. 8. 0/24 [110/65] via 203. 230. 11. 1, 01: 51: 18, Serial 0/3/1 203. 230. 9. 0/24 [110/65] via 203. 230. 1, 01: 51: 18, Serial 0/3/0 203. 230. 10. 0/24 is directly connected, Serial 0/3/0 203. 230. 11. 0/24 is directly connected, Serial 0/3/1 203. 230. 12. 0/24 [110/128] via 203. 230. 11. 1, 01: 51: 18, Serial 0/3/1 [110/128] via 203. 230. 1, 01: 51: 18, Serial 0/3/0 26

대역폭에 따른 비용 인터페이스 유형 및 대역폭 (Link type and bandwidth) 비용(cost) 56 Kbps

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

라우터 설정 Router(config)#hostname R 1(config)#int lo 0 R 1(config-if)#ip addr 1. 1 255. 0

라우터 설정 Router(config)#hostname R 1(config)#int lo 0 R 1(config-if)#ip addr 1. 1 255. 0 R 1(config-if)#exit R 1(config)#int fa 0/0 R 1(config-if)#ip addr 203. 230. 7. 1 255. 0 R 1(config-if)#no shutdown R 1(config-if)#exit R 1(config)#router ospf 1 R 1(config-router)#router-id 1. 1 R 1(config-router)#network 203. 230. 7. 0 0. 0. 0. 255 a 0 R 1(config-router)#network 1. 1. 1. 0 0. 0. 0. 255 a 0 R 1(config-router)#exit Router(config)#hostname R 3(config)#int lo 0 R 3(config-if)#ip addr 3. 3. 3. 1 255. 0 R 3(config-if)#exit R 3(config)#int fa 0/0 R 3(config-if)#ip addr 203. 230. 7. 3 255. 0 R 3(config-if)#no shutdown R 3(config-if)#exit R 3(config)#router ospf 1 R 3(config-router)#router-id 3. 3. 3. 1 R 3(config-router)#network 203. 230. 7. 0 0. 0. 0. 255 a 0 R 3(config-router)#network 3. 3. 3. 0 0. 0. 0. 255 a 0 R 3(config-router)#exit Router(config)#hostname R 2(config)#int lo 0 R 2(config-if)#ip addr 2. 2. 2. 1 255. 0 R 2(config-if)#exit R 2(config)#int fa 0/0 R 2(config-if)#ip addr 203. 230. 7. 2 255. 0 R 2(config-if)#no shutdown R 2(config-if)#exit R 2(config)#router ospf 1 R 2(config-router)#router-id 2. 2. 2. 1 R 2(config-router)#network 203. 230. 7. 0 0. 0. 0. 255 a 0 R 2(config-router)#network 2. 2. 2. 0 0. 0. R 2(config-router)#exit Router(config)#hostname R 4(config)#int lo 0 R 4(config-if)#ip addr 4. 4. 4. 1 255. 0 R 4(config-if)#exit R 4(config)#int fa 0/0 R 4(config-if)#ip addr 203. 230. 7. 4 255. 0 R 4(config-if)#no shutdown R 4(config-if)#exit R 4(config)#router ospf 1 R 4(config-router)#network 203. 230. 7. 0 0. 0. 0. 255 a 0 R 4(config-router)#network 4. 4. 4. 0 0. 0. 0. 255 a 0 R 4(config-router)#exit 31

DR/BDR 선정 결과 R 1#show ip ospf neighbor Neighbor ID 2. 2. 2. 1

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

OSPF 우선순위를 이용한 선정 � Ip ospf priority 명령 이용 R 1(config)#int fa 0/0

OSPF 우선순위를 이용한 선정 � Ip ospf priority 명령 이용 R 1(config)#int fa 0/0 R 1(config-if)#ip ospf priority 255 최고 우선 R 2(config)#int fa 0/0 R 2(config-if)#ip ospf priority 254 모든 라우터의 ospf 프로세스를 재시작 R 4#clear ip ospf process Reset ALL OSPF processes? [no]: y � DR/BDR 재선정 결과 R 4#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 2. 2. 2. 1 254 FULL/BDR 00: 30 203. 230. 7. 2 Fast. Ethernet 0/0 1. 1 255 FULL/DR 00: 35 203. 230. 7. 1 Fast. Ethernet 0/0 3. 3. 3. 1 1 2 WAY/DROTHER 00: 36 203. 230. 7. 3 Fast. Ethernet 0/0 33

디폴트 정적 경로 설정 R 1(config)#ip route 0. 0 loopback 0 R 1(config)#router ospf

디폴트 정적 경로 설정 R 1(config)#ip route 0. 0 loopback 0 R 1(config)#router ospf 1 R 1(config-router)#default-information originate R 3#show ip route Gateway of last resort is 203. 230. 7. 1 to network 0. 0 1. 0. 0. 0/32 is subnetted, 1 subnets O 1. 1 [110/2] via 203. 230. 7. 1, 00: 32: 19, Fast. Ethernet 0/0 2. 0. 0. 0/32 is subnetted, 1 subnets O 2. 2. 2. 1 [110/2] via 203. 230. 7. 2, 00: 32: 19, Fast. Ethernet 0/0 3. 0. 0. 0/24 is subnetted, 1 subnets C 3. 3. 3. 0 is directly connected, Loopback 0 4. 0. 0. 0/32 is subnetted, 1 subnets O 4. 4. 4. 1 [110/2] via 203. 230. 7. 4, 00: 31: 18, Fast. Ethernet 0/0 C 203. 230. 7. 0/24 is directly connected, Fast. Ethernet 0/0 O*E 2 0. 0/0 [110/1] via 203. 230. 7. 1, 00: 50, Fast. Ethernet 0/0 34

재분배(redistribution) � RIPv 2 - EIGRP 재분배 37

재분배(redistribution) � RIPv 2 - EIGRP 재분배 37

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

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

재분배(redistribution) � RIPv 2 – OSPF 재분배 39

재분배(redistribution) � RIPv 2 – OSPF 재분배 39

재분배(redistribution) � RIPv 2에서 OSPF, EIGRP 재분배 R 0(config)#router rip R 0(config-router)#version 2 R

재분배(redistribution) � RIPv 2에서 OSPF, EIGRP 재분배 R 0(config)#router rip R 0(config-router)#version 2 R 0(config-router)#redistribute ospf 7 metric 4 R 0(config-router)#redistribute eigrp 7 metric 4 � OSPF에서 RIPv 2, EIGRP 재분배 R 0(config)#router ospf 7 R 0(config-router)#redistribute eigrp 7 subnets R 0(config-router)#redistribute rip subnets � EIGRP에서 RIPv 2, OSPF 재분배 R 0(config)#router eigrp 7 R 0(config-router)#redistribute rip metric 1544 10 255 1 1500 R 0(config-router)#redistribute ospf 7 metric 1544 10 255 1 1500 40

요약 � OSPF 설정 R 1(config)#router ospf 7 R 1(config-router)#router-id 1. 1 R 1(config-router)#network

요약 � OSPF 설정 R 1(config)#router ospf 7 R 1(config-router)#router-id 1. 1 R 1(config-router)#network 203. 230. 7. 0 0. 0. 0. 255 a 0 R 1(config-router)#network 203. 230. 10. 0. 0. 255 a 0 R 1(config-router)#network 203. 230. 11. 0 0. 0. 0. 255 a 0 R 1(config-router)#network 1. 1. 1. 0 0. 0. 0. 255 a 0 � DR/BDR 선정 R 4#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 2. 2. 2. 1 254 FULL/BDR 00: 30 203. 230. 7. 2 Fast. Ethernet 0/0 1. 1 255 FULL/DR 00: 35 203. 230. 7. 1 Fast. Ethernet 0/0 3. 3. 3. 1 1 2 WAY/DROTHER 00: 36 203. 230. 7. 3 Fast. Ethernet 0/0 41