[VLAN] Vlan is inactive
Rui Cristo
rui_alisson at yahoo.com.br
Wed Apr 26 21:31:14 PDT 2006
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.candelatech.com/pipermail/vlan/attachments/20060426/deb690bd/attachment.htm
More information about the Vlan
mailing list