DynagenでCCIEを目指す
Compress
最終更新:
it_certification
-
view
1. 目的
- 圧縮の設定について確認します。
2. 構成
2.1. 設定概要
- Host OS側でApacheを起動させます。
- R1, R2間はframe-relayで接続します。
- R1, R2はOSPFでルーティングします。
2.2. 構成図

2.3. netファイル
model = 3620 [localhost] [[3620]] image = C:\Program Files\Dynamips\images\c3620-j1s3-mz.123-18.bin ram = 128 [[ROUTER R1]] f1/0 = NIO_gen_eth:\Device\NPF_{8B89D910-5ED3-4A43-9DE9-6A272A3D7592} s0/0 = SW 0 [[FRSW SW]] 0:100 = 1:100 [[ROUTER R2]] f1/0 = NIO_gen_eth:\Device\NPF_{5933302A-7AAA-475C-A8FE-A6B82B0C0F98} s0/0 = SW 1
2.4. 初期設定
- R1
! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R1 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Serial0/0 ip address 192.168.1.1 255.255.255.0 encapsulation frame-relay ip ospf network broadcast serial restart-delay 0 frame-relay map ip 192.168.1.2 100 broadcast ! interface Serial0/1 no ip address shutdown serial restart-delay 0 ! interface Serial0/2 no ip address shutdown serial restart-delay 0 ! interface Serial0/3 no ip address shutdown serial restart-delay 0 ! interface FastEthernet1/0 ip address 192.168.200.1 255.255.255.0 duplex auto speed auto ! router ospf 1 log-adjacency-changes passive-interface default no passive-interface Serial0/0 network 192.168.1.1 0.0.0.0 area 0 network 192.168.200.1 0.0.0.0 area 0 ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end
- R2
! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R2 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Serial0/0 ip address 192.168.1.2 255.255.255.0 encapsulation frame-relay ip ospf network broadcast serial restart-delay 0 frame-relay map ip 192.168.1.1 100 broadcast ! interface Serial0/1 no ip address shutdown serial restart-delay 0 ! interface Serial0/2 no ip address shutdown serial restart-delay 0 ! interface Serial0/3 no ip address shutdown serial restart-delay 0 ! interface FastEthernet1/0 ip address 192.168.201.2 255.255.255.0 duplex auto speed auto ! router ospf 1 log-adjacency-changes passive-interface default no passive-interface Serial0/0 network 192.168.1.2 0.0.0.0 area 0 network 192.168.201.2 0.0.0.0 area 0 ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end
2.5. サーバ側 ルーティング設定
- Host OS
route add 192.168.201.0 mask 255.255.255.0 192.168.200.1
- Guest OS
route add -net 192.168.200.0/24 gw 192.168.201.2
3. [検証] TCP header 圧縮
3.1. 設定投入
TCP10880のTCP headerを圧縮設定するをR1 s0/0に投入します。
R1(config)#ip access-list extended ACL_10880 R1(config-ext-nacl)#permit tcp any eq 10880 any R1(config-ext-nacl)#exit R1(config)# R1(config)# R1(config)#class-map CLASS_10880 R1(config-cmap)#match access-group name ACL_10880 R1(config-cmap)#exit R1(config)# R1(config)#policy-map POLICY_S00_OUT R1(config-pmap)#class CLASS_10880 R1(config-pmap-c)#compression header ip tcp R1(config-pmap-c)#exit R1(config-pmap)#exit R1(config)# R1(config)#interface Serial 0/0 R1(config-if)#service-policy output POLICY_S00_OUT R1(config-if)#
3.2. 設定確認
Guest OSで以下のwgetコマンドを実施し、HTTP通信を発生させます。
[root@localhost ~]# wget http://192.168.200.100:10880/large.html
show policy-map interfaceコマンドによって設定を確認します。
HTTP通信がCLASS_10880にマッチしている事を確認します。但し、圧縮されたパケットは1つもありませんでした。検証に失敗した理由が分かり次第、このページを修正したいと思います。
HTTP通信がCLASS_10880にマッチしている事を確認します。但し、圧縮されたパケットは1つもありませんでした。検証に失敗した理由が分かり次第、このページを修正したいと思います。
R1#show policy-map interface Serial 0/0 Serial0/0 Service-policy output: POLICY_S00_OUT Class-map: CLASS_10880 (match-all) 26814 packets, 15210387 bytes 5 minute offered rate 329000 bps, drop rate 0 bps Match: access-group name ACL_10880 compress: header ip tcp TCP compression: Sent: 26797 total, 0 compressed, <- 圧縮されたパケット数を確認できます。 0 bytes saved, 15099607 bytes sent 1.00 efficiency improvement factor 99% hit ratio, five minute miss rate 0 misses/sec, 0 max rate 326000 bps Class-map: class-default (match-any) 330 packets, 16221 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: any R1#
4. [検証] RTP header 圧縮
4.1. 設定投入
RTP headerを圧縮設定するをR1 s0/0に投入します。
R1(config)#class-map CLASS_RTP R1(config-cmap)#match protocol rtp audio R1(config-cmap)#exit R1(config)# R1(config)# R1(config)#policy-map POLICY_S00_OUT R1(config-pmap)#class CLASS_RTP R1(config-pmap-c)#compression header ip rtp R1(config-pmap-c)#^Z
4.2. 設定確認
show policy-map interfaceコマンドによって設定を確認します。
R1#show policy-map interface Serial 0/0 Serial0/0 Service-policy output: POLICY_S00_OUT Class-map: CLASS_10880 (match-all) 21 packets, 12456 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: access-group name ACL_10880 compress: header ip tcp TCP compression: Sent: 20 total, 0 compressed, 0 bytes saved, 12308 bytes sent 1.00 efficiency improvement factor 95% hit ratio, five minute miss rate 0 misses/sec, 0 max rate 0 bps Class-map: CLASS_RTP (match-all) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: protocol rtp audio compress: header ip rtp <- RTP headerを圧縮する設定が投入されている事を確認します。 UDP/RTP compression: Sent: 0 total, 0 compressed, 0 bytes saved, 0 bytes sent rate 0 bps Class-map: class-default (match-any) 72 packets, 3528 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: any R1#
添付ファイル