Thursday, August 10, 2017

c180x - ISR 1802 router RAM + IOS upgrade

upgrade rom-monitor file ?
 
 - to upgrade bootstrap issue the above command in privileged mode (#)
 
 
copy tftp flash: 
 
 - to copy new .bin image to flash
 
sh boot
 
 

TFTP on Ubuntu 16.10

  TFTP is used where user authentication and directory visibility are not required
TFTP uses -- >  UDP port 69  ( lighter than TCP based FTP )

TFTP is described formally in RFC 1350.

Light and simple design >> the protocol of choice for the initial stages of any network booting strategy ( i.e.: PXE; bootp; firmware transfer; config files transfer >> network devices - switches, routers and firewalls. )

Most typically is TFTP used to transfer firmware images to network devices for upgrade or recovery purposes.
How to install & run TFTP server on Ubuntu 16.10
tftpd-hpa  -- > an enhanced version of the BSD TFTP client and server. Lot of bugfixes plus enhancements over the original tftpd.

All commands impersonate root:

sudo su
Configure TFTP defaults
Now we need to create the default settings that the TFTP daemon will use when the service is started. To do this we need to edit the /etc/default/tftpd-hpa file:
Add the following to the file:
Where:
  • TFTP_USERNAME: Specify the username which tftpd will run as. The default is “nobody”.
  • TFTP_DIRECTORY: Specify the root directory where files will be served from. The default is /var/lib/tftp
  • TFTP_ADDRESS: Specify a specific address and port to listen on. The default is to listen to the TFTP port specified in /etc/services on all local addresses.
  • TFTP_OPTIONS: Specify any additional options to run the daemon with, in this case we used the following:
  1. –secure: Change root directory on startup. This means the remote host does not need to pass along the directory as part of the transfer, and may add security. The use of this option is recommended for security as well as compatibility with some boot ROMs which cannot be easily made to include a directory name in its request.
  2. –create: Allow new files to be created. By default, tftpd will only allow upload of files that already exist.
# /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/srv/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure --create"
Create the directory structure
Next we can create the directory structure for our network device images, in this case I will be creating a directory for Cisco and juniper devices and creating sub directories for IOS, IOSXR and NXOS. Under the IOS directory will create further sub directories for each specific model of router/switch on the network.
Next we need to set the user, group and file permissions for the /srv/tftpboot directory and its sub directories:
Before we test TFTP we need to restart the TFTP daemon so that the configuration changes made above are implemented:
Sample output of restarting the tftpd-hpa daemon:

Next I created a test file on the TFTP server that we will download to our test server, the test file is a list of directories in the root folder of the TFTP server:
Now from our test server we will connect to our new TFTP server and download (GET) the test file we just created:
Perfect everything is working correctly, if you are having problems check you firewall rules,on both the TFTP server and the TFTP client to make sure the traffic is allowed through.
  

No comments:

Post a Comment

Thank you for your comment. Will try to react as soon as possible.

Regards,

Networ King