how to change the ipaddress and gateway using script?
Friends,
RHEL AS 3/4
i have to connect my backup pc (RHEL AS 3) to the production server and test server very frequently(RHEL AS 4)
for that, each time i am manually opening /etc/sysconfig/network-scripts/ifcfg-eth0 and editing the below lines to and fro according to my need.
IPADDR=182.17.7.23 (this is production ip)
to
IPADDR=182.17.1.23 (this is test ip)
and the gateway...
GATEWAY=182.17.1.1 (production)
to
GATEWAY=182.17.7.1 (test)
can anybody give a solution to change it thru shell/bash script?
thanks
|