A method for establishing a virtual access node in an optical access network, wherein the method comprises: obtaining , by an access device in a first network, an identifier of a virtual line corresponding to a physical line after receiving a first message from user equipment, wherein the physical line is a physical line between the user equipment and a physical access node ,AN, in the first network, and the virtual line is a logical line between the user equipment and a virtual AN; obtaining , by the access device, configuration information from a configuration server in a second network according to the identifier of the virtual line, wherein the configuration information is used to create the virtual AN; and creating , by the access device, the virtual AN according to the configuration information, wherein the obtaining , by an access device, an identifier of a virtual line corresponding to a physical line comprises: sending , by the access device, a second message to a first server in the first network, wherein the second message comprises an identifier of the physical line; and receiving , by the access device, the identifier of the virtual line that is sent by the first server, or, wherein the obtaining , by an access device, an identifier of a virtual line corresponding to a physical line comprises: obtaining, by the access device, the identifier of the virtual line according to a correspondence and an identifier of the physical line, wherein the correspondence is stored in the access device and comprises the identifier of the physical line and the identifier of the virtual line. obtaining , by an access device in a first network, an identifier of a virtual line corresponding to a physical line after receiving a first message from user equipment, wherein the physical line is a physical line between the user equipment and a physical access node ,AN, in the first network, and the virtual line is a logical line between the user equipment and a virtual AN; obtaining , by the access device, configuration information from a configuration server in a second network according to the identifier of the virtual line, wherein the configuration information is used to create the virtual AN; and creating , by the access device, the virtual AN according to the configuration information, wherein the obtaining , by an access device, an identifier of a virtual line corresponding to a physical line comprises: sending , by the access device, a second message to a first server in the first network, wherein the second message comprises an identifier of the physical line; and receiving , by the access device, the identifier of the virtual line that is sent by the first server, or, wherein the obtaining , by an access device, an identifier of a virtual line corresponding to a physical line comprises: obtaining, by the access device, the identifier of the virtual line according to a correspondence and an identifier of the physical line, wherein the correspondence is stored in the access device and comprises the identifier of the physical line and the identifier of the virtual line. sending , by the access device, a second message to a first server in the first network, wherein the second message comprises an identifier of the physical line; and receiving , by the access device, the identifier of the virtual line that is sent by the first server, or, wherein the obtaining , by an access device, an identifier of a virtual line corresponding to a physical line comprises: obtaining, by the access device, the identifier of the virtual line according to a correspondence and an identifier of the physical line, wherein the correspondence is stored in the access device and comprises the identifier of the physical line and the identifier of the virtual line. <EOS>