パケットマーキングのトラブル

ネットワーク構成

marking01.jpg
図 パケットマーキングのトラブル ネットワーク構成

ホスト1(10.1.1.1)からToS128を指定して、ホスト2(10.3.3.3)へ通信を行います。その際、IP Precedenceをflash-overrideからCriticalにマーキングしなおします。

※ホスト1はR1のLoopback0です。ホスト2はR3のLoopback0です。

パケットマーキングのトラブル Dynamipsネットワーク構成ファイル

設定概要

R1

――――――――――――――――――――――――――――――――――
class-map match-all TOS128
match access-group 1
!
!
policy-map SET_PREC
class TOS128
set ip precedence 4
!
interface Loopback0
ip address 10.1.1.1 255.255.255.255
!
interface Ethernet0/0
ip address 192.168.12.1 255.255.255.0
service-policy output SET_PREC
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
network 10.0.0.0 0.255.255.255 area 0
network 192.168.0.0 0.0.255.255 area 0
!
access-list 1 permit 10.1.1.1
――――――――――――――――――――――――――――――――――

R2

――――――――――――――――――――――――――――――――――
class-map match-all SILVER
match access-group 1
match  precedence 4
!
policy-map CRITICAL
class SILVER
police 8000 conform-action drop
!
interface Loopback0
ip address 192.168.0.2 255.255.255.255
!
interface Ethernet0/0
ip address 192.168.12.2 255.255.255.0
service-policy input CRITICAL
!
interface Ethernet0/1
ip address 192.168.23.2 255.255.255.0
!
router ospf 1
log-adjacency-changes
network 192.168.0.0 0.0.255.255 area 0
!
access-list 1 permit 10.1.1.10
――――――――――――――――――――――――――――――――――

R3

――――――――――――――――――――――――――――――――――
interface Loopback0
ip address 10.3.3.3 255.255.255.255
!
interface Ethernet0/0
ip address 192.168.23.3 255.255.255.0
ip access-group 100 in
!
router ospf 1
router-id 3.3.3.3
log-adjacency-changes
network 10.0.0.0 0.255.255.255 area 0
network 192.168.0.0 0.0.255.255 area 0
!
access-list 100 permit ip any any precedence critical
access-list 100 permit ip any any precedence internet
――――――――――――――――――――――――――――――――――

トラブルの症状

R1で拡張Pingによって、ホスト1からTOS128を指定して、パケットを送信するとホスト3まで正常にルーティングされていません。

R1

――――――――――――――――――――――――――――――――――
R1#ping
Protocol [ip]:
Target IP address: 10.3.3.3
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: loopback0
Type of service [0]: 128
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 10.1.1.1
U.U.U
Success rate is 0 percent (0/5)
――――――――――――――――――――――――――――――――――

原因を調べるために、R1、R2、R3でそれぞれ次のshowコマンドを確認しました。

R1
show access-list
show class-map
show policy-map
show policy-map interface

R2
show access-list
show class-map
show policy-map
show policy-map interface

R3
show access-list
show ip interface e0/0

R1

――――――――――――――――――――――――――――――――――
R1#show access-list
Standard IP access list 1
10 permit 10.1.1.1 (5 matches)
R1#show class-map
Class Map match-any class-default (id 0)
Match any
Class Map match-all TOS128 (id 1)
Match access-group  1
R1#show policy-map
Policy Map SET_PREC
Class TOS128
set ip precedence 4
R1#show policy-map interface
Ethernet0/0
Service-policy output: SET_PREC
Class-map: TOS128 (match-all)
5 packets, 570 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: access-group 1
QoS Set
precedence 4
Packets marked 5
Class-map: class-default (match-any)
656 packets, 63912 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
――――――――――――――――――――――――――――――――――

R2

――――――――――――――――――――――――――――――――――
R2#show access-list
Standard IP access list 1
10 permit 10.1.1.10
R2#show class-map
Class Map match-all SILVER (id 1)
Match access-group  1
Match   precedence 4
Class Map match-any class-default (id 0)
Match any
R2#show policy-map
Policy Map CRITICAL
Class SILVER
police cir 8000 bc 1500
conform-action drop
exceed-action drop
R2#show policy-map interface
Ethernet0/0
Service-policy input: CRITICAL
Class-map: SILVER (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: access-group 1
Match:  precedence 4
police:
cir 8000 bps, bc 1500 bytes
conformed 0 packets, 0 bytes; actions:
drop
exceeded 0 packets, 0 bytes; actions:
drop
conformed 0 bps, exceed 0 bps
Class-map: class-default (match-any)
313 packets, 29594 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
――――――――――――――――――――――――――――――――――

R3

――――――――――――――――――――――――――――――――――
R3#show access-list
Extended IP access list 100
10 permit ip any any precedence critical
20 permit ip any any precedence internet (320 matches)
R3#show ip interface e0/0
Ethernet0/0 is up, line protocol is up
Internet address is 192.168.23.3/24
Broadcast address is 255.255.255.255
Address determined by non-volatile memory
MTU is 1500 bytes
Helper address is not set
Directed broadcast forwarding is disabled
Multicast reserved groups joined: 224.0.0.5 224.0.0.6
Outgoing access list is not set
Inbound  access list is 100
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
BGP Policy Mapping is disabled
WCCP Redirect outbound is disabled
WCCP Redirect inbound is disabled
WCCP Redirect exclude is disabled
――――――――――――――――――――――――――――――――――

問題

  • なぜホスト1からTOS128を指定したパケットがホスト3までルーティングされないのですか。
  • ホスト1からホスト3へ正常に通信できるようにするためには、どのように設定を修正すればよいですか。