diff --git a/api/bbsim/bbsim.pb.gw.go b/api/bbsim/bbsim.pb.gw.go
index acf8fe9..1826d3b 100644
--- a/api/bbsim/bbsim.pb.gw.go
+++ b/api/bbsim/bbsim.pb.gw.go
@@ -427,6 +427,114 @@
 
 }
 
+func request_BBSim_RestartEapol_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+	var protoReq ONURequest
+	var metadata runtime.ServerMetadata
+
+	var (
+		val string
+		ok  bool
+		err error
+		_   = err
+	)
+
+	val, ok = pathParams["SerialNumber"]
+	if !ok {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "SerialNumber")
+	}
+
+	protoReq.SerialNumber, err = runtime.String(val)
+
+	if err != nil {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "SerialNumber", err)
+	}
+
+	msg, err := client.RestartEapol(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+	return msg, metadata, err
+
+}
+
+func local_request_BBSim_RestartEapol_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+	var protoReq ONURequest
+	var metadata runtime.ServerMetadata
+
+	var (
+		val string
+		ok  bool
+		err error
+		_   = err
+	)
+
+	val, ok = pathParams["SerialNumber"]
+	if !ok {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "SerialNumber")
+	}
+
+	protoReq.SerialNumber, err = runtime.String(val)
+
+	if err != nil {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "SerialNumber", err)
+	}
+
+	msg, err := server.RestartEapol(ctx, &protoReq)
+	return msg, metadata, err
+
+}
+
+func request_BBSim_RestartDhcp_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+	var protoReq ONURequest
+	var metadata runtime.ServerMetadata
+
+	var (
+		val string
+		ok  bool
+		err error
+		_   = err
+	)
+
+	val, ok = pathParams["SerialNumber"]
+	if !ok {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "SerialNumber")
+	}
+
+	protoReq.SerialNumber, err = runtime.String(val)
+
+	if err != nil {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "SerialNumber", err)
+	}
+
+	msg, err := client.RestartDhcp(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+	return msg, metadata, err
+
+}
+
+func local_request_BBSim_RestartDhcp_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+	var protoReq ONURequest
+	var metadata runtime.ServerMetadata
+
+	var (
+		val string
+		ok  bool
+		err error
+		_   = err
+	)
+
+	val, ok = pathParams["SerialNumber"]
+	if !ok {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "SerialNumber")
+	}
+
+	protoReq.SerialNumber, err = runtime.String(val)
+
+	if err != nil {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "SerialNumber", err)
+	}
+
+	msg, err := server.RestartDhcp(ctx, &protoReq)
+	return msg, metadata, err
+
+}
+
 var (
 	filter_BBSim_SetOnuAlarmIndication_0 = &utilities.DoubleArray{Encoding: map[string]int{"SerialNumber": 0, "AlarmType": 1, "Status": 2}, Base: []int{1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 1, 1, 2, 3, 4}}
 )
@@ -725,6 +833,125 @@
 
 }
 
+var (
+	filter_BBSim_ChangeIgmpState_0 = &utilities.DoubleArray{Encoding: map[string]int{"OnuReq": 0, "SerialNumber": 1, "SubActionVal": 2, "GroupAddress": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 1, 1, 3, 4, 5}}
+)
+
+func request_BBSim_ChangeIgmpState_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+	var protoReq IgmpRequest
+	var metadata runtime.ServerMetadata
+
+	var (
+		val string
+		e   int32
+		ok  bool
+		err error
+		_   = err
+	)
+
+	val, ok = pathParams["OnuReq.SerialNumber"]
+	if !ok {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "OnuReq.SerialNumber")
+	}
+
+	err = runtime.PopulateFieldFromPath(&protoReq, "OnuReq.SerialNumber", val)
+
+	if err != nil {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "OnuReq.SerialNumber", err)
+	}
+
+	val, ok = pathParams["SubActionVal"]
+	if !ok {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "SubActionVal")
+	}
+
+	e, err = runtime.Enum(val, SubActionTypes_value)
+
+	if err != nil {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "SubActionVal", err)
+	}
+
+	protoReq.SubActionVal = SubActionTypes(e)
+
+	val, ok = pathParams["GroupAddress"]
+	if !ok {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "GroupAddress")
+	}
+
+	protoReq.GroupAddress, err = runtime.String(val)
+
+	if err != nil {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "GroupAddress", err)
+	}
+
+	if err := req.ParseForm(); err != nil {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+	}
+	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSim_ChangeIgmpState_0); err != nil {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+	}
+
+	msg, err := client.ChangeIgmpState(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+	return msg, metadata, err
+
+}
+
+func local_request_BBSim_ChangeIgmpState_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+	var protoReq IgmpRequest
+	var metadata runtime.ServerMetadata
+
+	var (
+		val string
+		e   int32
+		ok  bool
+		err error
+		_   = err
+	)
+
+	val, ok = pathParams["OnuReq.SerialNumber"]
+	if !ok {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "OnuReq.SerialNumber")
+	}
+
+	err = runtime.PopulateFieldFromPath(&protoReq, "OnuReq.SerialNumber", val)
+
+	if err != nil {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "OnuReq.SerialNumber", err)
+	}
+
+	val, ok = pathParams["SubActionVal"]
+	if !ok {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "SubActionVal")
+	}
+
+	e, err = runtime.Enum(val, SubActionTypes_value)
+
+	if err != nil {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "SubActionVal", err)
+	}
+
+	protoReq.SubActionVal = SubActionTypes(e)
+
+	val, ok = pathParams["GroupAddress"]
+	if !ok {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "GroupAddress")
+	}
+
+	protoReq.GroupAddress, err = runtime.String(val)
+
+	if err != nil {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "GroupAddress", err)
+	}
+
+	if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSim_ChangeIgmpState_0); err != nil {
+		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+	}
+
+	msg, err := server.ChangeIgmpState(ctx, &protoReq)
+	return msg, metadata, err
+
+}
+
 func request_BBSim_GetOnuTrafficSchedulers_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
 	var protoReq ONURequest
 	var metadata runtime.ServerMetadata
@@ -1024,6 +1251,46 @@
 
 	})
 
+	mux.Handle("POST", pattern_BBSim_RestartEapol_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+		ctx, cancel := context.WithCancel(req.Context())
+		defer cancel()
+		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
+		if err != nil {
+			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+			return
+		}
+		resp, md, err := local_request_BBSim_RestartEapol_0(rctx, inboundMarshaler, server, req, pathParams)
+		ctx = runtime.NewServerMetadataContext(ctx, md)
+		if err != nil {
+			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+			return
+		}
+
+		forward_BBSim_RestartEapol_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+	})
+
+	mux.Handle("POST", pattern_BBSim_RestartDhcp_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+		ctx, cancel := context.WithCancel(req.Context())
+		defer cancel()
+		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
+		if err != nil {
+			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+			return
+		}
+		resp, md, err := local_request_BBSim_RestartDhcp_0(rctx, inboundMarshaler, server, req, pathParams)
+		ctx = runtime.NewServerMetadataContext(ctx, md)
+		if err != nil {
+			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+			return
+		}
+
+		forward_BBSim_RestartDhcp_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+	})
+
 	mux.Handle("POST", pattern_BBSim_SetOnuAlarmIndication_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
 		ctx, cancel := context.WithCancel(req.Context())
 		defer cancel()
@@ -1104,6 +1371,26 @@
 
 	})
 
+	mux.Handle("POST", pattern_BBSim_ChangeIgmpState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+		ctx, cancel := context.WithCancel(req.Context())
+		defer cancel()
+		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
+		if err != nil {
+			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+			return
+		}
+		resp, md, err := local_request_BBSim_ChangeIgmpState_0(rctx, inboundMarshaler, server, req, pathParams)
+		ctx = runtime.NewServerMetadataContext(ctx, md)
+		if err != nil {
+			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+			return
+		}
+
+		forward_BBSim_ChangeIgmpState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+	})
+
 	mux.Handle("GET", pattern_BBSim_GetOnuTrafficSchedulers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
 		ctx, cancel := context.WithCancel(req.Context())
 		defer cancel()
@@ -1405,6 +1692,46 @@
 
 	})
 
+	mux.Handle("POST", pattern_BBSim_RestartEapol_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+		ctx, cancel := context.WithCancel(req.Context())
+		defer cancel()
+		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+		rctx, err := runtime.AnnotateContext(ctx, mux, req)
+		if err != nil {
+			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+			return
+		}
+		resp, md, err := request_BBSim_RestartEapol_0(rctx, inboundMarshaler, client, req, pathParams)
+		ctx = runtime.NewServerMetadataContext(ctx, md)
+		if err != nil {
+			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+			return
+		}
+
+		forward_BBSim_RestartEapol_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+	})
+
+	mux.Handle("POST", pattern_BBSim_RestartDhcp_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+		ctx, cancel := context.WithCancel(req.Context())
+		defer cancel()
+		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+		rctx, err := runtime.AnnotateContext(ctx, mux, req)
+		if err != nil {
+			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+			return
+		}
+		resp, md, err := request_BBSim_RestartDhcp_0(rctx, inboundMarshaler, client, req, pathParams)
+		ctx = runtime.NewServerMetadataContext(ctx, md)
+		if err != nil {
+			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+			return
+		}
+
+		forward_BBSim_RestartDhcp_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+	})
+
 	mux.Handle("POST", pattern_BBSim_SetOnuAlarmIndication_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
 		ctx, cancel := context.WithCancel(req.Context())
 		defer cancel()
@@ -1485,6 +1812,26 @@
 
 	})
 
+	mux.Handle("POST", pattern_BBSim_ChangeIgmpState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+		ctx, cancel := context.WithCancel(req.Context())
+		defer cancel()
+		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+		rctx, err := runtime.AnnotateContext(ctx, mux, req)
+		if err != nil {
+			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+			return
+		}
+		resp, md, err := request_BBSim_ChangeIgmpState_0(rctx, inboundMarshaler, client, req, pathParams)
+		ctx = runtime.NewServerMetadataContext(ctx, md)
+		if err != nil {
+			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+			return
+		}
+
+		forward_BBSim_ChangeIgmpState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+	})
+
 	mux.Handle("GET", pattern_BBSim_GetOnuTrafficSchedulers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
 		ctx, cancel := context.WithCancel(req.Context())
 		defer cancel()
@@ -1533,6 +1880,10 @@
 
 	pattern_BBSim_PoweronONUsOnPON_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"v1", "olt", "port", "PonPortId", "onus"}, "", runtime.AssumeColonVerbOpt(true)))
 
+	pattern_BBSim_RestartEapol_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"v1", "olt", "onus", "SerialNumber", "eapol"}, "", runtime.AssumeColonVerbOpt(true)))
+
+	pattern_BBSim_RestartDhcp_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"v1", "olt", "onus", "SerialNumber", "dhcp"}, "", runtime.AssumeColonVerbOpt(true)))
+
 	pattern_BBSim_SetOnuAlarmIndication_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6}, []string{"v1", "olt", "onus", "SerialNumber", "alarms", "AlarmType", "Status"}, "", runtime.AssumeColonVerbOpt(true)))
 
 	pattern_BBSim_SetOltAlarmIndication_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"v1", "olt", "ports", "InterfaceType", "InterfaceID", "alarms", "los", "Status"}, "", runtime.AssumeColonVerbOpt(true)))
@@ -1541,6 +1892,8 @@
 
 	pattern_BBSim_GetFlows_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "olt", "flows"}, "", runtime.AssumeColonVerbOpt(true)))
 
+	pattern_BBSim_ChangeIgmpState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6}, []string{"v1", "olt", "onus", "OnuReq.SerialNumber", "igmp", "SubActionVal", "GroupAddress"}, "", runtime.AssumeColonVerbOpt(true)))
+
 	pattern_BBSim_GetOnuTrafficSchedulers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"v1", "olt", "onus", "SerialNumber", "trafficschedulers"}, "", runtime.AssumeColonVerbOpt(true)))
 )
 
@@ -1569,6 +1922,10 @@
 
 	forward_BBSim_PoweronONUsOnPON_0 = runtime.ForwardResponseMessage
 
+	forward_BBSim_RestartEapol_0 = runtime.ForwardResponseMessage
+
+	forward_BBSim_RestartDhcp_0 = runtime.ForwardResponseMessage
+
 	forward_BBSim_SetOnuAlarmIndication_0 = runtime.ForwardResponseMessage
 
 	forward_BBSim_SetOltAlarmIndication_0 = runtime.ForwardResponseMessage
@@ -1577,5 +1934,7 @@
 
 	forward_BBSim_GetFlows_1 = runtime.ForwardResponseMessage
 
+	forward_BBSim_ChangeIgmpState_0 = runtime.ForwardResponseMessage
+
 	forward_BBSim_GetOnuTrafficSchedulers_0 = runtime.ForwardResponseMessage
 )
diff --git a/api/bbsim/bbsim.yaml b/api/bbsim/bbsim.yaml
index 5101d08..aacc160 100644
--- a/api/bbsim/bbsim.yaml
+++ b/api/bbsim/bbsim.yaml
@@ -52,6 +52,13 @@
   - selector: bbsim.BBSim.GetOnuTrafficSchedulers
     get: "/v1/olt/onus/{SerialNumber}/trafficschedulers"
 
+  - selector: bbsim.BBSim.RestartEapol
+    post: "/v1/olt/onus/{SerialNumber}/eapol"
+  - selector: bbsim.BBSim.RestartDhcp
+    post: "/v1/olt/onus/{SerialNumber}/dhcp"
+  - selector: bbsim.BBSim.ChangeIgmpState
+    post: "/v1/olt/onus/{OnuReq.SerialNumber}/igmp/{SubActionVal}/{GroupAddress}"
+
   - selector: bbsim.BBSim.SetOnuAlarmIndication
     post: "/v1/olt/onus/{SerialNumber}/alarms/{AlarmType}/{Status}"
   - selector: bbsim.BBSim.SetOltAlarmIndication
diff --git a/docs/swagger/bbsim/bbsim.swagger.json b/docs/swagger/bbsim/bbsim.swagger.json
index 6dbd843..e88ce97 100644
--- a/docs/swagger/bbsim/bbsim.swagger.json
+++ b/docs/swagger/bbsim/bbsim.swagger.json
@@ -100,6 +100,39 @@
         ]
       }
     },
+    "/v1/olt/onus/{OnuReq.SerialNumber}/igmp": {
+      "post": {
+        "summary": "Change IGMP state",
+        "operationId": "ChangeIgmpState",
+        "responses": {
+          "200": {
+            "description": "A successful response.",
+            "schema": {
+              "$ref": "#/definitions/bbsimResponse"
+            }
+          }
+        },
+        "parameters": [
+          {
+            "name": "OnuReq.SerialNumber",
+            "in": "path",
+            "required": true,
+            "type": "string"
+          },
+          {
+            "name": "body",
+            "in": "body",
+            "required": true,
+            "schema": {
+              "type": "string"
+            }
+          }
+        ],
+        "tags": [
+          "BBSim"
+        ]
+      }
+    },
     "/v1/olt/onus/{SerialNumber}": {
       "get": {
         "summary": "Get status of an ONU by serial number",
@@ -208,6 +241,56 @@
         ]
       }
     },
+    "/v1/olt/onus/{SerialNumber}/dhcp": {
+      "post": {
+        "summary": "Restart DHCP for ONU",
+        "operationId": "RestartDhcp",
+        "responses": {
+          "200": {
+            "description": "A successful response.",
+            "schema": {
+              "$ref": "#/definitions/bbsimResponse"
+            }
+          }
+        },
+        "parameters": [
+          {
+            "name": "SerialNumber",
+            "in": "path",
+            "required": true,
+            "type": "string"
+          }
+        ],
+        "tags": [
+          "BBSim"
+        ]
+      }
+    },
+    "/v1/olt/onus/{SerialNumber}/eapol": {
+      "post": {
+        "summary": "Restart EAPOL for ONU",
+        "operationId": "RestartEapol",
+        "responses": {
+          "200": {
+            "description": "A successful response.",
+            "schema": {
+              "$ref": "#/definitions/bbsimResponse"
+            }
+          }
+        },
+        "parameters": [
+          {
+            "name": "SerialNumber",
+            "in": "path",
+            "required": true,
+            "type": "string"
+          }
+        ],
+        "tags": [
+          "BBSim"
+        ]
+      }
+    },
     "/v1/olt/onus/{SerialNumber}/flows": {
       "get": {
         "summary": "Get all flows or ONU specific flows",
@@ -808,8 +891,12 @@
           "format": "int32"
         },
         "flow_id": {
-          "type": "integer",
-          "format": "int64"
+          "type": "string",
+          "format": "uint64"
+        },
+        "symmetric_flow_id": {
+          "type": "string",
+          "format": "uint64"
         },
         "flow_type": {
           "type": "string"
@@ -851,6 +938,17 @@
         "tech_profile_id": {
           "type": "integer",
           "format": "int64"
+        },
+        "replicate_flow": {
+          "type": "boolean",
+          "format": "boolean"
+        },
+        "pbit_to_gemport": {
+          "type": "object",
+          "additionalProperties": {
+            "type": "integer",
+            "format": "int64"
+          }
         }
       }
     },
diff --git a/docs/swagger/legacy/bbsim.swagger.json b/docs/swagger/legacy/bbsim.swagger.json
index 81e09f6..1f6b60d 100644
--- a/docs/swagger/legacy/bbsim.swagger.json
+++ b/docs/swagger/legacy/bbsim.swagger.json
@@ -1525,8 +1525,12 @@
           "format": "int32"
         },
         "flow_id": {
-          "type": "integer",
-          "format": "int64"
+          "type": "string",
+          "format": "uint64"
+        },
+        "symmetric_flow_id": {
+          "type": "string",
+          "format": "uint64"
         },
         "flow_type": {
           "type": "string"
@@ -1568,6 +1572,17 @@
         "tech_profile_id": {
           "type": "integer",
           "format": "int64"
+        },
+        "replicate_flow": {
+          "type": "boolean",
+          "format": "boolean"
+        },
+        "pbit_to_gemport": {
+          "type": "object",
+          "additionalProperties": {
+            "type": "integer",
+            "format": "int64"
+          }
         }
       }
     },
diff --git a/internal/bbsim/api/onus_handler.go b/internal/bbsim/api/onus_handler.go
index 2533fa3..276cddb 100644
--- a/internal/bbsim/api/onus_handler.go
+++ b/internal/bbsim/api/onus_handler.go
@@ -234,7 +234,7 @@
 		"OnuSn":        req.OnuReq.SerialNumber,
 		"subAction":    req.SubActionVal,
 		"GroupAddress": req.GroupAddress,
-	}).Infof("Received igmp request for ONU")
+	}).Info("Received igmp request for ONU")
 
 	olt := devices.GetOLT()
 	onu, err := olt.FindOnuBySn(req.OnuReq.SerialNumber)
@@ -242,7 +242,11 @@
 	if err != nil {
 		res.StatusCode = int32(codes.NotFound)
 		res.Message = err.Error()
-		fmt.Println("ONU not found for sending igmp packet.")
+		logger.WithFields(log.Fields{
+			"OnuSn":        req.OnuReq.SerialNumber,
+			"subAction":    req.SubActionVal,
+			"GroupAddress": req.GroupAddress,
+		}).Warn("ONU not found for sending igmp packet.")
 		return res, err
 	} else {
 		event := ""
@@ -286,12 +290,29 @@
 
 		if success {
 			res.StatusCode = int32(codes.OK)
-			res.Message = fmt.Sprintf("Authentication restarted on Services %s for ONU %s.",
-				fmt.Sprintf("%v", startedOn), onu.Sn())
+			if len(startedOn) > 0 {
+				res.Message = fmt.Sprintf("IGMP %s sent on Services %s for ONU %s.",
+					event, fmt.Sprintf("%v", startedOn), onu.Sn())
+			} else {
+				res.Message = "No service requires IGMP"
+			}
+			logger.WithFields(log.Fields{
+				"OnuSn":        req.OnuReq.SerialNumber,
+				"subAction":    req.SubActionVal,
+				"GroupAddress": req.GroupAddress,
+				"Message":      res.Message,
+			}).Info("Processed IGMP request for ONU")
 		} else {
 			res.StatusCode = int32(codes.FailedPrecondition)
 			res.Message = fmt.Sprintf("%v", errors)
+			logger.WithFields(log.Fields{
+				"OnuSn":        req.OnuReq.SerialNumber,
+				"subAction":    req.SubActionVal,
+				"GroupAddress": req.GroupAddress,
+				"Message":      res.Message,
+			}).Error("Error while processing IGMP request for ONU")
 		}
+
 	}
 
 	return res, nil
@@ -337,11 +358,24 @@
 
 	if success {
 		res.StatusCode = int32(codes.OK)
-		res.Message = fmt.Sprintf("Authentication restarted on Services %s for ONU %s.",
-			fmt.Sprintf("%v", startedOn), onu.Sn())
+		if len(startedOn) > 0 {
+			res.Message = fmt.Sprintf("Authentication restarted on Services %s for ONU %s.",
+				fmt.Sprintf("%v", startedOn), onu.Sn())
+		} else {
+			res.Message = "No service requires EAPOL"
+		}
+
+		logger.WithFields(log.Fields{
+			"OnuSn":   req.SerialNumber,
+			"Message": res.Message,
+		}).Info("Processed EAPOL restart request for ONU")
 	} else {
 		res.StatusCode = int32(codes.FailedPrecondition)
 		res.Message = fmt.Sprintf("%v", errors)
+		logger.WithFields(log.Fields{
+			"OnuSn":   req.SerialNumber,
+			"Message": res.Message,
+		}).Error("Error while processing DHCP restart request for ONU")
 	}
 
 	return res, nil
@@ -388,11 +422,24 @@
 
 	if success {
 		res.StatusCode = int32(codes.OK)
-		res.Message = fmt.Sprintf("DHCP restarted on Services %s for ONU %s.",
-			fmt.Sprintf("%v", startedOn), onu.Sn())
+		if len(startedOn) > 0 {
+			res.Message = fmt.Sprintf("DHCP restarted on Services %s for ONU %s.",
+				fmt.Sprintf("%v", startedOn), onu.Sn())
+
+		} else {
+			res.Message = "No service requires DHCP"
+		}
+		logger.WithFields(log.Fields{
+			"OnuSn":   req.SerialNumber,
+			"Message": res.Message,
+		}).Info("Processed DHCP restart request for ONU")
 	} else {
 		res.StatusCode = int32(codes.FailedPrecondition)
 		res.Message = fmt.Sprintf("%v", errors)
+		logger.WithFields(log.Fields{
+			"OnuSn":   req.SerialNumber,
+			"Message": res.Message,
+		}).Error("Error while processing DHCP restart request for ONU")
 	}
 
 	return res, nil
