Last time I had to understand how Cisco EtherSwitch Service Module like NME-16ES-1G-P (SM) communicates with the ISR Platform.
Once you installed the SM on the router you will have GigabitEthernet1/0 interface recognised by the IOS. First of all you have to configure the Gi1/0 interface with IP and no shut it to make a console connection over router to the SM.
You have to issue the following command to make a connection and you are already loged to module:
Router#service-module gigabitEthernet 1/0 session

If SM module or PCs connected to the SM need to communicate with the network outside of router, the SM’s Gi1/0/2 needs to be configured to communicate with the router itself.

Once I have configured the SM G1/0/2 like below:
interface GigabitEthernet1/0/2
description Trunk connection to Router
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 10,20
switchport mode trunk

I have started expierenced issue with the PoE on SM.
You can display the PoE statistics of the SM on the router, this is what I have got:
ROUTER#service-module gigabitEthernet 1/0 status
Service Module is Cisco GigabitEthernet1/0
Service Module supports session via TTY line 66
Service Module is failed
Service Module reset on error is disabled
Service Module status is not available

Hmm, SM is failed 🙂 why? PoE statistics are going over the CDP so maybe we have issue here I wondered. On the other side CDP by default is going over Native VLAN 1 but VLAN 1 is allowed over trunk. I have removed the switchport trunk allowed vlan just in case, and here what I got again :):
ROUTER#service-module gigabitEthernet 1/0 status
Service Module is Cisco GigabitEthernet1/0
Service Module supports session via TTY line 66
Service Module is in Steady state
Service Module reset on error is disabled
Getting status from the Service Module, please wait..
EtherSwitch Service Module with 16 PoE FE ports and 1 GE port
System name = SWITCH
Model string = NME-16ES-1G-P
System board ID = 0x18
Base MAC addr = 0017.5aa5.c480
Switch number = 1
System uptime = 0 days, 14 hours, 11 minutes, 21 seconds
Software Details:
Operating System = Cisco C3750 IOS Software
Vesrion = 12.2(44)SE6
Major version = 1
Minor Vesrion = 38
Image path = flash:c3750-ipbasek9-mz.122-44.SE6.bin

wow, is working fine now. Once I’ve configured trunk in the below manner it is working fine two. If you have any thougths about it or you have reference ID for this bug let me know please :). Enjoy!
interface GigabitEthernet1/0/2
description Trunk connection to Router
switchport trunk encapsulation dot1q
switchport trunk native vlan 10
switchport trunk allowed vlan 10,20
switchport mode trunk