default gateway and subnetmask problems

hello!

I’m having some networking problems on my opensuse 10.3.
I’m trying to set my subnetmask (255.255.252.0) and default gateway(192.168.2.4) from yast but after that if i try to see the interface configuration ifconfig I notice that the netmask is set to 255.255.255.0 and in my routing table (netstat -rn) the default route is not set. If I’ll make my configuration from CLI it’s ok.

my ip is 192.168.3.118
my default gateway is 192.168.2.4
my subnet mask is 255.255.252.0

Also when I’ll boot the system all the configurations will load as if I’ll make them from yast. So I have to make them again from CLI.

thanks

ionpetrache wrote:

> I’m having some networking problems on my opensuse 10.3.

Are you using traditional method (ifup) or networkmanager? Are you using
dhcp or static IP?

> I’m trying to set my subnetmask (255.255.252.0) and default
> gateway(192.168.2.4) from yast but after that if i try to see the
> interface configuration ifconfig I notice that the netmask is set to
> 255.255.255.0 and in my routing table (netstat -rn) the default route
> is not set. If I’ll make my configuration from CLI it’s ok.
>
> my ip is 192.168.3.118
> my default gateway is 192.168.2.4
> my subnet mask is 255.255.252.0

If (and only if) using “ifup” (I would recommend it for wired networks) and
static IP, you can try to manually setup by editing these 2 files:


/etc/sysconfig/network/ifcfg-eth0
IPADDR=‘192.168.3.18/22’
Just modify this line, the rest should be fine.
This will setup the IP and subnetmask

/etc/sysconfig/network/routes
default 192.168.2.4 - -
This will configure the gateway


Save the changes, restart the network (rcnetwork restart) and verify the
output (ifconfig eth0).

Greetings,


Camaleón

I’ve changed to ifup (traditional method) and seems to work just fine.

Thanks a lot!