久々に技術的なブログを書きます
最初にログの保存方法です
JUNOSで現状のキャンデティト・コンフギュレーションを出力させるためにはshowコマンドを実施します
ただし、showコマンドを実施しますと1ページごとに
moreを出力させないためには
show | no-more
を実施します”no-more”コマンドはshow以外のコマンドでも有効です
ユーザがログアウトするまでページングを無効にするためにはオペレーショナルモードで下のコマンドを実施します
>set cli screen-length 0
コンフィギュレーションモードからオペレーショナルモードのコマンドを実施したい場合は実施するコマンドの前にrunを付け加えます
#run set cli screen-length 0
JUNOSのrunコマンドはciscoで使えるdoコマンドとは違い”tabキー”や”?”を使うことができます
I love JUNOS !
しかし、JUNOSの設定はご存知のとおりset形式で実施します
このset形式でコンフィグを表示させるには、
#show | display set
を実施します 先ほどの”no-more”と組み合わせて
#show | display set | no-more
を実行すると良いでしょう
次はコンフィグの流し込みです
コンフィグをコンソール端末から流し込みを行う場合には
#load override terminal
を実施、コンフィグを流し終えたら、Ctrl-Dで終了です
念のためですがcommitで設定反映を忘れずに
タグ
2009年11月8日 | コメント/トラックバック(0)
|
カテゴリー:JUNOS
今回は設定の反映、保存方法について
ご存知のとおりJUNOSはいくらコンフィグを作ってもすぐには反映されません
設定反映する時にはcommitコマンドを使用します
さて、このcommitされたコンフィグファイルはJUNOSの場合は50世代まで世代管理されます
またrollbbackコマンドを実施することにより50世代前までの設定ファイルを読み込むことができます
この世代管理された設定ファイルは3世代目までは /config/ディレクトリ以下に保存され、それ以降の4世代目から50世代目までは /var/db/config/ディレクトリに保存されます
現在実行されているコンフィグのバックアップファイルは /config/juniper.conf.gzです
実はJUNOSではstart shellコマンドを実施することにより直接UNIXシェルにアクセスできます
実際にファイルが保存されている場所を確認してみましょう
(ただしshellを触るとサポートが受けられなくなりますので自己責任で)
|
root> start shell root@%ls -la /config total 24 drwxr-xr-x 2 root wheel 512 Sep 13 19:18 . drwxr-xr-x 19 root wheel 512 Sep 1 23:39 .. -rw-r—– 1 root wheel 200 Sep 13 16:54 juniper.conf.1.gz -rw-r—– 1 root wheel 151 Sep 12 12:24 juniper.conf.2.gz -rw-r—– 1 root wheel 271 Sep 12 00:05 juniper.conf.3.gz -rw-r—– 1 root wheel 230 Sep 13 19:18 juniper.conf.gz root@% ls -la /var/db/config total 60 drwxr-xr-x 2 root wheel 512 Sep 13 19:18 . drwxr-xr-x 11 root wheel 512 Sep 13 19:18 .. -rw-r—– 1 root wheel 325 Sep 11 11:37 juniper.conf.10.gz -rw-r—– 1 root wheel 319 Sep 10 11:30 juniper.conf.11.gz -rw-r—– 1 root wheel 312 Sep 9 01:55 juniper.conf.12.gz -rw-r—– 1 root wheel 292 Sep 9 01:50 juniper.conf.13.gz -rw-r—– 1 root wheel 151 Sep 9 01:30 juniper.conf.14.gz -rw-r—– 1 root wheel 210 Sep 9 01:30 juniper.conf.15.gz -rw-r—– 1 root wheel 151 Sep 9 01:29 juniper.conf.16.gz -rw-r—– 1 root wheel 225 Sep 13 19:18 juniper.conf.4.gz -rw-r—– 1 root wheel 330 Sep 13 16:54 juniper.conf.5.gz -rw-r—– 1 root wheel 286 Sep 12 12:24 juniper.conf.6.gz -rw-r—– 1 root wheel 151 Sep 12 00:05 juniper.conf.7.gz -rw-r—– 1 root wheel 357 Sep 11 11:42 juniper.conf.8.gz -rw-r—– 1 root wheel 352 Sep 11 11:41 juniper.conf.9.gz root@% exit root>
|
直接CLIよりこの設定ファイルの中身を確認したい場合は….
|
root> file show /var/db/config/juniper.conf.10.gz version 7.4R3.4; system { root-authentication { encrypted-password “$1$lsjMSsHY$6r1NpLratYqqQb5OrsfZ70″; } login { user Juniper { uid 2000; class super-user; authentication { encrypted-password “$1$WxKIvzoy$.8nGAuVuYjk.GZ.4EDrTG/”; } } } syslog { user * { any emergency; } file messages { any notice; authorization info; } file interactive-commands { —(more)—
|
設定ファイル自体はgzで圧縮されていますが
普通に見えますので中身を確認してからrollback 10を実施しましょう
タグ
2009年9月12日 | コメント/トラックバック(0)
|
カテゴリー:JUNOS
EXスイッチを立ち上げたときのdefault configですがJuniperルータの場合とは少し違い、
最初から物理インターフェースの情報がコンフィグに反映されております
この設定により他社製のスイッチのように初期設定を実施せずとも普通のスイッチングHUBとして利用することが可能です
下がEX4200のdefault configです (長いので途中を略しています)
root#show system { syslog { user * { any emergency; } file messages { any notice; authorization info; } file interactive-commands { interactive-commands any; } } } interfaces { ge-0/0/0 { unit 0 { family ethernet-switching { } } ge-0/0/1 { unit 0 {
family ethernet-switching {
}
} ge-0/0/2 { unit 0 {
family ethernet-switching {
}
} ge-0/0/3 {
unit 0 {
family ethernet-switching {
}
}
~~ 中略 ~~
ge-0/0/22 {
unit 0 {
family ethernet-switching {
}
} ge-0/0/23 {
unit 0 {
family ethernet-switching {
}
} } protocols { lldp { interface all; }
lldp-med {
interface all;
}
} |
因みにJuniperのスイッチ製品に関してポート番号は0番から始まります
たとえば、EX4200-24の場合は一番初めのポートはge-0/0/0から始まりcopperポートの最後のポート番号はge-0/0/23です
最初のうちは戸惑うかもしれませんが、慣れの問題だとおもいます
タグ
2009年9月4日 | コメント/トラックバック(0)
|
カテゴリー:EXスイッチ