Find the answer to your Linux question:
Results 1 to 2 of 2
Given the following values of a range of IPs, what's the proper way to bind the first few to eth0 using ifconfig? What value do I use for broadcast? The ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2003
    Posts
    2

    Correct Way to Configure eth0 using ifconfig for range of ip


    Given the following values of a range of IPs, what's the proper way to
    bind the first few to eth0 using ifconfig? What value do I use for
    broadcast?

    The co-located server IP information is as follows:
    Base IP: 68.14.52.2
    IP Range: 68.14.52.2 - 68.14.52.126
    Subnet Mask: 255.255.240.0
    Gateway: 68.14.52.1

    What would be the proper way to write the following to bind the first few
    ip address to eth0? Do I have the right value for broadcast?

    ifconfig eth0:0 68.14.52.2 broadcast 68.14.52.255 netmask 255.255.240.0
    route add -host 68.14.52.2 dev eth0:0
    ifconfig eth0:1 68.14.52.3 broadcast 68.14.52.255 netmask 255.255.240.0
    route add -host 68.14.52.3 dev eth0:1
    ifconfig eth0:2 68.14.52.4 broadcast 68.14.52.255 netmask 255.255.240.0
    route add -host 68.14.52.4 dev eth0:2

  2. #2
    Just Joined!
    Join Date
    Dec 2003
    Posts
    5
    Hello,

    Looks very close to the http://www.tldp.org/HOWTO/IP-Alias/ examples. Just one thing: there are three extra commands in the howto.

    /sbin/ifconfig lo 127.0.0.1
    /sbin/ifconfig eth0 up
    /sbin/ifconfig eth0 172.16.3.1
    /sbin/ifconfig eth0:0 172.16.3.10
    /sbin/ifconfig eth0:1 172.16.3.100

    Regards,
    Gene

Posting Permissions

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