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.