12
Getting Start | Korenix
dhcp on WAN interface. To configure LAN port to request an IP address dynamically,
remove the original settings and add the following line.
iface lan inet
dhcp
Default setting for LAN port
Default setting for WAN port
iface lan inet static
address 192.168.10.1
netmask 255.255.255.0
broadcast 192.168.10.255
network 192.168.10.0
iface wan inet dhcp
Default Gateway:
When static IP Address setting is used, add a default gateway is to set another
keyword “gateway”. For example:
iface wan inet static
address
192.168.1.2
netmask
255.255.255.0
broadcast
192.168.1.255
network
192.168.1.0
gateway
192.168.1.1 # This will set default gateway to
#192.168.1.1 on WAN port
2-2-2
Static and Dynamic IP address
After the /etc/network/interfaces file have been modified, issue the following command
to apply the network settings immediately:
/etc/init.d/network restart
2-2-3
Modifying Network Settings over the Network
Same the previous section, IP settings can be modified over the network, too. There is
another way to change the IP address without modifying the file /etc/network/interfaces,
but the new settings will not be saved to the flash disk.