LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 12-29-2004, 11:17 AM   #1
cormander
Member
 
Registered: Dec 2004
Location: Hawaii
Distribution: Fedora & CentOS
Posts: 72

Rep: Reputation: 15
Bcast ever different on two eth0:* devices?


I've gone through many linux servers on different networks configuring NIC cards, and I've noticed that every IP address on a single interface always has the same Bcast address.

This command:

Code:
/sbin/ifconfig

It lists the "Bcast" address on each of the eth0 interfaces,

eth0

eth0:1

eth0:2

etc etc

Althought the Bcast address may change from server to server, I've never ever seen it different from interface to interface on eth0

Is it possible to ever be different? And if so, in what case?

The reason I ask is because I'm configuring my firewall to drop packets pretending to be from the broadcast address, and wondered if I ever had to worry about there being a different value, then from the one that I always see there, if we were to add another IP address on the box.

-Corey
 
Old 01-05-2005, 05:14 AM   #2
denver1980
Member
 
Registered: Dec 2004
Location: Québec
Distribution: Gentoo, Kubuntu Karmic
Posts: 48

Rep: Reputation: 15
No the broadcast address is standart.
In TCP/IP x.x.x.255 is for broadcast and x.x.x.0 is the netmask.

Basically, broadcast is a kind of call "Anybody there?" that can be use when a comp wakes up on a network with no IP address and wants to reach the DHCP server.

On the other hand, netmask is for "isolate" your IP address in a range of address.

Last edited by denver1980; 01-05-2005 at 05:16 AM.
 
Old 01-05-2005, 06:25 AM   #3
cowanrl
Member
 
Registered: Dec 2004
Location: Western Pennsylvania, USA
Distribution: Red Hat
Posts: 150

Rep: Reputation: 15
The network address and broadcast address on an IP subnet are determined by the subnet mask. Lets say you have eth0 with an IP address of 192.168.1.1 and a subnet mask of 255.255.255.0. In this case, the network address is 192.168.1.0 and the broadcast address is 192.168.1.255.
However, if I were to change the subnet mask to 255.255.255.224, the network address stays at 192.168.1.0 but the broadcast address is now 192.168.1.31.

If the IP address is 192.168.1.67 with a subnet mask of 255.255.255.224, the network address is 192.168.1.64 and the broadcast address is 192.168.1.95.

An IP address always has 2 parts, the network address and the host address. How much of the address is the network address and how much is the host address is determined by the subnet mask. If you look at the IP address from a binary standpoint, for any IP subnet, the network address always has all zeros for the host portion and the broadcast address always has all ones for the host portion. These 2 addresses cannot be assigned to any host on that subnet.

This is the TCP/IP standard and is how you should find it on any network. However, in Linux it is possible to change the IP broadcast address on any interface. If you wanted to for some reason, you could change the IP broadcast address on every host on the network and things will probably still work. However, your better off to leave things as the default.

More than likely your router is always going to detect the broadcast address as what it is for that subnet according to the subnet mask. Most, if not all routers, will block broadcasts by default.

If someone were to configure a host so that the broadcast address no longer has a host portion with all ones on that subnet, that address now becomes a unicast address and your router should treat it as such.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SUSE 9.2 eth0 "Waiting for mandatory devices..." DHCP problems ozric Linux - Hardware 2 03-29-2005 01:07 PM
Wireless network on eth1 diabled Ethernet eth0 and eth0 never comes back tadatoshi Linux - Wireless Networking 4 09-23-2004 05:57 PM
Firewall WAN eth0 LAN eth1 self-bridges, eth0 does all routeing. Nichole_knc Linux - Networking 5 07-29-2004 02:33 PM
bcast name resolution 4ndre4 Linux - Networking 3 03-29-2004 07:58 AM
howto delete static ip configured on eth0 & reconf multiple ip on one eth0(redhat8 viveku Linux - Networking 0 01-31-2004 10:40 AM


All times are GMT -5. The time now is 04:41 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration