chapter 10. 라우팅프로토콜설정 한빛미디어 -1-
학습목표 시스코라우터의스태틱라우팅설정 시스코라우터의 RIP 설정 시스코라우터의 IGRP 설정 시스코라우터의 EIGRP 설정 시스코라우터의 OSPF 설정 한빛미디어 -2-
시스코라우터의스태틱라우팅설정 스태틱라우팅 루트 (route) / 라우팅테이블 스태틱라우팅예 [ 그림 ] 스태틱라우팅예 (1) 한빛미디어 -3-
시스코라우터의스태틱라우팅설정 스태틱루트설정 [ 그림 ] 스태틱라우팅예 (2) 라우터 A 설정 Router_A(config)#ip route 10.0.6.0 255.255.255.0 10.0.1.2 라우터 B 설정 Router_B(config)#ip route 10.0.6.0 255.255.255.0 10.0.3.2 Router_B(config)#ip route 10.0.0.0 255.255.255.0 10.0.1.1 한빛미디어 -4-
시스코라우터의스태틱라우팅설정 스태틱루트동작확인 [ 그림 ] 스태틱라우팅예 (3) 라우터 A 라우팅테이블 S 10.0.6.0/24 [1/0] via 10.0.1.2, 00:01:25, ethernet0/0 C 10.0.0.0/24 is directly connected, ethernet0/1 라우터 B 라우팅테이블 S 10.0.6.0/24 [1/0] via 10.0.3.2, 00:01:25, ethernet0/0 S 10.0.0.0/24 [1/0] via 10.0.1.1, 00:01:25, ethernet0/1 C 10.0.3.0/24 is directly connected, ethernet0/0 C 10.0.1.0/24 is directly connected, ethernet0/1 한빛미디어 -5-
시스코라우터의 RIP 설정과동작 RIP 특징 (1) RIP Version 1 과 2 의차이점 [ 그림 ] RIP 패킷구조 ( 버전 1) [ 그림 ] RIP 패킷구조 ( 버전 2) 한빛미디어 -6-
시스코라우터의 RIP 설정과동작 RIP 특징 (2) 프로토콜분류프로토콜구현방법매트릭업데이트 IGP 거리벡터홉수 ( 최대 15홉 ) 30초 타이머 트래픽분산 루트타임아웃 홀드다운 플러쉬 180초 180초 240초기본 4개경로 RIP v1 의특징 RIP v2 의특징 Classfull 네트워크만지원 VLSM, 트리거업데이트 한빛미디어 -7-
시스코라우터의 RIP 설정과동작 시스코라우터에서사용가능한라우팅프로토콜 router(config)#router? bgp Border Gateway Protocol (BGP) egp Exterior Gateway Protocol (EGP) eigrp Enhanced Interior Gateway Routing Protocol (EIGRP) igrp Interior Gateway Routing Protocol (IGRP) isis ISO IS-IS iso-igrp IGRP for OSI networks mobile Mobile routes odr On Demand stub Routes ospf Open Shortest Path First (OSPF) rip Routing Information Protocol (RIP) static Static routes traffic-engineering Traffic engineered routes 한빛미디어 -8-
시스코라우터의 RIP 설정과동작 RIP 관련명령어 Router(config)#router rip Router(config-router)#? Router configuration commands: auto-summary Enable automatic network number summarization default Set a command to its defaults default-information Control distribution of default information default-metric Set metric of redistributed routes distance Define an administrative distance distribute-list Filter networks in routing updates exit Exit from routing protocol configuration mode flash-update-threshold Specify flash update threshold in second help Description of the interactive help system input-queue Specify input queue depth maximum-paths Forward packets over multiple paths neighbor Specify a neighbor router network Enable routing on an IP network no Negate a command or set its defaults offset-list Add or subtract offset from IGRP or RIP metrics output-delay Interpacket delay for RIP updates passive-interface Suppress routing updates on an interface redistribute Redistribute information from another routing protocol timers Adjust routing timers validate-update-source Perform sanity checks against source address of routing updates version Set routing protocol version 한빛미디어 -9-
시스코라우터의 RIP 설정과동작 RIP 설정 Router-A#config t Enter configuration commands, one per line. End with CNTL/Z. Router-A(config)# router rip Router-A(config-router)# network 192.168.0.0 Router-A(config-router)# network 192.168.1.0 Router-A(config-router)#^Z Router-A # sh run Building Configuration...! router rip network 192.168.0.0 network 192.168.1.0 한빛미디어 -10-
시스코라우터의 RIP 설정과동작 RIP 동작확인 (1) show ip route Router# show ip route Codes: I - IGRP derived, R - RIP derived, O - OSPF derived, C - connected, S - static, E - EGP derived, B - BGP derived, * - candidate default route, IA - OSPF inter area route, i - IS-IS derived, ia - IS-IS, U - per-user static route, o - on-demand routing, M - mobile, P - periodic downloaded static route, D - EIGRP, EX - EIGRP external, E1 - OSPF external type 1 route, E2 - OSPF external type 2 route, N1 - OSPF NSSA external type 1 route, N2 - OSPF NSSA external type 2 route Gateway of last resort is 10.119.254.240 to network 10.140.0.0 R 172.150.0.0 [120/10] via 10.119.254.6, 0:01:00, Ethernet2 R 172.17.10.0 [120/5] via 10.119.254.244, 0:02:22, Ethernet2 S 172.21.114.201/32 is directly connected, BRI0 S 172.21.114.205/32 is directly connected, BRI0 R 172.30.0.0 [120/12] via 10.119.254.244, 0:02:22, Ethernet2 한빛미디어 -11-
시스코라우터의 RIP 설정과동작 RIP 동작확인 (2) show ip route summary Router# show ip route summary Route Source Networks Subnets Overhead Memory (bytes) connected 0 3 126 360 Static 1 2 126 360 igrp 109 747 12 31878 91080 internal 3 360 Total 751 17 32130 92160 한빛미디어 -12-
시스코라우터의 RIP 설정과동작 RIP 동작확인 (3) show ip protocol router#show ip protocol Routing Protocol is "rip" Sending updates every 30 seconds, next due in 8 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is Incoming update filter list for all interfaces is Redistributing: rip Default version control: send version 2, receive version 2 Interface Send Recv Triggered RIP Key-chain Ethernet2 2 2 Ethernet3 2 2 Routing for Networks: 172.19.0.0 10.3.0.0 Routing Information Sources: Gateway Distance Last Update Distance: (default is 120) 한빛미디어 -13-
시스코라우터의 RIP 설정과동작 RIP 동작확인 (4) debug ip rip router#debug ip rip 00:05:19: RIP: received v1 update from 172.16.1.2 on Serial1/0 00:05:19: 172.16.1.0 in 1 hops 00:05:19: 172.16.2.0 in 2 hops 00:05:19: 172.16.3.0 in 3 hops 00:05:29: RIP: start retransmit timer of 172.16.1.2 00:05:29: RIP: received v1 triggered ack from 172.16.1.2 on Serial1/0 00:05:29: RIP: Stopped retrans timer for 172.16.1.2 00:05:29: RIP: sending v1 ack to 172.16.1.2 via Serial1/0 (172.16.1.1), 00:05:29: RIP: bad version 128 from 160.89.80.43 한빛미디어 -14-
시스코라우터의 IGRP 설정과동작 IGRP 특징 (1) [ 그림 ] IGRP 매트릭결정요소 기본값 : 지연값 (Delay), 대역폭 (Bandwidth) 확장값 : 안전성 (Reliability), 혼잡도 (Load) 한빛미디어 -15-
시스코라우터의 IGRP 설정과동작 IGRP 특징 (2) [ 그림 ] IGRP 트래픽분산 Non Equal cost Load balancing 한빛미디어 -16-
시스코라우터의 IGRP 설정과동작 IGRP 특징 (3) 프로토콜분류 프로토콜구현방법 매트릭 IGP 거리벡터 복합매트릭 타이머 업데이트 Invalid 홀드다운플러쉬 90초 270초 ( 업데이트의 3배 ) 280초 (Invalid + 10초 ) 630초 ( 업데이트의 7배 ) 트래픽분산 기본 4 개경로 ( 최대 6 동일코스트경로 ) 한빛미디어 -17-
시스코라우터의 IGRP 설정과동작 IGRP 설정 [ 그림 ] IGRP 설정 Router_A(config)#router igrp 10 Router_A(config-router)#network 192.168.0.0 Router_A(config-router)#network 192.168.1.0 Router_A(config-router)#end 한빛미디어 -18-
시스코라우터의 IGRP 설정과동작 IGRP 동작확인 Router# show ip protocols Routing Protocol is "igrp 109" Sending updates every 90 seconds, next due in 44 seconds Invalid after 270 seconds, hold down 280, flushed after 630 Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Default networks flagged in outgoing updates Default networks accepted from incoming updates IGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0 IGRP maximum hopcount 100 IGRP maximum metric variance 1 Redistributing: igrp 109 Routing for Networks: 172.160.72.0 Routing Information Sources: Gateway Distance Last Update 172.160.72.20 100 0:01:04 172.160.72.30 100 0:01:29 Distance: (default is 100) 한빛미디어 -19-
시스코라우터의 EIGRP 설정과동작 EIGRP 특징 [ 그림 ] EIGRP 프로토콜 네이버테이블 토폴로지테이블 라우팅테이블 VLSM 프로토콜 Independent 라우팅프로토콜 IP, IPX, Appletalk 한빛미디어 -20-
시스코라우터의 EIGRP 설정과동작 EIGRP 설정 [ 그림 ] EIGRP 설정 Router_A(config)#router eigrp 100 Router_A(config-router)#network 192.168.0.0 255.255.255.0 Router_A(config-router)#network 192.168.1.0 255.255.255.0 Router_A(config-router)#end 한빛미디어 -21-
시스코라우터의 EIGRP 설정과동작 EIGRP 동작확인 Router# show ip protocols Routing Protocol is "eigrp 77" Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Redistributing: eigrp 77 Automatic network summarization is in effect Routing for Networks: 172.180.0.0 Routing Information Sources: Gateway Distance Last Update 172.180.81.28 90 0:02:36 172.180.80.28 90 0:03:04 172.180.80.31 90 0:03:04 Distance: internal 90 external 170 한빛미디어 -22-
시스코라우터의 OSPF 설정과동작 OSPF 특징 (1) [ 그림 ] OSPF 네트워크구조 Area ASBR (Autonomous System Boundary Router) ABR (Area Border Router) DR (Designated Router) BDR (Backup Designated Router) 매트릭 : Cost 한빛미디어 -23-
시스코라우터의 OSPF 설정과동작 OSPF 의 hello 패킷구조 Type 1 - Hello 패킷네이버관계를설정하고관리 Type 2 - Database description SPF 데이터베이스의내용 Type 3 - Link state request SPF 데이터베이스의내용을요청 Type 4 - Link state update Type 3에대한응답 Type 5 - Link state acknowledgement Type 4에대한확인 [ 그림 ] OSPF 프로토콜패킷 한빛미디어 -24-
시스코라우터의 OSPF 설정과동작 OSPF 의네트워크종류 [ 그림 ] OSPF 네트워크타입 한빛미디어 -25-
시스코라우터의 OSPF 설정과동작 OSPF 의 LSA 타입 LSA (Link state advertisement) LSA 1 2 3 / 4 5 이름 Route link entry Network link entry Summary link entry Summary net link status & summary ASB Autonomous system External link entry (E1 - OSPF external type 1) (E2 - OSPF external type 2) (AS external link status) 설명 각구역의라우터의링크특정네트워크에속해있는라우터정보 ABR과로컬 (local) 구역의내부라우터간링크로컬구역과백본간경로 / ASBR과의경로 (Reachability) ASBR, Autonomous 시스템간의루트 한빛미디어 -26-
시스코라우터의 OSPF 설정과동작 OSPF 의 Area 종류 [ 그림 ] OSPF Area Backbone Stub Totally stub Not So Stubby 한빛미디어 -27-
시스코라우터의 OSPF 설정과동작 OSPF 의설정 (1) 단일 area [ 그림 ] OSPF 설정 Router_A(config)#router ospf 100 Router_A(config-router)#network 192.168.0.0 0.0.0.255 area 0 Router_A(config-router)#network 192.168.1.0 0.0.0.255 area 0 Router_A(config-router)#end 한빛미디어 -28-
시스코라우터의 OSPF 설정과동작 OSPF 의설정 (2) 복수 area [ 그림 ] OSPF 설정 Router_B(config)#router ospf 100 Router_B(config-router)#network 192.168.1.0 0.0.0.255 area 1 Router_B(config-router)#network 192.168.2.0 0.0.0.255 area 0 Router_B(config-router)#end 한빛미디어 -29-
시스코라우터의 OSPF 설정과동작 OSPF 명령어 Router(config)#router ospf 100 Router(config-router)#? Router configuration commands: area OSPF area parameters auto-cost Calculate OSPF interface cost according to bandwidth default Set a command to its defaults default-information Control distribution of default information default-metric Set metric of redistributed routes distance Define an administrative distance log-adjacency-changes Log changes in adjacency state maximum-paths Forward packets over multiple paths neighbor Specify a neighbor router network Enable routing on an IP network no Negate a command or set its defaults passive-interface Suppress routing updates on an interface redistribute Redistribute information from another routing protocol summary-address Configure IP address summaries timers Adjust routing timers 한빛미디어 -30-
시스코라우터 OSPF 설정과동작 OSPF 동작확인 (1) show ip ospf Router# show ip ospf Routing Process "ospf 100" with ID 192.168.0.254 Supports only single TOS(TOS0) route It is an area border and autonomous system boundary router Redistributing External Routes from, igrp 200 with metric mapped to 2, includes subnets in redistribution rip with metric mapped to 2 igrp 2 with metric mapped to 100 igrp 32 with metric mapped to 1 Number of areas in this router is 3 Area 192.168.0.0 Number of interfaces in this area is 1 Area has simple password authentication SPF algorithm executed 6 times 한빛미디어 -31-
시스코라우터의 OSPF 설정과동작 OSPF 의동작확인 (2) show ip ospf neighbor show ip ospf database router#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 1.1.1.1 1 FULL/DR 00:00:33 206.202.1.1 FastEthernet0/0 2.2.2.2 1 FULL/DR 00:00:31 206.202.2.1 FastEthernet0/1 router#show ip ospf database OSPF Router with ID (206.202.1.2) (Process ID 100) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 1.1.1.1 1.1.1.1 56 0x80000002 0x4EF8 2 206.202.1.2 206.202.1.2 46 0x80000006 0x74EC 3 Net Link States (Area 0) Link ID ADV Router Age Seq# Checksum 206.202.1.1 1.1.1.1 57 0x80000001 0x1ADF 한빛미디어 -32-
시스코라우터의 OSPF 설정과동작 OSPF 동작확인 (3) show ip ospf interface Router# show ip ospf interface ethernet 0 Ethernet 0 is up, line protocol is up Internet Address 192.168.254.202, Mask 255.255.255.0, Area 0.0.0.0 AS 201, Router ID 192.77.99.1, Network Type BROADCAST, Cost: 10 Transmit Delay is 1 sec, State OTHER, Priority 1 Designated Router id 192.168.254.10, Interface address 192.168.254.10 Backup Designated router id 192.168.254.28, Interface addr 192.168.254.28 Timer intervals configured, Hello 10, Dead 60, Wait 40, Retransmit 5 Hello due in 0:00:05 Neighbor Count is 8, Adjacent neighbor count is 2 Adjacent with neighbor 192.168.254.28 (Backup Designated Router) Adjacent with neighbor 192.168.254.10 (Designated Router) 한빛미디어 -33-
시스코라우터의 OSPF 설정과동작 OSPF 의동작확인 (4) debug ip ospf router#debug ip ospf 1d01h: OSPF: rcv. v:2 t:1 l:52 rid:1.1.1.1 aid:0.0.0.0 chk:872b aut:0 auk: from FastEthernet0/0 1d01h: OSPF: Rcv hello from 1.1.1.1 area 0 from FastEthernet0/0 206.202.1.1 1d01h: OSPF: 2 Way Communication to 1.1.1.1 on FastEthernet0/0, state 2WAY 1d01h: OSPF: Backup seen Event before WAIT timer on FastEthernet0/0 1d01h: OSPF: DR/BDR election on FastEthernet0/0 1d01h: OSPF: Elect BDR 1.1.1.1 1d01h: OSPF: Elect DR 1.1.1.1 1d01h: DR: 1.1.1.1 (Id) BDR: 1.1.1.1 (Id) 1d01h: OSPF: Send DBD to 1.1.1.1 on FastEthernet0/0 seq 0x17D1 opt 0x42 flag 0x7 len 32 1d01h: OSPF: End of hello processing 한빛미디어 -34-