[VLAN] Vlan is inactive

Brown, Aaron F aaron.f.brown at intel.com
Wed Apr 26 18:05:39 PDT 2006


I think downing eth0 was the right track, but I believe the physical interface does need to be up in order for the virtual interface to use it.

 

Perhaps if you de-configure eth0, e.g. 

 

[root at box ~]# ifconfig eth0 0.0.0.0

 

so that packets on the 192.168.80.* subnet have only the VLAN interface to go out on...

 

________________________________

From: vlan-bounces at candelatech.com [mailto:vlan-bounces at candelatech.com] On Behalf Of Rui Cristo
Sent: Wednesday, April 26, 2006 4:31 PM
To: vlan at candelatech.com
Subject: [VLAN] Vlan is inactive

 

Hi all,

 

I`m trying to create a simple VLAN and make the traffic from a socket go through this interface and leave the device tagged.
Here is the configuration:
-----------------------------------------------------------------------------------------------
# modprobe 8021q
# vconfig add eth0 10
# ifconfig eth0 10 192.168.80.149 up
# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:11:25:88:AB:12
          inet addr:192.168.80.143  Bcast:192.168.80.255  Mask:255.255.255.0
          inet6 addr: fe80::211:25ff:fe88:ab12/64 Scope:Link
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:14474 errors:853 dropped:0 overruns:0 frame:853
          TX packets:19960 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4931508 (4.7 Mb)  TX bytes:19059455 (18.1 Mb)

eth0.10   Link encap:Ethernet  HWaddr 00:11:25:88:AB:12
          inet addr:192.168.80.149  Bcast:192.168.80.255  Mask:255.255.255.0
          inet6 addr: fe80::211:25ff:fe88:ab12/64 Scope:Link
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:484 (484.0 b)

lo        Link encap:Local Loopback ...
          
-----------------------------------------------------------------------------------------------

 -> I want to bind this VLAN to a socket, to send packets tagged through it.
 I bind it with IP:

-----------------------------------------------------------------------------------------------
 myaddr.sin_family = AF_INET;
 myaddr.sin_port = htonl(PORT);
 inet_aton("192.168.80.149", &myaddr.sin_addr.s_addr);

 if( (bind(sockfd, (struct sockaddr*)&myaddr, sizeof(struct sockaddr))) < 0 )
 {
  printf ("erro bind: %d\n", ret);
  close(sockfd);
  exit(-1);
 }
-----------------------------------------------------------------------------------------------
 The problem is that the sent packets contain the source address 192.168.80.149 but the traffic is sent only by eth0, the eth0.10 is inactive. Even trying to see the packets with ethereal in Capture->Interfaces the eth0.10 seems to be inactive.
 How can I send packets through eth0.10 to "TAG" the traffic.
 I have already tried to "DOWN" eth0 but doesn`t work (and the computer crashes).

 

 Thanks

________________________________

Yahoo! doce lar. Faça do Yahoo! sua homepage. <http://us.rd.yahoo.com/mail/br/tagline/homepage_set/*http:/br.yahoo.com/homepageset.html> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.candelatech.com/pipermail/vlan/attachments/20060426/6a02c871/attachment.htm


More information about the Vlan mailing list