3

I am trying to setup a vlan between 2 embedded Linux SOCs on wireless IPTV STB (set top box) using vconfig. The physical connection between the SOCs is a Marvell 88E60xx switch. The issue is that the vlan needs to be private. If there is more than 1 IPTV STB, an RPC (remote procedure call) gets a response from the wrong STB and the static IP addresses I use are duplicated on the network. I see this on Wireshark.

Duplicate IP address detected for 1.1.1.1 (28:c8:7a:b5:ad:50) - also in use by 28:c8:7a:b5:ad:10 (frame 171)

I suspect I am missing 1 or 2 configuration steps but this is my 1st attempt at setting up a vlan. This is how I configure the vlan on the SOC that controls the WiFi

vconfig add br0 12
ip link set br0.12 up
ifconfig br0.12 1.1.1.2 netmask 255.255.255.248

This is how I configure the vlan on the SOC that controls the IPTV

ifconfig eth0 0.0.0.0 multicast up
vconfig add eth0 0
ifconfig eth0.0 0.0.0.0 multicast up
brctl addbr br0
brctl addif br0 eth0.0
brctl addbr br6
brctl stp br6 0 # spanning tree protocol off
brctl setfd br6 0 # set bridge forward delay to 0 seconds
vconfig add eth0 12
ifconfig eth0.12 0.0.0.0 multicast up
brctl addif br6 eth0.12
ifconfig br6 1.1.1.1 up

This is the ifconfig on the SOC that controls the WiFi

br0       Link encap:Ethernet  HWaddr 28:C8:7A:B5:AD:11
          inet addr:192.168.1.230  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: /64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10266 errors:0 dropped:0 overruns:0 frame:0
          TX packets:130 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1032197 (1008.0 KiB)  TX bytes:10459 (10.2 KiB)

br0.12    Link encap:Ethernet  HWaddr 28:C8:7A:B5:AD:11
          inet addr:1.1.1.2  Bcast:1.1.1.7  Mask:255.255.255.248
          inet6 addr: /64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:178 errors:0 dropped:0 overruns:0 frame:0
          TX packets:124 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:11585 (11.3 KiB)  TX bytes:9991 (9.7 KiB)

eth1_0    Link encap:Ethernet  HWaddr 28:C8:7A:B5:AD:13
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9910 errors:0 dropped:0 overruns:0 frame:0
          TX packets:47291704 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:512
          RX bytes:927138 (905.4 KiB)  TX bytes:1386129256 (1.2 GiB)
          Interrupt:20

wifi0     Link encap:Ethernet  HWaddr 28:C8:7A:B5:AD:11
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:47372174 errors:26 dropped:0 overruns:0 frame:0
          TX packets:19386 errors:4 dropped:4 overruns:0 carrier:0
          collisions:0 txqueuelen:1536
          RX bytes:2526373464 (2.3 GiB)  TX bytes:1626473 (1.5 MiB)

This is the ifconfig on the SOC that controls the IPTV

br6       Link encap:Ethernet  HWaddr 28:C8:7A:B5:AD:10
          inet addr:1.1.1.1  Bcast:1.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:87 errors:0 dropped:0 overruns:0 frame:0
          TX packets:120 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5801 (5.6 KiB)  TX bytes:8981 (8.7 KiB)

eth0      Link encap:Ethernet  HWaddr 28:C8:7A:B5:AD:10
          inet addr:10.70.246.245  Bcast:10.70.246.255  Mask:255.255.255.240
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:46704864 errors:140 dropped:0 overruns:0 frame:226
          TX packets:19531 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:128
          RX bytes:433498829 (413.4 MiB)  TX bytes:821667 (802.4 KiB)
          Interrupt:46

eth0.0    Link encap:Ethernet  HWaddr 28:C8:7A:B5:AD:10
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0.12   Link encap:Ethernet  HWaddr 28:C8:7A:B5:AD:10
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:87 errors:0 dropped:0 overruns:0 frame:0
          TX packets:120 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:6149 (6.0 KiB)  TX bytes:9461 (9.2 KiB)

This is a cat /proc/net/vlan/* on the SOC that controls the WiFi

br0.12  VID: 12  REORDER_HDR: 1  dev->priv_flags: 1
         total frames received          266
          total bytes received        16535
      Broadcast/Multicast Rcvd            0

      total frames transmitted          191
       total bytes transmitted        20024
            total headroom inc            0
           total encap on xmit          191
Device: br0
INGRESS priority mappings: 0:0  1:0  2:0  3:0  4:0  5:0  6:0 7:0
 EGRESS priority mappings:
VLAN Dev name    | VLAN ID
Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD
br0.12         | 12  | br0

This is a cat /proc/net/vlan/* on the SOC that controls the IPTV

VLAN Dev name    | VLAN ID
Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD
eth0.0         | 0  | eth0
eth0.12        | 12  | eth0
eth0.0  VID: 0   REORDER_HDR: 1  dev->priv_flags: 1
         total frames received            0
          total bytes received            0
      Broadcast/Multicast Rcvd            0

      total frames transmitted            0
       total bytes transmitted            0
            total headroom inc            0
           total encap on xmit            0
Device: eth0
INGRESS priority mappings: 0:0  1:0  2:0  3:0  4:0  5:0  6:0 7:0
EGRESSS priority Mappings:
eth0.12  VID: 12         REORDER_HDR: 1  dev->priv_flags: 1
         total frames received          183
          total bytes received        17613
      Broadcast/Multicast Rcvd            6

      total frames transmitted          252
       total bytes transmitted        18699
            total headroom inc           39
           total encap on xmit          252
Device: eth0
INGRESS priority mappings: 0:0  1:0  2:0  3:0  4:0  5:0  6:0 7:0
EGRESSS priority Mappings:
jacknad
  • 131
  • 5

1 Answers1

0

I was able to isolate the vlan by turning off arp like this

ifconfig br6 -arp #turn off arp

and setting arp like this

arp -s 1.1.1.2 $WMAC

and doing something similar on the other side of the bridge like this

ifconfig br0 -arp #turn off arp
ifconfig br0.12 -arp #turn off arp

and

arp -s 1.1.1.1 $EMAC
jacknad
  • 131
  • 5