Networking Forums

Networking Forums > Computer Networking > Linux Networking > Correct Way to Configure eth0 using ifconfig for range of ips: Value for Broadcast??

Reply
Thread Tools Display Modes

Correct Way to Configure eth0 using ifconfig for range of ips: Value for Broadcast??

 
 
Dr. E
Guest
Posts: n/a

 
      12-14-2003, 04:15 PM
Given the following values of a range of IPs, what's the proper way to
bind the first few to etho 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
 
Reply With Quote
 
 
 
 
Michael Heiming
Guest
Posts: n/a

 
      12-14-2003, 04:57 PM
[ invalid (for me) ng removed ]

Dr. E <(E-Mail Removed)> wrote:
> Given the following values of a range of IPs, what's the proper way to
> bind the first few to etho 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


That looks suspicious and doesn't match, looks like the below
half of a class C net, but then sub-netmask is wrong and broadcast
in addition.

> Gateway: 68.14.52.1


> ifconfig eth0:0 68.14.52.2 broadcast 68.14.52.255 netmask 255.255.240.0


Please check your data, that doesn't fit.

--
Michael Heiming

Remove +SIGNS and www. if you expect an answer, sorry for
inconvenience, but I get tons of SPAM
 
Reply With Quote
 
David Efflandt
Guest
Posts: n/a

 
      12-14-2003, 06:41 PM
On 14 Dec 2003 09:15:08 -0800, Dr. E <(E-Mail Removed)> wrote:
> Given the following values of a range of IPs, what's the proper way to
> bind the first few to etho 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


Your 255.255.255.240 netmask would be network 68.14.48.0 broadcast
68.14.63.255 and any IPs between that.

Broadcast 68.14.52.255 would be for a netmask 255.255.255.0

Your listed IP range might be broadcast 68.14.52.127 netmask
255.255.255.127, but not if they are part of a larger network on eth0.

That is why your data does not compute. Broadcast and netmask should
match the local network on eth0, which is not clear from your data.

Depending upon what you are doing with these multiple IPs on the same
network, you may need to do some advanced routing (per Adv-Routing HOWTO).

--
David Efflandt - All spam ignored http://www.de-srv.com/
 
Reply With Quote
 
Dr. E
Guest
Posts: n/a

 
      12-15-2003, 04:54 AM
Does anyone know a good resource, book, or tutorial for calculating
broadcast addresses, etc., from the data given below?

Thanks!

Elliot



(E-Mail Removed) (Dr. E) wrote in message news:<(E-Mail Removed) om>...
> Given the following values of a range of IPs, what's the proper way to
> bind the first few to etho 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

 
Reply With Quote
 
Bit Twister
Guest
Posts: n/a

 
      12-15-2003, 05:47 AM
On 14 Dec 2003 21:54:40 -0800, Dr. E wrote:
> Does anyone know a good resource, book, or tutorial for calculating
> broadcast addresses, etc., from the data given below?


man ipcalc
 
Reply With Quote
 
David Efflandt
Guest
Posts: n/a

 
      12-15-2003, 06:41 PM
On 14 Dec 2003 21:54:40 -0800, Dr. E <(E-Mail Removed)> wrote:
> Does anyone know a good resource, book, or tutorial for calculating
> broadcast addresses, etc., from the data given below?


A google search for 'calculate netmask' should find something, including
http://screamer.mobrien.com/net.shtml

> (E-Mail Removed) (Dr. E) wrote in message news:<(E-Mail Removed) om>...
>> Given the following values of a range of IPs, what's the proper way to
>> bind the first few to etho 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



--
David Efflandt - All spam ignored http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://cgi-help.virtualave.net/ http://hammer.prohosting.com/~cgi-wiz/
 
Reply With Quote
 
ynotssor
Guest
Posts: n/a

 
      12-17-2003, 06:35 AM
"Dr. E" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) m

> Does anyone know a good resource, book, or tutorial for calculating
> broadcast addresses, etc., from the data given below?


ipcalc.pl is a very useful Perl script.


tony

--
use hotmail for any email replies


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
 
Reply With Quote
 
Carles Arjona
Guest
Posts: n/a

 
      12-28-2003, 10:25 PM
ynotssor wrote:
>
> "Dr. E" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) m
>
> > Does anyone know a good resource, book, or tutorial for calculating
> > broadcast addresses, etc., from the data given below?

>
> ipcalc.pl is a very useful Perl script.


Agreed.

http://jodies.cx/ipcalc
http://jodies.cx/ipcalc.pl

For instance:

$ ipcalc.pl -b 68.14.52.2/255.255.240.0

Address: 68.14.52.2
Netmask: 255.255.240.0 == 20
Wildcard: 0.0.15.255
=>
Network: 68.14.48.0/20
Broadcast: 68.14.63.255
HostMin: 68.14.48.1
HostMax: 68.14.63.254
Hosts/Net: 4094


--
Regards,

Carles Arjona (E-Mail Removed) ( nospammer IS my real username ).
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't get eth0 up (wired) - e1000 device eth0 does not seem to be present, delaying initialization. OtisUsenet Linux Networking 2 06-06-2007 02:57 AM
"ifconfig eth0" command not showing the Gateway address, how can I verify on Linux system? santa19992000@yahoo.com Linux Networking 3 10-16-2005 04:48 PM
How to Configure DHCP to reserve IP range based on MAC address ran =?Utf-8?B?UGFzY2FsbGky?= Windows Networking 4 03-28-2005 07:56 PM
ifconfig eth0 down works but it won't go up! Al. C Linux Networking 8 11-20-2004 05:59 PM
how tho change source address of eth0/eth0:1 ? news Linux Networking 2 06-09-2004 03:25 PM



1 2 3 4 5 6 7 8 9 10 11