ifconfig

configure a network interface

Set the IP address on eth0 to 192.168.1.102, netmask to 255.255.255.0, and broadcast to 192.168.1.255
copy
314
76
ifconfig eth0 192.168.1.103 netmask 255.255.255.0 broadcast 192.168.1.255Set the IP address on eth0 to 192.168.1.102, netmask to 255.255.255.0, and broadcast to 192.168.1.255

details |

Options:

  • ifconfig broadcast
    If the address argument is given, set the protocol broadcast address for this interface. Otherwise, set (or clear) the IFF_BROADCAST flag for the interface.
  • ifconfig netmaskifconfig
    Set the IP network mask for this interface. This value defaults to the usual class A, B or C network mask (as derived from the interface IP address), but it can be set to any value.