LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 09-25-2010, 11:15 AM   #1
bratch
Member
 
Registered: Nov 2004
Location: Jersey, British Isles
Distribution: Gentoo
Posts: 44

Rep: Reputation: 15
Interface alias does not receive broadcast traffic


When setting up an alias for eth0, the interface works as expected for normal traffic, but does not receive broadcast traffic.

Host 1's setup:
Code:
# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:17:31:f5:9d:63  
          inet addr:192.168.0.107  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::217:31ff:fef5:9d63/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:22749 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18614 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4245622 (4.0 MiB)  TX bytes:2217688 (2.1 MiB)
          Interrupt:16 
# ifconfig eth0:0
eth0:0    Link encap:Ethernet  HWaddr 00:17:31:f5:9d:63  
          inet addr:192.168.0.150  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:16
Pinging host 1's normal interface from host 2 works as expected:
Code:
$ ping 192.168.0.107
PING 192.168.0.107 (192.168.0.107) 56(84) bytes of data.
64 bytes from 192.168.0.107: icmp_req=1 ttl=64 time=0.274 ms
64 bytes from 192.168.0.107: icmp_req=2 ttl=64 time=0.276 ms
^C
--- 192.168.0.107 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.274/0.275/0.276/0.001 ms
Pinging host 1's alias interface from host 2 works as expected:
Code:
$ ping 192.168.0.150
PING 192.168.0.150 (192.168.0.150) 56(84) bytes of data.
64 bytes from 192.168.0.150: icmp_req=1 ttl=64 time=0.281 ms
64 bytes from 192.168.0.150: icmp_req=2 ttl=64 time=0.275 ms
^C
--- 192.168.0.150 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.275/0.278/0.281/0.003 ms
Broadcast pinging from host 2 only gets a reply from host 1's real interface (as well as some other uninteresting devices on the network):
Code:
$ ping -b 192.168.0.255
WARNING: pinging broadcast address
PING 192.168.0.255 (192.168.0.255) 56(84) bytes of data.
64 bytes from 192.168.0.107: icmp_req=1 ttl=64 time=0.285 ms
64 bytes from 192.168.0.1: icmp_req=1 ttl=64 time=0.289 ms (DUP!)
64 bytes from 192.168.0.35: icmp_req=1 ttl=255 time=0.982 ms (DUP!)
64 bytes from 192.168.0.107: icmp_req=2 ttl=64 time=0.274 ms
64 bytes from 192.168.0.1: icmp_req=2 ttl=64 time=0.278 ms (DUP!)
64 bytes from 192.168.0.35: icmp_req=2 ttl=255 time=0.994 ms (DUP!)
^C
--- 192.168.0.255 ping statistics ---
2 packets transmitted, 2 received, +4 duplicates, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.274/0.517/0.994/0.333 ms
I have confirmed by listening on both interfaces using netcat, and broadcasting using netcat, and again only the real interface receives data.

Is this by design, or is it possible to get interface aliases to receive broadcast traffic?
 
Old 09-27-2010, 02:26 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
The alias, eth0:0, thing is not an interface but only a kind of label associated to the address. The label does not exist for kernel networking functions such as routing, packet filtering and so on.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Swamped with NetBios Broadcast Traffic molybtek Linux - Networking 2 05-28-2009 09:37 PM
How to receive DHCP broadcast messages? kornerr Programming 1 03-11-2009 02:31 AM
How do I send and receive data through a TUN interface? jayadhanesh Linux - Networking 4 02-26-2009 01:49 AM
NFS traffic over broadcast -- normal or not? kpj104 Linux - Networking 1 12-15-2008 03:44 PM
promiscuous mode not working (hub) - can only see broadcast traffic lardus Linux - Networking 11 05-16-2005 04:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:34 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration