https://www.juniper.net/documentation/us/en/software/junos/cli/index.html
show virtual-chassis
show virtual-chassis status
show virtual-chassis vc-port
show lacp interfaces
Interfaces Konfigurieren (eine Default Gruppe und eine für Trunk Ports)
#### DEFAULT CONFIG #####
set groups default-interface-config interfaces <*> apply-macro juniper-port-profile "Desktop and Phone"
set groups default-interface-config interfaces <*> speed auto
set groups default-interface-config interfaces <*> ether-options auto-negotiation
set groups default-interface-config interfaces <*> unit <*> family ethernet-switching interface-mode access
set groups default-interface-config interfaces <*> unit <*> family ethernet-switching vlan member default
#### WLAN CONFIG ####
set groups wifi-config interfaces <*> description WLAN
#set groups wifi-config interfaces <*> native-vlan-id 1
set groups wifi-config interfaces <*> speed auto
set groups wifi-config interfaces <*> ether-options auto-negotiation
set groups wifi-config interfaces <*> unit <*> family ethernet-switching interface-mode trunk
set groups wifi-config interfaces <*> unit <*> family ethernet-switching vlan members [default wifi_gast wifi_intern wifi_public]
#### Portzuweisungen ####
wildcard range delete interfaces ge-0/0/[0-23]
wildcard range set interfaces ge-0/0/[0-20] unit 0 family ethernet-switching interface-mode access # interface mode muss immer direkt gesetzt werden
wildcard range set interfaces ge-0/0/[0-20] apply-groups default-interface-config
wildcard range set interfaces ge-0/0/[21-23] unit 0 family ethernet-switching interface-mode trunk # interface mode muss immer direkt gesetzt werden
wildcard range set interfaces ge-0/0/[21-23] native-vlan-id 1 # wird über die group config nicht übernommen
wildcard range set interfaces ge-0/0/[21-23] apply-groups wifi-config
#show interfaces | display inheritance
# rollback # Änderungen verwerfen
commit check
commit
#### MAC Security ####
set switch-options interface ge-0/0/0 interface-mac-limit 7
set switch-options interface ge-0/0/0 interface-mac-limit packet-action drop
#### IPv6 Advertisement deaktivieren ####
# Die EX Serie Switches machen ein automatisches IPv6 Advertisement, auch wenn das nicht konfiguriert ist.
delete protocols router-advertisement
Support Logs erstellen
A) For standalone switch:
-issue the command #run request support information | save /var/tmp/RSI.txt
-issue the command #run file archive compress source /var/log/ destination /var/tmp/VARLOG
-do ftp or http to the switch in order to download the RSI.txt and the VARLOG files from the /var/tmp
directory then attach them to the case
B) For virtual-chassis:
-issue the command #run request support information all-members | save /var/tmp/RSI-All-Members.txt
-follow this KB in order to collect logs: https://kb.juniper.net/InfoCenter/index?page=content&id=KB15186
-do ftp or http to the switch in order to download the RSI-All-Members.txt and the VARLOG files from the /var/tmp directory then attach them to the case‘
Root Shell erlangen und Dateien runterladen
Follow the steps below to collect all the files from the /var/log directory of each member of a virtual chassis.
NOTE: You will need FTP, SSH, HTTP (JWEB) or USB access to the EX Switch to copy the logs from the Switch.
- Login to the EX Virtual Chassis (VC) using the management IP address or console. You will be logged into the primary switch of the EX Virtual Chassis. In this example, member 0 is the primary switch. {master:0} user@router>
- Login to the shell prompt as the root user.
user@router>
start shell user root
- Use the „tar“ command to compress the folder /var/log and its contents. The file will be saved to /var/tmp directory
root%
tar -zcvf /var/tmp/varlog-mem0.tar.gz /var/log/*
- Verify whether the tar.gz file has been created
root% ls /var/tmp
.ssh varlog-mem0.tar.gz
- Exit from the shell prompt using the command „exit“ and you will be placed on the CLI prompt of Primary switch
{master:0}
root%
exit
- Request a session to the next member of the virtual chassis using its member ID. To verify which member you are connected to, use the „show virtual chassis“ command and it will display an asterisk * next to the member you are connected to.
root> request session member 1
- Login to the shell as the root user
root>
start shell user root
- Use the „tar“ command to compress the folder /var/log and its contents.
root%
tar -zcvf /var/tmp/varlog-mem1.tar.gz /var/log/*
- Verify whether the tar.gz file has been created
root% ls /var/tmp
.ssh varlog-mem1.tar.gz
- Go to the CLI of current member to copy the member log files to primary.
root%
cli
- Execute the file copy command to copy the tar.gz file from the current member switch to the /var/tmp directory on primary switch
root>
file copy fpc1:/var/tmp/varlog-mem1.tar.gz fpc0:/var/tmp/
- Exit from the current member session. Now you will be logged back into the Primary switch.
root>
exit
- Repeat steps 6 through 12 by changing the member id until all the member logs are loaded to the primary switch. Be sure to name each file according the member id to easily identify.
Now the files can be directly copied from the EX Virtual Chassis primary to any local host using ftp, scp, JWEB, or mounted USB.
NOTE: FTP, SSH and HTTP are configured under the ’system services‘ stanza. See Related Links below.