---
# System prepended metadata

title: Juniper
tags: [Network]

---

* setting root authentication password
```
set system root-authentication plain-test-password
```
> #Enter
> 1qaz@WSX

* setting super-user to remote access
```
set system login user admin class super-user
set system login user admin authentication plain-test-password 
```
> #Enter
> 1qaz@WSX

* feature ssh
```
set system service ssh
```
* setting ntp
```
set system time-zone Asia/Taipei
set system ntp server 192.168.2.199
```
* setting mgmt
```
set interfaces me0 unit 0 family inet address 192.168.1.236/24
```
The new Junos 20 up version must use "irb" to set managet IP


* setting vlan
```
set vlans Vlan10 vlan-id 10
set vlans Vlan20 vlan-id 20
set vlans Vlan30 vlan-id 30
```
* setting vlan interface
```
set interfaces vlan unit 0 family inet address 192.168.1.1/24
```
* setting singel prot
```
set interfaces ge-0/0/0 unit 0 family ethernet-switching interface-mode access
set interfaces ge-0/0/0 unit 0 family ethernet-swtiching vlan members Vlan10
```
* setting interface-range
```
set interfaces interface-range V10G member-range ge-0/0/0 to ge-0/0/25
set interfaces interface-range V20G member-range ge-0/0/26 to ge-0/0/41
set interfaces interface-range V30G member-range ge-0/0/42 to ge-0/0/47
```
* reset config
```
rename interfaces interface-range V10G member-range ge-0/0/0 to ge-0/0/20
```

* setting port range
```
set interfaces interface-range V10G unit 0 family ethernet-switching interface-mode access
set interfaces interface-range V10G unit 0 family ethernet-swtiching vlan members Vlan10
set interfaces interface-range V20G unit 0 family ethernet-switching interface-mode access
set interfaces interface-range V20G unit 0 family ethernet-swtiching vlan members Vlan20
set interfaces interface-range V30G unit 0 family ethernet-switching interface-mode access
set interfaces interface-range V30G unit 0 family ethernet-swtiching vlan members Vlan30
```
* setting trunk mode
```
set interfaces xe-0/1/3 unit 0 family ethernet-switching interface-mode trunk
set interfaces xe-0/1/3 unit 0 family ethernet-switching vlan members 10 members 20 members 30
```
```
commit check
commit
```
* unsave status
```
rollback 0
```
* show config
```
show configuration | display set
```
* show interface log
```
show log messages | last 100
```
* set boot-time sync ntp server
```
set system ntp boot-server IP
```
* set sync ntp server
```
set system ntp server IP
```
* set time
```
set date ntp IP
```
* show date
```
show system uptime
```
* restore ex switch to default
```
request system zeroize
```
## LACP
```
set interfaces interface-range V10G member-range ge-0/0/0 to ge-0/0/9
set interfaces interface-range V20G member-range ge-0/0/10 to ge-0/0/19

set interfaces interface-range V10G unit 0 family ethernet-switching interface-mode access
set interfaces interface-range V10G unit 0 family ethernet-swtiching vlan members Vlan10
set interfaces interface-range V20G unit 0 family ethernet-switching interface-mode access
set interfaces interface-range V20G unit 0 family ethernet-swtiching vlan members Vlan20

set chassis aggregated-devices ethernet device-count 10
set interfaces ae0 vlan-tagging
set interfaces ae0 aggregated-ether-options lacp active
set interfaces ae0 aggregated-ether-options lacp active periodic fast

delete interfaces xe-0/1/0 unit 0
delete interfaces xe-0/1/1 unit 0

delete protocols rstp interface xe-0/1/0
delete protocols rstp interface xe-0/1/1

set interfaces xe-0/1/0 ether-options 802.3ad ae0
set interfaces xe-0/1/1 ether-options 802.3ad ae0

set interfaces ae0 unit 0 family ethernet-switching interface-mode trunk
set interfaces ae0 unit 0 family ethernet-switching vlan members Vlan10,Vlan20
```