juniper模拟器使用入门 -...
TRANSCRIPT
edu.51cto.comedu.51cto.com
Juniper模拟器使用入门
edu.51cto.com
讲师:大侠唐在飞(小侠唐在飞)
唐志强
【大侠唐在飞出品】Juniper入门实战课程http://edu.51cto.com/course/course_id-3284.html
edu.51cto.com
虚拟化场景
Co
mp
ute
Clu
sters
Man
agem
en
t Clu
ster
Edge
Clu
ster
NSX Manager
NSX Edge
NSX Controller
Data Center IP network Management network(vMotion & storage)
vCenterServer
PhysicalAppliances
External networksWAN/ Internet
Compute Racks Infra Racks Edge Racks
L2
L3
edu.51cto.com
虚拟MX和 物理 MX 对比
PFE vPFEMicrocod
e
TRIO x86
CONTROL
PLANE
控制平面
DATA PLANE
数据(转发)平面
ASIC
转发芯片
PLATFORM
硬件平台
物理MX 虚拟MX
PFE(Packet Forwarding Engine) –包转发引擎(主要由包转发芯片组成)TRIO – Juniper自研包转发芯片
edu.51cto.com
VMX
VMX
Tester
测试拓扑
10
G
10
G1
0G
10
G1
0G
10
G1
0G
10
G1
0G
10
G1
0G
10
G
• 单个vMX实例,带 6 个10G端口,发送双向流量
• 16 核(8个用于 I/O, 8 个用于包处理)
• 单个vMX 实例 (1个VCP 实例+1个VFP实例) 1500字节转发性能达到双向60Gbps(单向120Gbps)
• 无丢包
• 只测试了IPv4 吞吐Port0 Port1 Port2 Port3 Port4 Port5
CPU Intel Xeon 3.1GHz
Cores Min 10
RAM 20GB
Host OS
Ubuntu 14.04 LTS
Kernel: Linux 3.13.0-32-
generic
NICs Intel 82599EB (for 10G)
QEMU-
KVMVersion 2.0
服务器参考配置
edu.51cto.com
VMX
SCRIPT
S
VCPVFP
Physical NICs
Virtual NICs
Management traffic
Guest VM (Linux +
DPDK)
Guest VM
(FreeBSD)
Hypervisor:
KVM
Cores Memory
Bridge /
vSwitch
SR
-IO
V
Physical
layer
vSwitch 提供 VFP和VCP 之间的
通信通道(内部主机通道)
通过SR-IOV (Single Root IO
Virtualization) 优化物理NIC到
vNIC的数据通道
可通过OpenStack/Scripts 进行
VM 管理
edu.51cto.com
VMX支持特性
• VMX is currently modeled on MX80
• Single PFE
• No Fabric
• Single RE
•Supports Fixed 10x1Gig Ethernet Ports only
• Working with JC team for Code check-in to 14.1
• RLI-20020, FCC Complete
• Code will be checked in to 14.1 Dev branch in next few days
• Added Engineers from RBU India team for helping with bug fixing
and closure of outstanding work items.
• Feature will be available for use post validation cycle of 3 months.
• Team members:
• Anjali Kulkarni (JC)
• Srikanth L (RBU-Dev)
• Ashish Gupta, Sanjay Habeeb, Sanjeev Kumar Mishra (RBU-Dev)
• Amit Jain (RBU–Test) + Dev test and Regression Engineers
edu.51cto.com
VMX支持特性
Following features were evaluated with private image.
Protocols• IS-IS, OSPF, RSVP, BGP, MPLS, VPLS, LDP, VRRP, BFD, ICCP, LACP, DHCP, MP-
eBGP, xSTP, ERPFeatures
• L2VPN, L3VPN, Aggregate Ethernet, Logical System (LSYS), Bridge Domain, Dynamic Profiles, Subscriber management, Flexible Ethernet encapsulations, Flexible-vlan-tagging, encapsulation extended-vlan-bridge• 6PE, IPv6 BGP-LU and ipv6-tunneling, RELAY, Virtual Switches• MC-AE in active-standby and redundancy mode.
Class of Service:• Classification & Basic rewrite functionality for DSCP & DSCP-V6 • Classification & Basic rewrite functionality for inet-precedence• MF/BA classifiers• Policers (2 color)• EXP rewrite
edu.51cto.com
VSRX
Advanced Security Services
Integrated UTM including IPS, Full Anti-virus, Anti-spam, Web-filtering, Content- filtering and AppSecure 2.0
Rich Routing & Network Capabilities
VPN connectivity and routing features in a flexible virtual machine format based on proven Junos OS foundation
Full Stateful Firewall
SRX 运行在VM里面:支持VMware, KVM and Contrail and integrated automated management functionality
HA 支持 active/active and active/passive modes,;
edu.51cto.com
VSRX
Junos Routing Protocols and SDK
Junos Rich and Extensible Security Stack
Firewall
VPN
NAT
Routing
Anti-Virus
IDP
Web Filtering
Anti-Spam
AppID
AppFW
AppQoS
AppTrack
Junos Space – Security Director & Virtual Director, CLI, JWEB, SNMP, HA/FT
Perimeter Security
Content Security
Application Security
Copyright © 2015 Juniper Networks, Inc.
edu.51cto.com
VSRX
Firewall (UDP 1514B puts) 4.6 Gbps 3.6 Gbps
Firewall (IMIX) 1.1 Gbps 221 Mbps
Firewall Ramp Rate (TCP) 22K CPS 9K CPS
Firewall Latency (512B UDP) 107 Micro Sec 114 Micro Sec
Firewall IPv6 (UDP 512B pkts) 1.46 Gbps 374 Mbps
NAT (UDP 1514B pkts) 4.4 Gbps 981 Mbps
NAT (IMIX) 1.1 Gbps 218 Mbps
NAT Ramp Rate (TCP) 19K CPS 8K CPS
IPSec (3DES+SHA1, 1514B) 294 Mbps 195 Mbps
IPSec (3DES+SHA1, IMIX) 132 Mbps 99 Mbps
IPSec (3DES+SHA1, 64B) 50 Mbps 25 Mbps
IKE Rate (3DES+SHA1,V1 or 2) 71 Tunnels/Sec 48 Tunnels/Sec
EWF (44KB File)251 Mbps (650 CPS
Load)62 Mbps (160 CPS Load)
SAV (Allscan 44KB File)280 Mbps (720 CPS
Load)
116 Mbps (300 CPS
Load)
HTTP Throughput2 (Response Content – 44KB File)
740 Mbps 385 Mbps
HTTP CPS2 (Response Content – 64 bytes) 3000 CPS 2000 CPS
Performance1 VMware KVM
1Reference platform for performance: Dell PowerEdge R820, ESXI 5.1, 24 Cores, 2.899 Ghz CPUs 2IDP Performance is based on default recommended IDP policy
1024Max Addresses/Address-set
256KMax Firewall Sessions
256KMax Pat Sessions (Source NAT with PAT)
8KMAC/ARP Table Size
2GBvRAM Required/Instance
10Max vNICs/Instance
128Max Zones
128Max Address Books
10240Max Policies
128Max Policies with Count
1024Max Applications/Policy
4KMax VLANS
160KMax OSPF Routes
2vCPUs Required/Instance
Max VRs Supported 5
IDP Session Scaling2 32K
Scale VMware & KVM
Copyright © 2015 Juniper Networks, Inc.
edu.51cto.com
模拟环境需要的软件 VMware ESXi 5 (Ubuntu+KVM)
虚拟化部署多台VMX、VSRX
VMware Workstation个人台式机中可导入VMX、VSRX、Olive junos,可与其他虚拟系统(windows\linux、GNS3、 VirtualBox、
mars、ENSP、 iou等进行桥接)
Oracle VM VirtualBox
个人台式机中可导入VMX、VSRX、Olive junos,可与其他虚拟系统(windows\linux、GNS3VMware Workstation、、 mars、ENSP、 iou等进行桥接)
Named Pipe TCP Proxy 提供终端控制台和模拟器之间的登陆方式,用于VMware、VirtualBox虚拟机中juniper,iou等模拟器与
SecureCRT之前端口连接工具
SecureCRT终端控制台
edu.51cto.com
常见的几种JUNIPER模拟软件
1、SRX:模拟SRX交换机junos-vsrx-12.1X47-D15.4-domestic.ova
2、VMX:模拟MX系列路由器jinstall-vmx-14.1R1.10-domestic.img或vmx-14.1R1.10.ova
3:JUNOS:模拟常规路由器 Olive Junos12.1R1.9.ova
edu.51cto.com
JUNOS模拟器基本功能
支持逻辑路由器特性,可以使得一台物理的路由器可以模拟出15台逻辑路由器, 加上本身的1个路由器, 一共可以在一台物理路由器上模拟出来16个路由器, 与传统的虚拟路由器不同, 每台逻辑路由器的路由进程都是独立的;节约了设备资源。
逻辑路由器支持的特性 RIP/RIPng/IS-IS/OSPFv2/OSPFv3/BGP/LDP/RSVP/MPLS协议的完整支持,
每个逻 辑路由器均完整支持IPv4/IPv6。 MPLS L2 VPN/L3 VPN/CCC/VPLS。 PIM SM/PIM DM/DVMRP。 所有的policy都支持。 所有的逻辑路由器支持Graceful-Switchover。 逻辑路由器支持各种接口,只要物理路由器上有物理接口,逻辑路由器就
可以借用
edu.51cto.com
JUNOS模拟器注意事项
注意事项: 所有的逻辑路由器和主路由器的配置是同一个配置文件。 每个逻辑路由器都有一个单独的路由进程(rpd),可以单独的重
启这个进程。 不支持一些特定的多业务卡,包括AS/ES/MS等。 不支持BFD/GMPLS/IPSec/P2MP LSP/port-mirroring/sampling。 不支持LSP Ping和带AS号码查询的trace-route 大部分版本在提交配置后,OSPF邻居会重新建立。
edu.51cto.com
VMWARE中部署方式
根据每个人电脑的配置来决定,部署方式:
1、如果电脑配置差,可只启动一台虚拟机,每台可模拟16台虚拟路由器。2、如果电脑配置较好,可以配置启动多台独立虚拟机,并将这些虚拟机一起组网。
比如配置6台虚拟机,可完成大部分的实验,如果有更复杂的要求,可在每台模拟中机再配置多台虚拟路由器。16*6=96台。
可以用单台虚拟机,可完成常规的实验,比如RIP、OSPF、ISIS、BGP、MPLS。
edu.51cto.com
Logical Systems
Junos OS Release 9.3以后, logical router 特性被改名为logical system。
edu.51cto.com
VMWARE中部署Olive JUNOS
1、VMWARE中打开或导入虚拟机文件
edu.51cto.com
VMWARE中部署Olive JUNOS
2、配置网络适配器,根据自己需要添加网关。如何实现互通:物理环境:打环方式。比如em1和em2用物理线缆连接起来。虚拟机:配置至同一VMNET中,同一个VMNET相同一个交换机。
edu.51cto.com
VMWARE中部署Olive JUNOS
3、配置CONSOLE口。NPTP 该软件作用类似于串口服务器,它把设备的串口和一个(IP+端口)对映射在一起,我们只用telnet这个ip的对应端口,就可以获得相当于访问该设备串口的服务。 按下图建立一个串口和(IP+端口)对的映射就可以了.
edu.51cto.com
VMWARE中部署Olive JUNOS
4、NPTP中增加pipe,此处的名称必须和VMWARE中添加的一致。
edu.51cto.com
VMWARE中部署Olive JUNOS
4、启动VMWARE中Olive junos路由器5、SecureCRT中登陆Olive junos路由器 CONSOLE口。
edu.51cto.com
拓扑规划
R1:em1.10 ---R2 : em2.10R1:em1.20 ---R2 : em2.20
R2:em2.30 ---R3: em1.30R2:em2.40 ---R4: em1.40
R3:em2.50 ---R4: em1.50
其他的依此类推,规划好所有接口IP地址也可以,按这样规律来规划。
edu.51cto.com
接口分配
接口的分配:模拟器中接口以em开头,从0开始计数
edu.51cto.com
逻辑系统的使用
1、建立逻辑系统user@host# set logical-systems PE3user@host# commituser@host# exit
2、进入逻辑系统进行配置user@host> set cli logical-system PE3Logical system: PE3user@host:PE3>
3、退出逻辑系统user@host:PE3> clear cli logical-systemCleared default logical systemuser@host>
进入逻辑系统配置,操作基本和单台模拟
器相同
edu.51cto.com
逻辑系统的使用:配置案例
配置械下:全局路由器中也可以完成逻辑路由器数据制作
1、为接口配置 vlan taggingset interfaces em0 vlan-taggingset interfaces em1 vlan-tagging
2、建立逻辑系统并配置相关数据set logical-systems R2 interfaces em1 unit 10 vlan-id 10set logical-systems R2 interfaces em1 unit 10 family inet address 11.11.11.12/24set logical-systems R2 interfaces em1 unit 20 vlan-id 20set logical-systems R2 interfaces em1 unit 20 family inet address 22.22.22.11/24set logical-systems R2 interfaces em1 unit 80 vlan-id 80set logical-systems R2 interfaces em1 unit 80 family inet address 8.8.8.8/24set logical-systems R2 interfaces lo0 unit 2 family inet address 2.2.2.2/32
edu.51cto.com
逻辑系统的使用:配置案例
set logical-systems R2 protocols ospf export export-ospfset logical-systems R2 protocols ospf area 0.0.0.0 interface em1.10set logical-systems R2 protocols ospf area 0.0.0.0 interface em1.20set logical-systems R2 protocols ospf area 0.0.0.0 interface lo0.2set logical-systems R2 protocols rip group rip-roup export export-ripset logical-systems R2 protocols rip group rip-roup import import-ripset logical-systems R2 protocols rip group rip-roup neighbor em1.10set logical-systems R2 protocols rip group rip-roup neighbor lo0.2set logical-systems R2 policy-options policy-statement export-ospf term 1 from protocol staticset logical-systems R2 policy-options policy-statement export-ospf term 1 from protocol directset logical-systems R2 policy-options policy-statement export-ospf term 1 then acceptset logical-systems R2 policy-options policy-statement export-rip term 1 from protocol staticset logical-systems R2 policy-options policy-statement export-rip term 1 from protocol directset logical-systems R2 policy-options policy-statement export-rip term 1 from protocol ripset logical-systems R2 policy-options policy-statement export-rip term 1 then acceptset logical-systems R2 policy-options policy-statement import-ospf term 1 from route-filter 8.8.8.0/24 exactset logical-systems R2 policy-options policy-statement import-ospf term 1 then rejectset logical-systems R2 policy-options policy-statement import-rip term 1 from route-filter 99.99.98.0/24 exactset logical-systems R2 policy-options policy-statement import-rip term 1 then rejectset logical-systems R2 routing-options static route 9.9.9.0/24 next-hop 11.11.11.11set logical-systems R2 routing-options static route 100.100.192.0/24 discard
edu.51cto.com
root> set cli logical-system PE1 Logical system: PE1
root:PE1> show route root:PE1> show ospf interface root:PE1> show routeroot:PE1> ping 6.6.6.6
进入逻辑系统查看状态、测试操作和单台模拟器相同
逻辑系统的使用:操作模式
edu.51cto.com
配置模式:root# run show route logical-system PE3 root# run show bgp neighbor logical-system PE1 root# run ping 6.6.6.6 logical-system CE2 root# show |display set |match CE1操作模式:
Root> show ospf interface logical-system CE1Root> show route logical-system PE3 Root> ping 6.6.6.6 logical-system CE2
逻辑系统的使用:操作模式
全局路由器下,查看逻辑路由器的运行状态、测试,需要指定逻辑路由器名称
edu.51cto.com
VSRX 组网
Win xp Win 2003SRX
vmnet1 vmnet2
untrusttrust
对于初学者,可以通过在防火墙两端各拉一台虚拟主机,来测试你需要的功能。比如在服务器上架设FTP、WEB等功能,通过墙来实现策略与管理。
也可以和junos路由器组网来测试。
em0 em1
edu.51cto.com
Thank You !
edu.51cto.com