Вы находитесь на странице: 1из 6

Requirements:

JunOS 10 or higher (can be gotten from torrent-sites) FreeBSD 4.11 JunOS signature removal script (junos-auto-unprotect-v0.2 (Linux Win).zip ) Any FTP server. (I used filezilla server) VMware player or workstation.

Setting up VMware
Choose the following menu options: New Virtual Machine (VM) Typical install I will install the OS later Other, then FreeBSD in dropdown menu Choose a name (I used JunOS Olive) and install location 6 GB, Single file Click Customize Hardware: Set memory to 512 MB Leave the default option or set the network adapter to bridged mode

Set the CD/DVD to use an .iso image and specify the FreeBSD install iso you downloaded Finish (Dont start the VM yet)

Before we install FreeBSD we will tweak the VMware image a bit. Do the following:

Locate the folder with the VMware image you just created Find the file ending with .vmx and open it in notepad Then change scsi0.present = TRUE Save the file and go back to vmware. to scsi0.present = FALSE

Installing FreeBSD
Start the VM Skip the kernel configuration

Select the standard install option, you will now be taken to the partition setup Within fdisk, press A to allocate entire disk for bsd, then press Q to finish Select: install a standard MBR Create partition (with C) : 1024M for / 1024M for swap partition 500M for /config The rest for /var (this should be around 3500 MB)

Press Q and select minimal install, then choose the following options: install from DVD/CD Config Ethernet: Yes Select em0 Config IPv6: No Config DHCP: Yes Network Gateway: No Config Inetd: No Config Anonymous FTP: No Config NFS Server: No Config NFS Client: No Select Default Security Profile: No Customize System Console: No

Set Time Zone: Yes/NoIts really up to you if you want to do this Enable Linux Binary Compatibility: No Non USB Mouse: No Browse Package Collection: No Add Accounts: Yes General Configuration Menu: No

Prepare JunOS and setup FTP server


Unpack the JunOS signature removal script Then find the JunOS install package (usually called jinstall10.1R1.13-export-signed.tgz or similar based the version you have) and put it in the same folder (Windows) as the batch script. Run the script (might need to run as admin on windows vista/7) and select the source .tgz file by typing the name of the jinstall (type ji and click tab to save time) The script will modify the install and create a new file with a name ending in olive. This is the file you want to tranfer and use in your FreeBSD VM

Now you should install and start the FTP server program. Click Launch User Account Wizard and set a name and password Then find the directory of the jinstall-olive image and set it as Home Directory Make sure the account has at least download priveliges Click the start button from the toolbar

Transfer and install JunOS in your VM


Start the VM and login with root as username and the password you assigned. Now we want to retrieve the install over ftp so type the following commands:

If you havent configure DHCP: ifconfig em0 <ip-address you want to assign the FreeBSD VM> e.g. 192.168.0.3, this should be in the same network as the ftp-server cd /var/tmp The connection between the host and the virtual machine should be NAT. ftp <ftp-server ip-address> e.g. ftp 192.168.0.2 username: <username> password: <password> binary get <jinstall-filename> e.g. get jinstall-7.2R2.4-domesticsigned.tgz bye

Now we will launch the JunOS install by executing the following command: pkg_add -f /var/tmp/<jinstall-filename> e.g. get jinstall-7.2R2.4domestic-signed.tgz When complete you should choose not to reboot, we want to edit one last file so we can monitor the installation progress after reboot. Excecute: ee /boot/default/loader.conf Find the line console=comconsole and set it to console=vidconsole Press escape and leave editor. Remember to save

Now reboot by typing reboot The virtual machine will reboot and install olive.

Initial configuration of olive


On the console at login enter root and enter on the password prompt. Enter cli to enter in to command line interface of JunOS and enter: % cli > configure Set the hostname for the router: # set system host-name <router name> Set the root password: # set system root-authentication plain-text-password <enter> Create a secondary admin user to use for SSH: # set system login user <username> class super-user # set system login user <username> authentication plain-textpassword <enter> Set an IP Address on the interface em0 so as to connect to the router: # set interfaces em0 unit 0 family inet address <ip/mask> Enable and set the SSH Version of the protocol to use to version 2: # set system services ssh protocol-version v2 Enable Telnet:

# set system services telnet Enable FTP: # set system services ftp Set the default gateway:

# set routing-options static route 0.0.0.0/0 next-hop <Default Gateway IP> Set the DNS Server to use: # set system name-server <name server IP> Save the configuration: # commit

Вам также может понравиться