【正文】
} } } 上面顯示的就是在 juniper 中配置了 ospf 后看到。 下面這個例子中的配置說明了啟動了 OSPF 路由協(xié)議,并且等同在 cisco 中使用了 work 。 } } 對應(yīng)命令: set routingoption static route 或者: edit routingoption static 深圳傲天信息技術(shù)有限公司 深圳傲天工程文檔 第 頁 共 20 頁 29 set route OSPF 路由協(xié)議配置 假設(shè)有設(shè)備,其上面有接口 Fe1/1/1 等等, ip 地址分別為 , ……依次遞增。 } family mpls } } } 節(jié)選結(jié)束 是不是感覺和 C 有點象?呵呵,完全是結(jié)構(gòu)層次的配置命令,上面配置的含義就是接口 fe1/0/3 配置ipv4 地址 。 rootstim rollback ? Possible pletions: [Enter] Execute this mand 0 20200930 13:58:53 UTC by root via cli 1 20200930 13:42:55 UTC by root via cli 2 20200928 15:47:34 UTC by root via cli 3 20200928 15:47:16 UTC by root via cli 4 20200928 15:46:44 UTC by root via cli 5 20200928 00:54:45 UTC by root via other | Pipe through a mand [edit] 查看當(dāng)前版本: rootstim show version Hostname: stim Model: olive JUNOS Base OS boot [] JUNOS Base OS Software Suite [] JUNOS Kernel Software Suite [] JUNOS Packet Forwarding Engine Support (M20/M40) [] JUNOS Routing Software Suite [] JUNOS Online Documentation [] JUNOS Crypto Software Suite [] Juniper 命令行入門 juniper 命令 行 有兩層: 操作模式,配置模式 : 如果對比其他廠商的設(shè)備,就是用戶模式,和特權(quán)模式的區(qū)別。用 mit check 查看配置是否正確,如圖在 mit check的時候發(fā)生報錯,需要修改。 [edit interfaces] rootstimRouterA show | display set set interfaces fe0/0/1 unit 0 family i address set interfaces se0/0/2 unit 0 family i address set interfaces se0/0/3 serialoptions clockingmode dce set interfaces se0/0/3 unit 0 family i address set interfaces lo0 unit 0 family i address 用 show pare 命令查看配置過的腳本 rootstim edit system services 深圳傲天信息技術(shù)有限公司 深圳傲天工程文檔 第 頁 共 20 頁 25 [edit system services] rootstim set tel [edit system services] rootstim exit [edit] rootstim exit The configuration has been changed but not mitted Exit with unmitted changes? [yes,no] (yes) no rootstim show | pare [edit system] + services { + tel。 進(jìn)入接口視圖 rootstim edit interface [edit interfaces] rootstim show fxp0 { unit 0 { family i { address 。 } } } interfaces { fxp0 { unit 0 { family i { address 。 authorization info。 syslog { user * { any emergency。 system { hostname stim。 } family mpls } } } OSPF路由協(xié)議配置 方法 1: 深圳傲天信息技術(shù)有限公司 深圳傲天工程文檔 第 頁 共 20 頁 23 一進(jìn)入配置模式 [edit]就使用命令 set protocol ospf area 0 interface fe1/1/1 方法 2: 進(jìn)入 [edit]后依次使用命令 [edit] edit protocol [edit protocol] edit ospf [edit protocol ospf] edit area 0 [edit protocol ospf area ] set interface fe1/1/1 或者 [edit] edit protocol ospf area 0 [edit protocol ospf area ] set interface fe1/1/1 [edit] protocols { ospf { area 0 { interface fe1/1/1。 root mit 確認(rèn)配置,在沒有確認(rèn)配置的時候所有配置都是不生效的! rootrouter1 exit rootrouter1 保存配置用 save 命令 深圳傲天信息技術(shù)有限公司 深圳傲天工程文檔 第 頁 共 20 頁 22 [edit] avivarouter1 save configurationmarch02 Wrote 433 lines of configuration to configurationmarch02 察看保存過的文件用 run file list 命令 avivarouter1 run file list /var/home/aviva: .ssh/ configurationmarch02 用保存的文件載入配置用 load replace 命令。 root set system backuprouter backuprouter 是本路由器的直連路由器,在路由器啟動的時候, JUNOS 路由軟件 (routing protocol process, RPD)沒有立即啟動,路由器將自動生成一條到backup router 的缺省路由,當(dāng)路由器啟動完成后再自動刪除這條路由。 export killprivateaddresses。 import [martianfilter longprefixfilter as47filter] neighbor neighbor } 深圳傲天信息技術(shù)有限公司 深圳傲天工程文檔 第 頁 共 20 頁 20 group problemchild{ type external。 group megainc{ type external。 } } finalaction。 } to{ matchconditions。 在 IGP 路由協(xié)議中,如 OSPF, ISIS 等,只有 Export;而 EGP 中,如 BGP等,可以有 import 和 export。 IMPORT Import 是指由外部注入到指定路由表的信 息方向。 neighbor address4。 cluster clusteridentifier。 } group groupname { type internal。 neighbor address1。 3) BGP 路由反射器的設(shè)置 edit protocols bgp] group groupname { type internal。 } policyoptions{ policystatement nexthopself{ then{ nexthop self。 import nexthopself。 } group AS_692{ 深圳傲天信息技術(shù)有限公司 深圳傲天工程文檔 第 頁 共 20 頁 17 type external。 authenticationkey XXXXXXXXXXXX neighbor 。