Cannot add gateway

Hi,

OS: Solaris 11.2 64bit
IP address: 172.16.10.10
Netmask: 255.255.254.0
Gateway: 172.16.2.254

From windows box, i can set and ping gateway. IP address is same segment with windows box. But on solaris i cannot set gateway.

route add default 172.16.2.254
add net default: gateway 172.16.2.254: Network is unreachable

It's said network is unreacheable. Any idea why?

Thanks.

You might want to consider adding -p to your route command to make it persistent across reboots.

Reboot the host then and check for network connectivity.

Regards
Peasant.

I already put

-p

but still same.

The gateway is in a different subnet... That is why the router is not reachable.

I'd say your netmask is too restrictive. Try allowing two more bits, i.e. 255.255.240.0 .

It not about ip but it's nic. When i change to net1, i can set gateway.

With the settings you provided in your first post, reaching the gateway is just not possible. If you are using different settings on your net1 interface, the output of ifconfig -a might be usefull for us, to figure out what is going on...