ixEnableArpResponse
ixEnableArpResponse - enable ARP response on a set of ports
SYNOPSIS
ixEnableArpResponse mapType portList
DESCRIPTION
The ixEnableArpResponse gets the MAC and IP address for a set of ports, sets up the address table and enables the ARP response engine for the set of ports. IP configuration must have been performed for this command to succeed.
ARGUMENTS
mapType
(By value) The type of IP to MAC mapping to be used. One of:
Option | Value | Usage |
---|---|---|
oneIpToOneMAC | 0 | Each IP address is mapped to a single MAC address. |
manyIpToOneMAC | 1 | All the IP addresses for a port are mapped to a single MAC address. |
portList
(By reference) The list of ports in one of the following formats:
one2oneArray, one2manyArray, many2oneArray, many2manyArray
Or a reference to a list. For example, pl after
set pl {{1 1 1} {1 1 2} {1 1 3} {1 1 4}} -or-
set pl {1,1,1 1,1,2 1,1,3 1,1,4}
RETURNS
0
No error; the command was successfully delivered to the IxServer.
1
Error; the command was delivered to the IxServer but it could not process the message.
EXAMPLES
package require IxTclHal
set host galaxy
set username user
# Check if we're running on UNIX - connect to the TCL Server
# which must be running on the chassis
if [isUNIX] {
if [ixConnectToTclServer $host] {
ixPuts "Could not connect to $host"
return 1
}
}
# Now connect to the chassis
if [ixConnectToChassis $host] {
ixPuts $::ixErrorInfo
return 1
}
# Get the chassis ID to use in port lists
set chas [ixGetChassisID $host]
set cardA 1
set portA 1
set cardB 1
set portB 2
# For different port list formats
set portList1 [list $chas,$cardA,$portA]
set portList2 [list $chas,$cardA,$portA $chas,$cardB,$portB]
set portList3 [list [list $chas $cardA $portA] [list $chas $cardB $portB]]
set portList4 [list [list $chas,$cardA,$portA] [list $chas,$cardB,$portB]]
# Login before taking ownership
if [ixLogin $username] {
ixPuts $::ixErrorInfo
return 1
}
# Take ownership of the ports we'll use
if [ixTakeOwnership $portList4] {
ixPuts $::ixErrorInfo
return 1
}
map new -type one2one
map config -type one2one
map add $chas $cardA $portA $chas $cardB $portB
map add $chas $cardB $portB $chas $cardA $portA
ip setDefault
ip set 1 1 1
ip set 1 1 2
# Try each of the formats
if {[ixEnableArpResponse oneIpToOneMAC portList1] != 0} {
ixPuts "Could not enable ARP response for $portList1"
}
if {[ixEnableArpResponse oneIpToOneMAC portList2] != 0} {
ixPuts "Could not enable ARP response for $portList2"
}
if {[ixEnableArpResponse manyIpToOneMAC portList3] != 0} {
ixPuts "Could not enable ARP response for $portList3"
}
if {[ixEnableArpResponse manyIpToOneMAC portList4] != 0} {
ixPuts "Could not enable ARP response for $portList4"
}
if {[ixEnableArpResponse manyIpToOneMAC one2oneArray] != 0} {
ixPuts "Could not enable ARP response for $one2oneArray"
}
# Let go of the ports that we reserved
ixClearOwnership $portList4
# Disconnect from the chassis we're using
ixDisconnectFromChassis $host
# If we're running on UNIX, disconnect from the TCL Server
if [isUNIX] {
ixDisconnectTclServer $host
}
SEE ALSO
ixDisableArpResponse, ixDisablePortArpResponse, ixEnablePortArpResponse