We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now


Linux Network settings

smetechit asked
Medium Priority
Last Modified: 2012-06-27

In my work network, I have dual system laptop (Windows 7 and OpenSUSE 11.4)
I can connect to internet from Windows 7 using the below settings:
 Windows 7 network settings that works
But I have problem connecting to internet from OpenSUSE 11.4 with the same settings shown below:

 Linux Network settings IP Linux Network settings DNS Linux Network settings Gateway
Pinging the default gateway returns the below message
> From icmp_seq=2 Destination Host Unreachable.
Watch Question

First you need test is your network works ok.
Post output of these commands please.



ping www.com


netstat -nr

Open in new window

Could you please show us output of below given commands from linux.

# ifconfig -a

# cat /etc/resolve.conf

# route -n

and also run the below given command in windows machine and paste the output.

ipconfig /all
Sikhumbuzo NtsadaIT Administration

You can select DHCP and get an IP address, then ping other PCs on the network, if all work use those setting as your static IP settings.

You can check your IP by typing:

You can check the default gateway by typing:
route -n
If you are not able to ping the gateway, its probably the IP/subnet mask / or NIC card


above file has all the networking settings except for DNS.  Cross check the above file for you ip and dns and default gateway.

DNS settings are in /etc/resolv.conf



attached are results of requested commands from Linux and Windows
Sikhumbuzo NtsadaIT Administration

inet addr: >> inet addr:

Try that.

Remove br0 interface, it could help you.
Most Valuable Expert 2015

If you can ping IP's (not domain names) on the internet, like (google.com), then you probably have a problem the name servers. Try adding the subnet to the routing table.

I have seen that you are not able to ping the gateway itself and network settings on both the hosts are looks fine. But It might have a issue of your bridge interface so could you please execute the below given command and then try to ping the gateway.

# ifconfig br0 netmask up

# ping

If you still face the same issue, then give us output of below given command.

# ethtool eth0
Cant see your gateway configured; can you paste the content of the following file



I run  ifconfig br0 netmask up
without any message output

below is the result of pining

PING ( 56(84) bytes of data.
From icmp_seq=3 Destination Host Unreachable
From icmp_seq=4 Destination Host Unreachable
From icmp_seq=7 Destination Host Unreachable
From icmp_seq=8 Destination Host Unreachable

Attached is the output of ethtool eth0

ethtoll's output looks fine to me.

Could you please execute below given command and try to ping the gateway.

# ip route delete default
# ip route add default via src

If you still face the same issue then try to get down the bridge interface br0 and then try again.

# ifconfig br0 down

and ping the gateway.
Sikhumbuzo NtsadaIT Administration

Have tried DHCP on this PC and restarted?
Are you running IPTables?

# iptables -F

This will flush them.

Previous suggestion of bringing down the br0 interface I agree with, however your default route already shows eth0, so I don't see that as an issue.

# arp -an

See if this is populated with the arp traffic from other devices on your network. See if you see an entry for your gateway IP in the list. You should at least see your own IP and MAC in the list.

If you do see the gateway IP and MAC in the list, try:

# arping

Similar to PING, but uses ARP packets instead of ICMP. Do you get a reply?
If all of the above fails, my last resort is a NIC driver issue in SUSE, but with the TX and RX counters incrementing in your ifconfig output, I don't think that's the issue, either.

Keep in mind that other IP addresses on the internet begin with 172, so you won't be able to access those. Reserved addresses per RFC1918 are,, This would give you through as private addresses. Just a word of advice.
Just read your ipconfig output... you're not running SUSE inside VirtualBox, are you? If so, you're using the wrong network config for this VM....


I am attaching the file /etc/sysconfig/network/ifcfg-eth0

For upanwar,
I run ip route delete default
then ip route add default via src
both commands have no output
ping is still not working (Destination Host Unreachable).
then I run  ifconfig br0 down
and pinging still replies Destination Host Unreachable.

Most Valuable Expert 2015

The ipconfig output is from windows the windows system, not the Linux system.

Have you tried adding the 10.0.0.x subnet to the routing table, and have you tried pinging the google IP I posted earlier? Also ignore the br0 interface for the moment, eth0 is the important one.

Since the gateway itself is not reachable then how can we ping the google or other IPs.
Most Valuable Expert 2015

If I'm not mistaken he was trying to get to the gateway using br0, and that is probably the wireless adapter which probably hasn't been associated with a wireless router ot access point yet. That's why I want him to forget that adapter for the moment, if possible turn the wireless NIC off using the switch or function keys or whatever is available on that PC so it doesn't add itself to the problem.

In my opinion the DNS servers can't be reached because they are on a different network than the actual NIC is on.

Personally I'd support the other idea of using DHCP, and if a static IP is needed reserve those IP's directly on the DHCP server, as that makes management of those static IP's much more simple since it is centrally organized. But for that you will of course have to be in charge of the DHCP server (or get the IT dep to reserve those addresses for your MAC address).
Unlock this solution and get a sample of our free trial.
(No credit card required)


Hi upanwar,

The gatway is reachable now, see commands result below:
 snapshot of terminal showing commands and results
But I still can not access internet.

Now could you please execute the below given command and paste the output.

nslookup yahoo.com

ping yahoo.com


upanwar .. the problem solved and I can browse internet now. It seems I have to run route add default gw after running ifconfig eth0 netmask up

Thanks for all of you

1) why you asked me to change IP other than 233?
2) have I to run these commands every time I restart Linux?
3) regarding question points, I will assign all of 500 points to upanwar only unless upanwar gives another suggestion.

route add default gw after executing it. It sets the route to take your request out.

1. I have to change the ip because I was suspecting a network conflict.

2. You no need to execute these commands everytime after reboot, for the time being you can put them in rc.local.

After reboot fist execute the below given command and paste the output so that we can get a permanent fix.

# ip a

Please paste the output of

# ip -a

after reboot your box so that we can get a permanent fix of your problem.

sorry its.

# ip a


where can I find rc.local?

I am attached results of ip -a before and after running the below commands

# ifdown br0
# ifdown eth0
# ifdown wlan0
# ifconfig eth0 netmask up
# route add default gw



please let me know what was the problem and how do you solved it.

Currently I am in the hospital because we are blessed with a baby girl.

I will get back to you after 3-4 hours.


my congratulations to you .. take your time
The answer is not to modify the rc.local.

The startup scripts should bring up the interfaces you need, assign the IPs, then set the routes. Having to modify the rc.local is a kludge.

In SUSE, if you make the correct entries in the GUI, the IPs and routes are properly set when the interface is brought up. The steps you have taken up to this point lead me to believe that the config files are simply wrong, so let's look at fixing them.

Are you using yast to configure the network, or are you modifying the config files by hand?
Either way, posting the configs so we can look for errors, and disabling the interfaces you aren't using, should resolve your issue. Nothing so far has indicated an issue other than misconfiguration.

Thanks for your congrates.

I was sure that one of the interface is creating problem, so I have asked you to get down all the interfaces.

# ifdown br0
# ifdown eth0
# ifdown wlan0

and then I have asked you to execute command to make the eth0 up only and set the route by.

# ifconfig eth0 netmask up
# route add default gw

Earlier we have tried so many ways to route the traffic from eth0 and we have execute last 2 commands without getting down all the interfaces but no luck, so this time I have asked you to get all the interfaces down.

Now the problem could be with either the bridge interface or the wi-fi interface, most probably yhe culprit is br0, so execute the below given commands to remove that interface and then reboot your system and check your internet without executing all five commands. It should work.

# brctl delif br0 eth0

# brctl delbr br0

If still nothing works then switch-off the wi-fi interface, you should have a switch on your laptop to make it on/off. Everything would be fine.

@LinuxNinja: Thanks for Heads up, I forgot that Its a Suse Box.

smetechit: Since Its a Suse Linux so its dont have rc.local its have /etc/init.d/boot.local for the same.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.