NW基本事項
cef
cefを有効にする (config)ip cef
無効にする (config)no ip cef
FIBの内容を表示する #show ip cef
TCP
TCPタイムスタンプを有効にする (config)#ip tcp timstamp
TCP選択確認応答を有効にする (config)#ip tcp selective-ack
TCPウィンドウサイズを変更するる。 (config)#ip tcp window-size {任意のウインドウサイズ}
OSPF
設定
マルチエリアOSPFの設定
(config)#router ospf 1 (config)#network {ネットワークアドレス} {ワイルドカードマスク} area {所属させたいエリア} 上記を所属されるインターフェースに設定する。
エリア1のルート情報を{192.168.32.0/21}に 集約してエリア0に流す。
(config)#router ospf 1 (config-router)#area 1 range {192.168.32.0 255.255.248.0}
エリア2をスタブエリアにする
そのエリアに所属するルータに設定すること。
RouterC(config)#router ospf 1 RouterC(config-router)#area 2 stub RouterD(config)#router ospf 1 RouterD(config)#router area 2 stub
エリア2をトータリスタブエリアにする。
RouterC(config)#router ospf 1 RouterC(config-router)#area 2 stub no-summary RouterD(config)#router ospf 1 RouterD(config)#area 2 stub
エリア2をNSSAにする。
RouterC(config)#router ospf 1 (config-router)#area {所属するエリア} nssa
RouterD(config)#router ospf 1 (config-router)#area {所属するエリア} nssa
エリア2をトータリNSSAにする。
ABRとASBRでは設定が異なる
RouterCにて (config)#router ospf 1 (config-router)#area 2 nssa no-summary
RouterDにて (config)#router ospf 1 (config-router)#area 2 nssa
仮想リンクを構築
相手のRouterIDを指定すること
(config)#router ospf 1 (config-router)# area {通過するエリア} virtual-link {相手のルータID}
showコマンド
OSPFの隣接ルータ情報を表示。
#show ip ospf neighbor
ルータID、所属するエリアの情報、SPF計算の 回数などのOSPF情報を表示
#show ip ospf
確認できるもの ・プロセスID ・ルータID ・所属するエリアの情報
ルーティングプロトコル情報を表示させる。
#show ip protocols
確認できるもの ・プロセスID ・ルータID ・所属するエリアの情報
OSPFのリンクステートデータベースを表示
#show ip ospf database
OSPFを有効にしているインターフェースの情報を表示
#show ip ospf interface
確認できるもの このインターフェースが所属するエリア 動作モード 役割(DR/BDR/DROUTER) DRの情報 BDRの情報
EIGRP
コマンド 設定
stub設定にする
(config)#router eigrp 1 (config-router)#eigrp stub
受信専用の設定を無効化
(config)#router eigrp 100 (config-router)#no eigrp stub receive-only
ルーティングテーブルにある、 EIGRPの経路、192.168.1.0/24に デフォルトネットワークのフラグをつける
(config)# ip default-network 192.168.1.0
自動集約
192.168.32.0/21に手動でルート集約する
(config)# interface fastethernet 0/0 (config-if)#ip summary-address eigrp {as番号} 192.168.32.0 255.255.248.0
EIGRPの自動集約を無効化する。
(config)#router eigrp 1 (config-router)#no auto-summary
ロードバランシング
EIGRPパケット率を20%に変更
(config)#interface fastEthernet 0/0 (config-if)#ip bandwidth-percent eigrp {as番号} 20
EIGRPで不等コストロードバランシングを行う。
例【4倍】未満のFDを持つフィージブルサクセサをロードバランシングの対象とする。
(config-router)# variance 4
EIGRPでロードバランシングを行える 最大経路数を「6」にする。
(config)#router eigrp 1 (config-router)#maximum-paths 6
認証
AS1にてMD5認証を行う
1.キーチェーンコンフィグレーションモードに移行。チェーン名は【test】 (config)#key chain {test} 2.キーIDコンフィグレーションモードに移行。キーIDは【1】 (config-keychain)#key 【キーID】 3.パスワードを設定【パスワード】 key-string 【ping-t】 4.認証を設定するインターフェースのコンフィグレーションモードに移行 (config)#interface fastEThernet 0/0 5.EiGRPパケットの【MD5認証】を有効化する (config-if)#ip authentication mode eigrp 【キーID】 md5 6.作成したキーチェーンを認証で使用するように設定する (config-if)#ip authentication key-chain eigrp {キーID} {チェーン名}
show コマンド
EIGRPが動作するインターフェースを確認
#show ip eigrp interfaces
EIGRPで学習した全てのルートを表示
#show ip eigrp topology all-links
サクセサとフィージブルサクセサを表示
#show ip eigrp topology
ネイバーテーブルを表示する
#show ip eigrp neighbors
特定のネットワークに対する ロードバランシングの割合を表示する
#show ip route 10.0.0.0
インストラクチャーサビス
Flexible NetFlow
Flexible NetFlowのフローサンプラの設定
(config)#sampler {サンプラ名} (config-sampler)#mode random {何パケット収集するか} out-of {何パケット中}
フローサンプラ確認
#show sampler
Flexble NetFlowをFa0の入力トラフィックに適用
適用するフローモニタ名「MON1」 適用するフローサンプラ名「SAM1」
(config)#interface FastEthernet 0 (config-if)#ip flow monitor {MON1} sampler {サンプラ名} input
Flexible NetFlowのフローレコード作成
条件 フローレコード名「REC1」 Keyフィールド1「ipv4 source address」 Keyフィールド2「ipv4 destination address」 Non Keyフィールド「counter bytes」
(config)#flow record {フローレコード名} (config-flow-record)#match {Keyフィールド1} (config-flow-record)#match {Keyフィールド2} (config-flow-record)#collect {Nonキーフィールド名}
フローレコードを確認
#show flow record
フローモニタの設定
フローモニタ名MON1 適用するレコード名REC1 適用するエクスポータ名EXP1
(config)#flow monitor {フローモニタ名} (config-flow-monitor)#record {REC1} (config-flow-monitor)#exporter {EXP1}
フローモニタを確認
#show flow monitor
フローモニタを適用したインターフェースを確認する。
#show flow interface
Flexble NetFlow のフローエクスポータ設定
フローエクスポータ名「EXP1」 出力先「192.168.2.2」
(config)#flow exporter {フローエクスポータ名} (config-flow-exporter)#destination {出力先IP}
#show flow exporter
ポート変更
HTTPSサーバポート変更
(config)#ip http secure-port {変更後のポート番号}
HTTPポート変更
(config)#ip http port 1026
DHCP
ルータをDHCPサーバとして動作させる
条件 プール名は「abc」 クライアントに割り当てるアドレスの範囲は「192.168.1.0/24」 デフォルトゲートウェイの指定「192.168.1.1」 DNSサーバの指定「192.168.1.5」 アドレスの貸し出し期間は「4日」 割り当てから除外するアドレスは「192.168.1.1~192.168.1.5」
(config)#ip dhcp pool {プール名} (dhcp-config)#network {割り当てるアドレスの範囲} (dhcp-config)#default-router {デフォゲの指定} (dhcp-config)#dns-server {DNSサーバの指定} (dhcp-config)#lease {貸し出し日数} (config)#ip dhcp excluded-address {割り当てから除外するアドレス範囲}
条件 プール名は「1」 クライアントに割り当てるアドレスの範囲「192.168.1.0/24」 中心となるDHCPサーバからパラメータ情報を取得する設定をする
(config)#ip dhcp pool {プール名} (config)# network 192.168.1.0 /24 (dhcp-config)#import all
ルータのFa0/0のアドレスをDHCPで取得するようにする
(config-if)#ip address dhcp
SNMP
SNMPTrapを有効にする
(config)#snmp-server enable traps
SNMP設定
メッセージの送信先192.168.1.100 SNMPマネージャから応答が無い場合は再送する バージョン「2c」 コミュニティストリング「ccnp」
(config)#snmp-server host 192.168.1.100 {trap | informs} version 2c {コミュニティ名}
Loading...