0

Hi, on a linux machine, what command do I have to type to set up the netmask?
And apparently I've heard there is a route command that also has to be input which is something else I don't know about. Can anyone tell me the commands and why it is this route command is necessary

Edited by pyTony: Keep it organized! Moved to Linux forum

4
Contributors
4
Replies
5
Views
5 Years
Discussion Span
Last Post by CimmerianX
1

ifconfig eth0 x.x.x.x(ipaddress) netmask x.x.x.x(subnet mask)
You don't need to "route" anything...

1

You can assign the IP, subnet mask, broadcast address seperately or together with one command:

ifconfig eth0 192.168.1.1
ifconfig eth0 netmask 255.255.255.0
ifconfig eth0 roadcast 192.168.1.255

ifconfig eth0 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255

0

Thanks all for the help.

I was told by a very entrusted source that a route command is necessary... confused :/

0

You wouldn't need to use the route command on a host unless there is more than 1 gateway on the subnet and the host must determine what gateway to use for what destination subnet.

Usually, all traffic for hosts that are not on your same subnet would be sent to the 'default gateway' which then sends along its way.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.