ネットワーク装置メモ

Contents:

cisco XE

VRF系

show ip route vrf MGMT
show bgp vrf MGMT all summary
> Neighbor情報

bgp clear

clear ip bgp all 65000

cisco XR

show route protocol bgp
show route ipv4 bgp
show route ipv6 bgp

個別経路をみる

show route ipv6 2001:200::/32

BGPpeerを見る

show bgp ipv4 unicast summary
show bgp ipv6 unicast summary

BGP経路を見る

show bgp ipv4 unicast neighbors 192.168.0.1 advertised-routes
show bgp ipv6 unicast neighbors 2001:db8::1 received routes

juniper

BGP基本

show bgp summary
 > neighbor情報
show route receive-protocol bgp 192.168.0.1
 > 受信経路
 show route advertising-protocol bgp 192.168.0.1
 > 送信経路

OSPF基本

show ospf neighbor
show ospf3 neighbor

比較

show | compare rollback 0
show configuration | compare rollback 45

configセーブ

show configuration |display set | save 20130515
configure
load override
load set
 factory-default      Override existing configuration with factory default
> 初期化
 merge                Merge contents with existing configuration
> confrict検知
 override             Override existing configuration
> 上書き
 patch                Load patch file into configuration
> 調べる
 replace              Replace configuration data
> 入れ替え
 set                  Execute set of commands on existing configuration
> display setの結果を
 update               Update existing configuration
> ???

rootでshell

start shell user root

JSRP時の他のノードの操作(SRXとか)

request routing-engine login node 1

logical-systems組んでる場合(MXとか)

set cli logical-system [system-name]

virtual-chassisしている場合(EXとか)

show virtual-chassis status
request session member 0
show chassis routing-engine

IFカウンタ系

show interfaces ge-0/0/0 extensive
monitor interface ge-0/0/0
> エラーカウンタとか見れる

BGP経路の確認

show route advertising-protocol bgp 192.168.0.1 terse
show route receive-protocol bgp 192.168.0.1 terse
show route receive-protocol bgp 192.168.0.1 hidden terse
show route source-gateway 192.168.0.1 terse aspath-regex "65000"

小技

set cli screen-width 1024
> ターミナルの幅を広げる
set cli timestamp
> cliのコマンド毎にタイムスタンプを表示

小技2

rename protocols bgp group AS65000 to group AS65000
edit protocols bgp group AS65001
replace pattern AS65000 with AS65001
top
> ASばんごうを 変える

BGPポートのフィルタの書き方 apply-path

set policy-options prefix-list bgp-peers apply-path "protocols bgp group <*> neighbor <*>";
set firewall family inet filter bgp-access term bgp-permit from prefix-list bgp-peers
set firewall family inet filter bgp-access term bgp-permit from protocol bgp
set firewall family inet filter bgp-access term bgp-permit from port 179
set firewall family inet filter bgp-access term bgp-permit then accept
set firewall family inet filter bgp-access term bgp-deny from protocol bgp
set firewall family inet filter bgp-access term bgp-deny from port 179
set firewall family inet filter bgp-access term bgp-deny then discard