Juniper EX3300接入交换机配置内容

#设置主机名、root密码

set system host-name 9F-EX3300-01
set system root-authentication plain-text-password
(输入两次要设置的root密码)

#添加用户,设置超时时间

#创建一个用户组superaaa
set system login class superaaa idle-timeout 20
set system login class superaaa permissions all
#创建一个管理用户admin,设置uid,并加入用户组
set system login user admin uid 2000
set system login user admin class superaaa
set system login user admin authentication plain-text-password
(输入两次要设置的admin密码)

#开启SSH、Telnet、WEB管理

#SSH、Telnet登录限制:最大连接数10,每分钟最大尝试5次
set system services ssh
set system services ssh connection-limit 10
set system services ssh rate-limit 5
set system services telnet
set system services telnet connection-limit 10
set system services telnet rate-limit 5
#WEB登录开启
set system services web-management https system-generated-certificate


#配置管理地址

#创建管理vlan
set vlans vlan1000 vlan-id 1000
set interfaces vlan unit 1000 family inet address 192.168.1.11/24
set vlans vlan1000 l3-interface vlan.1000


#配置默认路由

set routing-options static route 0.0.0.0/0 next-hop 192.168.1.1


#配置时区及NTP时间同步地址(可选)

set system time-zone Asia/Shanghai
set system ntp server 192.168.1.1


#取消后两个口VC模式,配置4个光口为上行口(EX3300最后两个光口默认为堆叠VC模式,若需配置使用,需要先取消VC模式

request virtual-chassis vc-port delete pic-slot 1 port 2
request virtual-chassis vc-port delete pic-slot 1 port 3
set interfaces xe-0/1/0 unit 0 family ethernet-switching port-mode trunk
set interfaces xe-0/1/0 unit 0 family ethernet-switching vlan members all
set interfaces xe-0/1/1 unit 0 family ethernet-switching port-mode trunk
set interfaces xe-0/1/1 unit 0 family ethernet-switching vlan members all
set interfaces xe-0/1/2 unit 0 family ethernet-switching port-mode trunk
set interfaces xe-0/1/2 unit 0 family ethernet-switching vlan members all
set interfaces xe-0/1/3 unit 0 family ethernet-switching port-mode trunk
set interfaces xe-0/1/3 unit 0 family ethernet-switching vlan members all


#配置SNMP、日志服务器(可选)

set snmp community public authorization read-only
set system syslog host 192.168.100.100 any any


#开启邻居学习功能

set protocols lldp interface all
set protocols lldp-med interface all


#关闭管理口告警

set chassis alarm management-ethernet link-down ignore

#系统自动同步

set system auto-snapshot

#拯救配置备份

request system configuration rescue save


#接口访问限制策略(相当于ACL访问控制,可选)

set interfaces xe-0/1/3 unit 0 family ethernet-switching filter input aclpolicy
set firewall family ethernet-switching filter aclpolicy term 3 from destination 192.168.200.0/24
set firewall family ethernet-switching filter aclpolicy term 3 then discard
set firewall family ethernet-switching filter aclpolicy term 1000 then accept


#设置接口广播控制5%(可选)

set ethernet-switching-options storm-control interface all level 5


#开启RSTP(可选)

set protocols rstp interface ge-0/0/0.0 edge
set protocols rstp interface ge-0/0/1.0 edge
set protocols rstp interface ge-0/0/2.0 edge
set protocols rstp interface ge-0/0/3.0 edge
set protocols rstp interface ge-0/0/4.0 edge
set protocols rstp interface ge-0/0/5.0 edge
set protocols rstp interface ge-0/0/6.0 edge
set protocols rstp interface ge-0/0/7.0 edge
set protocols rstp interface ge-0/0/8.0 edge
set protocols rstp interface ge-0/0/9.0 edge
set protocols rstp interface ge-0/0/10.0 edge
set protocols rstp interface ge-0/0/11.0 edge
set protocols rstp interface ge-0/0/12.0 edge
set protocols rstp interface ge-0/0/13.0 edge
set protocols rstp interface ge-0/0/14.0 edge
set protocols rstp interface ge-0/0/15.0 edge
set protocols rstp interface ge-0/0/16.0 edge
set protocols rstp interface ge-0/0/17.0 edge
set protocols rstp interface ge-0/0/18.0 edge
set protocols rstp interface ge-0/0/19.0 edge
set protocols rstp interface ge-0/0/20.0 edge
set protocols rstp interface ge-0/0/21.0 edge
set protocols rstp interface ge-0/0/22.0 edge
set protocols rstp interface ge-0/0/23.0 edge
set protocols rstp interface ge-0/0/24.0 edge
set protocols rstp interface ge-0/0/25.0 edge
set protocols rstp interface ge-0/0/26.0 edge
set protocols rstp interface ge-0/0/27.0 edge
set protocols rstp interface ge-0/0/28.0 edge
set protocols rstp interface ge-0/0/29.0 edge
set protocols rstp interface ge-0/0/30.0 edge
set protocols rstp interface ge-0/0/31.0 edge
set protocols rstp interface ge-0/0/32.0 edge
set protocols rstp interface ge-0/0/33.0 edge
set protocols rstp interface ge-0/0/34.0 edge
set protocols rstp interface ge-0/0/35.0 edge
set protocols rstp interface ge-0/0/36.0 edge
set protocols rstp interface ge-0/0/37.0 edge
set protocols rstp interface ge-0/0/38.0 edge
set protocols rstp interface ge-0/0/39.0 edge
set protocols rstp interface ge-0/0/40.0 edge
set protocols rstp interface ge-0/0/41.0 edge
set protocols rstp interface ge-0/0/42.0 edge
set protocols rstp interface ge-0/0/43.0 edge
set protocols rstp interface ge-0/0/44.0 edge
set protocols rstp interface ge-0/0/45.0 edge
set protocols rstp interface ge-0/0/46.0 edge
set protocols rstp interface ge-0/0/47.0 edge