[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: usage of ifconfig



J.Hwan.Kim wrote:

Hi, everyone

When I change IP address and netmask via "ifconfig",
the netmask is set incorrectly.

For example, when I command in shell
"ifconfig netmask 255.255.255.0 70.7.44.102",
the IP address 70.7.44.102 is set correctly,
but the netmask is set to 255.0.0.0.


That's the classful netmask for 70.x.x.x.

I've never seen ifconfig used without an interface specified before (other than to print current settings), but a quick experiment indicates the netmask needs to go after the ip address:

ifconfig eth0 70.7.4.102 netmask 255.255.255.0

--
Chris Jackson
Shadowcat Systems Ltd.


Reply to: