ip routing static route vs. dynamic route

21
1 IP Routing •Static Route vs. Dynamic Route - Static Route : Routing Table 을 을을을을 을을을을 . 을을을을 을을 을을을 을을을을 을을을을 을을 을을을 을을 을을을을 . 을을을을 Interface 을 을을을 IP Network Number 을 을을 route 을 static route 을 default route 을 을을을 을을 을을을 routing table 을 을을을을 을을 . - Default Route : 을을을 을을 을을을 을을을 을을을 을을을을 을을을 을을 을을을 을을 을 을을을을을 을을을을 . IGP(Interior Gateway Protocol) 을 EGP(Exterior Gateway Protocol) 을 을을을을 . •Dymanic Routing –Interior Gateway Protocll •RIP, IGRP(cisco), OSPF, EIGRP(cisco) –Exterior Gateway Protocol •BGP - IP Routing Protocol 을 CISCO 을을을 을을을을을 Routing Protocol 을 IGRP, EIGRP 을을 , 을을 을을을 을을을을을 Routing Information 을 을을을을을 RIP, OSPF 을을 을을을을 을을 .

Upload: calvin-chambers

Post on 01-Jan-2016

161 views

Category:

Documents


4 download

DESCRIPTION

IP Routing Static Route vs. Dynamic Route - Static Route : Routing Table 을 수동으로 구성한다. 관리자가 직접 라우팅 테이블을 수동적인 입력 방법에 의해 구성한다. 라우터의 Interface에 할당된 IP Network Number에 대한 route는 static route나 default route를 선언해 주지 않아도 routing table에 등록되어 있다. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: IP Routing Static Route vs. Dynamic Route

1

IP Routing

•Static Route vs. Dynamic Route

- Static Route : Routing Table 을 수동으로 구성한다 . 관리자가 직접 라우팅 테이블을 수동적인 입력 방법에 의해 구성한다 . 라우터의 Interface 에 할당된 IP Network Number 에 대한 route 는 static route 나 default route 를 선언해 주지 않아도routing table 에 등록되어 있다 .

- Default Route : 라우터 간에 라우팅 테이블 정보를 교환하여 최적의 경로 테이블 구성 및 업데이트를 담당한다 . IGP(Interior Gateway Protocol) 와 EGP(Exterior Gateway Protocol) 로 구분된다 .

•Dymanic Routing

–Interior Gateway Protocll

•RIP, IGRP(cisco), OSPF, EIGRP(cisco)

–Exterior Gateway Protocol

•BGP- IP Routing Protocol 중 CISCO 에서만 사용가능한 Routing Protocol 은 IGRP, EIGRP 이며 , 다른 회사의 라우터들과 Routing Information 을 교환하려면 RIP, OSPF 등을 이용해야 한다 .

Page 2: IP Routing Static Route vs. Dynamic Route

2

Static Route

ip route [destination_network ][mask ][next_hop_address orexitinterface ] [administrative_distance ][permanent ]

ip route The command used to create the static route.destination network The network you are placing in the routingtable.mask Indicates the subnet mask being used on the network.next hop address The address of the next hop router that will receivethe packet and forward it to the remote network. This is a router interfacethat is on a directly connected network. You must be able to ping therouter interface before you add the route.exit interface Used in place of the next hop address if desired. Mustbe on a point-to-point link, such as a WAN. This command does not workon a LAN; for example, Ethernet.administrative distance By default, static routes have an adminis-trativedistance of 1. You can change the default value by adding anadministrative weight at the end of the command.permanent If the interface is shut down or the router cannot communi-cateto the next hop router, the route is automatically discarded from therouting table. Choosing the permanent option keeps the entry in the rout-ingtable no matter what happens.

Page 3: IP Routing Static Route vs. Dynamic Route

3

Default Routing

Default Route

default route 란 목적지 IP Network Address 에 대한 route 가 없을때 해당IP Packet 을 전달할 route 를 말한다 . default route 는 대개 자신보다 많은route 정보를 가지고 있는 라우터의 IP Address 를 지정하는데 이유는 일단

그 라우터를 IP Packet 을 전달하면 그 라우터가 해당 IP Packet 을 routing 시켜줄 가능성이 높기 때문이다 . default route 는 dynamic routing protocol

을 운영할때도 설정해 주는 것이 바람직하다

Router02#config termRouter02(config)#ip route 0.0.0.0 0.0.0.0 203.255.246.33

IP ClasslessDefault Route 를 사용시 반드시 Enable 시켜 주어야 한다 . global configuration mode command 이다 .

2501C(Config)#ip classless

Page 4: IP Routing Static Route vs. Dynamic Route

4

Stub Network and Static Routing

Stub Network 을 연결하는 라우터 간에는 Static Routing 을 구성하여 , Dynamic Routing 의 OverHead 를 줄일 수 있다 .

Router Router

Stub Network

Netwoks

Static Route 사용 및 Default Route 설정을 하여Dynamic Routing OverHead 를 줄인다 .

Page 5: IP Routing Static Route vs. Dynamic Route

5

Stub Network and Static Routing 적용 사례

Current configuration:version 11.2

hostname Router1enable secret 5 $1$4oSM$A9KN76HjzUM0HoIBtBDNJ0enable password router

interface Ethernet0 ip address 203.227.110.126 255.255.255.128

interface Serial0ip address 210.116.118.94 255.255.255.252 encapsulation ppp bandwidth 256

ip route 0.0.0.0 0.0.0.0 Serial0 Dynamic Route 대신 Default-Route 를 사용

HDLC 대신 PPP 를 사용

Page 6: IP Routing Static Route vs. Dynamic Route

6

( 참고 )

Default RouteDefualt NetworkDefault Gateway

-Default Route 가 여럿인 경우 Load Balancinf 한다 .- Static Route 를 Interface 에 준 경우 (serial 0 등 ) 는 Distance 가 0 이 되고 Next Hop 의 Address(IP Address) 를 준 경우는 Distance 가 1 이 된다 . Broadcast Network 에서는 Interface 에 주면 안된다 .- ip default-network 명령은 인접라우터에 이 라우터를 Default Route 로 잡도록 설정하는 것이다 . 이 라우터에는 적용되지 않는다 .- default-gateway 는 평상시에 작동되지 않으며 #no ip route 명령을 주면 라우터가 일반 호스트처럼 되어 Default Gateway 로서 작동한다 .

Page 7: IP Routing Static Route vs. Dynamic Route

7

Dynamic Routing

Page 8: IP Routing Static Route vs. Dynamic Route

8

Page 9: IP Routing Static Route vs. Dynamic Route

9

RIP(Routing Information Protocol)

- interior gateway protocol 이다 . RIP 은 BSD UNIX 의 routed 로 처음 발표되었었다 .

- distance vector routing protocol 이다 . metric factor 로 hopcount 를 이용하며 가능한 최대값은15 이다 .

- RIP 는 6 개의 Equal Cost Path 를 지원한다 .(Default 는 4 개이다 .) maximum path 1 명령을 주면 Loadbalancing 이 Disable 된다 .

- 30 초마다 routing information 을 전달한다 . routing information 전체를 전달하는 full update 방식을 이용한다 .

- administrative distance 는 120 이다 .

- Class-Full routing 만을 지원한다 .VLSM, CIDR(summarization) 을 지원하지 않는다 .

- AS Number 를 필요로 하지 않는다 .

- Version 2 에서는 VLSM 지원 , Multicast Update 지원 등을 한다 . Serial 구간에 ip-unnumbered 를 사용할 수 있다 .IP Unnumbered 를 사용하는 경우 RIP,IGRP,EIGRP,OSPF 등의 라우팅 프로토콜이 라우팅을 하는데 문제가 없다 . VLSM 을 지원하지 않는 RIP v1. IGRP 를 쓰는 라우터의 Serial 구간에서 사용하면 유용할 수 있다 . 시리얼 구간에서 한 쪽은 IP 를 부여하고 다른 쪽은 IP Unnumbered 를 사용해도 상관없다 .

RouterA#config termEnter configuration commands, one per line. End with CNTL/Z.RouterA(config)#router ripRouterA(config-router)#version 2

Page 10: IP Routing Static Route vs. Dynamic Route

10

Configuring RIP Routing

RouterA#config termEnter configuration commands, one per line. End with CNTL/Z.RouterA(config)#router ripRouterA(config-router)#network 192.168.1.0RouterA(config-router)#network 192.168.2.0RouterA(config-router)#network 192.168.3.0

-RIP 을 이용하는 네트웍에서 subnetwork number 가 불연속적으로 할당되는 것은 피해야 한다 . Class-Full 로 라우팅테이블을 전달하기 때문에 불연속적으로

할당하면 동일한 네트워크가 불연속적으로 분산되어 나타난다 .

- 서브네팅을 하는 경우는 모든 네트워크에 동일한 서브넷 마스크를 사용해야 한다 .

Page 11: IP Routing Static Route vs. Dynamic Route

11

Verifying the RIP Routing Tables

2621A#sh ip routeCodes:C -connected,S -static,I -IGRP,R -RIP,M – [output cut ]Gateway of last resort is not set172.16.0.0/24 is subnetted,5 subnetsR 172.16.50.0 [120/3 ] via 172.16.10.2,,FastEthernet0/0R 172.16.40.0 [120/2 ] via 172.16.10.2,,FastEthernet0/0R 172.16.30.0 [120/2 ] via 172.16.10.2,,FastEthernet0/0R 172.16.20.0 [120/1 ] via 172.16.10.2,,FastEthernet0/0C 172.16.10.0 is directly connected,FastEthernet0/0

( 참고 )#clear ip route * 명령은 라우팅 테이블을 즉시 새로이 업데이트 한다 .

Page 12: IP Routing Static Route vs. Dynamic Route

12

RIP 의 동작확인

2501B#sh ip protocolRouting Protocol is "rip"Sending updates every 30 seconds,next due in 6 secondsInvalid after 180 seconds,hold down 180,flushed after240Outgoing update filter list for all interfaces isIncoming update filter list for all interfaces isRedistributing:ripDefault version control:send version 1,receive any versionInterface Send Recv Key-chainEthernet0 1 1 2Serial0 1 1 2Serial1 1 1 2Routing for Networks:172.16.0.0Routing Information Sources:Gateway Distance Last Update172.16.40.2 120 00:00:21172.16.20.1 120 00:00:23Distance:(default is 120)

Page 13: IP Routing Static Route vs. Dynamic Route

13

RIP Timers

Route update timer Sets the interval (typically 30 seconds) betweenperiodic routing updates, in which the router sends a complete copy of itsrouting table out to all neighbors.Route invalid timer Determines the length of time that must expire (180seconds) before a router determines that a route has become invalid. Itwill come to this conclusion if it hasn’t heard any updates about a partic-ularroute for that period. When that happens, the router will send outupdates to all its neighbors letting them know that the route is invalid.Route flush timer Sets the time between a route becoming invalid andits removal from the routing table (240 seconds). Before it is removedfrom the table, the router notifies its neighbors of that route’s impendingdoom. The value of the route invalid timer must be less than that of theroute flush timer. This is to provide the router with enough time to tell itsneighbors about the invalid route before the routing table is updated.

- 라우터는 30 초 간격으로 인접라우터에 라우팅 테이블을 브로드캐스트로 업데이트한다 . 만약 180 초 동안 특정 루트에 대해서 Update 가 이루어지지 않으면 그 루트를 Invalid 로 표시한다 . 실제로 라우팅 테이블을 지우는 것은 Invalid 처리된 시점에서 60 초 후이다 .( 총 240 초 ) 최종적으로 지우는 시점까지는 서실상 유효한 경로로 작동한다 . 60ch 후에 지우는 이유는 그동안 Invalid 된 경로를 인접 라우터에 전달해 주기 위해서다 .

Page 14: IP Routing Static Route vs. Dynamic Route

14

Routing Loops Solution

Maximum Hop Count : Maximum Hop Count 가 15 로 정해져 있어 이를 초과하는 초과하는 Route 는 무시된다 . 즉 홉 값이 15 를 넘어서는 네트워크에 대한 Route 는 라우팅테이블에 Update 하지 않는다 .Split Horizon : A 라우터가 Network 1 에 대한 루트를 B 라우터에 알려 주어 B 라우터가 그 경로를 추가한 경우 , B 라우터는 Network1 에 대한 루트를 A라우터에 업데이트 하지 않는다 .Triggered Update : 직접 연결된 인접 네트워크가 다운되는 경우 그 라우터는 다운된 루트에 대해서 Infinity Route 로 설정 (Route Poisoning 이라 한다 .)하여 Update Time 30 초를 기다리지 않고 바로 인접라우터로 Update 하고 , 이러한 업데이트는 인접라우터로 연속적으로 Triggered Update 된다 .Holddown : 라우터가 인접라우터로 부터 Infinity Route( 홉값이 16 이다 .)를 Update 받게 되면 이 Route 에 대해서 Hold Down Timer 180 초를 작동시키는데 이 시간동안은 해당 Route 에 대해서 기존의 메트릭 ( 홉수 ) 보다 좋은 경우가 아니면 인접라우터로 부터 업데이트를 받지 않는다 . 타이머가 종료되면 기존의 경로를 제거하고 새로운 경로를 받아 들인다 . Poison Reverse : 다운된 네트워크에 직접연결된 라우터는 다운된 루트에 대한 엔트리는 제거하고 Infinity Route 로 인접라우터에 Triggered update 를 하는데 이르 받은 라우터는 역으로 다시 그 루트에 대해서 Infinity Route 로 업데이트하여 다운된 네트워크에 직접 연결된 라우터도 그 경로에 대해서 Infinity Route 를 가지게 한다 .

Page 15: IP Routing Static Route vs. Dynamic Route

15

IGRP(Interior Gateway Routing Protocol)

- interior gateway protocol 이다 . cisco 사에서 개발한 것으로 시스코 라우터간에만 사용할 수 있다 .

- distance vector routing protocol 이다 . metric factor 로 bandwidth, delay, reliability, load, mtu 를 이용한다 . Hop Count 는 255 개 까지를 지원한다 .(Default 로 100 개를 지원한다 .)

- multi path routing protocol 이다 . 기본적으로 4 개의 Equal Metric Path 를 지원한다 .

- 90 초마다 routing information 을 전달한다 . routing information 전체를 전달하는 full update 방식을 이용한다 .

- administrative distance 는 100 이다 .

- Class-Full routing 만을 지원한다 .VLSM, CIDR(summarization) 을 지원하지 않는다 .

- AS Number 를 필요로 한다 . AS Number 가 동일한 라우터끼리만 IGRP routing information 을 교환한다 .

Page 16: IP Routing Static Route vs. Dynamic Route

16

IGRP Timers

Update timers These specify how frequently routing-update messagesshould be sent. The default is 90 seconds.Invalid timers These specify how long a router should wait beforedeclaring a route invalid if it doesn’t receive a specific update about it. Thedefault is three times the update period.(270 sec)Holddown timers These specify the holddown period. The default isthree times the update timer period plus 10 seconds.(280 sec)Flush timers These indicate how much time should pass before a routeshould be flushed from the routing table. The default is seven times therouting update period.(630 sec)

Page 17: IP Routing Static Route vs. Dynamic Route

17

Configuring IGRP Routing

RouterA#config tRouterA(config)#router igrp 10RouterA(config-router)#network 172.16.0.0

Router(config-router)#variance ?<1-128>Metric variance multiplier

Router(config-router)#traffic-share ?balanced Share inversely proportional to metricmin All traffic shared among min metric paths

- Traffic-Share Balanced 는 어떤 네트워크에 이르는데 있어 동일하지 않은 Metric 값을 갖는 6 개까지의 경로로 Load Balancing 할 수 있다 .- Variance 는 Traffic-Share Balanced 하는데 있어 Best Metric 의 몇배 까지의 Metric 값을 갖는 경로를 허용할 것인가를 결정한다 .

Page 18: IP Routing Static Route vs. Dynamic Route

18

IGRP 의 costCost = [ K1 * Bandwidth’ + (K2 * Bandwidth’) / (256 - Load) + K3 * Delay] *

[K5 / (Reliability + K4) ]

(K1, K2, K3, K4, K5 는 상수값 )

cisco 라우터에서는 기본적으로 K1 == K3 ==1, K2 == K4 == K ==0 으로 설정되어 있어cost 를 계산하는 방식은 다음과 같이 간략화된다 .

Cost = K1 * Bandwidth’ + K3 * Delay

cisco 에서 통신매체 (LAN 매체 , WAN 매체 ) 에 따라 정의하고 있는 Bandwidth’ 와 Delay 값은 다음과 같다 .

통신매체 Delay Bandwidth’ (Bandwidth’ = 10,000,000 / ? Kbps) 위성회선 2 초 20 (500Mbps) Ethernet 100 1,000 1.5Mbps 2,000 (20msec) 6,476 64Kbps 2,000 156,250 56Kbps 2,000 178,571 10Kbps 2,000 1,000,000

1Kbps 2,000 10,000,000

- 라우터의 interface serial 에 대한 default bandwidth 는 1.5Mbps 로 지정되어 있으므로 바 른 cost 계산을 위해서는 bandwidth 를 지정해야 한다 .

Router(config-if)# bandwidth 56

Page 19: IP Routing Static Route vs. Dynamic Route

19

Verifying the IGRP Routing Tables

2621A#sh ip routeCodes:C -connected,S -static,I -IGRP,R -RIP,M –[output cut ]T -traffic engineered routeGateway of last resort is not set172.16.0.0/24 is subnetted,5 subnetsI 172.16.50.0 [100/160360 ] via 172.16.10.2,,FastEthernet0/0I 172.16.40.0 [100/160260 ] via 172.16.10.2,,FastEthernet0/0I 172.16.30.0 [100/158360 ] via 172.16.10.2,,FastEthernet0/0I 172.16.20.0 [100/158260 ] via 172.16.10.2,,FastEthernet0/0C 172.16.10.0 is directly connected,FastEthernet0/0

Page 20: IP Routing Static Route vs. Dynamic Route

20

Verifying Configuration

RouterB#sh protocolsGlobal values: Internet Protocol routing is enabledEthernet0 is up, line protocol is up Internet address is 192.168.2.254/24Serial0 is up, line protocol is up Internet address is 192.168.1.253/24Serial1 is administratively down, line protocol is down

- The show protocols command is useful because it shows you the Networklayer addresses configured on each interface.

Page 21: IP Routing Static Route vs. Dynamic Route

21

Debug Command

debug ip rip 명령은 라우팅 업데이트 상황을 보여준다 . 텔넷 세션에서 Monitoring 하게 하기 위해서는 #termianl monitor command 명령을 사용한다 .

2501B#debug ip rip2501B#undebug all2501B#terminal monitor

debug ip igrp events 명령은 작동중인 IGRP 라우팅 정보의 요약을 보여준다 .2501B#debug ip igrp events

Debug IP IGRP Transactions 명령은 인접라우터로 부터의 라우팅 Update 요청과 인접라우터로 가는 업데이트와 브로드캐스트 정보를 보여준다 ..2501B#debug ip igrp transactions