|
IP Switching Tech Tip
Script for setting default VCI on IP Switch Gateway and Controller
Introduction
The script below is a UNIX shell script designed to be run on the IP Switch Gateway
(DAGIG) or the IP Switch Controller (DAGIC). This script automatically edits the
/etc/rc.local file on these machines. If you know VI, then you may edit /etc/rc.local
directly, as described in the tech tip on setting the default VCI for IP SWitching.
This script is provided as a more direct mechanism for those not familiar with VI.
Procedure
- Create the following script, and save it as a file named setvci on
the target system.
#!/bin/sh
#
# Copyright Digital Equipment Corporation 1997. All rights reserved.
#
# Restricted Rights: Use, duplication, or disclosure by the U.S. Government
# is subject to restrictions as set forth in subparagraph (c) (1) (ii) of
# DFARS 252.227-7013, or in FAR 52.227-19, or in FAR 52.227-14 Alt. III, as
# applicable.
#
# This software is proprietary to and embodies the confidential technology
# of Digital Equipment Corporation. Possession, use, or copying of this
# software and media is authorized only pursuant to a valid written license
# from Digital or an authorized sublicensor.
#
if test $# -ne 1
then
echo "usage: setvci vci_value" >&2
exit 1
fi
if [ ! -z "`grep change_llc /etc/rc.local`" ]
then
grep -v change_llc /etc/rc.local >/tmp/setvcitmp
mv /tmp/setvcitmp /etc/rc.local
fi
echo "/usr/ips/change_llc ips0 $1" >>/etc/rc.local
exit 0
- Place the script in the /usr/bin directory of the target system. Name the
file 'setvci'. Be certain to enable execut privileges on the file by issuing
the command chmod 755 /usr/bin/setvci. Update the command tables in
you shell by issuing the rehash command.
- Rung the script by issuing the setvci 32 command, where the number
32 may be replaced by the value you wish to use as the default VCI for IP
Switching.
- The script only has to be run once. The script edits the /etc/rc.local
file on the system, making the change persistent across system resets.
|