You are not logged in.

#1 2007-04-07 12:54:18

NeoEx
Member
From: Italy
Registered: 2007-04-07
Posts: 15

Changing ip, netmask and gateway

Hi. I need to upgrade the firmware of my modem, and to do so I have to change these things:

ip: 192.168.1.2
netmask: 255.255.255.0
gateway: 192.168.1.1

So, I've changed in /etc/rc.conf the line eth0="dhcp" in

eth0="eth0 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.1"

and then I issued

# /etc/rc.d/network restart

but I'm not so sure it's right, 'cause if I try to connect to http://192.168.1.1 (which is needed), I can't access to modem web interface.
What's the correct way to change ip, netmask etc?
Thanks.


Linux user #420208

Offline

#2 2007-04-07 13:02:26

_adam_
Member
From: Dora, Alabama
Registered: 2006-05-18
Posts: 94

Re: Changing ip, netmask and gateway

change it to this:

eth0="eth0 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255"

and make sure you have

gateway="default gw 192.168.1.1"
ROUTES=(gateway)

notice that "gateway" on the ROUTES line does not have a "!" in front of it.

Last edited by _adam_ (2007-04-07 13:03:58)

Offline

#3 2007-04-07 16:58:26

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Changing ip, netmask and gateway

To be more accurate about the code:

eth0="eth0 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255"

Sometimes, the eth0 is incorrect because it was entered with "o" instead of "0".

Recheck the entry...it should work!


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#4 2007-04-07 17:14:40

NeoEx
Member
From: Italy
Registered: 2007-04-07
Posts: 15

Re: Changing ip, netmask and gateway

Thank you, that worked!
But... what is 192.168.1.255?


Linux user #420208

Offline

#5 2007-04-07 17:52:01

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Changing ip, netmask and gateway

I believe it is related to your website internet activity.  Google ....ipv4 broadcast..for details.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

Board footer

Powered by FluxBB