A network system, comprising: a network of node devices configured to handle received packets in accordance with flow tables containing flow entries that define a rule and action for collectively controlling packets as a flow; and a controller configured to register flow entries into the flow tables of the node devices; wherein, when receiving a packet from a terminal connected to a node device, said node device notifies said controller of a set of a source MAC address information and a port number of said packet, the terminal being a source of said packet; and wherein said controller recognizes the current network location of the terminal on the network based on the notification from said node device; wherein said node device includes: means for comparing a set(s) of MAC address information and a port number which are held by said node device with a set of source MAC address information and a port number of said packet, and when the set(s) of the MAC address information and port number which are held by said node device does not match the set of the source MAC address information and port number of said packet, generating a first inquiry packet based on said packet to transmit said first inquiry packet to said controller; and means for comparing the MAC address information held by said node device with a destination MAC address information of said packet, and when the MAC address information held by said node device does not match the destination MAC address information of said packet, generating a second inquiry packet based on said packet to transmit said second inquiry packet to said controller, and wherein said controller includes: means for managing MAC address information of said terminal and a port number indicating a port connected to said terminal, based on contents of said first inquiry packet; and means for updating information held by said node device based on contents of said first and second inquiry packets. a network of node devices configured to handle received packets in accordance with flow tables containing flow entries that define a rule and action for collectively controlling packets as a flow; and a controller configured to register flow entries into the flow tables of the node devices; means for comparing a set(s) of MAC address information and a port number which are held by said node device with a set of source MAC address information and a port number of said packet, and when the set(s) of the MAC address information and port number which are held by said node device does not match the set of the source MAC address information and port number of said packet, generating a first inquiry packet based on said packet to transmit said first inquiry packet to said controller; and means for comparing the MAC address information held by said node device with a destination MAC address information of said packet, and when the MAC address information held by said node device does not match the destination MAC address information of said packet, generating a second inquiry packet based on said packet to transmit said second inquiry packet to said controller, and means for managing MAC address information of said terminal and a port number indicating a port connected to said terminal, based on contents of said first inquiry packet; and means for updating information held by said node device based on contents of said first and second inquiry packets.