Results 1 to 4 of 4

Thread: help me !!!! configure ip for many computer

  1. #1

    help me !!!! configure ip for many computer

    How to configure IP for many computer with of by shell programing ?
    ex: add ip, remove ip.
    thanks

  2. #2
    Associate
    Join Date
    Sep 2007
    Location
    idaho
    Posts
    16
    If they're on a lan networ, I think your router will assign IP's using DHCP automatically, unless you go to each computer and program a static IP. If you want static IP's, you'll have to go to each computer and type in ifconfig plus some other info that I don't remember. Do a "man ifconfig". It's less confusing than it looks.

  3. #3
    You can't do through network but to reduce ur work.You can do as below
    create a file named hosts and make entries as below [Replace the hostname and IP as per yours]
    #vi hosts.txt
    hosta 10.1.1.18
    hostb 10.1.1.19
    hostc 10.1.1.20

    <Format should be hostname IPADDRESS>

    Copy the hosts files you created and below script to a pendrive. Change the permission of ip.sh to 755.
    #vi ip.sh
    MYHOST=`hostname`
    IP=`grep $MYHOST hosts|awk '{print $2}'`
    echo -e "IPADDR=$IP \n NETMASK=255.255.255.0" >> /etc/sysconfig/network-scripts/ifcfg-eth0
    echo "GATEWAY=10.1.1.1" >> /etc/sysconfig/network
    /etc/init.d/network restart



    Mount to the hosts individually and execute the script.

    #mount /dev/sdx /mnt [x is the drive ipdentified by your host.use fdisk -l]
    #cd /mnt;./ip.sh


    Hope this helps you.

  4. #4
    The best way to assign ip to many computers is via DHCP server. DHCP protocol is designed for this purpose only.
    Run a dhcp server in one of the system in the network and dhclient in all other systems.

    If you are bothered about getting the same ip always for every system, this can also be done via dhcp server/client configuration file .

    Hope this helps !!
    Manish Gupta
    Last edited by Nishu; 11-16-2011 at 06:47 AM.

Similar Threads

  1. How to configure httpd ?
    By sdanielraja in forum General Chat
    Replies: 1
    Last Post: 10-31-2011, 11:55 PM
  2. How to configure NAT64....
    By dashang in forum Linux - Hardware, Networking & Security
    Replies: 0
    Last Post: 09-06-2011, 01:04 PM
  3. How to configure DNS with BIND
    By diamondd in forum Linux - Hardware, Networking & Security
    Replies: 2
    Last Post: 08-02-2011, 01:26 AM
  4. Cannot configure my dsl
    By bleeding toejam in forum Mandriva
    Replies: 5
    Last Post: 04-08-2002, 04:29 PM
  5. Configure ftp
    By benny666 in forum Linux - Hardware, Networking & Security
    Replies: 9
    Last Post: 03-04-2002, 12:47 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •