[ovs-discuss] vlan and bridge problem on CentOS 6.3 with 1.6.1

Jesse Gross jesse at nicira.com
Wed Jul 25 18:01:43 UTC 2012


I don't see an actual question or description of a problem in here.
I'm guessing that you expect the tap device to be a vlan access port
but I don't see that you've actually configured that anywhere.

On Wed, Jul 25, 2012 at 8:53 AM, Gianluca Cecchi
<gianluca.cecchi at gmail.com> wrote:
> I put this in /etc/sysconfig/openvswitch
>
> BRCOMPAT=yes
>
> Modules:
> # lsmod|grep br
> brcompat_mod            5873  0
> openvswitch_mod        90652  1 brcompat_mod
>
> On host I have eth2 that is configured on a physical switch in
> trunking with vlan 65 and 66
> I'm testing at the moment only the vlan65 functionality
>
> Basic test config
> # cat ifcfg-eth2
> DEVICE=eth2
> HWADDR=00:1C:C4:AB:3A:DD
> ONBOOT=yes
> BOOTPROTO=none
> DEVICETYPE=ovs
> TYPE=OVSPort
> OVS_BRIDGE=brvlan65
> OVS_OPTIONS="trunks=65,66"
> NM_CONTROLLED=no
> HOTPLUG=no
>
> # cat ifcfg-brvlan65
> DEVICE=brvlan65
> DEVICETYPE=ovs
> TYPE=OVSBridge
> ONBOOT=yes
> BOOTPROTO=static
> STP=off
> NM_CONTROLLED=no
> HOTPLUG=no
> OVS_EXTRA="br-set-external-id $DEVICE bridge-id $DEVICE"
>
> after boot
>
> # brctl show
> bridge name     bridge id               STP enabled     interfaces
> brvlan65                /sys/class/net/brvlan65/bridge: No such file or directory
> /sys/class/net/brvlan65/bridge: No such file or directory
> /sys/class/net/brvlan65/bridge: No such file or directory
> /sys/class/net/brvlan65/bridge: No such file or directory
> /sys/class/net/brvlan65/bridge: No such file or directory
> /sys/class/net/brvlan65/bridge: No such file or directory
> /sys/class/net/brvlan65/bridge: No such file or directory
> /sys/class/net/brvlan65/bridge: No such file or directory
> /sys/class/net/brvlan65/bridge: No such file or directory
> /sys/class/net/brvlan65/bridge: No such file or directory
> /sys/class/net/brvlan65/bridge: No such file or directory
> /sys/class/net/brvlan65/bridge: No such file or directory
> 0000.001cc4ab3add       no
>
> But /sys/class/net/brvlan65/bridge actually contains something...???
>
> # ll /sys/class/net/brvlan65/bridge
> total 0
> -rw-r--r-- 1 root root 4096 Jul 25 16:24 ageing_time
> -r--r--r-- 1 root root 4096 Jul 25 16:24 bridge_id
> -rw-r--r-- 1 root root 4096 Jul 25 16:24 forward_delay
> -r--r--r-- 1 root root 4096 Jul 25 16:24 gc_timer
> -rw-r--r-- 1 root root 4096 Jul 25 16:25 group_addr
> -rw-r--r-- 1 root root 4096 Jul 25 16:24 hello_time
> -r--r--r-- 1 root root 4096 Jul 25 16:24 hello_timer
> -rw-r--r-- 1 root root 4096 Jul 25 16:24 max_age
> -rw-r--r-- 1 root root 4096 Jul 25 16:25 priority
> -r--r--r-- 1 root root 4096 Jul 25 16:24 root_id
> -r--r--r-- 1 root root 4096 Jul 25 16:24 root_path_cost
> -r--r--r-- 1 root root 4096 Jul 25 16:24 root_port
> -rw-r--r-- 1 root root 4096 Jul 25 16:24 stp_state
> -r--r--r-- 1 root root 4096 Jul 25 16:24 tcn_timer
> -r--r--r-- 1 root root 4096 Jul 25 16:24 topology_change
> -r--r--r-- 1 root root 4096 Jul 25 16:24 topology_change_detected
> -r--r--r-- 1 root root 4096 Jul 25 16:24 topology_change_timer
>
> ovsdb-server.log
> 2012-07-25T14:23:34Z|00001|vlog|INFO|opened log file
> /var/log/openvswitch/ovsdb-server.log
>
> ovs-brcompatd.log
> 2012-07-25T14:23:34Z|00001|vlog|INFO|opened log file
> /var/log/openvswitch/ovs-brcompatd.log
>
> ovs-vswitchd.log
> 2012-07-25T14:23:34Z|00001|vlog|INFO|opened log file
> /var/log/openvswitch/ovs-vswitchd.log
> 2012-07-25T14:23:34Z|00002|reconnect|INFO|unix:/var/run/openvswitch/db.sock:
> connecting...
> 2012-07-25T14:23:34Z|00003|reconnect|INFO|unix:/var/run/openvswitch/db.sock:
> connected
> 2012-07-25T14:23:49Z|00004|ofproto|INFO|using datapath ID 00000023208c01bd
> 2012-07-25T14:23:49Z|00005|bridge|WARN|bridge brvlan65: using default
> bridge Ethernet address fa:96:7a:18:01:4b
> 2012-07-25T14:23:49Z|00006|xenserver|INFO|not running on a XenServer
> 2012-07-25T14:23:49Z|00007|ofproto|INFO|datapath ID changed to 0000fa967a18014b
> 2012-07-25T14:23:49Z|00008|bridge|INFO|bridge brvlan65: added
> interface eth2 on port 1
> 2012-07-25T14:23:49Z|00009|ofproto|INFO|datapath ID changed to 0000001cc4ab3add
> 2012-07-25T14:23:50Z|00010|ofproto_dpif|WARN|bridge brvlan65: dropping
> VLAN 0 packet received on port eth2 not configured for trunking VLAN 0
> 2012-07-25T14:23:50Z|00011|ofproto_dpif|WARN|bridge brvlan65: dropping
> VLAN 0 packet received on port eth2 not configured for trunking VLAN 0
> 2012-07-25T14:23:52Z|00012|ofproto_dpif|WARN|bridge brvlan65: dropping
> VLAN 0 packet received on port eth2 not configured for trunking VLAN 0
> 2012-07-25T14:23:52Z|00013|ofproto_dpif|WARN|bridge brvlan65: dropping
> VLAN 0 packet received on port eth2 not configured for trunking VLAN 0
> 2012-07-25T14:23:53Z|00014|ofproto_dpif|WARN|bridge brvlan65: dropping
> VLAN 1 packet received on port eth2 not configured for trunking VLAN 1
> 2012-07-25T14:24:52Z|00015|ofproto_dpif|WARN|Dropped 13 log messages
> in last 59 seconds (most recently, 10 seconds ago) due to excessive
> rate
> 2012-07-25T14:24:52Z|00016|ofproto_dpif|WARN|bridge brvlan65: dropping
> VLAN 0 packet received on port eth2 not configured for trunking VLAN 0
> 2012-07-25T14:25:52Z|00017|ofproto_dpif|WARN|Dropped 17 log messages
> in last 60 seconds (most recently, 10 seconds ago) due to excessive
> rate
> 2012-07-25T14:25:52Z|00018|ofproto_dpif|WARN|bridge brvlan65: dropping
> VLAN 0 packet received on port eth2 not configured for trunking VLAN 0
>
> # ovs-dpctl show
> system at brvlan65:
>         lookups: hit:4649 missed:957 lost:0
>         flows: 16
>         port 0: brvlan65 (internal)
>         port 1: eth2
>
> # ovs-vsctl show
> 5a1ec46c-6b24-414c-9b15-53dc2622e724
>     Bridge "brvlan65"
>         Port "eth2"
>             trunks: [65, 66]
>             Interface "eth2"
>         Port "brvlan65"
>             Interface "brvlan65"
>                 type: internal
>     ovs_version: "1.6.1"
>
> # ovs-ofctl show brvlan65
> OFPT_FEATURES_REPLY (xid=0x1): ver:0x1, dpid:0000001cc4ab3add
> n_tables:255, n_buffers:256
> features: capabilities:0xc7, actions:0xfff
>  1(eth2): addr:00:1c:c4:ab:3a:dd
>      config:     0
>      state:      0
>      current:    1GB-FD FIBER AUTO_NEG
>      advertised: 1GB-HD 1GB-FD FIBER AUTO_NEG AUTO_PAUSE
>      supported:  1GB-HD 1GB-FD FIBER AUTO_NEG
>  LOCAL(brvlan65): addr:00:1c:c4:ab:3a:dd
>      config:     0
>      state:      0
> OFPT_GET_CONFIG_REPLY (xid=0x3): frags=normal miss_send_len=0
>
> # ifconfig brvlan65
> brvlan65  Link encap:Ethernet  HWaddr 00:1C:C4:AB:3A:DD
>           UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
>           RX packets:5729 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:1042860 (1018.4 KiB)  TX bytes:0 (0.0 b)
>
> # ifconfig eth2
> eth2      Link encap:Ethernet  HWaddr 00:1C:C4:AB:3A:DD
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:5865 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:1079304 (1.0 MiB)  TX bytes:0 (0.0 b)
>           Interrupt:19
>
>
> started vm with an  e1000 adapter
> and
>     <interface type='bridge'>
>       <mac address='52:54:00:0a:96:e2'/>
>       <source bridge='brvlan65'/>
>       <model type='e1000'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
> function='0x0'/>
>     </interface>
>
> qemu      2944     1 42 17:19 ?        00:02:46 /usr/libexec/qemu-kvm
> -S -M rhel6.3.0 -enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1
> -name tt -uuid 41b300e0-ba33-2374-cb4c-364c812b3209 -nodefconfig
> -nodefaults -chardev
> socket,id=charmonitor,path=/var/lib/libvirt/qemu/tt.monitor,server,nowait
> -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc
> -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2
> -drive file=/dev/VG_VIRT01/tt,if=none,id=drive-virtio-disk0,format=raw,cache=none,aio=native
> -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
> -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw
> -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0
> -netdev tap,fd=22,id=hostnet0 -device
> e1000,netdev=hostnet0,id=net0,mac=52:54:00:0a:96:e2,bus=pci.0,addr=0x3
> -chardev pty,id=charserial0 -device
> isa-serial,chardev=charserial0,id=serial0 -vnc 127.0.0.1:0 -vga cirrus
> -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device
> hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device
> virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6
>
> so in particular I get vnet0
> -netdev tap,fd=22,id=hostnet0 -device
> e1000,netdev=hostnet0,id=net0,mac=52:54:00:0a:96:e2,bus=pci.0,addr=0x3
>
> In virt-manager I see
> host device brvlan65 (empty bridge)
>
> # ll /sys/class/net/brvlan65/brif/
> total 0
>
> Now
> # ovs-vsctl show
> 5a1ec46c-6b24-414c-9b15-53dc2622e724
>     Bridge "brvlan65"
>         Port "eth2"
>             trunks: [65, 66]
>             Interface "eth2"
>         Port "brvlan65"
>             Interface "brvlan65"
>                 type: internal
>         Port "vnet0"
>             Interface "vnet0"
>
> # ovs-ofctl show brvlan65
> OFPT_FEATURES_REPLY (xid=0x1): ver:0x1, dpid:0000001cc4ab3add
> n_tables:255, n_buffers:256
> features: capabilities:0xc7, actions:0xfff
>  1(eth2): addr:00:1c:c4:ab:3a:dd
>      config:     0
>      state:      0
>      current:    1GB-FD FIBER AUTO_NEG
>      advertised: 1GB-HD 1GB-FD FIBER AUTO_NEG AUTO_PAUSE
>      supported:  1GB-HD 1GB-FD FIBER AUTO_NEG
>  5(vnet0): addr:fe:54:00:0a:96:e2
>      config:     0
>      state:      0
>      current:    10MB-FD COPPER
>  LOCAL(brvlan65): addr:00:1c:c4:ab:3a:dd
>      config:     0
>      state:      0
> OFPT_GET_CONFIG_REPLY (xid=0x3): frags=normal miss_send_len=0
>
> # ovs-dpctl show
>
> system at brvlan65:
>         lookups: hit:57688 missed:9067 lost:0
>         flows: 19
>         port 0: brvlan65 (internal)
>         port 1: eth2
>         port 5: vnet0
>
> Before beginning this testing the server was configured with standard
> linux bridging and I had this rules in FORWARD chain
>
> Chain FORWARD (policy ACCEPT)
> target     prot opt source               destination
> ACCEPT     all  --  0.0.0.0/0            192.168.101.0/24    state
> RELATED,ESTABLISHED
> ACCEPT     all  --  192.168.101.0/24     0.0.0.0/0
> ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
> REJECT     all  --  0.0.0.0/0            0.0.0.0/0
> reject-with icmp-port-unreachable
> REJECT     all  --  0.0.0.0/0            0.0.0.0/0
> reject-with icmp-port-unreachable
> ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
> REJECT     all  --  0.0.0.0/0            0.0.0.0/0
> reject-with icmp-port-unreachable
> REJECT     all  --  0.0.0.0/0            0.0.0.0/0
> reject-with icmp-port-unreachable
> ACCEPT     all  --  0.0.0.0/0            192.168.122.0/24    state
> RELATED,ESTABLISHED
> ACCEPT     all  --  192.168.122.0/24     0.0.0.0/0
> ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
> REJECT     all  --  0.0.0.0/0            0.0.0.0/0
> reject-with icmp-port-unreachable
> REJECT     all  --  0.0.0.0/0            0.0.0.0/0
> reject-with icmp-port-unreachable
> ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           PHYSDEV
> match --physdev-is-bridged
> REJECT     all  --  0.0.0.0/0            0.0.0.0/0
> reject-with icmp-host-prohibited
>
> Thanks in advance for your help,
> Gianluca
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> http://openvswitch.org/mailman/listinfo/discuss



More information about the discuss mailing list