单位最近更新防火墙,打算把10年前的2台juniper换成现在的2台juniper srx 3400,利用juniper的jsrp技术实现,双机设备,一台坏了,另一台自动接替。觉得这次juniper命令比以前有很多该变小弟菜鸟跟着学了一点。

原理,每台机子有9个板卡位,分别是012345678,把板卡插在那个地方就是那个位置,设一台3400为a,另一台为b,那么变双机后,a,b变成一个整体,a为主机板卡为012345678,b为备机板卡不在是012345678,而是从9开始,数9个数

fxp0为a的telnet管理口 fxp1为b的telnet管理口

a的g1/0/15为fab0 与 b的9/0/15为fab1 相连 为数据传输   心跳线(控制传输)为固定的两个端口相连

a的g1/0/0 与 b的9/0/0 同属reth10  与主交换机相连

a的g1/0/1 与 b的9/0/1 同属reth11  与被交换机相连

详细配置如下:红色为说明 黑色为命令

只要配置好主机就好了,另一台会自动同步的

 

配置Cluster id和Node id

注意,这一步两个node都需要配置。

配置命令:

SRX3400A

SRX3400a>set chassis cluster cluster-id 1 node 0 reboot

//注1:注意该命令需在operational模式下输入

//注2:Cluster ID取值范围为1 – 15,当Cluster ID = 0时会unsets cluster配置,成为单机

SRX3400B

SRX3400b>set chassis cluster cluster-id 1 node 1 reboot

 

指定Fabric Link

Fabric Link是一个虚拟的交换平面,用于将两个SRX机箱的数据平面连接在一起,主要用于RTO对象同步和异步路由数据的回程。

配置命令:

SRX3400A

set interfaces fab0 fabric-options member-interfaces ge-1/0/15

set interfaces fab1 fabric-options member-interfaces ge-9/0/15

commit

//注5:Fabric Link中的Fab0固定用于node 0,Fab1固定用于node 1


配置Redundancy Group

Redundancy Group (RG)类似ScreenOS NSRP里的VSD,用来抽象两个机箱之间可以互相热备切换的一组对象,其中RG0固定用于RE切换,RG1用于一组redundant interface切换,如果要做AA,则还需要RG2。由此可以看出,RE切换是独立于接口切换的。


配置如下:

set chassis cluster reth-count 255

set chassis cluster redundancy-group 0 node 0 priority 254

set chassis cluster redundancy-group 0 node 1 priority 100

set chassis cluster redundancy-group 1 node 0 priority 254

set chassis cluster redundancy-group 1 node 1 priority 100

commit

 

每个机箱的个性化配置

通过group模板来实现,类似JUNOS RE 的group配置,实际上JSRP中的跨机箱RE切换就是模拟了JUNOS中的RE Redundancy,这样也方便以后实现NSR/ISSU。


配置如下:

set groups node0 system host-name juniper-srx-3400a

set groups node0 system backup-router 192.168.1.28

set groups node0 system backup-router destination 0.0.0.0/0

set groups node0 interfaces fxp0 unit 0 family inet address 192.168.1.26/28

set groups node1 system host-name juniper-srx-3400b

set groups node1 system backup-router 192.168.1.28

set groups node1 system backup-router destination 0.0.0.0/0

set groups node1 interfaces fxp0 unit 0 family inet address 192.168.1.27/28

set apply-groups ${node}"

commit

 

配置Redundant Ethernet Interface

Redundant Ethernet interface是一组主备的以太网接口,实际上利用了跨机箱的802.3ad link aggregate技术来实现两个成员接口间的主备切换。

Redundant Ethernet interface的MAC地址是虚拟的,其值根据以下公式可以计算得出:

0010DB11111111CCCCRRVV1111111

  CCCC:     Cluster ID

 RR:Reserved. 00.

 VV:     Version, 00 for the first release

 IIIIIIII:Interface id, derived from the reth index. 



配置如下:

set interfaces ge-0/0/0 gigether-options redundant-parent reth0    // node0的ge-0/0/0

set interfaces ge-0/0/1 gigether-options redundant-parent reth1    // node0的ge-0/0/1

set interfaces ge-0/0/2 gigether-options redundant-parent reth2   // node0的ge-0/0/2

set interfaces ge-0/0/3 gigether-options redundant-parent reth3    // node0的ge-0/0/3

 

set interfaces ge-8/0/0 gigether-options redundant-parent reth0    // node1的ge-0/0/0

set interfaces ge-8/0/1 gigether-options redundant-parent reth1    // node1的ge-0/0/1

set interfaces ge-8/0/2 gigether-options redundant-parent reth2    // node1的ge-0/0/2

set interfaces ge-8/0/3 gigether-options redundant-parent reth3    // node1的ge-0/0/3

 

set interfaces ge-1/0/0 gigether-options redundant-parent reth10    // node0的ge-1/0/0

set interfaces ge-1/0/1 gigether-options redundant-parent reth11    // node0的ge-1/0/1

set interfaces ge-1/0/2 gigether-options redundant-parent reth12    // node0的ge-1/0/2

set interfaces ge-1/0/3 gigether-options redundant-parent reth13    // node0的ge-1/0/3

 

set interfaces ge-9/0/0 gigether-options redundant-parent reth10   // node1的ge-9/0/0

set interfaces ge-9/0/1 gigether-options redundant-parent reth11   // node1的ge-9/0/1

set interfaces ge-9/0/2 gigether-options redundant-parent reth12    // node1的ge-9/0/2

set interfaces ge-9/0/3 gigether-options redundant-parent reth13     // node1的ge-9/0/3

 

set interfaces reth0 redundant-ether-options redundancy-group 1    // 属于RG1

set interfaces reth1 redundant-ether-options redundancy-group 1    // 属于RG1

set interfaces reth2 redundant-ether-options redundancy-group 1    // 属于RG1

set interfaces reth3 redundant-ether-options redundancy-group 1    // 属于RG1

set interfaces reth10 redundant-ether-options redundancy-group 1    // 属于RG1

set interfaces reth11 redundant-ether-options redundancy-group 1    // 属于RG1

set interfaces reth12 redundant-ether-options redundancy-group 1    // 属于RG1

set interfaces reth13 redundant-ether-options redundancy-group 1    // 属于RG1

 

 

配置Interface Monitoring

默认情况下,接口故障只会触发Redundant Ethernet interface内部主备接口切换,这时异步路由流量会从Fabric Link送到egress接口所在的node;如果希望避免这种状况 (比如Fabric Link带宽不够) 则可以通过配置interface monitoring来监控物理接口的存亡,并触发整个Redundancy Group的切换。每个被监控的成员接口需要被赋予一个权重(weight),当累积的weight超过threshold (default为255)时则可触发整个Redundancy Group切换。

配置如下:

set chassis cluster redundancy-group 1 interface-monitor ge-0/0/0 weight 255

set chassis cluster redundancy-group 1 interface-monitor ge-0/0/1 weight 255

set chassis cluster redundancy-group 1 interface-monitor ge-0/0/2 weight 255

set chassis cluster redundancy-group 1 interface-monitor ge-0/0/3 weight 255

 

set chassis cluster redundancy-group 1 interface-monitor ge-8/0/0 weight 255

set chassis cluster redundancy-group 1 interface-monitor ge-8/0/1 weight 255

set chassis cluster redundancy-group 1 interface-monitor ge-8/0/2 weight 255

set chassis cluster redundancy-group 1 interface-monitor ge-8/0/3 weight 255

 

set chassis cluster redundancy-group 1 interface-monitor ge-1/0/0 weight 255

set chassis cluster redundancy-group 1 interface-monitor ge-1/0/1 weight 255

set chassis cluster redundancy-group 1 interface-monitor ge-1/0/2 weight 255

set chassis cluster redundancy-group 1 interface-monitor ge-1/0/3 weight 255

 

set chassis cluster redundancy-group 1 interface-monitor ge-9/0/0 weight 255

set chassis cluster redundancy-group 1 interface-monitor ge-9/0/1 weight 255

set chassis cluster redundancy-group 1 interface-monitor ge-9/0/2 weight 255

set chassis cluster redundancy-group 1 interface-monitor ge-9/0/3 weight 255

commit

 

至此一个基本的JSRP配置已经完成,其余安全策略部分的配置跟单机类似。

 


request support information

查看系统启动信息show system boot-messages 

查看存储相关信息show system storage 

查看系统进程信息show system processes extensive 

查看系统启动时间信息show system uptime

查看系统连接信息show system connections 

CPU利用率核查show chassis routing-engine 

MEM利用率核查show chassis routing-engine 

OSPF邻居关系核查show ospf neighbor 

BGP邻居关系检查show bgp neighbor 

HSRP信息检查 show vrrp extensive 

电源状态核查show chassis environment pem 

风扇状态核查show chassis environment 

单板告警核查show chassis alarms 

单板状态核查show chassis fpc/show chassis fpc pic-status 

单板温度核查show chassis fpc/show chassis fpc pic-status 

单板固件版本信息检查show chassis fpc detail 

接口配置核查show configuration interfaces 

接口描述规范性核查 show interface descriptions 

AAA认证检查 show configuration system 

引擎板冗余状态检查  show configuration chassis redundancy 

NTP状态核查 show ntp associations


Telnet安全登录配置检查 show configuration system login 

版本核查show version 

查看配置show configuration

commit check

commit 

rollback

查看包含127的路由 

show route | find 127


show interfaces terse 

terse相当于IOS的brife 

配置一个接口: 

set interfaces em1 unit 0 family inet address 192.168.1.1/24 

delete interfaces em1 unit 0 family inet address 192.168.1.1/24


开启telnet: 

root@RSR04E-1# set services telnet

新建一个用户 admin 

root@RSR04E-1# edit system login


root@RSR04E-1# set user admin class super-user authentication plain-text-password 

New password:star123 

Retype new password:star123


root@RSR04E-1# edit system services 

[edit system services] 

root@RSR04E-1# set ssh protocol-version v2 

root@RSR04E-1# commit 

set routing-options static route 1.1.1.0/10 next-hop 2.2.2.2 

恢复出厂设置: 

这里我还是要细讲一下:可以通过JUNOS CLI的load factory default命令恢复Juniper路由器、交换机的原厂默认配置。load factory default将清空当前JUNOS的活跃配置以及除root用户以外的所有用户帐号。另外root用户的登录密码同时被清除:无密码直接回车登录。在commit激活JUNOS原厂默认配置之前,你最好也同时设定root用户的登录密码


在清空配置的时候,如提示: 

‘system’ 

Missing mandatory statement: ‘root-authentication’ 

error: configuration check-out failed: (missing statements) 

则需要设置root验证密码 

root@Juniper# set system root-authentication plain-text-password 

New password: 

Retype new password: 

继续commit check提示: 

[edit] 

root@Juniper# commit check 

error: cannot create user account: root 

error: user name is used by a system account 

error: configuration check-out failed: daemon file propagation failed 

这是因为之前我已经创建了一个username为root的账户,其实是我自己理解错了,set sys root-authen的时候系统会自动创建root用户,所有只要del掉之前我创建的那个root,check成功,直接commit,配置被清除。 

root@Juniper# delete system login user root 

[edit] 




root@Juniper# commit check 

configuration check succeeds


http://wenku.baidu.com/link?url=Btxp24PK-XaySXW8sYH-fdGFjjODIEn39XvTwxwcXYslctCzOwncrVKZO5IwoJtk1USP9KEqSK8k5z7cjUMPrEdPHxl4JKdY18S_5ArFJqa

http://wenku.baidu.com/link?url=Btxp24PK-XaySXW8sYH-fdGFjjODIEn39XvTwxwcXYslctCzOwncrVKZO5IwoJtk_FeaJKUMcoKtiwelRQFC9-0O7LufssJFs7oIMducFZC

http://wenku.baidu.com/link?url=JvOg2Fn0i7Xmb1B2-6L06s6FHajUsLWvP66fmD-kjbE3AM1YliZ6MrMbZx6Eemm_tB2r_Rr7bsTRaXCldhvVd4mW7qjy4Ntm7h0X3BJ4wr_


https://learningportal.juniper.net/juniper/user_courses.aspx