I'm trying to remove a couple of entries from the static routes in SMIT
and not getting particularly far with it. I'm obviously missing
something simple but can't see what. Any pointers gratefully received.
Below is the one I'm trying to delete...
Thanks
Bryan
192.168.1/24 192.168.1.1 U 1 120 en0 - -
[MORE...5]
Remove Static Route
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
Destination TYPE net
+
* DESTINATION Address [192.168.1.0]
(dotted decimal or symbolic name)
* Default GATEWAY Address [192.168.1.1]
(dotted decimal or symbolic name)
Network MASK (hexadecimal or dotted decimal) [255.255.255.0]
F1=Help +------------------------------------------------------+
F5=Reset Ś Running command... Ś
F9=Shell +------------------------------------------------------+
COMMAND STATUS
Command: running stdout: yes stderr: no
Before command completion, additional instructions may appear below.
Method error (/usr/lib/methods/chginet):
0514-009 Cannot delete an object from the device
configuration database.
0821-216 chginet: Cannot delete route (net,192.168.1.0,192.168.1.1) from
CuAt.
Bryan Hepworth wrote:
> Hi Everyone
>
> I'm trying to remove a couple of entries from the static routes in SMIT
> and not getting particularly far with it. I'm obviously missing
> something simple but can't see what. Any pointers gratefully received.
>
> Below is the one I'm trying to delete...
>
> Thanks
>
> Bryan
>
> 192.168.1/24 192.168.1.1 U 1 120 en0 - -
> [MORE...5]
>
>
> Remove Static Route
>
> Type or select values in entry fields.
> Press Enter AFTER making all desired changes.
>
> [Entry Fields]
> Destination TYPE net
> +
> * DESTINATION Address [192.168.1.0]
> (dotted decimal or symbolic name)
> * Default GATEWAY Address [192.168.1.1]
> (dotted decimal or symbolic name)
> Network MASK (hexadecimal or dotted decimal) [255.255.255.0]
>
>
> F1=Help +------------------------------------------------------+
> F5=Reset ¦ Running command... ¦
mrkh...@yahoo.com wrote:
> Can you post output from netstat -rn
>
>
>
> Bryan Hepworth wrote:
>
>>Hi Everyone
>>
>>I'm trying to remove a couple of entries from the static routes in SMIT
>>and not getting particularly far with it. I'm obviously missing
>>something simple but can't see what. Any pointers gratefully received.
>>
>>Below is the one I'm trying to delete...
>>
>>Thanks
>>
>>Bryan
>>
>>192.168.1/24 192.168.1.1 U 1 120 en0 - -
>>[MORE...5]
>>
>>
>> Remove Static Route
>>
>>Type or select values in entry fields.
>>Press Enter AFTER making all desired changes.
>>
>> [Entry Fields]
>> Destination TYPE net
>> +
>>* DESTINATION Address [192.168.1.0]
>> (dotted decimal or symbolic name)
>>* Default GATEWAY Address [192.168.1.1]
>> (dotted decimal or symbolic name)
>> Network MASK (hexadecimal or dotted decimal) [255.255.255.0]
>>
>>
>>F1=Help +------------------------------------------------------+
>>F5=Reset Ś Running command... Ś
# lsattr -El inet0
...
route net,-hopcount,10,,0,10.0.0.1 Route
True
# chdev -l inet0 -a delroute=net,-hopcount,10,,0,10.0.0.1
the above command deletes a default route (destination 0)
hth
Bryan Hepworth wrote:
> Hi Everyone
>
> I'm trying to remove a couple of entries from the static routes in SMIT
> and not getting particularly far with it. I'm obviously missing
> something simple but can't see what. Any pointers gratefully received.
>
> Below is the one I'm trying to delete...
>
> Thanks
>
> Bryan
>
> 192.168.1/24 192.168.1.1 U 1 120 en0 - -
...
Hi Brian
Maybe some background information is in order...
What I was trying to do was setup two ethernet addresses on one
ethernet card. The network is changing over from some strangely
assigned ip addresses to 192.168 range. There is already a default
route in place so I won't be high and dry. I've managed to do this on a
linux box, but this is my first attempt on AIX using SMIT.
# netstat -rn
Routing tables
Destination Gateway Flags Refs Use If PMTU Exp
Groups
Route Tree for Protocol Family 2 (Internet):
default 92.0.0.100 UG 9 759677 en0 - -
10.0.0.2 10.0.0.1 UH 0 0 pp0 - -
92/8 92.56.56.56 U 5 103297 en0 - -
94/24 92.0.0.100 UG 0 0 en0 - -
=>
94/8 92.0.0.100 UG 1 191572 en0 - -
94.0.0.100/32 92.0.0.100 UG 0 0 en0 - -
127/8 127.0.0.1 U 2 109 lo0 - -
192.168.1/24 192.168.1.1 U 1 121 en0 - -
192.168.2/24 192.168.1.1 UG 0 0 en0 - -
Route Tree for Protocol Family 24 (Internet v6):
::1 ::1 UH 0 0 lo0 16896 -
Something like (as root):
chdev -l en0 -a alias4=dottedipaddress,dottedmask
and to remove entry:
chdev -l en0 -a delalias4=dottedipaddress,dottedmask
This is also available from the additional menus available from "smitty tcpip", but can't remember which ones and not near a machine today.
So if your "extra" ipaddress and mask needed to address en0 is 150.140.130.120 & 255.255.255.0
then
chdev -l en0 -a alias4=150.140.130.120,255.255.255.0
Then clients can target en0 with both the primary and alias ip addresses.
Here's a little script you can run to display the ip addresses of an adapter, call it what you will:
#!/bin/ksh
# Script to show the status of all ethernet NICS.
# v6.0 BJC 12/12/2003 Generate list from ODM if entries, instead of fixed list
# v7.0 BJC 08/21/2005 Fix positional parameter problems for AIX 5.2
##############################################################
echo
# Display the headings.
echo "Device\tIP Adress\tState\t Speed"
# Loop thru each device.
lsdev -Cc if | grep Available | grep -v Loopback | while read nicdev dummy ; do
nicnum=$(echo ${nicdev} | cut -c3-99)
# Peel Out the ip address and state.
lsinfo=`lsattr -El ${nicdev} | grep "^netaddr" | grep -v "^netaddr6"`
netaddr=$(echo ${lsinfo} | cut -f2 -d" ")
lsinfo=`lsattr -El ${nicdev} | grep "^state"`
state=$(echo ${lsinfo} | cut -f2 -d" ")
# Get the netstat info.
netstat=`netstat -v ent${nicnum} | grep "^Media Speed Running"`
# Peel out the speed.
speed=$(echo ${netstat} | cut -f2 -d":")
# Display the Info.
echo "${nicdev}\t${netaddr}\t${state}\t${speed}"
lsattr -El ${nicdev} | grep alias4 | while read dum cmip dum ; do
[ "${cmip}" = "N/A" -o "${cmip}" = "IPv4" ] && continue
anetaddr=$(echo ${cmip} | cut -f1 -d",")
echo "+alias+\t${anetaddr}"
done
done
echo
exit 0
Regards, Brian.