P4 switches not identifying packets as valid Ipv6 packets

16 views
Skip to first unread message

Debobroto Das

unread,
Jan 25, 2020, 6:44:28 PM1/25/20
to P4 brigade
Hello Everyone,

I am simulating a network using mininet. And the switches are implemented in P4. I am using the bmv2 simulator. 
But unfortunately when I run the simulation the p4 switches (stratum bmv2 switches), not identifies the packets as valid ipv6 packet.

To make sure I have added 4 extra exact matching tables,  2 with key to ipv6 src and dst address and 2 with eth src address and dest address. 

table tab1 {
key = {
hdr.ethernet.src_addr: exact;
}
actions = { NoAction; }
}
table tab2 {
key = {
hdr.ethernet.dst_addr: exact;
}
actions = { NoAction; }
}
table tab3 {
key = {
hdr.ipv6.src_addr: exact;
}
actions = { NoAction; }
}
table tab4 {
key = {
hdr.ipv6.dst_addr: exact;
}
actions = { NoAction; }
}

I have enabled debug logs in stratum_bmv2 switches. A sample log is following: I am trying 
mininet> h1p0l0 ping h2p0l0
PING 2001:1:1:1:0000:11:0000:0002(2001:1:1:1:0:11:0:2) 56 data bytes

Both of the switches are connected to p0l0.  Now when I check the logs of this switch I do not see the relevant IPv6 src and destination address. 
an example log is following:


[18:40:21.963] [bmv2] [D] [thread 23828] [934.0] [cxt 0] Table 'tbl_act': miss
[18:40:21.963] [bmv2] [D] [thread 23828] [934.0] [cxt 0] Action entry is act - 
[18:40:21.963] [bmv2] [D] [thread 23828] [934.0] [cxt 0] Looking up key:
* hdr.ethernet.src_addr: 665d6d419006

[18:40:21.963] [bmv2] [D] [thread 23828] [934.0] [cxt 0] Table 'IngressPipeImpl.tab1': miss
[18:40:21.963] [bmv2] [D] [thread 23828] [934.0] [cxt 0] Action entry is NoAction - 
[18:40:21.963] [bmv2] [D] [thread 23828] [934.0] [cxt 0] Looking up key:
* hdr.ethernet.dst_addr: 3333ff000000

[18:40:21.963] [bmv2] [D] [thread 23828] [934.0] [cxt 0] Table 'IngressPipeImpl.tab2': miss
[18:40:21.963] [bmv2] [D] [thread 23828] [934.0] [cxt 0] Action entry is NoAction - 
[18:40:21.963] [bmv2] [D] [thread 23828] [934.0] [cxt 0] Looking up key:
* hdr.ipv6.src_addr   : fe80000000000000645d6dfffe419006

[18:40:21.963] [bmv2] [D] [thread 23828] [934.0] [cxt 0] Table 'IngressPipeImpl.tab3': miss
[18:40:21.963] [bmv2] [D] [thread 23828] [934.0] [cxt 0] Action entry is NoAction - 
[18:40:21.963] [bmv2] [D] [thread 23828] [934.0] [cxt 0] Looking up key:
* hdr.ipv6.dst_addr   : ff0200000000000000000001ff000000

[18:40:21.963] [bmv2] [D] [thread 23828] [934.0] [cxt 0] Table 'IngressPipeImpl.tab4': miss
[18:40:21.963] [bmv2] [D] [thread 23828] [934.0] [cxt 0] Action entry is NoAction - 
[18:40:21.963] [bmv2] [D] [thread 23828] [934.0] [cxt 0] Looking up key:
* hdr.ipv6.src_addr   : fe80000000000000645d6dfffe419006

[18:40:21.963] [bmv2] [D] [thread 23828] [934.0] [cxt 0] Table 'IngressPipeImpl.ndp_reply_table': miss
[18:40:21.963] [bmv2] [D] [thread 23828] [934.0] [cxt 0] Action entry is NoAction - 
[18:40:21.963] [bmv2] [D] [thread 23828] [934.0] [cxt 0] Looking up key:


The problem is, I can not see the relevant ip address of the hosts. It is important for my p4 program, because my p4 program only accepts packets from known IPv6 address. I have checked the relevant flowrules in the tables. But they are ok.

I can not understand why the switch do not get the source ipv6 addresses correctly. Do I need to configure something in mininet? 
Or any other tips to debug? Any kind of help or hint is welcome as I am really stuck in this issue for few days. 

Debobroto Das

unread,
Jan 25, 2020, 6:50:24 PM1/25/20
to P4 brigade
the previous log seems not appropriate. Here is another log 

[18:47:43.298] [bmv2] [D] [thread 23780] [1062.2] [cxt 0] Transmitting packet of size 124 out of port 255
[18:47:43.298] [bmv2] [D] [thread 23774] [1063.0] [cxt 0] Table 'tbl_act': miss
[18:47:43.298] [bmv2] [D] [thread 23780] Transmitting packet-in
[18:47:43.298] [bmv2] [D] [thread 23774] [1063.0] [cxt 0] Action entry is act - 
[18:47:43.298] [bmv2] [D] [thread 23774] [1063.0] [cxt 0] Looking up key:
* hdr.ethernet.src_addr: 02eb02827a29

[18:47:43.298] [bmv2] [D] [thread 23774] [1063.0] [cxt 0] Table 'IngressPipeImpl.tab1': miss
[18:47:43.298] [bmv2] [D] [thread 23774] [1063.0] [cxt 0] Action entry is NoAction - 
[18:47:43.298] [bmv2] [D] [thread 23774] [1063.0] [cxt 0] Looking up key:
* hdr.ethernet.dst_addr: 0180c200000e

[18:47:43.298] [bmv2] [D] [thread 23774] [1063.0] [cxt 0] Table 'IngressPipeImpl.tab2': miss
[18:47:43.298] [bmv2] [D] [thread 23774] [1063.0] [cxt 0] Action entry is NoAction - 
[18:47:43.298] [bmv2] [D] [thread 23774] [1063.0] [cxt 0] Looking up key:
* hdr.ipv6.src_addr   : 00000000000000000000000000000000

[18:47:43.298] [bmv2] [D] [thread 23774] [1063.0] [cxt 0] Table 'IngressPipeImpl.tab3': miss
[18:47:43.298] [bmv2] [D] [thread 23774] [1063.0] [cxt 0] Action entry is NoAction - 
[18:47:43.298] [bmv2] [D] [thread 23774] [1063.0] [cxt 0] Looking up key:
* hdr.ipv6.dst_addr   : 00000000000000000000000000000000

[18:47:43.298] [bmv2] [D] [thread 23774] [1063.0] [cxt 0] Table 'IngressPipeImpl.tab4': miss
[18:47:43.298] [bmv2] [D] [thread 23774] [1063.0] [cxt 0] Action entry is NoAction - 
[18:47:43.298] [bmv2] [D] [thread 23774] [1063.0] [cxt 0] Looking up key:
* hdr.ipv6.src_addr   : 00000000000000000000000000000000

Here seems the packets are even not identified as IPv6 packets. For being sure, I have tried to check "hdr.ipv6.valid()" that also not works.  To me it seems like some how the bmv2 switch is not interpreting the packet as valid ipv6 packet
Reply all
Reply to author
Forward
0 new messages