글
신입사원 직무역량 강화 08년10월29일 - ICND
서비스 운영
2008/10/29 19:03
더보기
08년10월29일-ICND
목차
--------------------------------------------------------------------------------
라우팅 프로토콜(cont.)
RIP
실습) RIP 설정
EIGRP
실습) EIGRP 구성
OSPF
실습) OSPF 설정하기
ACLs를 이용한 트래픽 제어
ACLs의 개요
Wildcard Bits
Access list 설정
실습)
HSRP
Router Redundancy : Proxy ARP
Router Redundancy : HSRP
라우팅 프로토콜(cont.)#
RIP#
6개까지 equal cost load balancing 지원. (default = 4)
최적 경로 선정에서 기준이 되는 값은 hopping-count.
설사 경로를 구성하는 망의 링크의 속도가 다르더라도 홉의 수를 가지고 판단한다.
홉수가 같은 경우 최대 6개까지 경로정보를 유지한다. (IOS버전에 따라서는 16개까지 지원하기도 함)
트래픽이 발생할 경유 현재 유지하고 있는 경로의 정보 전체를 이용해서 트래픽을 분산한다.
LOAD SHARING 이라고 표현하는게 정확함. (망의 속도와 무관하게 동일 cost로 계산하기 때문)
예시) Distance Vector, Advanced Distance Vector, Link State
> 전통적인 DV의 경우 30sec마다 전체 라우팅 테이블을 update
※ distance : how far, vector : in which direction 에 대한 정보를 자신과 인접한 라우터에 전달
해당 라우터와 직접 연결되지 않은 네트에 대한 정보를 받은 경우 정보와 함께온 hop-count+1을 해서 라우팅 테이블에 저장하는방식으로 동작함.
상호간 가진 정보를 저장해서 라우팅에 이용한다.
단점)
regular update + full update
regular update 실시에 있어 update 시점이 동기화 되지 않아서 정보가 엊갈려 looping 이 발생가능.
A라우터의 E0가 장애로 인해서 동작이 불능한 상황이 발생했을 때, 라우터가 해당 인터페이스에 관련한 정보를 테이블에서 삭제하지만, 이웃한 라우터 B가 A(E0)에 대한 정보를 주면서 A는 해당 정보를 미지의 라우터 정보로 판단하고 테이블에 업데이트하는 과정을 거치면서 두 라우터가 해당 정보를 계속해서 loop해서 홉카운트를 올려버리는 일이 발생. (routing looping occured)
이 문제로 인해서 DV방식에서는 loop방지책을 제공하지만, 여전히 루핑이 발생할 가능성이 존재
이를 해결하는 알고리즘을 추가한 방식이 Advanced DV (EIGRP) 방식
IOS의 rip 설정시에 network class 를 부여해야하는데, subnet mask를 이용하지 않고 major network 주소를 입력한다.
실습) RIP 설정#
RouterD#sh ip int brie
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 10.5.5.3 YES manual up up
Serial0/0 10.140.4.2 YES manual up up
BRI0/0 unassigned YES unset administratively down down
BRI0/0:1 unassigned YES unset administratively down down
BRI0/0:2 unassigned YES unset administratively down down
Serial0/1 10.45.45.2 YES manual up up
Loopback0 192.168.2.81 YES manual up up
RouterD#sh ip protocols
RouterD#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RouterD(config)#router rip
RouterD(config-router)#network 10.0.0.0RouterD#sh ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
Ethernet0/0 1 1 2
Serial0/0 1 1 2
Serial0/1 1 1 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
10.0.0.0
Routing Information Sources:
Gateway Distance Last Update
10.45.45.1 120 00:00:01
10.140.4.1 120 00:00:12
Distance: (default is 120)
RouterD#sh ip int brieInterface IP-Address OK? Method Status Protocol
Ethernet0/0 10.5.5.3 YES manual up up
Serial0/0 10.140.4.2 YES manual up up
BRI0/0 unassigned YES unset administratively down down
BRI0/0:1 unassigned YES unset administratively down down
BRI0/0:2 unassigned YES unset administratively down down
Serial0/1 10.45.45.2 YES manual up up
Loopback0 192.168.2.81 YES manual up up
RouterD#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 21 subnets
R 10.89.89.0 [120/2] via 10.140.4.1, 00:00:02, Serial0/0 > [AD값/Metric값]
R 10.67.67.0 [120/2] via 10.140.4.1, 00:00:02, Serial0/0 > 해당 정보를 어떻게 알았는지 표현
C 10.45.45.0 is directly connected, Serial0/1
R 10.23.23.0 [120/2] via 10.140.4.1, 00:00:02, Serial0/0
R 10.9.9.0 [120/1] via 10.140.4.1, 00:00:02, Serial0/0
R 10.8.8.0 [120/1] via 10.140.4.1, 00:00:02, Serial0/0
R 10.7.7.0 [120/1] via 10.140.4.1, 00:00:02, Serial0/0
R 10.6.6.0 [120/1] via 10.140.4.1, 00:00:03, Serial0/0
C 10.5.5.0 is directly connected, Ethernet0/0
R 10.4.4.0 [120/1] via 10.45.45.1, 00:00:10, Serial0/1
[120/1] via 10.140.4.1, 00:00:03, Serial0/0
R 10.3.3.0 [120/1] via 10.140.4.1, 00:00:03, Serial0/0
R 10.2.2.0 [120/1] via 10.140.4.1, 00:00:07, Serial0/0
R 10.1.1.0 [120/1] via 10.140.4.1, 00:00:07, Serial0/0
R 10.140.6.0 [120/1] via 10.140.4.1, 00:00:07, Serial0/0
R 10.140.7.0 [120/1] via 10.140.4.1, 00:00:07, Serial0/0
C 10.140.4.0 is directly connected, Serial0/0
R 10.140.5.0 [120/1] via 10.140.4.1, 00:00:07, Serial0/0
R 10.140.2.0 [120/1] via 10.140.4.1, 00:00:07, Serial0/0
R 10.140.3.0 [120/1] via 10.140.4.1, 00:00:07, Serial0/0
R 10.140.1.0 [120/1] via 10.140.4.1, 00:00:07, Serial0/0
R 10.140.8.0 [120/1] via 10.140.4.1, 00:00:07, Serial0/0
192.168.2.0/28 is subnetted, 1 subnets
C 192.168.2.80 is directly connected, Loopback0
EIGRP#
Advanced Distance Vector 사용
모른 RP중에서 가장 빠른 Convergence 제공 (대체 경로 마련 시간이 가장 적다)
효율적인 Bandwidth 사용
RIP의 경우는 정기적인 업데이트 정보 교환으로 인해서 오버헤드가 크기 때문에 소형망에서나 사용 가능하다.
EIGRP의 경우는 변경된 정보만을 기준으로 업데이트를 하기 때문에 효율적인 Bandwidth 를 사용한다.
IP네트워크 이외의 IPX, AppleTalk 등의 네트워크 간의 라우팅도 지원한다.
EIGRP의 경우 시스코에서 만든 프로토콜인 관계로 시스코 라우터에서만 지원함
※ 토폴로지 구성
neighbor table makeup > topology table makeup > routing table makeup
최초 이웃하는 라우터를 판단하고, 라우터가 얻은 라우팅 테이블 정보를 이용해서 네트워크 토폴로지를 learning하는 과정을 거친다는 특징이 있다. 토폴로지 테이블은 구성시 대상 네트워크에 대한 중복된 경로 정보를 모두 유지한다는 것이 특징이다. 이렇게 토폴로지를 구성하고 BP로 선택된 경로만이 라우팅 테이블에 구성되기 때문에 BP에 이상이 발생하더라도 토폴로지를 이용해서 바로 BP를 얻어오는 것이 가능하기 때문에 Convergence 시간이 가장 짧다.
EIGRP Metric = [해당 PATH 내 lowest Bandwidth] + Delay
아무리 T1급 회선을 깔아도 중간에 64K하나 끼면, 256K로만 연결된 Path보다 못하다.
Unequal-cost Load Balancing-Variance
Variance라는 비용에 대한 배수 개념을 도입.
Variance 1의 경우 최저 cost*1 내의 코스트 경로만 BP로 인정
Variance 2의 경우 최저 cost*2 내의 코스트 경로도 BP로 인정. 라우팅 테이블에 참여시켜 패킷 전달
(load sharing 과 다른 load balancing 기술이 가능해진당~)
EIGRP DUAL
현재 라우터에서 목적지 네트워크까지 가는 비용을 계산하는데 드는 비용을 Advertised Distance + (해당 라우터 까지의 비용) 식으로 더해서 구현한다.
AD of second-best route < FeasibleDistance of best route (sucessor) = feasible successor
라는 조건을 만족해야지만 해당 루트를 BP라고 판단한다. (루핑 방지를 위해서 이웃하는 라우터의 정보가 현재 라우터의 정보보다 크기가 크다면 정보 업데이트를 하지 않겠다)
EIGRP Packet
hello,
update,
query, > 토폴로지 정보를 가지고는 있지만 loop 가능성이 존재하는 경우 존재하는 feasible route를 인정하지 안고 이웃에 정보를 요청한다.
reply,
ack : 데이터를 업데이트하는 경우는 오로지 네떡에 변화가 생긴 경우이기 때문에 반드시 대상 라우터가 정보를 받았다는 확인을 받아야함.
※ 설정시 AS#를 넣어야하는데 여기서 넣는 AS#는 IAEA에서 제정하는 번호가 아니라, 단순히 관리자가 정하는 번호이다. AS#가 같아야지만 라우팅 정볼르 교환하게 됀다.
라우팅 프로토콜 설정에서 지정하는 네트워크 주소는 어떤 인터페이스를 통해서 해당 프로토콜을 사용할지를 결정하기 위해서 사용된다는 사실에 주의하자.
EIGRP는 subnetmask 대신 wildcard-mask를 이용해서 네트워크를 설정하는데, subnet mask를 이용해서 설정해도 알아서 변환해서 설정해준다.
Auto-sumary : 서브넷 정보가 해당 네트워크를 떠나서 다른 네트로 이동할때는 원래의 서브넷 정보로 싸인채로 전달된다. (맞나?)
sh ip eigrp neighbor, sh ip eigrp topology, sh ip eigrp route
실습) EIGRP 구성#
RouterD#sh ip int brieInterface IP-Address OK? Method Status Protocol
Ethernet0/0 10.5.5.3 YES manual up up
Serial0/0 10.140.4.2 YES manual up up
BRI0/0 unassigned YES unset administratively down down
BRI0/0:1 unassigned YES unset administratively down down
BRI0/0:2 unassigned YES unset administratively down down
Serial0/1 10.45.45.2 YES manual up up
Loopback0 192.168.2.81 YES manual up up
RouterD#conf tEnter configuration commands, one per line. End with CNTL/Z.
RouterD(config)#router eigrp 100
RouterD(config-router)#network 10.5.5.0 0.0.0.255
RouterD(config-router)#network 10.140.4.0 0.0.0.255
RouterD(config-router)#network 10.45.45.0 0.0.0.255
RouterD(config-router)#network 192.168.2.0 0.0.0.255
RouterD(config-router)#exit
RouterD#sh ip int briefInterface IP-Address OK? Method Status Protocol
Ethernet0/0 10.5.5.3 YES manual up up
Serial0/0 10.140.4.2 YES manual up up
BRI0/0 unassigned YES unset administratively down down
BRI0/0:1 unassigned YES unset administratively down down
BRI0/0:2 unassigned YES unset administratively down down
Serial0/1 10.45.45.2 YES manual up up
Loopback0 192.168.2.81 YES manual up up
RouterD#sh ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 10.140.4.1 to network 0.0.0.0
10.0.0.0/8 is variably subnetted, 23 subnets, 3 masks
D 10.89.89.0/24 [90/21536000] via 10.140.4.1, 00:00:43, Serial0/0
D 10.67.67.0/24 [90/21536000] via 10.140.4.1, 00:00:43, Serial0/0
C 10.45.45.0/24 is directly connected, Serial0/1
D 10.23.23.0/24 [90/21536000] via 10.140.4.1, 00:00:43, Serial0/0
D 10.9.9.0/24 [90/20514560] via 10.140.4.1, 00:00:43, Serial0/0
D 10.8.8.0/24 [90/20514560] via 10.140.4.1, 00:00:43, Serial0/0
D 10.7.7.0/24 [90/20514560] via 10.140.4.1, 00:00:44, Serial0/0
D 10.6.6.0/24 [90/20514560] via 10.140.4.1, 00:00:44, Serial0/0
C 10.5.5.0/24 is directly connected, Ethernet0/0
D 10.4.4.0/24 [90/20514560] via 10.140.4.1, 00:10:23, Serial0/0
D 10.3.3.0/24 [90/20514560] via 10.140.4.1, 00:00:44, Serial0/0
D 10.2.2.0/24 [90/20514560] via 10.140.4.1, 00:00:44, Serial0/0
D 10.1.1.0/24 [90/20514560] via 10.140.4.1, 00:00:46, Serial0/0
D 10.0.0.0/8 is a summary, 00:10:13, Null0
D 10.140.6.0/24 [90/21024000] via 10.140.4.1, 00:00:46, Serial0/0
D 10.140.7.0/24 [90/21024000] via 10.140.4.1, 00:00:46, Serial0/0
C 10.140.4.0/24 is directly connected, Serial0/0
D 10.140.5.0/24 [90/21024000] via 10.140.4.1, 00:00:46, Serial0/0
D 10.140.2.0/24 [90/21024000] via 10.140.4.1, 00:00:46, Serial0/0
D 10.140.3.0/28 [90/21024000] via 10.45.45.1, 00:10:25, Serial0/1
D 10.140.3.0/24 [90/21024000] via 10.140.4.1, 00:10:54, Serial0/0
D 10.140.1.0/24 [90/21024000] via 10.140.4.1, 00:00:46, Serial0/0
D 10.140.8.0/24 [90/21024000] via 10.140.4.1, 00:00:46, Serial0/0
D 192.168.1.0/24 [90/21152000] via 10.140.4.1, 00:00:46, Serial0/0
192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.2.80/28 is directly connected, Loopback0
D 192.168.2.0/24 is a summary, 00:10:14, Null0
D 192.168.3.0/24 [90/21152000] via 10.140.4.1, 00:00:47, Serial0/0
D* 0.0.0.0/0 [90/21049600] via 10.140.4.1, 00:00:47, Serial0/0
RouterD#sh ip protocolsRouting Protocol is "rip"
Sending updates every 30 seconds, next due in 14 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
Ethernet0/0 1 1 2
Serial0/0 1 1 2
Serial0/1 1 1 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
10.0.0.0
Routing Information Sources:
Gateway Distance Last Update
10.45.45.1 120 00:00:25
10.140.4.1 120 00:00:16
Distance: (default is 120)
Routing Protocol is "eigrp 100"
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
EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
EIGRP maximum hopcount 100
EIGRP maximum metric variance 1
Redistributing: eigrp 100
EIGRP NSF-aware route hold timer is 240s
Automatic network summarization is in effect
Automatic address summarization:
192.168.2.0/24 for Ethernet0/0, Serial0/0, Serial0/1
Summarizing with metric 128256
10.0.0.0/8 for Loopback0
Summarizing with metric 281600
Maximum path: 4
Routing for Networks:
10.5.5.0/24
10.45.45.0/24
10.140.4.0/24
192.168.2.0
Routing Information Sources:
Gateway Distance Last Update
(this router) 90 00:10:22
Gateway Distance Last Update
10.45.45.1 90 00:00:57
10.140.4.1 90 00:00:57
Distance: internal 90 external 170
RouterD#sh ip eigrp neighborIP-EIGRP neighbors for process 100
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
1 10.45.45.1 Se0/1 13 00:10:50 217 1302 0 51
0 10.140.4.1 Se0/0 13 00:11:19 351 2106 0 74
RouterD#sh ip eigrp topologyIP-EIGRP Topology Table for AS(100)/ID(192.168.2.81)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
P 0.0.0.0/0, 1 successors, FD is 21049600
via 10.140.4.1 (21049600/20537600), Serial0/0
P 10.0.0.0/8, 1 successors, FD is 281600
via Summary (281600/0), Null0
P 10.89.89.0/24, 1 successors, FD is 21536000
via 10.140.4.1 (21536000/21024000), Serial0/0
P 10.23.23.0/24, 1 successors, FD is 21536000
via 10.140.4.1 (21536000/21024000), Serial0/0
P 10.45.45.0/24, 1 successors, FD is 20512000
via Connected, Serial0/1
P 10.67.67.0/24, 1 successors, FD is 21536000
via 10.140.4.1 (21536000/21024000), Serial0/0
P 10.9.9.0/24, 1 successors, FD is 20514560
via 10.140.4.1 (20514560/28160), Serial0/0
P 10.8.8.0/24, 1 successors, FD is 20514560
via 10.140.4.1 (20514560/28160), Serial0/0
P 10.7.7.0/24, 1 successors, FD is 20514560
via 10.140.4.1 (20514560/28160), Serial0/0
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
P 10.6.6.0/24, 1 successors, FD is 20514560
via 10.140.4.1 (20514560/28160), Serial0/0
P 10.4.4.0/24, 1 successors, FD is 20514560
via 10.140.4.1 (20514560/28160), Serial0/0
via 10.45.45.1 (20537600/281600), Serial0/1
P 10.3.3.0/24, 1 successors, FD is 20514560
via 10.140.4.1 (20514560/28160), Serial0/0
P 10.2.2.0/24, 1 successors, FD is 20514560
via 10.140.4.1 (20514560/28160), Serial0/0
P 10.1.1.0/24, 1 successors, FD is 20514560
via 10.140.4.1 (20514560/28160), Serial0/0
P 10.5.5.0/24, 1 successors, FD is 281600
via Connected, Ethernet0/0
via 10.140.4.1 (20514560/28160), Serial0/0
P 192.168.2.80/28, 1 successors, FD is 128256
via Connected, Loopback0
P 192.168.1.0/24, 1 successors, FD is 21152000
via 10.140.4.1 (21152000/20640000), Serial0/0
P 192.168.2.0/24, 1 successors, FD is 128256
via Summary (128256/0), Null0
P 192.168.3.0/24, 1 successors, FD is 21152000
via 10.140.4.1 (21152000/20640000), Serial0/0
P 10.140.6.0/24, 1 successors, FD is 21024000
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
via 10.140.4.1 (21024000/20512000), Serial0/0
P 10.140.7.0/24, 1 successors, FD is 21024000
via 10.140.4.1 (21024000/20512000), Serial0/0
P 10.140.4.0/24, 1 successors, FD is 20512000
via Connected, Serial0/0
P 10.140.5.0/24, 1 successors, FD is 21024000
via 10.140.4.1 (21024000/20512000), Serial0/0
P 10.140.2.0/24, 1 successors, FD is 21024000
via 10.140.4.1 (21024000/20512000), Serial0/0
P 10.140.3.0/28, 1 successors, FD is 21024000
via 10.45.45.1 (21024000/20512000), Serial0/1
P 10.140.3.0/24, 1 successors, FD is 21024000
via 10.140.4.1 (21024000/20512000), Serial0/0
P 10.140.1.0/24, 1 successors, FD is 21024000
via 10.140.4.1 (21024000/20512000), Serial0/0
P 10.140.8.0/24, 1 successors, FD is 21024000
via 10.140.4.1 (21024000/20512000), Serial0/0
RouterD#ping 172.16.31.100
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.31.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/29/32 ms
RouterD#
OSPF#
Link-State 방식
Link는 인터페이스를 말한다. OSPF는 라우터가 가진 인터페이스와 링크의 상세 정보를 이웃하는 라우터로 전달해서 이 정보를 가지고 라우팅에 이용하는 것을 말한다. (topological db a.k.a LSDB) DV와의 차이점은 전달하는 데이터가 다르다.
이 방식을 가지고 라우팅을 하는 것은 패킷의 목적지를 찾아가는 방식이 마치 지도를 가지고 길을 찾아가는 것과 유사하다.
전체 네트의 정보를 가지고 있기 때문에 루핑이 기본적으로 발생할 여지가 없다. 단점은 전체 네트의 정보를 개발 장비가 가지고 있어야하며, 비용 계산의 단계가 오버헤드가 크기 때문에 라우터의 부하가 크다.
OSPF로 라우팅을 하는 구간을 AS라고 구분하며, 보다 효율적인 관리를 위해서 Area 라는 개념을 도입해서 관리하여 라우터의 부하를 최대한 출이는 계층적인 구조를 가져가게 된다. 마치 access layer switch, distribution lay switch처럼 regular area, transit area 라는 개념을 도입해서 각각의 라우터가 유지하는 네트워크의 정보를 최소화하고, 라우터의 부하를 줄여준다.
패킷
HELLO
hello and dead interval : 헬로우 패킷은 주기적인 전달. 최초 네이버 관계를 맺고 지속적으로 그 관계를 유지할지 말지를 결정, 보통 hello는 10초마다하고, 40초간 전달이 되지 않으면 네이버를 끊는다.
area id : 자신이 속해 있는 area #
authentication password : 인증을 통해서 데이터를 전달한다.
stub area flag : 자신의 에어리어를 제외하고, 기타 area와 통신하기 위해서는 통로가 유일한 area이며 이 안에 속해 있는 라우터는 이 플래그를 설정해야한다.
P2P링크의 경우에는 연결이 이루어지면 encapsulation type PPP, HDLC인지를 판단하고 바로 정보를 공유한다.
Broadcast Multiaccess Network 링크의 경우 DR, BDR이라는 라우터를 선정해서 라우팅 정보의 구성 및 업데이트 역할을 위임해서 작업을 간소화한다.
실습) OSPF 설정하기#
하나의 라우터에서도 여러개의 OSPF를 구성해서 사용할수 있다. process id를 이용해서 구분
네트워크 설정에는 반드시 inverse-mask, area id 를 부여해서 설정
Wildcard Mask 0: 반드시 일치 해야함을 의미, 1:dont-care bit 의미
RouterD#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 10.140.4.1 to network 0.0.0.0
D 172.16.0.0/16 [90/20640000] via 10.140.4.1, 00:01:05, Serial0/0
10.0.0.0/8 is variably subnetted, 23 subnets, 3 masks
D 10.89.89.0/24 [90/21536000] via 10.140.4.1, 00:01:05, Serial0/0
D 10.67.67.0/24 [90/21536000] via 10.140.4.1, 00:01:05, Serial0/0
C 10.45.45.0/24 is directly connected, Serial0/1
D 10.23.23.0/24 [90/21536000] via 10.140.4.1, 00:01:05, Serial0/0
D 10.9.9.0/24 [90/20514560] via 10.140.4.1, 00:01:05, Serial0/0
D 10.8.8.0/24 [90/20514560] via 10.140.4.1, 00:01:06, Serial0/0
D 10.7.7.0/24 [90/20514560] via 10.140.4.1, 00:01:06, Serial0/0
D 10.6.6.0/24 [90/20514560] via 10.140.4.1, 00:01:06, Serial0/0
C 10.5.5.0/24 is directly connected, Ethernet0/0
D 10.4.4.0/24 [90/20514560] via 10.140.4.1, 00:07:35, Serial0/0
D 10.3.3.0/24 [90/20514560] via 10.140.4.1, 00:01:06, Serial0/0
D 10.2.2.0/24 [90/20514560] via 10.140.4.1, 00:01:08, Serial0/0
D 10.1.1.0/24 [90/20514560] via 10.140.4.1, 00:01:08, Serial0/0
D 10.0.0.0/8 is a summary, 00:27:09, Null0
D 10.140.6.0/24 [90/21024000] via 10.140.4.1, 00:01:08, Serial0/0
D 10.140.7.0/24 [90/21024000] via 10.140.4.1, 00:01:08, Serial0/0
C 10.140.4.0/24 is directly connected, Serial0/0
D 10.140.5.0/24 [90/21024000] via 10.140.4.1, 00:01:08, Serial0/0
D 10.140.2.0/24 [90/21024000] via 10.140.4.1, 00:01:08, Serial0/0
D 10.140.3.0/28 [90/21024000] via 10.45.45.1, 00:27:22, Serial0/1
D 10.140.3.0/24 [90/21024000] via 10.140.4.1, 00:27:51, Serial0/0
D 10.140.1.0/24 [90/21024000] via 10.140.4.1, 00:01:08, Serial0/0
D 10.140.8.0/24 [90/21024000] via 10.140.4.1, 00:01:08, Serial0/0
D 192.168.1.0/24 [90/21152000] via 10.140.4.1, 00:01:08, Serial0/0
192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.2.80/28 is directly connected, Loopback0
D 192.168.2.0/24 is a summary, 00:27:11, Null0
D 192.168.3.0/24 [90/21152000] via 10.140.4.1, 00:01:09, Serial0/0
D* 0.0.0.0/0 [90/21049600] via 10.140.4.1, 00:01:09, Serial0/0
RouterD#conf tEnter configuration commands, one per line. End with CNTL/Z.
RouterD(config)#router ospf 100
RouterD(config-router)#router-id 5.5.5.5Reload or use "clear ip ospf process" command, for this to take effect
RouterD(config-router)#*Mar 1 22:28:33.411: %SYS-5-CONFIG_I: Configured from console by consoleclear
RouterD#clear ip ospf processReset ALL OSPF processes? [no]: yes
RouterD#*Mar 1 22:28:46.400: %OSPF-5-ADJCHG: Process 100, Nbr 10.140.3.2 on Serial0/1 from FULL to DOWN, Neighbor Down: Interface down or detached
*Mar 1 22:28:46.400: %OSPF-5-ADJCHG: Process 100, Nbr 172.16.31.100 on Serial0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*Mar 1 22:28:54.561: %OSPF-5-ADJCHG: Process 100, Nbr 172.16.31.100 on Serial0/0 from LOADING to FULL, Loading Done
*Mar 1 22:29:00.567: %OSPF-5-ADJCHG: Process 100, Nbr 172.16.31.100 on Serial0/0 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
*Mar 1 22:29:00.747: %OSPF-5-ADJCHG: Process 100, Nbr 1.1.1.1 on Serial0/0 from LOADING to FULL, Loading Done
RouterD#sh ip ospf Routing Process "ospf 100" with ID 5.5.5.5
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Number of external LSA 0. Checksum Sum 0x000000
Number of opaque AS LSA 0. Checksum Sum 0x000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
External flood list length 0
Area BACKBONE(0)
Number of interfaces in this area is 4 (1 loopback)
Area has no authentication
SPF algorithm last executed 00:00:04.864 ago
SPF algorithm executed 4 times
Area ranges are
Number of LSA 8. Checksum Sum 0x076405
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
RouterD#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.2.65 0 FULL/ - 00:00:39 10.45.45.1 Serial0/1
1.1.1.1 0 FULL/ - 081227.TXT081028.TXTlog_29090424.log 00:00:37 10.140.4.1 Serial0/0
RouterD#
ACLs를 이용한 트래픽 제어#
ACLs의 개요#
Access Control List 를 이용하면 라우터를 이용해서 마치 방화벽을 사용하는 것과 같은 효과를 얻을 수 있다.
라우터의 내부에서 발생하는 트래픽은 제어가 불가능하며, 제어 가능한 패킷은 외부에서 들어온 패킷이거나 들어와서 나가는 패킷의 형태에만 적용가능하다.
Standard Access List
L3 Src 정보만을 이용해서 체크. (aka Packet Filter)
Extended Access List
L3 Src & Port 정볼르 이용해서 체크.
Inbound Access List
외부에서 내부로 들어오는 패킷에 대한 체크
Outbound Access List
내부에서 외부로 나가는 패킷에 대한 체크
ACLs의 조건식 검사 원칙
1) Top-down Process
조건 검사의 순서가 상단에서 하단으로 내려간다.
2) First match
최초의 조건이 체크되어 맞는 경우에는 하단의 조건을 검사하지 않는다.
3) Implicit deny
모든 조건을 체크해서 맞지 않는 경우에는 deny (ACLs을 사용하고 조건을 넣지 않으면 기본적으로 deny상태)
Wildcard Bits#
eigrp, ospf 에서 사용하는 마스크와 비슷한놈~
※ 굳이 왜 익숙한 subnet mask 를 사용하지 않고, wildcard mask를 쓰느냐? 이는 subnet mask의 경우에는 반드시 연속적인 주소만을 걸러내기 때문에 wildcard mask에 비해서 유연함이 적다.
예시) 특정한 네트워크 영역에서 홀수 IP만 걸러내고 싶다면 4번째 옥텟의 마지막 요소만을 wildcard masking시키면 걸러낼 수 있다.
summarization 할 경우 172.16.0.0/24르르 기준으로 생각해야함.
Access list 설정#
실습)#
conf t
access-list 102 deny icmp any 10.1.1.2 0.0.0.0 echo log
access-list 102 permit tcp any any eq 23 log
interface s0/0
ip access-group 102 out
HSRP#
Router Redundancy : Proxy ARP#
ARP를 날렸을때 그에 대한 응답을 해주는 대행자를 두어서 차후 게이트 웨이의 장애시 발생하는 문제를 해결하는데 이용할 수있도록 만든다. (네트워크 이중화를 위한 기술이다.)
ProxyARP의 문제점은 게이트 웨이의 정보를 일정 시간동안 가지고 있기 때문에 장애상황이 즉각적으로 반영되지 못한다는 문제가 있다.
RouterD#sh ip int e0/0
Ethernet0/0 is up, line protocol is up
Internet address is 10.5.5.3/24
Broadcast address is 255.255.255.255
Address determined by setup command
MTU is 1500 bytes
Helper address is not set
Directed broadcast forwarding is disabled
Multicast reserved groups joined: 224.0.0.9 224.0.0.5 224.0.0.6
Outgoing access list is not set
Inbound access list is not set
Proxy ARP is enabled
Local Proxy ARP is disabled
Security level is default
Split horizon is enabled
ICMP redirects are always sent
ICMP unreachables are always sent
ICMP mask replies are never sent
IP fast switching is enabled
IP fast switching on the same interface is disabled
IP Flow switching is disabled
IP CEF switching is enabled
IP CEF Feature Fast switching turbo vector
IP multicast fast switching is enabled
IP multicast distributed fast switching is disabled
IP route-cache flags are Fast, CEF
Router Discovery is disabled
IP output packet accounting is disabled
IP access violation accounting is disabled
TCP/IP header compression is disabled
RTP/IP header compression is disabled
Policy routing is disabled
Network address translation is disabled
WCCP Redirect outbound is disabled
WCCP Redirect inbound is disabled
WCCP Redirect exclude is disabled
BGP Policy Mapping is disabled
RouterD#
Router Redundancy : HSRP#
가상의 라우터를 만들고, 실제로 동작하는 라우터를 연결해주어서 동작하게 만드는 기술이다.
Virtual Router, Active Router, Standby Router 를 구성하고 Active Router 장애시 Standby Router 가 라우터의 역할을 한다. HSRP상에서 AR의 장애는 AR이 Standby에게 보내는 주기적인 Hello Message를 이용해서 판단해서 하게 된다. (3초마다 정보를 보내고 10초동안 메시지가 오지 않을 경우 장애로 분류)
VLAN 별로 가상의 라우터를 구성하고, Active Standby를 서로 교차해서 라우터로 동작하게 만들수 있다.
목차
--------------------------------------------------------------------------------
라우팅 프로토콜(cont.)
RIP
실습) RIP 설정
EIGRP
실습) EIGRP 구성
OSPF
실습) OSPF 설정하기
ACLs를 이용한 트래픽 제어
ACLs의 개요
Wildcard Bits
Access list 설정
실습)
HSRP
Router Redundancy : Proxy ARP
Router Redundancy : HSRP
라우팅 프로토콜(cont.)#
RIP#
6개까지 equal cost load balancing 지원. (default = 4)
최적 경로 선정에서 기준이 되는 값은 hopping-count.
설사 경로를 구성하는 망의 링크의 속도가 다르더라도 홉의 수를 가지고 판단한다.
홉수가 같은 경우 최대 6개까지 경로정보를 유지한다. (IOS버전에 따라서는 16개까지 지원하기도 함)
트래픽이 발생할 경유 현재 유지하고 있는 경로의 정보 전체를 이용해서 트래픽을 분산한다.
LOAD SHARING 이라고 표현하는게 정확함. (망의 속도와 무관하게 동일 cost로 계산하기 때문)
예시) Distance Vector, Advanced Distance Vector, Link State
> 전통적인 DV의 경우 30sec마다 전체 라우팅 테이블을 update
※ distance : how far, vector : in which direction 에 대한 정보를 자신과 인접한 라우터에 전달
해당 라우터와 직접 연결되지 않은 네트에 대한 정보를 받은 경우 정보와 함께온 hop-count+1을 해서 라우팅 테이블에 저장하는방식으로 동작함.
상호간 가진 정보를 저장해서 라우팅에 이용한다.
단점)
regular update + full update
regular update 실시에 있어 update 시점이 동기화 되지 않아서 정보가 엊갈려 looping 이 발생가능.
A라우터의 E0가 장애로 인해서 동작이 불능한 상황이 발생했을 때, 라우터가 해당 인터페이스에 관련한 정보를 테이블에서 삭제하지만, 이웃한 라우터 B가 A(E0)에 대한 정보를 주면서 A는 해당 정보를 미지의 라우터 정보로 판단하고 테이블에 업데이트하는 과정을 거치면서 두 라우터가 해당 정보를 계속해서 loop해서 홉카운트를 올려버리는 일이 발생. (routing looping occured)
이 문제로 인해서 DV방식에서는 loop방지책을 제공하지만, 여전히 루핑이 발생할 가능성이 존재
이를 해결하는 알고리즘을 추가한 방식이 Advanced DV (EIGRP) 방식
IOS의 rip 설정시에 network class 를 부여해야하는데, subnet mask를 이용하지 않고 major network 주소를 입력한다.
실습) RIP 설정#
RouterD#sh ip int brie
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 10.5.5.3 YES manual up up
Serial0/0 10.140.4.2 YES manual up up
BRI0/0 unassigned YES unset administratively down down
BRI0/0:1 unassigned YES unset administratively down down
BRI0/0:2 unassigned YES unset administratively down down
Serial0/1 10.45.45.2 YES manual up up
Loopback0 192.168.2.81 YES manual up up
RouterD#sh ip protocols
RouterD#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RouterD(config)#router rip
RouterD(config-router)#network 10.0.0.0RouterD#sh ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
Ethernet0/0 1 1 2
Serial0/0 1 1 2
Serial0/1 1 1 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
10.0.0.0
Routing Information Sources:
Gateway Distance Last Update
10.45.45.1 120 00:00:01
10.140.4.1 120 00:00:12
Distance: (default is 120)
RouterD#sh ip int brieInterface IP-Address OK? Method Status Protocol
Ethernet0/0 10.5.5.3 YES manual up up
Serial0/0 10.140.4.2 YES manual up up
BRI0/0 unassigned YES unset administratively down down
BRI0/0:1 unassigned YES unset administratively down down
BRI0/0:2 unassigned YES unset administratively down down
Serial0/1 10.45.45.2 YES manual up up
Loopback0 192.168.2.81 YES manual up up
RouterD#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 21 subnets
R 10.89.89.0 [120/2] via 10.140.4.1, 00:00:02, Serial0/0 > [AD값/Metric값]
R 10.67.67.0 [120/2] via 10.140.4.1, 00:00:02, Serial0/0 > 해당 정보를 어떻게 알았는지 표현
C 10.45.45.0 is directly connected, Serial0/1
R 10.23.23.0 [120/2] via 10.140.4.1, 00:00:02, Serial0/0
R 10.9.9.0 [120/1] via 10.140.4.1, 00:00:02, Serial0/0
R 10.8.8.0 [120/1] via 10.140.4.1, 00:00:02, Serial0/0
R 10.7.7.0 [120/1] via 10.140.4.1, 00:00:02, Serial0/0
R 10.6.6.0 [120/1] via 10.140.4.1, 00:00:03, Serial0/0
C 10.5.5.0 is directly connected, Ethernet0/0
R 10.4.4.0 [120/1] via 10.45.45.1, 00:00:10, Serial0/1
[120/1] via 10.140.4.1, 00:00:03, Serial0/0
R 10.3.3.0 [120/1] via 10.140.4.1, 00:00:03, Serial0/0
R 10.2.2.0 [120/1] via 10.140.4.1, 00:00:07, Serial0/0
R 10.1.1.0 [120/1] via 10.140.4.1, 00:00:07, Serial0/0
R 10.140.6.0 [120/1] via 10.140.4.1, 00:00:07, Serial0/0
R 10.140.7.0 [120/1] via 10.140.4.1, 00:00:07, Serial0/0
C 10.140.4.0 is directly connected, Serial0/0
R 10.140.5.0 [120/1] via 10.140.4.1, 00:00:07, Serial0/0
R 10.140.2.0 [120/1] via 10.140.4.1, 00:00:07, Serial0/0
R 10.140.3.0 [120/1] via 10.140.4.1, 00:00:07, Serial0/0
R 10.140.1.0 [120/1] via 10.140.4.1, 00:00:07, Serial0/0
R 10.140.8.0 [120/1] via 10.140.4.1, 00:00:07, Serial0/0
192.168.2.0/28 is subnetted, 1 subnets
C 192.168.2.80 is directly connected, Loopback0
EIGRP#
Advanced Distance Vector 사용
모른 RP중에서 가장 빠른 Convergence 제공 (대체 경로 마련 시간이 가장 적다)
효율적인 Bandwidth 사용
RIP의 경우는 정기적인 업데이트 정보 교환으로 인해서 오버헤드가 크기 때문에 소형망에서나 사용 가능하다.
EIGRP의 경우는 변경된 정보만을 기준으로 업데이트를 하기 때문에 효율적인 Bandwidth 를 사용한다.
IP네트워크 이외의 IPX, AppleTalk 등의 네트워크 간의 라우팅도 지원한다.
EIGRP의 경우 시스코에서 만든 프로토콜인 관계로 시스코 라우터에서만 지원함
※ 토폴로지 구성
neighbor table makeup > topology table makeup > routing table makeup
최초 이웃하는 라우터를 판단하고, 라우터가 얻은 라우팅 테이블 정보를 이용해서 네트워크 토폴로지를 learning하는 과정을 거친다는 특징이 있다. 토폴로지 테이블은 구성시 대상 네트워크에 대한 중복된 경로 정보를 모두 유지한다는 것이 특징이다. 이렇게 토폴로지를 구성하고 BP로 선택된 경로만이 라우팅 테이블에 구성되기 때문에 BP에 이상이 발생하더라도 토폴로지를 이용해서 바로 BP를 얻어오는 것이 가능하기 때문에 Convergence 시간이 가장 짧다.
EIGRP Metric = [해당 PATH 내 lowest Bandwidth] + Delay
아무리 T1급 회선을 깔아도 중간에 64K하나 끼면, 256K로만 연결된 Path보다 못하다.
Unequal-cost Load Balancing-Variance
Variance라는 비용에 대한 배수 개념을 도입.
Variance 1의 경우 최저 cost*1 내의 코스트 경로만 BP로 인정
Variance 2의 경우 최저 cost*2 내의 코스트 경로도 BP로 인정. 라우팅 테이블에 참여시켜 패킷 전달
(load sharing 과 다른 load balancing 기술이 가능해진당~)
EIGRP DUAL
현재 라우터에서 목적지 네트워크까지 가는 비용을 계산하는데 드는 비용을 Advertised Distance + (해당 라우터 까지의 비용) 식으로 더해서 구현한다.
AD of second-best route < FeasibleDistance of best route (sucessor) = feasible successor
라는 조건을 만족해야지만 해당 루트를 BP라고 판단한다. (루핑 방지를 위해서 이웃하는 라우터의 정보가 현재 라우터의 정보보다 크기가 크다면 정보 업데이트를 하지 않겠다)
EIGRP Packet
hello,
update,
query, > 토폴로지 정보를 가지고는 있지만 loop 가능성이 존재하는 경우 존재하는 feasible route를 인정하지 안고 이웃에 정보를 요청한다.
reply,
ack : 데이터를 업데이트하는 경우는 오로지 네떡에 변화가 생긴 경우이기 때문에 반드시 대상 라우터가 정보를 받았다는 확인을 받아야함.
※ 설정시 AS#를 넣어야하는데 여기서 넣는 AS#는 IAEA에서 제정하는 번호가 아니라, 단순히 관리자가 정하는 번호이다. AS#가 같아야지만 라우팅 정볼르 교환하게 됀다.
라우팅 프로토콜 설정에서 지정하는 네트워크 주소는 어떤 인터페이스를 통해서 해당 프로토콜을 사용할지를 결정하기 위해서 사용된다는 사실에 주의하자.
EIGRP는 subnetmask 대신 wildcard-mask를 이용해서 네트워크를 설정하는데, subnet mask를 이용해서 설정해도 알아서 변환해서 설정해준다.
Auto-sumary : 서브넷 정보가 해당 네트워크를 떠나서 다른 네트로 이동할때는 원래의 서브넷 정보로 싸인채로 전달된다. (맞나?)
sh ip eigrp neighbor, sh ip eigrp topology, sh ip eigrp route
실습) EIGRP 구성#
RouterD#sh ip int brieInterface IP-Address OK? Method Status Protocol
Ethernet0/0 10.5.5.3 YES manual up up
Serial0/0 10.140.4.2 YES manual up up
BRI0/0 unassigned YES unset administratively down down
BRI0/0:1 unassigned YES unset administratively down down
BRI0/0:2 unassigned YES unset administratively down down
Serial0/1 10.45.45.2 YES manual up up
Loopback0 192.168.2.81 YES manual up up
RouterD#conf tEnter configuration commands, one per line. End with CNTL/Z.
RouterD(config)#router eigrp 100
RouterD(config-router)#network 10.5.5.0 0.0.0.255
RouterD(config-router)#network 10.140.4.0 0.0.0.255
RouterD(config-router)#network 10.45.45.0 0.0.0.255
RouterD(config-router)#network 192.168.2.0 0.0.0.255
RouterD(config-router)#exit
RouterD#sh ip int briefInterface IP-Address OK? Method Status Protocol
Ethernet0/0 10.5.5.3 YES manual up up
Serial0/0 10.140.4.2 YES manual up up
BRI0/0 unassigned YES unset administratively down down
BRI0/0:1 unassigned YES unset administratively down down
BRI0/0:2 unassigned YES unset administratively down down
Serial0/1 10.45.45.2 YES manual up up
Loopback0 192.168.2.81 YES manual up up
RouterD#sh ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 10.140.4.1 to network 0.0.0.0
10.0.0.0/8 is variably subnetted, 23 subnets, 3 masks
D 10.89.89.0/24 [90/21536000] via 10.140.4.1, 00:00:43, Serial0/0
D 10.67.67.0/24 [90/21536000] via 10.140.4.1, 00:00:43, Serial0/0
C 10.45.45.0/24 is directly connected, Serial0/1
D 10.23.23.0/24 [90/21536000] via 10.140.4.1, 00:00:43, Serial0/0
D 10.9.9.0/24 [90/20514560] via 10.140.4.1, 00:00:43, Serial0/0
D 10.8.8.0/24 [90/20514560] via 10.140.4.1, 00:00:43, Serial0/0
D 10.7.7.0/24 [90/20514560] via 10.140.4.1, 00:00:44, Serial0/0
D 10.6.6.0/24 [90/20514560] via 10.140.4.1, 00:00:44, Serial0/0
C 10.5.5.0/24 is directly connected, Ethernet0/0
D 10.4.4.0/24 [90/20514560] via 10.140.4.1, 00:10:23, Serial0/0
D 10.3.3.0/24 [90/20514560] via 10.140.4.1, 00:00:44, Serial0/0
D 10.2.2.0/24 [90/20514560] via 10.140.4.1, 00:00:44, Serial0/0
D 10.1.1.0/24 [90/20514560] via 10.140.4.1, 00:00:46, Serial0/0
D 10.0.0.0/8 is a summary, 00:10:13, Null0
D 10.140.6.0/24 [90/21024000] via 10.140.4.1, 00:00:46, Serial0/0
D 10.140.7.0/24 [90/21024000] via 10.140.4.1, 00:00:46, Serial0/0
C 10.140.4.0/24 is directly connected, Serial0/0
D 10.140.5.0/24 [90/21024000] via 10.140.4.1, 00:00:46, Serial0/0
D 10.140.2.0/24 [90/21024000] via 10.140.4.1, 00:00:46, Serial0/0
D 10.140.3.0/28 [90/21024000] via 10.45.45.1, 00:10:25, Serial0/1
D 10.140.3.0/24 [90/21024000] via 10.140.4.1, 00:10:54, Serial0/0
D 10.140.1.0/24 [90/21024000] via 10.140.4.1, 00:00:46, Serial0/0
D 10.140.8.0/24 [90/21024000] via 10.140.4.1, 00:00:46, Serial0/0
D 192.168.1.0/24 [90/21152000] via 10.140.4.1, 00:00:46, Serial0/0
192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.2.80/28 is directly connected, Loopback0
D 192.168.2.0/24 is a summary, 00:10:14, Null0
D 192.168.3.0/24 [90/21152000] via 10.140.4.1, 00:00:47, Serial0/0
D* 0.0.0.0/0 [90/21049600] via 10.140.4.1, 00:00:47, Serial0/0
RouterD#sh ip protocolsRouting Protocol is "rip"
Sending updates every 30 seconds, next due in 14 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
Ethernet0/0 1 1 2
Serial0/0 1 1 2
Serial0/1 1 1 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
10.0.0.0
Routing Information Sources:
Gateway Distance Last Update
10.45.45.1 120 00:00:25
10.140.4.1 120 00:00:16
Distance: (default is 120)
Routing Protocol is "eigrp 100"
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
EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
EIGRP maximum hopcount 100
EIGRP maximum metric variance 1
Redistributing: eigrp 100
EIGRP NSF-aware route hold timer is 240s
Automatic network summarization is in effect
Automatic address summarization:
192.168.2.0/24 for Ethernet0/0, Serial0/0, Serial0/1
Summarizing with metric 128256
10.0.0.0/8 for Loopback0
Summarizing with metric 281600
Maximum path: 4
Routing for Networks:
10.5.5.0/24
10.45.45.0/24
10.140.4.0/24
192.168.2.0
Routing Information Sources:
Gateway Distance Last Update
(this router) 90 00:10:22
Gateway Distance Last Update
10.45.45.1 90 00:00:57
10.140.4.1 90 00:00:57
Distance: internal 90 external 170
RouterD#sh ip eigrp neighborIP-EIGRP neighbors for process 100
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
1 10.45.45.1 Se0/1 13 00:10:50 217 1302 0 51
0 10.140.4.1 Se0/0 13 00:11:19 351 2106 0 74
RouterD#sh ip eigrp topologyIP-EIGRP Topology Table for AS(100)/ID(192.168.2.81)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
P 0.0.0.0/0, 1 successors, FD is 21049600
via 10.140.4.1 (21049600/20537600), Serial0/0
P 10.0.0.0/8, 1 successors, FD is 281600
via Summary (281600/0), Null0
P 10.89.89.0/24, 1 successors, FD is 21536000
via 10.140.4.1 (21536000/21024000), Serial0/0
P 10.23.23.0/24, 1 successors, FD is 21536000
via 10.140.4.1 (21536000/21024000), Serial0/0
P 10.45.45.0/24, 1 successors, FD is 20512000
via Connected, Serial0/1
P 10.67.67.0/24, 1 successors, FD is 21536000
via 10.140.4.1 (21536000/21024000), Serial0/0
P 10.9.9.0/24, 1 successors, FD is 20514560
via 10.140.4.1 (20514560/28160), Serial0/0
P 10.8.8.0/24, 1 successors, FD is 20514560
via 10.140.4.1 (20514560/28160), Serial0/0
P 10.7.7.0/24, 1 successors, FD is 20514560
via 10.140.4.1 (20514560/28160), Serial0/0
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
P 10.6.6.0/24, 1 successors, FD is 20514560
via 10.140.4.1 (20514560/28160), Serial0/0
P 10.4.4.0/24, 1 successors, FD is 20514560
via 10.140.4.1 (20514560/28160), Serial0/0
via 10.45.45.1 (20537600/281600), Serial0/1
P 10.3.3.0/24, 1 successors, FD is 20514560
via 10.140.4.1 (20514560/28160), Serial0/0
P 10.2.2.0/24, 1 successors, FD is 20514560
via 10.140.4.1 (20514560/28160), Serial0/0
P 10.1.1.0/24, 1 successors, FD is 20514560
via 10.140.4.1 (20514560/28160), Serial0/0
P 10.5.5.0/24, 1 successors, FD is 281600
via Connected, Ethernet0/0
via 10.140.4.1 (20514560/28160), Serial0/0
P 192.168.2.80/28, 1 successors, FD is 128256
via Connected, Loopback0
P 192.168.1.0/24, 1 successors, FD is 21152000
via 10.140.4.1 (21152000/20640000), Serial0/0
P 192.168.2.0/24, 1 successors, FD is 128256
via Summary (128256/0), Null0
P 192.168.3.0/24, 1 successors, FD is 21152000
via 10.140.4.1 (21152000/20640000), Serial0/0
P 10.140.6.0/24, 1 successors, FD is 21024000
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
via 10.140.4.1 (21024000/20512000), Serial0/0
P 10.140.7.0/24, 1 successors, FD is 21024000
via 10.140.4.1 (21024000/20512000), Serial0/0
P 10.140.4.0/24, 1 successors, FD is 20512000
via Connected, Serial0/0
P 10.140.5.0/24, 1 successors, FD is 21024000
via 10.140.4.1 (21024000/20512000), Serial0/0
P 10.140.2.0/24, 1 successors, FD is 21024000
via 10.140.4.1 (21024000/20512000), Serial0/0
P 10.140.3.0/28, 1 successors, FD is 21024000
via 10.45.45.1 (21024000/20512000), Serial0/1
P 10.140.3.0/24, 1 successors, FD is 21024000
via 10.140.4.1 (21024000/20512000), Serial0/0
P 10.140.1.0/24, 1 successors, FD is 21024000
via 10.140.4.1 (21024000/20512000), Serial0/0
P 10.140.8.0/24, 1 successors, FD is 21024000
via 10.140.4.1 (21024000/20512000), Serial0/0
RouterD#ping 172.16.31.100
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.31.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/29/32 ms
RouterD#
OSPF#
Link-State 방식
Link는 인터페이스를 말한다. OSPF는 라우터가 가진 인터페이스와 링크의 상세 정보를 이웃하는 라우터로 전달해서 이 정보를 가지고 라우팅에 이용하는 것을 말한다. (topological db a.k.a LSDB) DV와의 차이점은 전달하는 데이터가 다르다.
이 방식을 가지고 라우팅을 하는 것은 패킷의 목적지를 찾아가는 방식이 마치 지도를 가지고 길을 찾아가는 것과 유사하다.
전체 네트의 정보를 가지고 있기 때문에 루핑이 기본적으로 발생할 여지가 없다. 단점은 전체 네트의 정보를 개발 장비가 가지고 있어야하며, 비용 계산의 단계가 오버헤드가 크기 때문에 라우터의 부하가 크다.
OSPF로 라우팅을 하는 구간을 AS라고 구분하며, 보다 효율적인 관리를 위해서 Area 라는 개념을 도입해서 관리하여 라우터의 부하를 최대한 출이는 계층적인 구조를 가져가게 된다. 마치 access layer switch, distribution lay switch처럼 regular area, transit area 라는 개념을 도입해서 각각의 라우터가 유지하는 네트워크의 정보를 최소화하고, 라우터의 부하를 줄여준다.
패킷
HELLO
hello and dead interval : 헬로우 패킷은 주기적인 전달. 최초 네이버 관계를 맺고 지속적으로 그 관계를 유지할지 말지를 결정, 보통 hello는 10초마다하고, 40초간 전달이 되지 않으면 네이버를 끊는다.
area id : 자신이 속해 있는 area #
authentication password : 인증을 통해서 데이터를 전달한다.
stub area flag : 자신의 에어리어를 제외하고, 기타 area와 통신하기 위해서는 통로가 유일한 area이며 이 안에 속해 있는 라우터는 이 플래그를 설정해야한다.
P2P링크의 경우에는 연결이 이루어지면 encapsulation type PPP, HDLC인지를 판단하고 바로 정보를 공유한다.
Broadcast Multiaccess Network 링크의 경우 DR, BDR이라는 라우터를 선정해서 라우팅 정보의 구성 및 업데이트 역할을 위임해서 작업을 간소화한다.
실습) OSPF 설정하기#
하나의 라우터에서도 여러개의 OSPF를 구성해서 사용할수 있다. process id를 이용해서 구분
네트워크 설정에는 반드시 inverse-mask, area id 를 부여해서 설정
Wildcard Mask 0: 반드시 일치 해야함을 의미, 1:dont-care bit 의미
RouterD#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 10.140.4.1 to network 0.0.0.0
D 172.16.0.0/16 [90/20640000] via 10.140.4.1, 00:01:05, Serial0/0
10.0.0.0/8 is variably subnetted, 23 subnets, 3 masks
D 10.89.89.0/24 [90/21536000] via 10.140.4.1, 00:01:05, Serial0/0
D 10.67.67.0/24 [90/21536000] via 10.140.4.1, 00:01:05, Serial0/0
C 10.45.45.0/24 is directly connected, Serial0/1
D 10.23.23.0/24 [90/21536000] via 10.140.4.1, 00:01:05, Serial0/0
D 10.9.9.0/24 [90/20514560] via 10.140.4.1, 00:01:05, Serial0/0
D 10.8.8.0/24 [90/20514560] via 10.140.4.1, 00:01:06, Serial0/0
D 10.7.7.0/24 [90/20514560] via 10.140.4.1, 00:01:06, Serial0/0
D 10.6.6.0/24 [90/20514560] via 10.140.4.1, 00:01:06, Serial0/0
C 10.5.5.0/24 is directly connected, Ethernet0/0
D 10.4.4.0/24 [90/20514560] via 10.140.4.1, 00:07:35, Serial0/0
D 10.3.3.0/24 [90/20514560] via 10.140.4.1, 00:01:06, Serial0/0
D 10.2.2.0/24 [90/20514560] via 10.140.4.1, 00:01:08, Serial0/0
D 10.1.1.0/24 [90/20514560] via 10.140.4.1, 00:01:08, Serial0/0
D 10.0.0.0/8 is a summary, 00:27:09, Null0
D 10.140.6.0/24 [90/21024000] via 10.140.4.1, 00:01:08, Serial0/0
D 10.140.7.0/24 [90/21024000] via 10.140.4.1, 00:01:08, Serial0/0
C 10.140.4.0/24 is directly connected, Serial0/0
D 10.140.5.0/24 [90/21024000] via 10.140.4.1, 00:01:08, Serial0/0
D 10.140.2.0/24 [90/21024000] via 10.140.4.1, 00:01:08, Serial0/0
D 10.140.3.0/28 [90/21024000] via 10.45.45.1, 00:27:22, Serial0/1
D 10.140.3.0/24 [90/21024000] via 10.140.4.1, 00:27:51, Serial0/0
D 10.140.1.0/24 [90/21024000] via 10.140.4.1, 00:01:08, Serial0/0
D 10.140.8.0/24 [90/21024000] via 10.140.4.1, 00:01:08, Serial0/0
D 192.168.1.0/24 [90/21152000] via 10.140.4.1, 00:01:08, Serial0/0
192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.2.80/28 is directly connected, Loopback0
D 192.168.2.0/24 is a summary, 00:27:11, Null0
D 192.168.3.0/24 [90/21152000] via 10.140.4.1, 00:01:09, Serial0/0
D* 0.0.0.0/0 [90/21049600] via 10.140.4.1, 00:01:09, Serial0/0
RouterD#conf tEnter configuration commands, one per line. End with CNTL/Z.
RouterD(config)#router ospf 100
RouterD(config-router)#router-id 5.5.5.5Reload or use "clear ip ospf process" command, for this to take effect
RouterD(config-router)#*Mar 1 22:28:33.411: %SYS-5-CONFIG_I: Configured from console by consoleclear
RouterD#clear ip ospf processReset ALL OSPF processes? [no]: yes
RouterD#*Mar 1 22:28:46.400: %OSPF-5-ADJCHG: Process 100, Nbr 10.140.3.2 on Serial0/1 from FULL to DOWN, Neighbor Down: Interface down or detached
*Mar 1 22:28:46.400: %OSPF-5-ADJCHG: Process 100, Nbr 172.16.31.100 on Serial0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*Mar 1 22:28:54.561: %OSPF-5-ADJCHG: Process 100, Nbr 172.16.31.100 on Serial0/0 from LOADING to FULL, Loading Done
*Mar 1 22:29:00.567: %OSPF-5-ADJCHG: Process 100, Nbr 172.16.31.100 on Serial0/0 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
*Mar 1 22:29:00.747: %OSPF-5-ADJCHG: Process 100, Nbr 1.1.1.1 on Serial0/0 from LOADING to FULL, Loading Done
RouterD#sh ip ospf Routing Process "ospf 100" with ID 5.5.5.5
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Number of external LSA 0. Checksum Sum 0x000000
Number of opaque AS LSA 0. Checksum Sum 0x000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
External flood list length 0
Area BACKBONE(0)
Number of interfaces in this area is 4 (1 loopback)
Area has no authentication
SPF algorithm last executed 00:00:04.864 ago
SPF algorithm executed 4 times
Area ranges are
Number of LSA 8. Checksum Sum 0x076405
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
RouterD#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.2.65 0 FULL/ - 00:00:39 10.45.45.1 Serial0/1
1.1.1.1 0 FULL/ - 081227.TXT081028.TXTlog_29090424.log 00:00:37 10.140.4.1 Serial0/0
RouterD#
ACLs를 이용한 트래픽 제어#
ACLs의 개요#
Access Control List 를 이용하면 라우터를 이용해서 마치 방화벽을 사용하는 것과 같은 효과를 얻을 수 있다.
라우터의 내부에서 발생하는 트래픽은 제어가 불가능하며, 제어 가능한 패킷은 외부에서 들어온 패킷이거나 들어와서 나가는 패킷의 형태에만 적용가능하다.
Standard Access List
L3 Src 정보만을 이용해서 체크. (aka Packet Filter)
Extended Access List
L3 Src & Port 정볼르 이용해서 체크.
Inbound Access List
외부에서 내부로 들어오는 패킷에 대한 체크
Outbound Access List
내부에서 외부로 나가는 패킷에 대한 체크
ACLs의 조건식 검사 원칙
1) Top-down Process
조건 검사의 순서가 상단에서 하단으로 내려간다.
2) First match
최초의 조건이 체크되어 맞는 경우에는 하단의 조건을 검사하지 않는다.
3) Implicit deny
모든 조건을 체크해서 맞지 않는 경우에는 deny (ACLs을 사용하고 조건을 넣지 않으면 기본적으로 deny상태)
Wildcard Bits#
eigrp, ospf 에서 사용하는 마스크와 비슷한놈~
※ 굳이 왜 익숙한 subnet mask 를 사용하지 않고, wildcard mask를 쓰느냐? 이는 subnet mask의 경우에는 반드시 연속적인 주소만을 걸러내기 때문에 wildcard mask에 비해서 유연함이 적다.
예시) 특정한 네트워크 영역에서 홀수 IP만 걸러내고 싶다면 4번째 옥텟의 마지막 요소만을 wildcard masking시키면 걸러낼 수 있다.
summarization 할 경우 172.16.0.0/24르르 기준으로 생각해야함.
Access list 설정#
실습)#
conf t
access-list 102 deny icmp any 10.1.1.2 0.0.0.0 echo log
access-list 102 permit tcp any any eq 23 log
interface s0/0
ip access-group 102 out
HSRP#
Router Redundancy : Proxy ARP#
ARP를 날렸을때 그에 대한 응답을 해주는 대행자를 두어서 차후 게이트 웨이의 장애시 발생하는 문제를 해결하는데 이용할 수있도록 만든다. (네트워크 이중화를 위한 기술이다.)
ProxyARP의 문제점은 게이트 웨이의 정보를 일정 시간동안 가지고 있기 때문에 장애상황이 즉각적으로 반영되지 못한다는 문제가 있다.
RouterD#sh ip int e0/0
Ethernet0/0 is up, line protocol is up
Internet address is 10.5.5.3/24
Broadcast address is 255.255.255.255
Address determined by setup command
MTU is 1500 bytes
Helper address is not set
Directed broadcast forwarding is disabled
Multicast reserved groups joined: 224.0.0.9 224.0.0.5 224.0.0.6
Outgoing access list is not set
Inbound access list is not set
Proxy ARP is enabled
Local Proxy ARP is disabled
Security level is default
Split horizon is enabled
ICMP redirects are always sent
ICMP unreachables are always sent
ICMP mask replies are never sent
IP fast switching is enabled
IP fast switching on the same interface is disabled
IP Flow switching is disabled
IP CEF switching is enabled
IP CEF Feature Fast switching turbo vector
IP multicast fast switching is enabled
IP multicast distributed fast switching is disabled
IP route-cache flags are Fast, CEF
Router Discovery is disabled
IP output packet accounting is disabled
IP access violation accounting is disabled
TCP/IP header compression is disabled
RTP/IP header compression is disabled
Policy routing is disabled
Network address translation is disabled
WCCP Redirect outbound is disabled
WCCP Redirect inbound is disabled
WCCP Redirect exclude is disabled
BGP Policy Mapping is disabled
RouterD#
Router Redundancy : HSRP#
가상의 라우터를 만들고, 실제로 동작하는 라우터를 연결해주어서 동작하게 만드는 기술이다.
Virtual Router, Active Router, Standby Router 를 구성하고 Active Router 장애시 Standby Router 가 라우터의 역할을 한다. HSRP상에서 AR의 장애는 AR이 Standby에게 보내는 주기적인 Hello Message를 이용해서 판단해서 하게 된다. (3초마다 정보를 보내고 10초동안 메시지가 오지 않을 경우 장애로 분류)
VLAN 별로 가상의 라우터를 구성하고, Active Standby를 서로 교차해서 라우터로 동작하게 만들수 있다.
소셜웹 반응글
접기▲
소셜웹 더보기▼