Junos成功瘦身,117M,解压缩后149M。内置组播补丁,组播固化补丁, 支持Vlan-tagging,支持Jweb 支持逻辑路由器
支持十个千兆网卡,这下可以搭出非常复杂的拓扑了! 支持FreeBSD下的操作。
经本人试验,可稳定运行,启动与关机均只需一分钟。
下载地址:http://www.rayfile.com/zh-cn/files/cfc6a1d7-fcce-11dd-98c0-0014221b798a/
系统运行后,可直接在虚拟机里操作,或者通过SecureCRT 来Telnet登陆,
同时支持串口登陆,压缩包内含pipe proxy,
NPTP:
其作用有点类似于部门使用的串口服务器,它把设备的串口和一个(IP+端口)对映射在一起,我们只用telnet这个ip的对应端口,就可以获得相当于访问该设备串口的服务。
按下图建立一个串口和(IP+端口)对的映射就可以了。
在建立好上面的映射关系后,保持NPTP软件始终打开就行。
JUNOS管理口为em0,其IP地址为192.168.1.254,对应的是虚拟机的第一块网卡Ethernet,在虚拟机属性里,正确选择这块网卡对应的主机虚拟网卡,并将这块虚拟网卡的IP地址设置为192.168.1.1,则不但可以适用JWeb,而且JUNOS可以联通。
帐号和JUNOS配置模式
系统账号:root 密码:juniper123 用户账号:mengmeng 密码:test123
系统环境: VMware-6.0 Freebsd 6.1
jinstall-8.5R1.14-domestic-signed jweb-8.5R1.14-signed
系统运行后,自动支持组播,
支持web访问,地址:http://192.168.1.254
支持Telnet 访问,地址:192.168.1.254 端口号:23
JUNOS的配置模式:按我的理解JUNOS有三种模式 @%
操作系统模式,处于FreeBSD操作系统,可以使用常用的FreeBSD相关命令,比如ls、pwd、cd等等,通过命令cli可以进入用户模式; >
用户模式,经过JUNOS封装的系统,可以进行一些简单的命令配置和所有信息显示,类似于我司路由器的config t之前的模式,使用configure命令可以进入配置模式; #
配置模式,在此模式下对路由器进行配置,类似于我司路由器的config t之后的模式。
JUNOS的命令风格:
JUNOS的命令风格在业界很特别,仅与Alcatel的命令风格略有相似之处。这里只作简单的介绍,具体的使用希望大家钻研。
JUNOS采用edit、set、delete、show、run show和commit来完成主体功能的配置。值得注意的是,在完成了某项功能的配置之后,只有使用commit命令提交成功之后,该配置才会生效,在commit提交之后,系统会对提交的配置进行合法性检查,只有通过合法性检查才算提交成功,否则系统会给出错误信息。合法性检查仅检查配置的合法性,并不检查配置的准确性与正确性,请注意。
里面已经配置了OSPF协议,可以完美运行。拓扑图如下:
root> show ospf neighbor logical-router r1
Address Interface State ID Pri Dead 10.0.4.6 em1.12 Full 10.0.6.2 128 37 10.0.4.13 em1.13 Full 10.0.3.3 128 34
root> show ospf neighbor logical-router r5
Address Interface State ID Pri Dead 10.0.2.2 em5.53 Full 10.0.3.3 128 34 10.0.2.10 em5.54 Full 10.0.3.4 128 33 10.0.8.5 em5.56 Full 10.0.9.6 128 31 10.0.8.10 em5.57 Full 10.0.9.7 128 34
root> show route logical-router r1
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both
10.0.2.0/30 *[OSPF/10] 00:02:51, metric 2 > to 10.0.4.13 via em1.13 10.0.2.4/30 *[OSPF/10] 00:02:51, metric 2 > to 10.0.4.13 via em1.13 10.0.2.8/30 10.0.3.3/32
*[OSPF/10] 00:02:51, metric 3 > to 10.0.4.6 via em1.12 to 10.0.4.13 via em1.13
*[OSPF/10] 00:02:51, metric 1
> to 10.0.4.13 via em1.13
10.0.3.4/32 *[OSPF/10] 00:02:51, metric 2 to 10.0.4.6 via em1.12 > to 10.0.4.13 via em1.13
10.0.3.5/32 *[OSPF/10] 00:02:51, metric 2 > to 10.0.4.13 via em1.13
10.0.4.0/30 *[OSPF/10] 00:02:51, metric 2 to 10.0.4.6 via em1.12 > to 10.0.4.13 via em1.13 10.0.4.4/30 *[Direct/0] 00:03:56 > via em1.12 10.0.4.5/32 *[Local/0] 00:03:56
Local via em1.12
10.0.4.8/30 *[OSPF/10] 00:03:06, metric 2 > to 10.0.4.6 via em1.12 10.0.4.12/30 *[Direct/0] 00:03:56 > via em1.13
10.0.4.14/32 *[Local/0] 00:03:56 Local via em1.13
10.0.6.1/32 *[Direct/0] 00:03:56 10.0.6.2/32 10.0.8.0/30
> via lo0.1
*[OSPF/10] 00:03:06, metric 1 > to 10.0.4.6 via em1.12
*[OSPF/10] 00:02:51, metric 4
> to 10.0.4.13 via em1.13 10.0.8.4/30 *[OSPF/10] 00:02:51, metric 3 > to 10.0.4.13 via em1.13
10.0.8.8/30 *[OSPF/10] 00:02:51, metric 3 > to 10.0.4.13 via em1.13 10.0.9.6/32 *[OSPF/10] 00:02:51, metric 3 > to 10.0.4.13 via em1.13 10.0.9.7/32 *[OSPF/10] 00:02:51, metric 3 > to 10.0.4.13 via em1.13 224.0.0.5/32 *[OSPF/10] 00:03:56, metric 1 MultiRecv
root> ping 10.222.10.1 logical-system R source 10.222.3.2
全部配置如下:
root> show configuration
## Last commit: 2008-10-10 17:44:21 UTC by root version 8.5R1.14; system {
backup-router 192.168.1.1;
root-authentication {
encrypted-password \"$1$Mvxox7d8$UVmJd7OLkwbIJ/B7Kbavz0\"; ## SECRET-DATA }
login {
user mengmeng { uid 2001;
class super-user;
authentication {
encrypted-password \"$1$GAAB2nYd$v.aOFalSpMh5rbiWG/f1a.\"; ## SECRET-DATA } } } services { ftp; telnet;
web-management { http { port 80; }
} } }
logical-routers { r1 {
interfaces { em1 {
unit 12 {
vlan-id 12; family inet { address 10.0.4.5/30; } }
unit 13 { vlan-id 13; family inet {
address 10.0.4.14/30; } } } lo0 {
unit 1 {
family inet {
address 10.0.6.1/32; }
} } }
protocols { ospf {
area 0.0.0.10 {
interface em1.12; interface em1.13; interface lo0.1; } } } } r2 {
interfaces { em2 {
unit 21 {
vlan-id 12; family inet {
address 10.0.4.6/30;
} }
unit 23 {
vlan-id 23;
family inet { address 10.0.4.2/30; } } unit 24 { vlan-id 24; family inet {
address 10.0.4.10/30; } } }
lo0 {
unit 2 {
family inet { address 10.0.6.2/32; }
} } }
protocols {
ospf {
area 0.0.0.10 { interface em2.21; interface em2.23; interface em2.24; interface lo0.2; } } } } r3 {
interfaces { em3 {
unit 31 { vlan-id 13; family inet {
address 10.0.4.13/30; } }
unit 32 {
vlan-id 23; family inet {
address 10.0.4.1/30; }
} unit 34 { vlan-id 34; family inet { address 10.0.2.5/30; } }
unit 35 {
vlan-id 35;
family inet {
address 10.0.2.2/30; } } } lo0 { unit 3 {
family inet {
address 10.0.3.3/32; } }
}
} protocols { ospf {
area 0.0.0.10 { interface em3.31; interface em3.32; }
area 0.0.0.0 { interface em3.34; interface em3.35; interface lo0.3; } } } }
r4 {
interfaces { em4 {
unit 42 {
vlan-id 24; family inet {
address 10.0.4.9/30; }
} unit 43 { vlan-id 34; family inet { address 10.0.2.6/30; } }
unit 45 {
vlan-id 45;
family inet {
address 10.0.2.10/30; } } } lo0 { unit 4 {
family inet {
address 10.0.3.4/32; } }
} }
protocols { ospf {
area 0.0.0.10 { interface em4.42; }
area 0.0.0.0 {
interface em4.43; interface em4.45; interface lo0.4; } } } } r5 {
interfaces { em5 {
unit 53 {
vlan-id 35;
family inet {
address 10.0.2.1/30; } }
unit 54 { vlan-id 45;
family inet {
address 10.0.2.9/30; } }
unit 56 { vlan-id 56; family inet { address 10.0.8.6/30; } }
unit 57 {
vlan-id 57; family inet { address 10.0.8.9/30;
} } } lo0 {
unit 5 {
family inet { address 10.0.3.5/32; } } } }
protocols { ospf {
area 0.0.0.0 {
interface em5.53; interface em5.54; interface lo0.5; }
area 0.0.0.1 { interface em5.56; interface em5.57; } }
}
} r6 {
interfaces { em6 { unit 65 { vlan-id 56;
family inet {
address 10.0.8.5/30; } }
unit 67 { vlan-id 67; family inet { address 10.0.8.1/30; } } } lo0 { unit 6 {
family inet {
address 10.0.9.6/32; } } }
}
protocols {
ospf {
area 0.0.0.1 {
interface em6.65; interface em6.67; interface lo0.6; } } } } r7 {
interfaces { em7 { unit 75 { vlan-id 57;
family inet {
address 10.0.8.10/30; }
}
unit 76 {
vlan-id 67; family inet {
address 10.0.8.2/30;
} } } lo0 { unit 7 {
family inet {
address 10.0.9.7/32; } } } }
protocols { ospf {
area 0.0.0.1 { interface em7.75; interface em7.76; } }
interfaces { em0 {
unit 0 {
family inet {
address 192.168.1.254/24; } } } em1 {
vlan-tagging; } em2 {
vlan-tagging; }
em3 {
vlan-tagging; }
interface lo0.7; } } }
em4 {
vlan-tagging; } em5 {
vlan-tagging; } em6 {
vlan-tagging; } em7 {
vlan-tagging; }
}
routing-options { static {
route 0.0.0.0/0 { next-hop 192.168.1.1; retain;
no-readvertise; } }
} root>
root@r1# show | display set | no-more set version 10.1R1.8 set system host-name r1
set system root-authentication \"$1$n8DzwYjD$yznZWrEL6bFXAJ3jaksgR0\" set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any set logical-systems r1 interfaces em1 unit 12 vlan-id 12
set logical-systems r1 interfaces em1 unit 12 family inet address 10.0.4.5/30 set logical-systems r1 interfaces em1 unit 13 vlan-id 13
set logical-systems r1 interfaces em1 unit 13 family inet address 10.0.4.14/30 set logical-systems r1 interfaces lo0 unit 1 family inet address 10.0.6.1/32 set logical-systems r1 protocols ospf area 0.0.0.10 interface em1.12 set logical-systems r1 protocols ospf area 0.0.0.10 interface em1.13 set logical-systems r1 protocols ospf area 0.0.0.10 interface lo0.1
set logical-systems r2 interfaces em2 unit 21 vlan-id 12
set logical-systems r2 interfaces em2 unit 21 family inet address 10.0.4.6/30 set logical-systems r2 interfaces em2 unit 23 vlan-id 23
encrypted-password
set logical-systems r2 interfaces em2 unit 23 family inet address 10.0.4.2/30 set logical-systems r2 interfaces em2 unit 24 vlan-id 24
set logical-systems r2 interfaces em2 unit 24 family inet address 10.0.4.10/30 set logical-systems r2 interfaces lo0 unit 2 family inet address 10.0.6.2/32 set logical-systems r2 protocols ospf area 0.0.0.10 interface em2.21 set logical-systems r2 protocols ospf area 0.0.0.10 interface em2.23 set logical-systems r2 protocols ospf area 0.0.0.10 interface em2.24 set logical-systems r2 protocols ospf area 0.0.0.10 interface lo0.2 set logical-systems r3 interfaces em3 unit 31 vlan-id 13
set logical-systems r3 interfaces em3 unit 31 family inet address 10.0.4.13/30 set logical-systems r3 interfaces em3 unit 32 vlan-id 23
set logical-systems r3 interfaces em3 unit 32 family inet address 10.0.4.1/30 set logical-systems r3 interfaces em3 unit 34 vlan-id 34
set logical-systems r3 interfaces em3 unit 34 family inet address 10.0.2.5/30 set logical-systems r3 interfaces em3 unit 35 vlan-id 35
set logical-systems r3 interfaces em3 unit 35 family inet address 10.0.2.2/30 set logical-systems r3 interfaces lo0 unit 3 family inet address 10.0.3.3/32 set logical-systems r3 protocols ospf area 0.0.0.10 interface em3.31 set logical-systems r3 protocols ospf area 0.0.0.10 interface em3.32 set logical-systems r3 protocols ospf area 0.0.0.0 interface em3.34 set logical-systems r3 protocols ospf area 0.0.0.0 interface em3.35
set logical-systems r3 protocols ospf area 0.0.0.0 interface lo0.3 set logical-systems r4 interfaces em4 unit 42 vlan-id 24
set logical-systems r4 interfaces em4 unit 42 family inet address 10.0.4.9/30 set logical-systems r4 interfaces em4 unit 43 vlan-id 34
set logical-systems r4 interfaces em4 unit 43 family inet address 10.0.2.6/30 set logical-systems r4 interfaces em4 unit 45 vlan-id 45
set logical-systems r4 interfaces em4 unit 45 family inet address 10.0.2.10/30 set logical-systems r4 interfaces lo0 unit 4 family inet address 10.0.3.4/32 set logical-systems r4 protocols ospf area 0.0.0.10 interface em4.42 set logical-systems r4 protocols ospf area 0.0.0.0 interface em4.43 set logical-systems r4 protocols ospf area 0.0.0.0 interface em4.45 set logical-systems r4 protocols ospf area 0.0.0.0 interface lo0.4 set logical-systems r5 interfaces em5 unit 53 vlan-id 35
set logical-systems r5 interfaces em5 unit 53 family inet address 10.0.2.1/30 set logical-systems r5 interfaces em5 unit 54 vlan-id 45
set logical-systems r5 interfaces em5 unit 54 family inet address 10.0.2.9/30 set logical-systems r5 interfaces em5 unit 56 vlan-id 56
set logical-systems r5 interfaces em5 unit 56 family inet address 10.0.8.6/30 set logical-systems r5 interfaces em5 unit 57 vlan-id 57
set logical-systems r5 interfaces em5 unit 57 family inet address 10.0.8.9/30 set logical-systems r5 interfaces lo0 unit 5 family inet address 10.0.3.5/32 set logical-systems r5 protocols ospf area 0.0.0.1 interface em5.56 set logical-systems r5 protocols ospf area 0.0.0.1 interface em5.57
set logical-systems r5 protocols ospf area 0.0.0.0 interface em5.53
set logical-systems r5 protocols ospf area 0.0.0.0 interface em5.54 set logical-systems r5 protocols ospf area 0.0.0.0 interface lo0.5 set logical-systems r6 interfaces em6 unit 65 vlan-id 56
set logical-systems r6 interfaces em6 unit 65 family inet address 10.0.8.5/30 set logical-systems r6 interfaces em6 unit 67 vlan-id 67
set logical-systems r6 interfaces em6 unit 67 family inet address 10.0.8.1/30 set logical-systems r6 interfaces lo0 unit 6 family inet address 10.0.9.6/32 set logical-systems r6 protocols ospf area 0.0.0.1 interface em6.65 set logical-systems r6 protocols ospf area 0.0.0.1 interface lo0.6 set logical-systems r6 protocols ospf area 0.0.0.1 interface em6.67 set logical-systems r7 interfaces em7 unit 75 vlan-id 57
set logical-systems r7 interfaces em7 unit 75 family inet address 10.0.8.10/30 set logical-systems r7 interfaces em7 unit 76 vlan-id 67
set logical-systems r7 interfaces em7 unit 76 family inet address 10.0.8.2/30 set logical-systems r7 interfaces lo0 unit 7 family inet address 10.0.9.7/32 set logical-systems r7 protocols ospf area 0.0.0.1 interface em7.75 set logical-systems r7 protocols ospf area 0.0.0.1 interface em7.76 set logical-systems r7 protocols ospf area 0.0.0.1 interface lo0.7 set interfaces em0 unit 0 family inet address 192.168.1.254/24 set interfaces em1 vlan-tagging set interfaces em2 vlan-tagging set interfaces em3 vlan-tagging set interfaces em4 vlan-tagging set interfaces em5 vlan-tagging set interfaces em6 vlan-tagging set interfaces em7 vlan-tagging
set interfaces fxp0 unit 0 family inet address 10.0.0.101/24 set interfaces fxp1 vlan-tagging set interfaces fxp2 vlan-tagging
set routing-options static route 0.0.0.0/0 next-hop 192.168.1.1 set routing-options static route 0.0.0.0/0 retain set routing-options static route 0.0.0.0/0 no-readvertise
RSVP配置
RSVP功能主要从interfaces、protocols和routing-options三个方面进行配置。
Interfaces
初始时,interface视图下是没有什么配置的,但是我们可以通过(run) show interfaces terse命令看到有em0到em3四个网口,这就是我们虚拟机里看到的四个intel千兆网卡。
这样,我们需要给对应的网卡和lo0配上需要的ip地址。 完成如下的配置即可
当完成了上述配置之后再显示接口信息会如下图。
值得注意的是,进行TE的相关配置时,物理接口必须支持mpls协议族,即family mpls。同时给物理接口配置了地址之后,可能使用上面的命令看不到具体的地址信息,并且也ping不通对端接口,这是正常的,应该是模拟器的原因,这时候需要保存一下配置,重启模拟器,就正常了。
Protocols
Protocol视图下,需要编辑三个对应的子视图,rsvp子视图、mpls子视图和ospf子视图(视具体选用的igp而定)。
Rsvp子视图的配置如下:
在子视图下添加rsvp接口,即使能对应接口的rsvp功能即可,这类似于我司设备在物理接口下使能te功能和设置带宽参数。 Mpls子视图的配置如下:
在该视图下,首先也要添加mpls接口,其次在te隧道和其路径的配置都在该视图下进行,上图中的lsp和path分别对应te隧道和显示路径,其他的一些属性配置整个业界大致都是一致的,仔细找下具体的命令即可,这里主要描述一个配置框架,不对细节太过于描述。
Ospf子视图的配置如下:
在子视图下添加ospf接口,并配置ospf支持te,与我司设备配置一致。这里需要注意的是,由于模拟器的原因,ospf不能支持组播,所以需要将ospf接口类型设置为nbma,并且显示指定ospf邻居,才能触发ospf发送单播的协议报文,建立ospf邻居,还有哪些方式可以实现同样的功能,个人没有去探究,因为在这里重点关注的是te而非ospf,望谅。
相关附件
一个较完整的配置和相关lsp的显示信息 root@% cli root>
root> configure
Entering configuration mode
Users currently editing the configuration:
root terminal d0 (pid 3417) on since 2007-04-22 21:26:51 UTC [edit protocols] [edit]
root# run show configuration
## Last commit: 2007-04-22 21:31:39 UTC by root version 8.1R1.5; system {
root-authentication { encrypted-password \"$1$67/rC6nA$NeboJ.WtV2i2UNzJHAyZT/\"; SECRET-DATA }
login {
user mafm { uid 2000; class super-user; authentication { encrypted-password \"$1$sp2gEjZW$RSjEalukJwDsrMZplbM7L0\";
SECRET-DATA } } }
services { telnet; } }
logical-routers { J2001; }
##
##
interfaces {
em0 {
unit 0 { bandwidth 2m; family inet {
address 192.168.22.201/24; } family mpls; } }
lo0 {
unit 0 {
family inet {
address 202.1.1.1/32; } }
} }
routing-options { static {
route 0.0.0.0/0 next-hop 192.168.22.1; }
router-id 202.1.1.1; } protocols {
rsvp {
interface em0.0 { bandwidth 2m; }
interface em1.0; } mpls {
traffic-engineering mpls-forwarding; admin-groups { gold 1; silver 2; copper 3; best-effort 4; }
class-of-service 0;
label-switched-path frr {
to 202.1.1.3; record;
admin-group include-all [ silver copper ];
fast-reroute;
primary lsp1; }
label-switched-path bypass { disable; to 202.1.1.2; primary lsp2; }
path lsp1 {
192.168.23.203 loose; }
path lsp2 {
192.168.23.202 strict; }
interface em0.0 {
admin-group [ gold silver copper best-effort ]; }
interface em1.0; } ospf {
traffic-engineering {
shortcuts lsp-metric-into-summary; }
area 0.0.0.0 { interface em0.0 {
interface-type nbma; priority 10;
neighbor 192.168.22.202; }
interface lo0.0;
interface em1.0 {
interface-type nbma; priority 20;
neighbor 192.168.23.202; } } } } [edit]
root# run show mpls lsp
Ingress LSP: 1 sessions
To From State Rt ActivePath P LSPname 202.1.1.3 202.1.1.1 Up 1 lsp1 * frr
Total 1 displayed, Up 1, Down 0
Egress LSP: 0 sessions Total 0 displayed, Up 0, Down 0
Transit LSP: 0 sessions Total 0 displayed, Up 0, Down 0 [edit]
root# run show mpls lsp extensive Ingress LSP: 1 sessions
202.1.1.3
From: 202.1.1.1, State: Up, ActiveRoute: 1, LSPname: frr ActivePath: lsp1 (primary) FastReroute desired
LoadBalance: Random
Encoding type: Packet, Switching type: Packet, GPID: IPv4 *Primary lsp1 State: Up, COS: 0 SmartOptimizeTimer: 180 Include All: copper silver
Computed ERO (S [L] denotes strict [loose] hops): (CSPF metric: 51) 192.168.22.202 S 192.168.23.203 S
Received RRO (ProtectionFlag 1=Available 2=InUse 4=B/W 8=Node 10=SoftPreempt): 192.168.22.202 192.168.23.203
5 Apr 22 21:31:39.541 Selected as active path
4 Apr 22 21:31:39.523 Record Route: 192.168.22.202 192.168.23.203
3 Apr 22 21:31:39.523 Up
2 Apr 22 21:31:39.458 Originate Call
1 Apr 22 21:31:39.458 CSPF: computation result accepted 192.168.22.202 192.168.23.203 Created: Sun Apr 22 21:31:38 2007 Total 1 displayed, Up 1, Down 0
Egress LSP: 0 sessions Total 0 displayed, Up 0, Down 0
Transit LSP: 0 sessions Total 0 displayed, Up 0, Down 0 [edit] root#
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- huatuo0.cn 版权所有 湘ICP备2023017654号-2
违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务