Network apparatus and network address translation configuration method

Information

  • Patent Application
  • 20070253433
  • Publication Number
    20070253433
  • Date Filed
    October 17, 2006
    18 years ago
  • Date Published
    November 01, 2007
    17 years ago
Abstract
A network apparatus (10) for network address translation (NAT) configuration includes a web server (200), a wide area network (WAN) setting module (300), a dynamic host configuration protocol (DHCP) setting module (400), and an NAT setting module (500). The web server receives a WAN protocol message and an easy-mode enable message. The WAN setting module sets the WAN protocol message. The DHCP setting module sets DHCP predefined information according to the easy-mode enable message. The NAT setting module sets NAT predefined information according to the easy-mode enable message. The setting results of the WAN setting module, the DHCP setting module, and the NAT setting module are executed to complete the NAT configuration of the network apparatus. An NAT configuration method thereof is also provided.
Description

BRIEF DESCRIPTION OF THE DRAWINGS


FIG. 1 is a schematic block diagram of functional modules of a network apparatus of an exemplary embodiment of the present invention;



FIG. 2 is a diagram illustrating a forwarding rule table of another exemplary embodiment of the present invention;



FIG. 3 is a flowchart of a network address translation (NAT) configuration method of a further exemplary embodiment of the present invention; and



FIG. 4 is a detailed flowchart of the NAT configuration method of FIG. 3.





DETAILED DESCRIPTION OF THE INVENTION


FIG. 1 is a schematic block diagram of functional modules of a network apparatus 10 of an exemplary embodiment of the present invention. In the exemplary embodiment, the network apparatus 10 may be an integrated access device (IAD), a router, a modem, or other network apparatus with an NAT function. The network apparatus 10 is automatic and does not require manually setting a dynamic host configuration protocol (DHCP) server and a network address translation (NAT), and provides users an easy and fast way to configure the NAT, thereby easily acquiring a network service.


The network apparatus 10 includes a user interface 100, a web server 200, a wide area network (WAN) setting module 300, a DHCP setting module 400, an NAT setting module 500, a storage module 600, and a system configuration module 700.


The storage module 600 includes DHCP predefined information and NAT predefined information. In the exemplary embodiment, the DHCP predefined information includes local area network (LAN) Internet protocol (IP) address information, DHCP server enable information, DHCP server pool start/end address information, and DHCP lease time information. Accordingly, the DHCP setting module 400 can set an LAN IP address, enable a DHCP server, set DHCP server pool start/end addresses, and set a DHCP lease time according to the DHCP predefined information. In this embodiment, the DHCP server pool includes only one IP address. The IP address is assigned to a personal computer first connected to the network apparatus 10 at an LAN side of the network apparatus 10.


The NAT predefined information includes NAT enable information and a forwarding rule table 610. Accordingly, the NAT setting module 500 can enable an NAT and set the forwarding rule table 610 according to the NAT predefined information. In this embodiment, all user datagram protocol (UDP)/transport control protocol (TCP) packets can be forwarded to the one IP address in the DHCP server pool aside from packets belonging to the network apparatus 10 according to the forwarding rule table 610 of the storage module 600.



FIG. 2 is a diagram illustrating the forwarding rule table 610 of an exemplary embodiment of the present invention. The forwarding rule table 610 includes an identifier (ID) field, an interface field, a forward port start (FPS) field, a forward port end (FPE) filed, a type field, a server IP field, a server port field, and a protocol field. By setting the fields of the forwarding rule table 610, the network apparatus 10 can forward all UDP/TCP packets to the one IP address in the DHCP server pool aside from packets belonging to the network apparatus 10.


For example, if the LAN IP address is 192.168.1.1, the DHCP server start and end addresses are both 192.168.1.2 (namely the one IP address in the DHCP server pool), and the DHCP lease time is 86400 seconds, the network apparatus 10 can forward all UDP/TCP packets to the IP address 192.168.1.2 in the DHCP server pool aside from packets with UDP port 69 or TCP port 1287 from an interface ppp0 (point-to-point protocol 0), according to the settings of the fields of the forwarding rule table 610 of FIG. 2. The packets with UDP port 69 or TCP port 1287 from the interface ppp0 belongs to the network apparatus 10.


Referring again to FIG. 1, the user interface 100 receives a WAN protocol message and an easy-mode enable message, and transmits the WAN protocol message and the easy-mode enable message to the web server 200. In the exemplary embodiment, the WAN protocol message includes point to point over Ethernet (PPPoE) information, a username, and a password.


In other embodiments, the WAN protocol message may include other protocol information, such as DHCP, static IP addresses.


In the exemplary embodiment, the user interface 100 includes an input device 110, for receiving the easy-mode enable message. In this embodiment, when a user inputs the WAN protocol message to the user interface 100 and presses the input device 110 such as a button, the web server 200 receives the WAN protocol message and the easy-mode enable message from the user interface 100. Then, the web server 200 transmits the WAN protocol message to the WAN setting module 300, and transmits the easy-mode enable message to the DHCP setting module 400 and the NAT setting module 500.


The WAN setting module 300 sets the WAN protocol message. In the exemplary embodiment, the WAN setting module 300 receives the WAN protocol message from the web server 200, and sets the WAN protocol message such as the PPPoE, the username, and the password.


The DHCP setting module 400 sets the DHCP predefined information according to the easy-mode enable message. In the exemplary embodiment, the DHCP setting module 400 receives the easy-mode enable message from the web server 200, reads and sets the DHCP predefined information according to the easy-mode enable message, including steps of setting the LAN IP address, enabling the DHCP server, and setting the DHCP server start/end addresses, and setting the DHCP lease time.


The NAT setting module 500 sets the NAT predefined information according to the easy-mode enable message. In the exemplary embodiment, the NAT setting module 500 receives the easy-mode enable message from the web server 200, reads and sets the NAT predefined information according to the easy-mode enable message, including steps of enabling the NAT and setting the forwarding rule table 610. Finally, the setting results of the WAN setting module 300, the DHCP setting module 400, and the NAT setting module 500 are executed to complete the NAT configuration of the network apparatus 10.


The system configuration module 700 stores and executes the setting results of the WAN setting module 300, the DHCP setting module 400, and the NAT setting module 500 to complete the NAT configuration. In the exemplary embodiment, after the settings of the WAN setting module 300, the DHCP setting module 400, and the NAT setting module 500 are completed, the network apparatus 10 will be rebooted to execute the setting results, thereby completing the NAT configuration of the network apparatus 10.



FIG. 3 is a flowchart of an NAT configuration method of an exemplary embodiment of the present invention.


In step S300, the web server 200 receives a WAN protocol message and an easy-mode enable message via the user interface 100.


In step S302, the WAN setting module 300 sets the WAN protocol message, including information such as a PPPoE, a username, and a password.


In step S304, the DHCP setting module 400 sets DHCP predefined information according to the easy-mode enable message.


In step S306, the NAT setting module 500 sets NAT predefined information according to the easy-mode enable message.


In step S308, the system configuration module 700 executes all settings to complete the NAT configuration.



FIG. 4 is a detailed flowchart of the NAT configuration method of FIG. 3. In the exemplary embodiment, the network apparatus 10 is configured as an NAT by using an easy mode.


In step S400, the web server 200 receives a WAN protocol message and an easy-mode enable message from the user interface 100. In the exemplary embodiment, the WAN protocol message includes PPPoE information, a username, and a password.


In step S402, the web server 200 transmits the WAN protocol message and the easy-mode enable message. In the exemplary embodiment, the web server 200 transmits the WAN protocol message to the WAN setting module 300, and transmits the easy-mode enable message to the DHCP setting module 400 and the NAT setting module 500.


In step S404, the WAN setting module 300 receives the WAN protocol message from the web server 200, and sets the WAN protocol message. That is, the WAN setting module 300 sets the PPPoE, the username, and the password.


In step S406, the DHCP setting module 400 receives the easy-mode enable message from the web server 200.


In step S408, the DHCP setting module 400 reads and sets DHCP predefined information. In the exemplary embodiment, the DHCP setting module 400 reads the DHCP predefined information according to the easy-mode enable message, and then sets the predefined information, namely setting an LAN IP address, enabling a DHCP server, setting DHCP server start/end addresses, and setting a DHCP lease time.


In step S410, the NAT setting module 500 receives the easy-mode enable message from the web server 200.


In step S412, the NAT setting module 500 reads and sets NAT predefined information. In the exemplary embodiment, the NAT setting module 500 reads the NAT predefined information according to the easy-mode enable message, and then sets the NAT predefined information, namely enabling an NAT and setting the forwarding rule table 610.


In step S414, the system configuration module 700 executes all settings to complete the NAT configuration.


After the NAT configuration of the network apparatus 10, the network apparatus 10 will be rebooted to execute the setting results, thereby acquiring the network service.


Thus, the network apparatus 10 can receive an easy-mode enable message via the input device 110 of the user interface 100, and transmits the easy-mode enable message to the web server 200, thereby easily configuring an NAT.

Claims
  • 1. A network apparatus, for network address translation (NAT) configuration, comprising: a web server, for receiving a wide area network (WAN) protocol message and an easy-mode enable message;a WAN setting module, for setting the WAN protocol message;a dynamic host configuration protocol (DHCP) setting module, for setting DHCP predefined information according to the easy-mode enable message; andan NAT setting module, for setting NAT predefined information according to the easy-mode enable message;wherein, the setting results of the WAN setting module, the DHCP setting module, and the NAT setting module are executed to complete the NAT configuration of the network apparatus.
  • 2. The network apparatus as claimed in claim 1, further comprising a user interface, for receiving the WAN protocol message and the easy-mode enable message, and transmitting the WAN protocol message and the easy-mode enable message to the web server.
  • 3. The network apparatus as claimed in claim 2, wherein the user interface comprises an input device, for receiving the easy-mode enable message.
  • 4. The network apparatus as claimed in claim 1, further comprising a storage module, for storing the DHCP predefined information and the NAT predefined information.
  • 5. The network apparatus as claimed in claim 1, further comprising a system configuration module, for storing and executing the setting results of the WAN setting module, the DHCP setting module, and the NAT setting module.
  • 6. The network apparatus as claimed in claim 1, wherein the WAN protocol message comprises point to point over Ethernet (PPPoE) information.
  • 7. The network apparatus as claimed in claim 1, wherein the DHCP predefined information comprises local area network (LAN) Internet protocol (IP) address information, DHCP server enable information, DHCP server pool start/end address information, and DHCP lease time information.
  • 8. The network apparatus as claimed in claim 7, wherein the DHCP setting module is for setting an LAN IP address, enabling a DHCP server, setting DHCP pool start/end addresses, and setting a DHCP lease time according to the DHCP predefined information.
  • 9. The network apparatus as claimed in claim 7, wherein the DHCP server pool comprises only one IP address.
  • 10. The network apparatus as claimed in claim 9, wherein the NAT predefined information comprises NAT enable information and a forwarding rule table, and the forwarding rule of the forwarding rule table is to forward all user datagram protocol (UDP)/transport control protocol (TCP) packets to the one IP address in the DHCP server pool aside from packets belonging to the network apparatus.
  • 11. The network apparatus as claimed in claim 10, wherein the NAT setting module is for enabling an NAT and setting the forwarding table according to the NAT predefined information.
  • 12. A network address translation (NAT) configuration method, comprising: receiving a wide area network (WAN) protocol message and an easy-mode enable message;setting the WAN protocol message;setting dynamic host configuration protocol (DHCP) predefined information according to the easy-mode enable message;setting NAT predefined information according to the easy-mode enable message; andexecuting all settings to complete the NAT configuration.
  • 13. The NAT configuration method as claimed in claim 12, wherein the DHCP predefined information comprises local area network (LAN) Internet protocol (IP) address information, DHCP server enable information, DHCP server pool start/end address information, and DHCP lease time information.
  • 14. The NAT configuration method as claimed in claim 13, wherein the DHCP server pool comprises only one IP address.
  • 15. The NAT configuration method as claimed in claim 14, wherein the NAT predefined information comprises NAT enable information and a forwarding rule table, and the forwarding rule of the forwarding rule table is to forward all user datagram protocol (UDP)/transport control protocol (TCP) packets to the one IP address in the DHCP server pool aside from packets belonging to a network apparatus.
  • 16. The NAT configuration method as claimed in claim 12, further comprising: transmitting the WAN protocol message and the easy-mode enable message by a web server.
  • 17. The NAT configuration method as claimed in claim 16, wherein the step of setting DHCP predefined information according to the easy-mode enable message comprises: receiving the easy-mode enable message from the web server by a DHCP setting module; andreading and setting the DHCP predefined information by the DHCP setting module.
  • 18. The NAT configuration method as claimed in claim 16, wherein the step of setting NAT predefined information according to the easy-mode enable message comprises: receiving the easy-mode enable message from the web server by an NAT setting module; andreading and setting the predefined information by the NAT setting module.
Priority Claims (1)
Number Date Country Kind
95115372 Apr 2006 TW national