set system root-authentication plain-text-password //按提示为root设置新密码; set system login user lab uid 2004 class super-user authentication plain-text-password //创建lab用户,并按提示为超级用户lab设置密码; set system host-name olive //更改主机名,类似于Cisco的hostname命令 set system domain-name juniper.net set interface fxp0 unit 0 family inet address 192.168.1.2/24 //设置接口ip地址 set routing-options static route default nexthop 192.168.1.1 retain no-readvertise //设置默认路由 set system services ftp set system services telnet //开启ftp和telnet服务 设置完以后记得commit哦,不然配置是不会生效的^_^
$ ls $ su Password: bsd# cd /var bsd# ls account cron heimdal preserve tmp at db log run yp backups empty mail rwho crash games msgs spool bsd# cd tmp bsd# ls vi.recover bsd# ftp 192.168.1.11 Connected to 192.168.1.11. 220 Xlight FTP 2.4 ?íD÷... Name (192.168.1.11:xiao): abc a331 Dèòa?ü?? abc Password: 530 ??óDè¨?T ftp: Login failed. Remote system type is UNIXààDí:. ftp> user (username) abc 331 Dèòa?ü?? abc Password: 230 μ???3é1| ftp> dir 150 ?y?ú′ò?a??±??£ê?êy?Yá??ó?a /bin/ls (387 ±èì?). drw-rw-rw- 1 ftp ftp 0 Oct 06 17:05 Ahead.Nero.Burning.ROM.v6.6.0.1 drw-rw-rw- 1 ftp ftp 0 Oct 06 19:37 ISO drw-rw-rw- 1 ftp ftp 0 Oct 08 15:42 RECYCLER drw-rw-rw- 1 ftp ftp 0 Oct 07 21:15 System Volume Information drw-rw-rw- 1 ftp ftp 0 Oct 09 14:23 c drw-rw-rw- 1 ftp ftp 0 Oct 07 21:45 a 226 ′??ííê±? (9.675 KB/s). ftp> cd c 250 3é1|?D?????? ftp> dir 150 ?y?ú′ò?a??±??£ê?êy?Yá??ó?a /bin/ls (1354 ±èì?). -rw-rw-rw- 1 ftp ftp 42517 Oct 08 20:10 07.9.jpg -rw-rw-rw- 1 ftp ftp 6179957 Oct 07 12:06 360safe.exe drw-rw-rw- 1 ftp ftp 0 Oct 07 20:00 DeepinGhostXP-5.0 -rw-rw-rw- 1 ftp ftp 15719 Oct 07 12:31 DeepinGhostXP-5.0.torrent -rw-rw-rw- 1 ftp ftp 91914211 Oct 09 14:23 jinstall-8.1R1.5-export-signed.tgz -rw-rw-rw- 1 ftp ftp 385536 Oct 07 14:04 JN0-341 v2.doc drw-rw-rw- 1 ftp ftp 0 Oct 09 11:12 juniper drw-rw-rw- 1 ftp ftp 0 Oct 06 20:03 msendisk drw-rw-rw- 1 ftp ftp 0 Oct 07 21:16 RECYCLER drw-rw-rw- 1 ftp ftp 0 Oct 07 21:15 System Volume Information drw-rw-rw- 1 ftp ftp 0 Oct 07 21:18 TDDOWNLOAD drw-rw-rw- 1 ftp ftp 0 Oct 09 15:57 Tencent -rw-rw-rw- 1 ftp ftp 640637555 Oct 08 22:08 TomatoWinXP_SP2_V3.3_Greendown.cn.rar.td -rw-rw-rw- 1 ftp ftp 35655 Oct 08 22:08 TomatoWinXP_SP2_V3.3_Greendown.cn.rar.td.cfg -rw-rw-rw- 1 ftp ftp 133211 Oct 07 18:15 _20071007061046_JUM4JUJBJUQ2JUY3JUNEJUM2JUJDJUY2JUEzJUJBMzQxLXRrLWRvYyslQkYlQzklQjQlRjIlRDMlQTE=.rar dr--r--r-- 1 ftp ftp 0 Oct 08 16:05 ?òμ???μμ -rw-rw-rw- 1 ftp ftp 2104260 Apr 05 23:13 ??ó°′??μ.mp3 -rw-rw-rw- 1 ftp ftp 1511453 Oct 07 19:21 °???????50ìì?ú?à2á.rar 226 ′??ííê±? (29.435 KB/s). ftp> cd juniper 250 3é1|?D?????? ftp> dir 150 ?y?ú′ò?a??±??£ê?êy?Yá??ó?a /bin/ls (359 ±èì?). drw-rw-rw- 1 ftp ftp 0 Oct 09 11:12 . drw-rw-rw- 1 ftp ftp 0 Oct 09 11:12 .. -rw-rw-rw- 1 ftp ftp 69045945 Sep 08 17:06 jinstall-7.4R1.7-export-signed.tgz -rw-rw-rw- 1 ftp ftp 94927919 Sep 05 20:34 jinstall-8.3R2.8-export-signed.tgz -rw-rw-rw- 1 ftp ftp 3669610 Sep 05 17:44 jweb-8.2R1.7-signed.tgz 226 ′??ííê±? (8.756 KB/s). ftp> binary 200 ààDíéè???a I. ftp> get jinstall-7.4R1.7-export-signed.tgz local: jinstall-7.4R1.7-export-signed.tgz remote: jinstall-7.4R1.7-export-signed.tgz 150 ?y?ú′ò?a?t?????£ê?êy?Yá??ó?a jinstall-7.4R1.7-export-signed.tgz (69045945 ±èì?). 100% |**************************************************| 67427 KB 00:00 ETA 226 ′??ííê±? (10633.905 KB/s). 69045945 bytes received in 6.41 seconds (10.28 MB/s) ftp> get jinstall-8.3R2.8-export-signed.tgz local: jinstall-8.3R2.8-export-signed.tgz remote: jinstall-8.3R2.8-export-signed.tgz 150 ?y?ú′ò?a?t?????£ê?êy?Yá??ó?a jinstall-8.3R2.8-export-signed.tgz (94927919 ±èì?). 100% |**************************************************| 92703 KB 00:00 ETA 226 ′??ííê±? (9772.279 KB/s). 94927919 bytes received in 9.63 seconds (9.40 MB/s) ftp> get jweb-8.2R1.7-signed.tgz local: jweb-8.2R1.7-signed.tgz remote: jweb-8.2R1.7-signed.tgz 150 ?y?ú′ò?a?t?????£ê?êy?Yá??ó?a jweb-8.2R1.7-signed.tgz (3669610 ±èì?). 100% |**************************************************| 3583 KB 00:00 ETA 226 ′??ííê±? (7195.314 KB/s). 3669610 bytes received in 0.43 seconds (8.17 MB/s) ftp> dir 150 ?y?ú′ò?a??±??£ê?êy?Yá??ó?a /bin/ls (446 ±èì?). drw-rw-rw- 1 ftp ftp 0 Oct 09 16:24 . drw-rw-rw- 1 ftp ftp 0 Oct 09 16:24 .. -rw-rw-rw- 1 ftp ftp 69045945 Sep 08 17:06 jinstall-7.4R1.7-export-signed.tgz -rw-rw-rw- 1 ftp ftp 91914211 Oct 09 14:23 jinstall-8.1R1.5-export-signed.tgz -rw-rw-rw- 1 ftp ftp 94927919 Sep 05 20:34 jinstall-8.3R2.8-export-signed.tgz -rw-rw-rw- 1 ftp ftp 3669610 Sep 05 17:44 jweb-8.2R1.7-signed.tgz 226 ′??ííê±? (12.054 KB/s). ftp> cd .. 250 3é1|?D?????? ftp> dir 150 ?y?ú′ò?a??±??£ê?êy?Yá??ó?a /bin/ls (1267 ±èì?). -rw-rw-rw- 1 ftp ftp 42517 Oct 08 20:10 07.9.jpg -rw-rw-rw- 1 ftp ftp 6179957 Oct 07 12:06 360safe.exe drw-rw-rw- 1 ftp ftp 0 Oct 07 20:00 DeepinGhostXP-5.0 -rw-rw-rw- 1 ftp ftp 15719 Oct 07 12:31 DeepinGhostXP-5.0.torrent -rw-rw-rw- 1 ftp ftp 385536 Oct 07 14:04 JN0-341 v2.doc drw-rw-rw- 1 ftp ftp 0 Oct 09 16:24 juniper drw-rw-rw- 1 ftp ftp 0 Oct 06 20:03 msendisk drw-rw-rw- 1 ftp ftp 0 Oct 07 21:16 RECYCLER drw-rw-rw- 1 ftp ftp 0 Oct 07 21:15 System Volume Information drw-rw-rw- 1 ftp ftp 0 Oct 07 21:18 TDDOWNLOAD drw-rw-rw- 1 ftp ftp 0 Oct 09 15:57 Tencent -rw-rw-rw- 1 ftp ftp 640637555 Oct 08 22:08 TomatoWinXP_SP2_V3.3_Greendown.cn.rar.td -rw-rw-rw- 1 ftp ftp 35655 Oct 08 22:08 TomatoWinXP_SP2_V3.3_Greendown.cn.rar.td.cfg -rw-rw-rw- 1 ftp ftp 133211 Oct 07 18:15 _20071007061046_JUM4JUJBJUQ2JUY3JUNEJUM2JUJDJUY2JUEzJUJBMzQxLXRrLWRvYyslQkYlQzklQjQlRjIlRDMlQTE=.rar dr--r--r-- 1 ftp ftp 0 Oct 08 16:05 ?òμ???μμ -rw-rw-rw- 1 ftp ftp 2104260 Apr 05 23:13 ??ó°′??μ.mp3 -rw-rw-rw- 1 ftp ftp 1511453 Oct 07 19:21 °???????50ìì?ú?à2á.rar 226 ′??ííê±? (40.871 KB/s). ftp> cd juniper 250 3é1|?D?????? ftp> dir 150 ?y?ú′ò?a??±??£ê?êy?Yá??ó?a /bin/ls (446 ±èì?). drw-rw-rw- 1 ftp ftp 0 Oct 09 16:24 . drw-rw-rw- 1 ftp ftp 0 Oct 09 16:24 .. -rw-rw-rw- 1 ftp ftp 69045945 Sep 08 17:06 jinstall-7.4R1.7-export-signed.tgz -rw-rw-rw- 1 ftp ftp 91914211 Oct 09 14:23 jinstall-8.1R1.5-export-signed.tgz -rw-rw-rw- 1 ftp ftp 94927919 Sep 05 20:34 jinstall-8.3R2.8-export-signed.tgz -rw-rw-rw- 1 ftp ftp 3669610 Sep 05 17:44 jweb-8.2R1.7-signed.tgz 226 ′??ííê±? (11.436 KB/s). ftp> get jinstall-8.1R1.5-export-signed.tgz local: jinstall-8.1R1.5-export-signed.tgz remote: jinstall-8.1R1.5-export-signed.tgz 150 ?y?ú′ò?a?t?????£ê?êy?Yá??ó?a jinstall-8.1R1.5-export-signed.tgz (91914211 ±èì?). 100% |**************************************************| 89759 KB 00:00 ETA 226 ′??ííê±? (9639.666 KB/s). 91914211 bytes received in 9.45 seconds (9.27 MB/s) ftp> cd .. 250 3é1|?D?????? ftp> bye 221 ?ù?? bsd# df Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ad0s1a 128990 36886 81786 31% / /dev/ad0s1h 74702 2 68724 0% /config /dev/ad0s1e 100750 10 92680 0% /tmp /dev/ad0s1g 503966 284230 179420 61% /usr /dev/ad0s1f 1814318 253878 1415296 15% /var procfs 4 4 0 100% /proc
bsd# df -H Filesystem Size Used Avail Capacity Mounted on /dev/ad0s1a 132M 38M 84M 31% / /dev/ad0s1h 76M 2.0K 70M 0% /config /dev/ad0s1e 103M 10K 95M 0% /tmp /dev/ad0s1g 516M 291M 184M 61% /usr /dev/ad0s1f 1.9G 260M 1.4G 15% /var procfs 4.1K 4.1K 0B 100% /proc bsd# ls jinstall-7.4R1.7-export-signed.tgz jweb-8.2R1.7-signed.tgz jinstall-8.1R1.5-export-signed.tgz vi.recover jinstall-8.3R2.8-export-signed.tgz bsd# pwd /var/tmp bsd# pkg_add jinstall-8.1R1.5-export-signed.tgz Verified SHA1 checksum of jinstall-8.1R1.5-export.tgz Adding jinstall... sysctl: unknown oid 'hw.re.model' sysctl: unknown oid 'hw.re.model' usage: disklabel [-r] disk (to read label) disklabel -w [-r] [-n] disk type [ packid ] (to write label with existing boot program) disklabel -e [-r] [-n] disk (to edit label) disklabel -R [-r] [-n] disk protofile (to restore label with existing boot program) disklabel -B [-n] [ -b boot1 [ -s boot2 ] ] disk [ type ] (to install boot program with existing label) disklabel -w -B [-n] [ -b boot1 [ -s boot2 ] ] disk type [ packid ] (to write label and boot program) disklabel -R -B [-n] [ -b boot1 [ -s boot2 ] ] disk protofile [ type ] (to restore label and boot program) disklabel [-NW] disk (to write disable/enable label) ELF binary type "0" not known. Abort trap
WARNING: This installation attempt will be aborted. WARNING: If you wish to force the installation despite these warnings WARNING: you may use the 'force' option on the command line. pkg_add: package /var/tmp/instmp.NHFyw7/jinstall-8.1R1.5-export.tgz fails requirements - not installed pkg_add: install script returned error status bsd#
bsd# dmesg Copyright (c) 1992-2005 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 4.11-RELEASE #0: Fri Jan 21 17:21:22 GMT 2005
Timecounter "i8254" frequency 1193182 Hz CPU: Pentium II/Pentium II Xeon/Celeron (233.86-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x634 Stepping = 4 Features=0x80fbff real memory = 268435456 (262144K bytes) avail memory = 255705088 (249712K bytes) Preloaded elf kernel "kernel" at 0xc055c000. Pentium Pro MTRR support enabled md0: Malloc disk Using $PIR table, 6 entries at 0xc00f8180 npx0:
bsd# ls jinstall-7.4R1.7-export-signed.tgz jweb-8.2R1.7-signed.tgz jinstall-8.1R1.5-export-signed.tgz vi.recover jinstall-8.3R2.8-export-signed.tgz bsd# pkg_add jinstall-7.4R1.7-export-signed.tgz Verified SHA1 checksum of jinstall-7.4R1.7-export.tgz Adding jinstall... sysctl: unknown oid 'hw.re.model' sysctl: unknown oid 'hw.re.model' usage: disklabel [-r] disk (to read label) disklabel -w [-r] [-n] disk type [ packid ] (to write label with existing boot program) disklabel -e [-r] [-n] disk (to edit label) disklabel -R [-r] [-n] disk protofile (to restore label with existing boot program) disklabel -B [-n] [ -b boot1 [ -s boot2 ] ] disk [ type ] (to install boot program with existing label) disklabel -w -B [-n] [ -b boot1 [ -s boot2 ] ] disk type [ packid ] (to write label and boot program) disklabel -R -B [-n] [ -b boot1 [ -s boot2 ] ] disk protofile [ type ] (to restore label and boot program) disklabel [-NW] disk (to write disable/enable label)
WARNING: This package will load JUNOS 7.4R1.7 software. WARNING: It will save JUNOS configuration files, and SSH keys WARNING: (if configured), but erase all other files and information WARNING: stored on this machine. It will attempt to preserve dumps WARNING: and log files, but this can not be guaranteed. This is the WARNING: pre-installation stage and all the software is loaded when WARNING: you reboot the system.
Saving the config files ... Installing the bootstrap installer ...
WARNING: A REBOOT IS REQUIRED TO LOAD THIS SOFTWARE CORRECTLY. Use the WARNING: 'request system reboot' command when software installation is WARNING: complete. To abort the installation, do not reboot your system, WARNING: instead use the 'request system software delete jinstall' WARNING: command as soon as this operation completes.
bsd# bsd# reboot
cd /var/tmp ls install jinstall-8.3R2.8-export-signed.tgz jbundle-7.4R1.7-export.tgz preinstall_boot_loader.conf jbundle-8.1R1.5-export.tgz sampled.pkts jinstall-8.1R1.5-export-signed.tgz vi.recover cli root> request system software add jinstall-8.1R1.5-export-signed.tgz
Verified jinstall-8.1R1.5-export.tgz signed by PackageProduction_8_1_0 Adding jinstall...
WARNING: This package will load JUNOS 8.1R1.5 software. WARNING: It will save JUNOS configuration files, and SSH keys WARNING: (if configured), but erase all other files and information WARNING: stored on this machine. It will attempt to preserve dumps WARNING: and log files, but this can not be guaranteed. This is the WARNING: pre-installation stage and all the software is loaded when WARNING: you reboot the system.
Saving the config files ... Installing the bootstrap installer ...
WARNING: A REBOOT IS REQUIRED TO LOAD THIS SOFTWARE CORRECTLY. Use the WARNING: 'request system reboot' command when software installation is WARNING: complete. To abort the installation, do not reboot your system, WARNING: instead use the 'request system software delete jinstall' WARNING: command as soon as this operation completes.
Saving package file in /var/sw/pkg/jinstall-8.1R1.5-export-signed.tgz ... Saving state for rollback ...
root> request system reboot Reboot the system ? [yes,no] (no) yes
Shutdown NOW! Reboot consistency check bypassed - jinstall 8.1R1.5 will complete installation upon reboot [pid 11128]
*** FINAL System shutdown message from root@ *** System going down IMMEDIATELY
root> Waiting (max 60 seconds) for system process `vnlru' to stop...stopped Waiting (max 60 seconds) for system process `bufdaemon' to stop...stopped Waiting (max 60 seconds) for system process `syncer' to stop...stopped
syncing disks... 2 done Uptime: 30m35s ata0: Spinning down devices. Please wait... ata2: Spinning down devices. Please wait... Rebooting...
=================== Bootstrap installer starting ===================6 irq 15 on isa0e stop remove /etc/pccard_ether $device st atkbdc Initialized the environment42)> at port 0x60,0x64 on i Routing engine model is Olive "Xircom" "CreditCard 10/100" Discovered that flash disk = , hard disk = ad0n atkbdc0e" ? config auto "sn" ?
Warning: Block size restricts cylinders per group to 94. Setting ospackage=jboot-8.1R1.5.tgz, configpackage=configs-8.1R1.5.tgz Setting packlist=jbundle-8.1R1.5-export.tgz Setting isupgrade=jboot-8.1R1.5.tgz Packages and configurations copied to /tmp Cleaning up ad0... Running newfs on ad0s1a... Warning: Block size restricts cylinders per group to 96. Warning: 3612 sector(s) in last cylinder unallocated /dev/ad0s1a: 225764 sectors in 56 cylinders of 1 tracks, 4096 sectors 110.2MB in 1 cyl groups (96 c/g, 192.00MB/g, 14080 i/g) super-block backups (for fsck -b #) at: 32 Running newfs on ad0s1e... Warning: Block size restricts cylinders per group to 106. Warning: 3588 sector(s) in last cylinder unallocated /dev/ad0s1e: 25084 sectors in 7 cylinders of 1 tracks, 4096 sectors 12.2MB in 1 cyl groups (106 c/g, 212.00MB/g, 1664 i/g) super-block backups (for fsck -b #) at: 32 Installing disk label on ad0 Installing JUNOS on ad0... Adding jbase... Mounted jbase on /mnt/packages/mnt/jbase (/dev/vn0)an, 36528 free /dev/ad0s1e: FILESYSTEM CLEAN; SKIPP Adding jbundle-8.1R1.5-export.tgz...IA Credit Card Controller"0
# IBM SC logstr "GENERIC PCMCIA Verified SHA1 checksum of jdocs-8.1R1.5.tgz Verified SHA1 checksum of jkernel-8.1R1.5.tgz Verified SHA1 checksum of jpfe-8.1R1.5.tgz Verified SHA1 checksum of jroute-8.1R1.5.tgz Verified SHA1 checksum of pkgtools.tgz Adding jkernel... Adding jpfe... WARNING: hw.product.model='unknown' using jpfe-M40 Adding jdocs... Adding jroute... Restoring backed up configurations... Unmounted /mnt/packages/mnt/jbase machdep.bootsuccess: 0 -> 0 -> Waiting (max 60 seconds) for system process `vnlru' to stop...stopped Waiting (max 60 seconds) for system process `bufdaemon' to stop...stopped Waiting (max 60 seconds) for system process `syncer' to stop...stopped
syncing disks... done Uptime: 2m49s ata0: Spinning down devices. Please wait... ata1: Spinning down devices. Please wait... Rebooting...
Starting final network daemons:. setting ldconfig path: /usr/lib /opt/lib starting standard daemons: cron. Initial rc.i386 initialization: microcode kld. Local package initialization:. kern.securelevel: -1 -> 1 starting local daemons:. Tue Oct 9 17:11:40 UTC 2007
Amnesiac (ttyd0)
login: root
--- JUNOS 8.1R1.5 built 2006-11-02 00:33:41 UTC ls .cshrc .login .profile cd /var/tmp ls install jinstall-8.3R2.8-export-signed.tgz jbundle-7.4R1.7-export.tgz preinstall_boot_loader.conf jbundle-8.1R1.5-export.tgz sampled.pkts jinstall-8.1R1.5-export-signed.tgz vi.recover cli root> request system software add jinstall-8.3R2.8-export-signed.tgz NOTICE: Validating configuration against jinstall-8.3R2.8-export-signed.tgz. NOTICE: Use the 'no-validate' option to skip this if desired. Checking compatibility with configuration Initializing... Using jbase-8.1R1.5 Verified manifest signed by PackageProduction_8_1_0 Using /var/tmp/jinstall-8.3R2.8-export-signed.tgz Verified jinstall-8.3R2.8-export.tgz signed by PackageProduction_8_3_0 Using /mfs/validate/tmp/jinstall-signed/jinstall-8.3R2.8-export.tgz Using /mfs/validate/tmp/jinstall/jbundle-8.3R2.8-export.tgz