In general, embodiments relate to a method for managing a network device, including receiving an incoming frame originating from a host, where the incoming frame includes
IP address of the host and a
payload specifying information associated with an external
server. The further includes determining, using the
IP address of the host and an
IP address to segment identifier (ID) mapping, that the host is associated with a first segment, in response to the determining, forwarding the incoming frame towards a redirection
server executing on the network device, where the first segment is associated with a first policy and where the first policy specifies that the incoming frame is to be forwarded to the redirection
server. The method further includes receiving a redirection frame including a
uniform resource locator (URL) of a
captive portal, transmitting the redirection frame towards the host, wherein the user of the host is authenticated by the
captive portal based, at least in part, on the redirection frame, and associating, after the user of the host has been authenticated by the
captive portal, the host with a second segment, where the segment second permits the host to access the external server.