For the Horde!!

검색어 : Study (41)

  1. 2014. 11. 19. Access-List 실습 ( VTY ) 2014.11.19
  2. 2014. 11. 18. Access-List 실습 2014.11.18
  3. 2014. 11. 18. Access-List 이론 2014.11.18
  4. 2014. 11. 17. OSPF 2014.11.17

2014. 11. 19. Access-List 실습 ( VTY )

 

 

 조건

1. 10.1.5.2 의 서버로의 접근을 차단

2. 그외 모든 네트워크는 허용

 R1 (S)

!
interface FastEthernet0/0
 ip address 10.1.1.1 255.255.255.128
 ip access-group 2 in
 ip access-group 1 out
 duplex auto
 speed auto
!
access-list 1 deny 10.1.5.0 0.0.0.127
access-list 1 permit any
access-list 2 permit host 10.1.1.10
!
line con 0
 exec-timeout 0 0
 logging synchronous
line vty 0 4
 access-class 2 out
 password cisco
 login
line vty 5 15
 access-class 2 out
 login
!

Seoul#sh access-lists
Standard IP access list 1
    deny 10.1.5.0 0.0.0.127 (32 match(es))
    permit any (40 match(es))
Standard IP access list 2
    permit host 10.1.1.10 (85 match(es))

 

 조건

1. 관리자PC의 서버로의 ping은 허용

2. 관리자 및 사용자의 서버로의 telnet은 차단

 R5 (J)

!
interface FastEthernet0/1.1
 encapsulation dot1Q 10
 ip address 10.1.5.1 255.255.255.128
!
interface FastEthernet0/1.2
 encapsulation dot1Q 20
 ip address 10.1.5.129 255.255.255.128
 ip access-group 100 in
!

access-list 100 permit icmp host 10.1.5.130 host 10.1.1.10

access-list 100 deny tcp any any eq telnet

!

Jeju#sh access-lists
Extended IP access list 100
    deny tcp any any eq telnet (12 match(es))
    permit icmp host 10.1.5.130 host 10.1.1.10 (4 match(es))

 

 조건

1. 관리자 외에는 telnet을 차단

2. ping의 모든 트래픽을 차단

3. 그 외 트래픽은 허용

4. 단 Seoul 라우터에서 설정

 R1 (S) 

!
interface FastEthernet0/0
 ip address 10.1.1.1 255.255.255.128
 ip access-group 100 out
 duplex auto
 speed auto
!

access-list 100 permit tcp host 10.1.5.130 host 10.1.1.10 eq telnet
access-list 100 permit tcp host 10.1.3.10 host 10.1.1.10 eq telnet
access-list 100 deny icmp any any
access-list 100 permit ip any any
access-list 2 permit host 10.1.1.10
!

line con 0
 exec-timeout 0 0
 logging synchronous
line vty 0 4
 access-class 2 out
 password cisco
 login
line vty 5 15
 access-class 2 out
 login
!

Seoul#sh access-lists
Extended IP access list 100
    permit tcp host 10.1.5.130 host 10.1.1.10 eq telnet (8 match(es))
    permit tcp host 10.1.3.10 host 10.1.1.10 eq telnet (8 match(es))
    deny icmp any any (2 match(es))
    permit ip any any
Standard IP access list 2
    permit host 10.1.1.10

 

'Study > Cisco' 카테고리의 다른 글

2014. 11. 24. PAT  (0) 2014.11.24
2014. 11. 20. NAT Dynamic  (0) 2014.11.20
2014. 11. 18. Access-List 실습  (0) 2014.11.18
2014. 11. 17. OSPF  (0) 2014.11.17
EIGRP 라우팅 세팅  (2) 2014.11.13
   

2014. 11. 18. Access-List 실습

 

 

2014.11.17. OSFP 설정에 추가 설정 적용

제주 아래 네트워크 trunk적용

 

 R1 (S) 

!
interface FastEthernet0/0
 ip address 10.1.1.1 255.255.255.128
 ip access-group 1 out
 duplex auto
 speed auto
!

interface Serial0/0/0
 ip address 10.1.12.1 255.255.255.252
!
interface Serial0/0/1
 ip address 100.1.1.1 255.255.255.128
 clock rate 2000000
!

router ospf 1
 log-adjacency-changes
 network 10.1.1.0 0.0.0.255 area 1
 network 100.1.1.0 0.0.0.127 area 1
 network 10.1.12.0 0.0.0.3 area 0
!

access-list 1 deny 10.1.5.128 0.0.0.127
access-list 1 permit any
!

 - access-list 1 permit any : 미설정시 라우터에 deny all 초기설정 지정되어있음

 

 PC1 

PC>ping 10.1.1.10

Pinging 10.1.1.10 with 32 bytes of data:

Reply from 10.1.1.10: bytes=32 time=218ms TTL=124
Reply from 10.1.1.10: bytes=32 time=203ms TTL=124
Reply from 10.1.1.10: bytes=32 time=203ms TTL=124
Reply from 10.1.1.10: bytes=32 time=218ms TTL=124

Ping statistics for 10.1.1.10:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 203ms, Maximum = 218ms, Average = 210ms

 

 PC2 

PC>ping 10.1.1.10

Pinging 10.1.1.10 with 32 bytes of data:

Reply from 10.1.12.1: Destination host unreachable.
Reply from 10.1.12.1: Destination host unreachable.
Reply from 10.1.12.1: Destination host unreachable.
Reply from 10.1.12.1: Destination host unreachable.

Ping statistics for 10.1.1.10:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

 

'Study > Cisco' 카테고리의 다른 글

2014. 11. 20. NAT Dynamic  (0) 2014.11.20
2014. 11. 19. Access-List 실습 ( VTY )  (0) 2014.11.19
2014. 11. 17. OSPF  (0) 2014.11.17
EIGRP 라우팅 세팅  (2) 2014.11.13
EIGRP 라우팅  (0) 2014.11.12
   

2014. 11. 18. Access-List 이론

 Access-list 사용이유

 - Packet Filtering을 통해 네트워크의 트래픽을 제한하거나, 특정 사용자나 장치에 의해
   사용되는 네트워크 자원을 제한할 수 있다.

 - Access List는 일반적으로 라우터의 특정 인터페이스를 통과하는 패킷을 허용하거나
   제한할 수 있다.

 - 사용자가 라우터에 Telnet 접근하는 것을 허용하거나 제한할 수 있고, 라우터로부터
   다른 장치나 호스트에 Telnet 접근하는 것을 허용하거나 제한할 수도 있다.
 - Access List는 라우터를 통과하는 트래픽을 제한할 수 있지만 라우터에서
   만들어지는 트래픽에 대해서는 제한이 불가능하다.

 

절차

데이터 -> 라우터 -> 라우터에서 라우팅테이블 확인 -> 액세스리스트 확인

 

 Access-list 타입 2가지

 Standard

  - Source Address만 체크

 Extended

  - Source Address와 Destination Address, Port Address 모두를 체크

 

 

 Access-list 적용위치

 Inbound Access List

  - 라우터에 수신되는 패킷이 라우터의 Outbound Interface로 전달되기 전에

    Access List가 적용된다.

 Outbound Access List
  - 라우터에 수신된 패킷이 라우터의 Outbound Interface까지 전달된 후 Access List가

     적용된다.

  - 라우터의 Inbound Interface에 패킷이 들어 왔을 경우 처음에는 라우팅 테이블을

    참조해서 목적지에 대한 주소가 존재하면 맞는 인터페이스 패킷이 전송되고, 그렇지

    않는 경우에는 버려진다.

 

 Wildcard Mask 

 - Wildcard Mask는 IP Address List나 OSPF에서 Network Command 설정시 사용된다.

   Wildcard Mask의 Rule은 다음과 같다.
   * Wildcard Bits의 0은 IP Address Bits와 반드시 일치해야 한다.
   * Wildcard Bits의 1은 IP Address Bits아 일치해야 할 필요가 없다.
 - Subnet Mask에서의 0은 일치할 필요가 없고, 1은 반드시 일치해야 하는 특성이
   있는데 위의 Wildcard Mask와 완전히 반대로 동작한다.

 

 Access-List Name

- Cisco IOS 11.2 이상에서만 적용이 가능하다.
- Numbered IP Access List는 조건 문 제거 시 모든 Numbered Access List가 삭제되기
  때문에 처음부터 다시 모든 Access List를 다시 입력해야 하는 문제가 있지만
  Named IP Access List는 원하는 조건 문만 제거할 수 있다.

R1(config)#ip access-list extended Telnet-Test
R1(config-ext-nacl)#deny tcp 172.16.4.0 0.0.0.255 172.16.3.0 0.0.0.255 eq 23
R1(config-ext-nacl)#permit ip any any
R1(config)#interface ethernet 1
R1(config-if)#ip access-group Telnet-Test out

 

 Access List Configuration 원칙들

-엑세스 리스트 문장의 순서는 적절한 필터링이 중요하다.
  ☞ TFTP 서버에서 텍스트 에디터를 이용해서 만들고 라우터로 TFTP를 이용해서
      다운로드하여 엑세스 리스트를 만드는 것을 추천한다.
  ☞ 또는 terminal emulator 또는 Telnet 세션을 PC에서 사용하고 엑세스 리스트를 cut &
      paste 하여 라우터 설정 모드로 옮기는 것을 사용할 수 있다.
  ☞ 엑세스 리스트를 위에서 아래로 처리한다. 자주 테스트하여 만족하는 테스트와
      구체적인 테스트들을 엑세스 리스트의 앞쪽에 두면 프로세싱 오버헤드를 줄일 수 있다.
  ☞ 리스트에서 각 문장은 이름이 부여된 엑세스 리스트만이 제거될 수 있지만, 순서를
      바꾸는 것은 되지 않는다.
  ☞ 엑서스 리스트의 순서를 바꾸려면, 전체 리스트를 제거하고 원하는 순서 또는 원하는
      문장으로 다시 만들어야 한다.
  ☞ 모든 엑세스 리스트는 implicit “deny any” 문장으로 끝난다.

'Study > Net' 카테고리의 다른 글

2014. 11. 24. WAN 이론  (0) 2014.11.24
2014. 11. 19. NAT/PAT 이론  (0) 2014.11.19
2014. 11. 17. OSPF  (0) 2014.11.17
라우팅 프로토콜 4  (0) 2014.11.13
라우팅 프로토콜 3  (0) 2014.11.12
   

2014. 11. 17. OSPF

 

 R2 (D) 

Daejeon#sh ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.1.1          0   FULL/  -        00:00:31    10.1.12.1       Serial0/0/0
10.1.3.1          0   FULL/  -        00:00:31    10.1.12.6       Serial0/0/1
10.1.4.1          0   FULL/  -        00:00:31    10.1.12.10      Serial0/1/0

 - Neighbor ID : 라우터ID

 R2 (D)

Daejeon#sh ip ospf interface s0/0/0
Serial0/0/0 is up, line protocol is up
  Internet address is 10.1.12.2/30, Area 0
  Process ID 1, Router ID 10.1.2.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:00:06
  Index 2/2, 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 10.1.1.1
  Suppress hello for 0 neighbor(s)

 

 

 R1 (S)

!
interface Loopback0
 ip address 10.1.1.1 255.255.255.0
!

interface Serial0/0/0
 ip address 10.1.12.1 255.255.255.252
!

router ospf 1
 router-id 10.1.1.1
 log-adjacency-changes
 network 10.1.1.0 0.0.0.255 area 1
 network 10.1.12.0 0.0.0.3 area 0
!

!

Seoul#sh ip route 
     10.0.0.0/8 is variably subnetted, 9 subnets, 3 masks
C       10.1.1.0/24 is directly connected, Loopback0
O       10.1.2.1/32 [110/65] via 10.1.12.2, 00:00:46, Serial0/0/0
O IA    10.1.3.1/32 [110/129] via 10.1.12.2, 00:00:46, Serial0/0/0
O IA    10.1.4.1/32 [110/129] via 10.1.12.2, 00:00:46, Serial0/0/0
O IA    10.1.5.1/32 [110/130] via 10.1.12.2, 00:00:46, Serial0/0/0
C       10.1.12.0/30 is directly connected, Serial0/0/0
O       10.1.12.4/30 [110/128] via 10.1.12.2, 00:00:46, Serial0/0/0
O       10.1.12.8/30 [110/128] via 10.1.12.2, 00:00:46, Serial0/0/0
O IA    10.1.12.12/30 [110/129] via 10.1.12.2, 00:00:46, Serial0/0/0

!

 O : OSPF

 IA : inter area의 약자로 Area 들끼리 주고 받은 경로라는 뜻이다

 

 R2 (D)

!
interface Loopback0
 ip address 10.1.2.1 255.255.255.0
!

interface Serial0/0/0
 ip address 10.1.12.2 255.255.255.252
 clock rate 64000
!
interface Serial0/0/1
 ip address 10.1.12.5 255.255.255.252
 clock rate 64000
!
interface Serial0/1/0
 ip address 10.1.12.9 255.255.255.252
 clock rate 64000
!

router ospf 1
 router-id 10.1.2.1
 log-adjacency-changes
 network 10.1.2.0 0.0.0.255 area 0
 network 10.1.12.0 0.0.0.3 area 0
 network 10.1.12.4 0.0.0.3 area 0
 network 10.1.12.8 0.0.0.3 area 0

!

!

Daejeon#sh ip route 

     10.0.0.0/8 is variably subnetted, 9 subnets, 3 masks
O IA    10.1.1.1/32 [110/65] via 10.1.12.1, 00:34:23, Serial0/0/0
C       10.1.2.0/24 is directly connected, Loopback0
O IA    10.1.3.1/32 [110/65] via 10.1.12.6, 00:34:23, Serial0/0/1
O IA    10.1.4.1/32 [110/65] via 10.1.12.10, 00:34:23, Serial0/1/0
O IA    10.1.5.1/32 [110/66] via 10.1.12.10, 00:34:23, Serial0/1/0
C       10.1.12.0/30 is directly connected, Serial0/0/0
C       10.1.12.4/30 is directly connected, Serial0/0/1
C       10.1.12.8/30 is directly connected, Serial0/1/0
O IA    10.1.12.12/30 [110/65] via 10.1.12.10, 00:34:23, Serial0/1/0

!

 

 R3 (G) 

!
interface Loopback0
 ip address 10.1.3.1 255.255.255.0
!

interface Serial0/0/0
 ip address 10.1.12.6 255.255.255.252
!

router ospf 1
 router-id 10.1.3.1
 log-adjacency-changes
 network 10.1.3.0 0.0.0.255 area 2
 network 10.1.12.4 0.0.0.3 area 0
!

!

Gwangju#sh ip route

     10.0.0.0/8 is variably subnetted, 9 subnets, 3 masks
O IA    10.1.1.1/32 [110/129] via 10.1.12.5, 00:35:37, Serial0/0/0
O       10.1.2.1/32 [110/65] via 10.1.12.5, 00:35:37, Serial0/0/0
C       10.1.3.0/24 is directly connected, Loopback0
O IA    10.1.4.1/32 [110/129] via 10.1.12.5, 00:35:37, Serial0/0/0
O IA    10.1.5.1/32 [110/130] via 10.1.12.5, 00:35:37, Serial0/0/0
O       10.1.12.0/30 [110/128] via 10.1.12.5, 00:35:37, Serial0/0/0
C       10.1.12.4/30 is directly connected, Serial0/0/0
O       10.1.12.8/30 [110/128] via 10.1.12.5, 00:35:37, Serial0/0/0
O IA    10.1.12.12/30 [110/129] via 10.1.12.5, 00:35:37, Serial0/0/0

!

 

 R4 (B)

!
interface Loopback0
 ip address 10.1.4.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 10.1.12.13 255.255.255.252
 duplex auto
 speed auto
!
interface Serial0/0/0
 ip address 10.1.12.10 255.255.255.252
!

router ospf 1
 log-adjacency-changes
 network 10.1.4.0 0.0.0.255 area 3
 network 10.1.12.12 0.0.0.3 area 3
 network 10.1.12.8 0.0.0.3 area 0
!

!

Busan#sh ip route 
     10.0.0.0/8 is variably subnetted, 9 subnets, 3 masks
O IA    10.1.1.1/32 [110/129] via 10.1.12.9, 00:37:14, Serial0/0/0
O       10.1.2.1/32 [110/65] via 10.1.12.9, 00:37:14, Serial0/0/0
O IA    10.1.3.1/32 [110/129] via 10.1.12.9, 00:37:14, Serial0/0/0
C       10.1.4.0/24 is directly connected, Loopback0
O       10.1.5.1/32 [110/2] via 10.1.12.14, 00:39:56, FastEthernet0/0
O       10.1.12.0/30 [110/128] via 10.1.12.9, 00:37:14, Serial0/0/0
O       10.1.12.4/30 [110/128] via 10.1.12.9, 00:37:14, Serial0/0/0
C       10.1.12.8/30 is directly connected, Serial0/0/0
C       10.1.12.12/30 is directly connected, FastEthernet0/0

!

 

 R5 (J)

!
interface Loopback0
 ip address 10.1.5.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 10.1.12.14 255.255.255.252
 duplex auto
 speed auto
!

router ospf 1
 log-adjacency-changes
 network 10.1.5.0 0.0.0.255 area 3
 network 10.1.12.12 0.0.0.3 area 3
!

!

Jeju# sh ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       i - IS-IS, 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/8 is variably subnetted, 9 subnets, 3 masks
O IA    10.1.1.1/32 [110/130] via 10.1.12.13, 00:38:11, FastEthernet0/0
O IA    10.1.2.1/32 [110/66] via 10.1.12.13, 00:38:11, FastEthernet0/0
O IA    10.1.3.1/32 [110/130] via 10.1.12.13, 00:38:11, FastEthernet0/0
O       10.1.4.1/32 [110/2] via 10.1.12.13, 00:40:55, FastEthernet0/0
C       10.1.5.0/24 is directly connected, Loopback0
O IA    10.1.12.0/30 [110/129] via 10.1.12.13, 00:38:11, FastEthernet0/0
O IA    10.1.12.4/30 [110/129] via 10.1.12.13, 00:38:11, FastEthernet0/0
O IA    10.1.12.8/30 [110/65] via 10.1.12.13, 00:40:55, FastEthernet0/0
C       10.1.12.12/30 is directly connected, FastEthernet0/0

!

 

'Study > Cisco' 카테고리의 다른 글

2014. 11. 19. Access-List 실습 ( VTY )  (0) 2014.11.19
2014. 11. 18. Access-List 실습  (0) 2014.11.18
EIGRP 라우팅 세팅  (2) 2014.11.13
EIGRP 라우팅  (0) 2014.11.12
DV 라우팅  (0) 2014.11.12
   
1 2 3 4 5 6 7 8 ··· 11