I am able to connect remotely to the machine using SSH, but I cannot ping www.google.com through the machine.I did the following to make sure SSH was enabled (well I know it is, as I am using PuTTy):# svcs sshSTATE          STIME    FMRIonline          9:56:08 svc:/network/ssh:defaultThe machine name is:# uname -aSunOS solaris 5.11 11.1 i86pc i386 i86pcAnd the precise version is:# cat /etc/releaseOracle Solaris 11.1 X86Copyright (c) 1983, 2012, Oracle and/or its affiliates.  All rights reserved.Assembled 19 September 2012I am trying to install gcc, but it cannot contact valid package repository:# pkg install gcc-45pkg: 0/1 catalogs successfully updated:Unable to contact valid package repositoryEncountered the following error(s):Unable to contact any configured publishers.This is likely a network configuration problem.Framework error: code: 6 reason: Couldn't resolve host 'pkg.oracle.com'URL: 'http://pkg.oracle.com/solaris/release' (happened 4 times)I don't understand that SSH can work, but my internet is not open.This is what ifconfig -a returns:# ifconfig -alo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1    inet 127.0.0.1 netmask ff000000net0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2    inet 10.0.11.17 netmask ff000000 broadcast 10.255.255.255    ether 8:0:27:7:ad:7lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1    inet6 ::1/128net0: flags=20002004841<UP,RUNNING,MULTICAST,DHCP,IPv6> mtu 1500 index 2    inet6 fe80::a00:27ff:fe07:ad07/10    ether 8:0:27:7:ad:7net0 IPv4 is the correct IP address that I am using for SSH. The only way I could (possibly) get round it, is if I could edit the gateway and the DNS IP addresses.Any help to get this machine to see the internet, would be greatly appreciated.
Cannot Connect to Internet but can SSH into Solaris x86 (vs. 11)
networking;solaris
The message couldn't resolve host in the output to the pkg command suggests some fundamental misconfiguration of the network stack on the Solaris box. Given that you can connect to it over ssh from another machine on the LAN, we know its networking stack is initialised, and that it is passing packets correctly. The problem is therefore most likely to be due to a name resolution failure, or a missing gateway specification.The simplest way to find out which problem is causing your lack of service, is just to try to ping a machine on the Internet by its IP address. A successful response means that routing is fine, and we then need to look at the name resolution settings on the box. If the ping fails, however, it should give you a reason why.$ ping 8.8.8.8ping: sendto No route to hostIn this case, as you reported above in the comments, ping fails with a message that the network stack couldn't find a route to the remote host. On Solaris, there should be a file, /etc/defaultrouter, which contains the LAN IP address of your gateway machine. If that file doesn't exist, or contains the wrong IP address, that is the cause of your problem. Fix the file, and run route add default 10.0.11.1 to install the new default route in the IP stack now.When it boots, the system will automatically configure a default gateway based on the contents of /etc/defaultrouter - there should be no need to run the route add again manually.