Monolog

Goo辞書(英和)で“Monolog”は、
『独白; 独白劇; 独り占めのおしゃべり』
独り言・備忘録を綴るブログ

CCNAの復習(Access-list)

2007-11-17 23:59:59 | Weblog
たまにはCCNA範囲の復習をしようと思い、ACL(Access-list)の練習をしてみました。

以下ひたすら実施記録(Copy&Paste)です。

●練習課題
WindowsのコマンドプロンプトにおけるPingにてトラヒックが時々パケロス(=パケットロス10%程度)するACLを作成する。

●使用した材料
・WindowsPC
・Dynamips

●環境構成
・トポロジ
           ▼
      │ ┌────┐
      ├─┤Router-1│
┌───┐ │ └────┘
│ PC ├─┤
└───┘ │
      ▲


●完成イメージ
・Windowsにて実行したPingが10%程度ロスする状況を確認できること。

●実施手法及び結果
・Windows(コマンドプロンプト)のPing では、“Sequence number”(シーケンス番号)がインクリメントするので、Ciscoの『拡張48ビットMACアドレスアクセスリスト』を利用してパケットロスを実現する。

1.Dynamipsにて、トポロジを作成する。
下記は実施例

###Dynamips Server の設定###
[localhost]
Debug = 1
###2651 Routerの基本Config###
[[2651XM]]
#---IOSのフルパス---#
idlepc = 0x821f8ce4
image = c:Program FilesDynamipsimagesC2600-AD.BIN
#---RouterのRAM容量---#
ghostios = true
ghostsize = 128
ram = 128
nvram = 128
disk0 = 64
confreg = 0x2102
mmap = true
#___< 稼動Routerの個別設定 >___#
#---使用するRouterのModel名---#
#---Router名の指定;“2651XM-1”---#
[[ROUTER R2651XM-1]]
model = 2651XM
console = 2001
slot1 = NM-16ESW
WIC0/0 = WIC-1T
WIC0/1 = WIC-1T
#___FastEther0/1をFastEther1/0に接続
f0/1 = R2651XM-1 f1/0
#___Ether1/0を“RealNIC”に接続
f0/0 = NIO_gen_eth:DeviceNPF_{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}

2.作成した『Cisco 2651XM』のConfig (一部省略)

!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 15
no network-clock-participate slot 1
no network-clock-participate wic 0
ip cef
!
bridge crb
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
 bridge-group 1
 bridge-group 1 input-pattern-list 1100
!
interface Serial0/0
 no ip address
 shutdown
!
interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
 bridge-group 1
!
interface Serial0/1
 no ip address
 shutdown
!
interface FastEthernet1/0
 no switchport
 ip address 1.1.1.2 255.255.255.0
!
interface FastEthernet1/1
!
interface FastEthernet1/2
!   (中略)
interface FastEthernet1/15
!
interface Vlan1
 no ip address
!
ip http server
no ip http secure-server
!
access-list 1100 deny   0000.0000.0000 ffff.ffff.ffff 0000.0000.0000 ffff.ffff.ffff 0x28 1 eq 0x0
access-list 1100 deny   0000.0000.0000 ffff.ffff.ffff 0000.0000.0000 ffff.ffff.ffff 0x28 1 eq 0x10
access-list 1100 deny   0000.0000.0000 ffff.ffff.ffff 0000.0000.0000 ffff.ffff.ffff 0x28 1 eq 0x20
access-list 1100 deny   0000.0000.0000 ffff.ffff.ffff 0000.0000.0000 ffff.ffff.ffff 0x28 1 eq 0x30
access-list 1100 deny   0000.0000.0000 ffff.ffff.ffff 0000.0000.0000 ffff.ffff.ffff 0x28 1 eq 0x40
access-list 1100 deny   0000.0000.0000 ffff.ffff.ffff 0000.0000.0000 ffff.ffff.ffff 0x28 1 eq 0x50
access-list 1100 deny   0000.0000.0000 ffff.ffff.ffff 0000.0000.0000 ffff.ffff.ffff 0x28 1 eq 0x60
access-list 1100 deny   0000.0000.0000 ffff.ffff.ffff 0000.0000.0000 ffff.ffff.ffff 0x28 1 eq 0x70
access-list 1100 deny   0000.0000.0000 ffff.ffff.ffff 0000.0000.0000 ffff.ffff.ffff 0x28 1 eq 0x80
access-list 1100 deny   0000.0000.0000 ffff.ffff.ffff 0000.0000.0000 ffff.ffff.ffff 0x28 1 eq 0x90
access-list 1100 deny   0000.0000.0000 ffff.ffff.ffff 0000.0000.0000 ffff.ffff.ffff 0x28 1 eq 0xA0
access-list 1100 deny   0000.0000.0000 ffff.ffff.ffff 0000.0000.0000 ffff.ffff.ffff 0x28 1 eq 0xB0
access-list 1100 deny   0000.0000.0000 ffff.ffff.ffff 0000.0000.0000 ffff.ffff.ffff 0x28 1 eq 0xC0
access-list 1100 deny   0000.0000.0000 ffff.ffff.ffff 0000.0000.0000 ffff.ffff.ffff 0x28 1 eq 0xD0
access-list 1100 deny   0000.0000.0000 ffff.ffff.ffff 0000.0000.0000 ffff.ffff.ffff 0x28 1 eq 0xE0
access-list 1100 deny   0000.0000.0000 ffff.ffff.ffff 0000.0000.0000 ffff.ffff.ffff 0x28 1 eq 0xF0
access-list 1100 permit 0000.0000.0000 ffff.ffff.ffff 0000.0000.0000 ffff.ffff.ffff(ARPを通すため)
!
control-plane
!
bridge 1 protocol ieee
!
line con 0
 exec-timeout 0 0
line aux 0
line vty 0 4
 login
!
end

3.コマンドプロンプト出力

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:>date /t
2007/11/17

C:>time /t
23:15

C:>ipconfig

Windows IP Configuration


Ethernet adapter ネットワーク ブリッジ:

Connection-specific DNS Suffix. :
IP Address. . . . . . . . . . . : 192.168.X.223
Subnet Mask . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . : 192.168.X.1

Ethernet adapter LoopbackAdapter#2:

Connection-specific DNS Suffix. :
IP Address. . . . . . . . . . . : 1.1.1.1
Subnet Mask . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . :

C:>arp -a

Interface: 192.168.X.223 --- 0x2
Internet Address Physical Address Type
192.168.X.1   AA-AA-AA-AA-AA-AA dynamic
192.168.X.2   BB-BB-BB-BB-BB-BB dynamic
192.168.X.250 CC-CC-CC-CC-CC-CC dynamic

C:>ping 1.1.1.2 -n 1

Pinging 1.1.1.2 with 32 bytes of data:

Reply from 1.1.1.2: bytes=32 time=642ms TTL=255

Ping statistics for 1.1.1.2:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 642ms, Maximum = 642ms, Average = 642ms

C:>arp -a

Interface: 192.168.X.223 --- 0x2
Internet Address Physical Address Type
192.168.X.1   AA-AA-AA-AA-AA-AA dynamic
192.168.X.2   BB-BB-BB-BB-BB-BB dynamic
192.168.X.250 CC-CC-CC-CC-CC-CC dynamic

Interface: 1.1.1.1 --- 0x10004
Internet Address Physical Address Type
1.1.1.2 XX-XX-XX-XX-XX-XX dynamic

C:>ping 1.1.1.2 -n 30

Pinging 1.1.1.2 with 32 bytes of data:

Reply from 1.1.1.2: bytes=32 time=313ms TTL=255
Reply from 1.1.1.2: bytes=32 time=85ms TTL=255
Reply from 1.1.1.2: bytes=32 time=69ms TTL=255
Request timed out.
Reply from 1.1.1.2: bytes=32 time=201ms TTL=255
Reply from 1.1.1.2: bytes=32 time=75ms TTL=255
Reply from 1.1.1.2: bytes=32 time=66ms TTL=255
Reply from 1.1.1.2: bytes=32 time=173ms TTL=255
Reply from 1.1.1.2: bytes=32 time=56ms TTL=255
Reply from 1.1.1.2: bytes=32 time=62ms TTL=255
Reply from 1.1.1.2: bytes=32 time=78ms TTL=255
Reply from 1.1.1.2: bytes=32 time=214ms TTL=255
Request timed out.
Reply from 1.1.1.2: bytes=32 time=79ms TTL=255
Reply from 1.1.1.2: bytes=32 time=59ms TTL=255
Reply from 1.1.1.2: bytes=32 time=349ms TTL=255
Reply from 1.1.1.2: bytes=32 time=59ms TTL=255
Reply from 1.1.1.2: bytes=32 time=359ms TTL=255
Reply from 1.1.1.2: bytes=32 time=68ms TTL=255
Request timed out.
Reply from 1.1.1.2: bytes=32 time=397ms TTL=255
Reply from 1.1.1.2: bytes=32 time=79ms TTL=255
Reply from 1.1.1.2: bytes=32 time=66ms TTL=255
Reply from 1.1.1.2: bytes=32 time=56ms TTL=255
Reply from 1.1.1.2: bytes=32 time=56ms TTL=255
Reply from 1.1.1.2: bytes=32 time=72ms TTL=255
Reply from 1.1.1.2: bytes=32 time=320ms TTL=255
Reply from 1.1.1.2: bytes=32 time=68ms TTL=255
Request timed out.
Reply from 1.1.1.2: bytes=32 time=71ms TTL=255

Ping statistics for 1.1.1.2:
Packets: Sent = 30, Received = 26, Lost = 4 (13% loss),
Approximate round trip times in milli-seconds:
Minimum = 56ms, Maximum = 397ms, Average = 136ms

C:>

4.パケットキャプチャ(一部の抜粋)

34 2007-11-17 23:15:33.63 YY:YY:YY:YY:YY:YY CDP/VTP/DTP/PAgP/UDLD CDP
67 2007-11-17 23:16:25.64 ZZ:ZZ:ZZ:ZZ:ZZ:ZZ Broadcast ARP Who has 1.1.1.2? Tell 1.1.1.1
68 2007-11-17 23:16:26.11 XX:XX:XX:XX:XX:XX ZZ:ZZ:ZZ:ZZ:ZZ:ZZ ARP 1.1.1.2 is at XX:XX:XX:XX:XX:XX
69 2007-11-17 23:16:26.11 1.1.1.1 1.1.1.2 ICMP Echo (ping) request
70 2007-11-17 23:16:26.29 1.1.1.2 1.1.1.1 ICMP Echo (ping) reply
75 2007-11-17 23:16:33.62 YY:YY:YY:YY:YY:YY CDP/VTP/DTP/PAgP/UDLD CDP
98 2007-11-17 23:17:09.85 1.1.1.1 1.1.1.2 ICMP Echo (ping) request
99 2007-11-17 23:17:10.16 1.1.1.2 1.1.1.1 ICMP Echo (ping) reply
100 2007-11-17 23:17:10.85 1.1.1.1 1.1.1.2 ICMP Echo (ping) request
102 2007-11-17 23:17:10.93 1.1.1.2 1.1.1.1 ICMP Echo (ping) reply
103 2007-11-17 23:17:11.85 1.1.1.1 1.1.1.2 ICMP Echo (ping) request
104 2007-11-17 23:17:11.92 1.1.1.2 1.1.1.1 ICMP Echo (ping) reply
106 2007-11-17 23:17:12.85 1.1.1.1 1.1.1.2 ICMP Echo (ping) request
110 2007-11-17 23:17:18.15 1.1.1.1 1.1.1.2 ICMP Echo (ping) request
111 2007-11-17 23:17:18.35 1.1.1.2 1.1.1.1 ICMP Echo (ping) reply
113 2007-11-17 23:17:19.15 1.1.1.1 1.1.1.2 ICMP Echo (ping) request

  ~以下省略。。

以上で無事動作確認できました。

ということで、今日のお勉強は終わりとすることに。
明日は午前中に免許の書き換えと、午後はお楽しみです


最新の画像もっと見る

post a comment

ブログ作成者から承認されるまでコメントは反映されません。