#!/bin/bash

# Copyright (c) Verax Systems.  All Rights Reserved.
#
# Script used to add virtual interfaces
# Description:
#     This script is used by Verax SNMP Simulator to turn virtual interfaces up.
#     All interfaces created by Verax SNMP Simulator are stored in temporary file $FILE for further reference.
# Parameters:
#     $1 - The name of the interface (e.g. eth0 for the first Ethernet interface)
#     $2 - The sub ID of interface alias (e.g. 0 for "eth0:0" alias, 1 for "eth0:1", ...)
#     $3 - The IP address and mask assigned for the interface (e.g. 192.168.1.12/255.255.255.0)
#
# NOTE: This script is being invoked internally by Verax SNMP Simulator and cannot be invoked manually.

ifconfig $1:$2 $3 up
echo $1:$2 >> /tmp/created_interfaces.txt 


