#amazon(4844322214)
レイヤ 3 スイッチング †
Process Switching †
- パケットの転送時に、毎回ルーティング テーブルを照合して送信インタフェースを決定する
- コントロール プレーンでソフトウェア処理される
設定 †
rt(config)# interface type mod/num
rt(config-if)# no ip route-cache
確認 †
- 設定情報
rt# show ip int fa0/0
FastEthernet0/0 is up, line protocol is up
IP fast switching is disabled
IP fast switching on the same interface is disabled
IP Flow switching is disabled
IP CEF switching is disabled
IP Null turbo vector
IP multicast fast switching is disabled
IP multicast distributed fast switching is disabled
IP route-cache flags are No CEF
デバッグ †
rt# debug ip packet
Fast Switching †
- 初めて受信したパケットは Process Switching し、経路情報をルート キャッシュに記録
- 同じ宛先のパケットはキャッシュを使用してハードウェア処理する
- Process Switching に比べ、高速で処理できる
設定 †
rt(config)# interface type mod/num
rt(config-if)# ip route-cache
確認 †
CEF Switching [Cisco Express Forwarding] †
Control Plane (処理)
[CPU] [Routing Table] [ARP Table]
Data Plane (制御)
[ASIC] [Cache] [FIB] [Adjacency Table]
Back Plane (転送)
Interface
- ルーティング テーブルを元に、データ プレーンに FIB [Forwarding Information Base] を構築
- MAC アドレス テーブルを元に、隣接テーブル (Adjacency Table) を構築
- トラフィック フローの最初のパケットも、データ プレーンで処理
設定 †
rt(config)# ip cef
確認 †
- 設定情報
rt# show ip interface fa0/0
FastEthernet0/0 is up, line protocol is up
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
- FIB の状態
rt# show ip cef summary
IP CEF with switching (Table Version 243), flags=0x0
232 routes, 0 reresolve, 0 unresolved (0 old, 0 new), peak 1
2 instant recursive resolutions, 0 used background process
232 leaves, 15 nodes, 50864 bytes, 256 inserts, 24 invalidations
0 load sharing elements, 0 bytes, 0 references
universal per-destination load sharing algorithm, id F7B27E9A
3(0) CEF resets, 1 revisions of existing leaves
Resolution Timer: Exponential (currently 1s, peak 1s)
1 in-place/0 aborted modifications
refcounts: 5000 leaf, 4096 node
Table epoch: 0 (232 entries at this epoch)
Adjacency Table has 2 adjacencies
CPU 処理 †
- CEF Switching でも CPU 処理が必要なもの
- FIB テーブルにエントリがないパケット
- ARP 要求、応答
- ルータからの応答が必要なもの (TTL 超過、MTU 超過など)
- ルーティング プロトコル
- CDP
- 暗号化処理
- NAT の最初のパケット
- フラグメントが必要なパケット
- ACL で log オプションが設定されているパケット
NetFlow Switching †
- スイッチング パスではない
- トラフィック フローに基づいて処理
- Fast Switching と組み合わせると、トラフィック フローの最初のパケットは、コントロール プレーン処理
- 一度処理されたフローはデータ プレーンにキャッシュ
- CEF Switching と組み合わせると、すべてデータ プレーン処理
設定 †
rt(config)# interface type mod/num
rt(config-if)# ip route-cache flow
確認 †
- 設定情報
rt# show ip interface fa0/0
FastEthernet0/0 is up, line protocol is up
IP fast switching is enabled
IP fast switching on the same interface is disabled
IP Flow switching is enabled
IP CEF switching is enabled
IP CEF Flow Fast switching turbo vector
IP multicast fast switching is enabled
IP multicast distributed fast switching is disabled
IP route-cache flags are Fast, Flow cache, CEF, Full Flow
ARP テーブル †
設定 †
クリア †
rt# clear arp-cache
確認 †
rt# show arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 192.168.0.101 93 0000.0000.0001 ARPA FastEthernet0/1
Internet 192.168.0.102 65 0000.0000.0002 ARPA FastEthernet0/1
Internet 172.16.0.10 66 0000.0000.000a ARPA FastEthernet0/0
Internet 192.168.0.103 150 0000.0000.0003 ARPA FastEthernet0/1
デバッグ †
rt# debug arp
Jun 13 17:30:34: IP ARP: rcvd req src ip-addr mac-addr, dst ip-addr FastEthernet0
Jun 13 17:31:34: IP ARP: sent rep src ip-addr mac-addr,
dst ip-addr mac-addr FastEthernet0
インターフェース †
設定 †
イーサネット †
- インターフェースの選択
rt(config)# interface type mod/num
- IP アドレスの設定
rt(config-if)# ip address ip-addr netmask
- デュプレックスの設定
rt(config-if)# duplex full|half
- full|half
- 全二重、半二重 (デフォルトはオート ネゴシエーション)
- 対向機器がオート ネゴシエーションに対応していない場合、半二重になる
- 速度の設定
rt(config-if)# speed 1000|100|10
- インターフェースの起動
rt(config-if)# no shutdown
シリアル †
rt(config-if)# clock rate 64000
サブ インターフェース †
セカンダリ アドレス †
アン ナンバード †
- 2 つのインターフェースで IP アドレスを共有する
- P2P 回線でしか利用できない
- 元のインターフェースがダウンすると、Unnumbered I/F もダウンする
e0 s0 s0 e0
{192.168.0.0/24}---[rt1]---<WAN>---[rt2]----{192.168.1.0/24}
.1 .1
rt1(config)# interface serial 0
rt1(config-if)# ip unnumbered ethernet 0
rt2(config)# interface serial 0
rt2(config-if)# ip unnumbered ethernet 0
ヘルパー アドレス †
e0
[host]-------[rt]-------[DHCP_SVR]
192.168.1.32
broadcast-> unicast->
複数インターフェースの一括変更 †
- マクロの設定
rt# define interface-range name type mod/num - num
- マクロによる選択
rt# interface range macro name
ブロードキャスト パケットのルーティング †
ICMP パケットの扱い †
確認 †
レイヤ 2 までの情報 †
rt# show interface type mod/num
FastEthernet0/0 is up, line protocol is up
Hardware is AmdFE, address is XXXX.XXXX.XXXX (bia XXXX.XXXX.XXXX)
Internet address is 192.168.0.1/24
MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:00, output 00:00:00, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo キューイング方式
Output queue: 0/40 (size/max) キューのパケット数
5 minute input rate 24000 bits/sec, 28 packets/sec 5分平均のスループット
5 minute output rate 31000 bits/sec, 28 packets/sec 5分平均のスループット
1066386229 packets input, 2296717048 bytes
Received 71410545 broadcasts, 0 runts, 0 giants, 0 throttles
81 input errors, 81 CRC, 48 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
1018311900 packets output, 2999269283 bytes, 0 underruns
0 output errors, 5763390 collisions, 1 interface resets
0 babbles, 0 late collision, 18760007 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
interface (L1) | line protocol (L2) | 説明 |
administratively down | down | I/F がシャットダウンされている |
down | down | リンク ダウンしている |
up | down | L2 レベルでの通信が確立していない (クロックレート、カプセル化の不一致など) |
up | up | L2 レベルでは通信が確立している |
up | errdisable | 何らかのエラーにより、ポートが無効になっている |
- Received num broadcasts, num runts, num giants, num throttles
- ブロードキャスト パケット数
- num runts … 最小フレーム サイズよりも小さく破棄されたパケット数
- num giants … 最大フレーム サイズよりも大きく破棄されたパケット数
- num throttles … 過負荷だとカウントされる?
- num input errors
- 受信エラー パケット数
- num CRC … CRC エラー
- num frame … フレームが切れている
- num overrun … 過負荷により破棄されたフレーム数
- num ignored … リソース不足でドロップされたフレーム数
- num watchdog … 2048 byte より大きいパケットを受信したときにカウント
- num input packets with dribble condition detected … フレーム長がわずかに長いものを受けたっときにカウント
- num output errors
- 送信エラー パケット数
- num collisions … コリジョン数 (全二重では必ず 0)
- num interface resets … Link down/up の数
- num babbles … 1518 バイトを超えるフレームを送信した場合にカウント
- num late collision … 衝突ウィンドウの外部で発生する衝突 (Duplex の不一致、距離制限)
- num deferred … ワイヤ上のトラフィックのために送信を待機した数
- num lost carrier … ハードウェアがフレームをワイヤに送信しており、ハードウェア自体のキャリア波がイーサネット上で検知されない場合に、キャリア検知の損失が発生すると増加します
- num no carrier … キャリア信号がない場合にカウント
- num output buffer failures … 送信ポートが輻輳するとカウント
- num output buffers swapped out … ?
レイヤ 3 の情報 †
rt# show ip interface
レイヤ 3 情報のサマリ †
rt# show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.0.1 YES NVRAM up up
FastEthernet0/1 10.0.0.1 YES NVRAM up up
デバッグ †
rt# debug ip policy
DHCP サーバ †
設定 †
- プールの作成
rt(config)# ip dhcp pool name
- 払い出すホスト用アドレス
rt(dhcp-config)# network net-addr /prefix
- 払い出す DNS サーバ アドレス
rt(dhcp-config)# dns-server ip-addr
- 払い出すデフォルト ルート
rt(dhcp-config)# default-router defaultrouter
- 払い出すドメイン
rt(dhcp-config)# domain-name domain
- 払い出し期間
rt(dhcp-config)# lease time
- time
- days [hours] [minutes]
- infinite … 無期限
- デフォルトは 1 日
- 除外アドレス
rt(config)# ip dhcp excleuded-address start-addr end-addr
rt(dhcp-config)# host ip-addr
rt(dhcp-config)# hardware-address mac-addr ieee802
rt(dhcp-config)# client name neme
確認 †
rt# show ip dhcp pool
NBAR [Network Based Application Recognition] †
- トラフィックの統計情報の取得
- トラフィックの分類
- ACL よりも負荷が軽い
- アプリケーション レイヤまで見ることができる
PDLM [Packet Description Language Module] †
PDLM ファイルを指定 †
rt(config)# ip nbar pdlm file-name
- file-name
- PDLM ファイルの場所
- flash://foobar.pdlm
手動で設定 †
rt(config)# ip nbar port-map proto-name [tcp|udp] port-num
確認 †
rt# show ip nbar port-map
統計情報の取得 †
設定 †
rt(config-if)# ip nbar protocol-discovery
確認 †
rt# show ip nbar protocol-discovery
FastEthernet0/1
Input Output
----- ------
Protocol Packet Count Packet Count
Byte Count Byte Count
5min Bit Rate (bps) 5min Bit Rate (bps)
5min Max Bit Rate (bps) 5min Max Bit Rate (bps)
------------------------ ------------------------ ------------------------
rtp 888 878
190032 187892
3000 3000
3000 3000
sqlnet 992 373
150288 20142
3000 3000
3000 3000
ftp 487 392
36567 21168
3000 3000
3000 3000
NetFlow †
設定 †
rt(config)# ip flow-export source type mod/num
rt(config)# ip flow-export version ver
rt(config)# ip flow-export destination ip-addr port
rt(config)# interface type mod/num
rt(config-if)# ip route-cache flow
rt(config-if)# ip flow ingress
rt(config-if)# ip flow egress
確認 †
rt# show ip flow interface
rt# show ip cache flow
サービス †
PAD サービス (X.25) †
rt(config)# service pad
rt# show processes | i PAD
46 Hwe 809102B4 0 1 0 5784/6000 0 PAD InCall
DHCP サービス †
rt(config)# service dhcp
rt# show processes | i DHCP
43 Mwe 804656C0 0 1 0 5436/6000 0 DHCPD Receive
48 Mwe 804FDD5C 0 1 0 5788/6000 0 DHCPD Timer
71 Msi 80506898 0 2 0 4984/6000 0 DHCPD Database
Finger サービス †
rt(config)# service finger
- デフォルトで無効
- 有効にすると外部からログイン ユーザの情報が取得できてしまう
Echo、Discard、Chargen サービス †
rt(config)# service tcp-small-servers
rt(config)# service udp-small-servers