How To Activate An IP ALIAS from Bash Script
Posted on 2009-04-01
I am trying to bring an IP Alias online from a bash script and am having issues connecting to the IP once it has been "up'ed" Here is the command I am using from the Bash Script
/sbin/ifconfig eth0:1 XXX.XXX.XXX.XXX/28 broadcast YYY.YYY.YYY.YYY up
In the above command X's and Y's are used to mask the real IPs.
Now, what I am wondering is if the problem is a missing "gateway", the IP Address assigned to eth0, and the one assigned to eth0:1 are on different subnets with different gateways. So I am wondering if the issue here is a missing route (gateway), and if so how do I go about adding it.
I am not getting any errors, so my syntax is correct, I just cant connect to this IP once its been brought online. Any ideas for me? Thanks in advance.