> > > I need to assign two IP addresses (different subnets and gateways)
> to a
> > > single NIC card. My ISP is changing and so are my IP addresses.
> During
> > > the changeover I want my AIX server to respond to both its old and
> its
> > > new IP address. Can this be done?
> > > In my case the old address of the server is 198.76.208.197 and the
> new
> > > one will be 64.26.68.197. It appears that the ifconfig command will
> let
> > > me assign a second IP address but I dont see a way to assign a
> second
> > > gateway.
> > > If this can be done can someone give me the exact syntax of the
> command
> > > to do this as I am certainly no AIX expert?
> > > Please reply directly.
> > > Thanks.
> > > Jim
> > Assuming interface is en0
> > ifconfig en0 up alias 64.26.68.197 255.255.255.0 #or your correct
> > subnet.
> > Add it to /etc/rc.net if you want it there after boot.
> > To remove
> > ifconfig en0 delete 64.26.68.197
> > After the completion of the change over, remove the alias thing
> > from /etc/rc.net, and use smitty chinet to change the address
> > perm to the new one.
> > - Matt
> Matt,
> Am I missing something here? How does this set the gateway? And how do
> you check what address/mask/gate combinations are set on the interface?
> Pete
> Sent via Deja.com http://www.deja.com/
> Before you buy.
First sorry, I had the wrong ifconfig command, the broadcast, not the
netmask was being set.
ifconfig tr0 up alias 192.168.100.1 netmask 255.255.255.0
There is only one gateway. All adaters should show the same. To check
the
address/mask/gate combos use `smitty mktcpip`. The gateway should be
the
same for all interfaces. If you change it on one you change it on
another.
Now since you have an alias, you won't see all the addresses and masks.
But the gateway still holds for all IP/MASK interfaces.
To see the IP/mask use `ifconfig <interface>`. The mask is in hex so
you need to be able to understand hex->decimal representation. Here
is an example of my interface (with alias)
# ifconfig tr0
tr0: flags=e0a0043<UP,BROADCAST,RUNNING,ALLCAST,MULTICAST,GROUPRT,64BIT>
inet 9.53.111.88 netmask 0xfffffe00 broadcast 9.53.111.255
inet 192.168.100.1 netmask 0xffffff00 broadcast 192.168.255.255
`netstat -i` (or -in) will show the interfaces too.
- Matt