Useful Commands(JUNO

2023-01-31 01:01:37 Commands juno
1.Capturing protocol packets:
monitor traffic interface xxx size 2000 no-resolve extensive write-file xxx.cap
You can get the *.cap file in the current directory. As you can see it using just file list. You can open the *.cap file using Wireshark on your PC.
Note: The monitor traffic interface command just capture the packet upload to the system cpu through the specified interface.
 
Also, you can read the captured file on the router itself using the command below.
monitor traffic read-file xxx.cap
 
when in GNS3, type the following in the command window (Capturing packets of R0 interface g1/0):
capture R0 g1/0 /file_name.cap
no capture R0 g1/0   -----stop capturing.
Then you can get the *.cap file in the system root directory (likely C:/)
 
2.Debuging (said, "traceoption" in JUNOS)
set xxx traceoption flag xxx
set xxx traceoption file file_name size xxx files x
You can get the traceoption file in the directory: /var/log/logical_router_name/traceoption_file_name
You can get it to your PC, or you can read it by file show command
 
3.Tar files
gzip /var/xxx/yyy       #used in the shell
Caution!!When using the gzip command, the origin file will be deleted, leaving only the zip file. The zip file will be tared to be *.gz fORMat.
 
4.Mounting a directory to the file system
mount 202.105.123.123:/var/test /tmpdir
Mount the directory /var/test on 202.105.123.123 to local path: /tmpdir.
You can use the command above for even network file system mounting.

相关文章