LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-22-2013, 05:32 AM   #1
keymoo
Member
 
Registered: Jan 2002
Location: UK
Distribution: Desktop - Ubuntu, Server - Debian, CentOS
Posts: 72

Rep: Reputation: 15
No route to host


I moved my CentOS 6.4 virtual machine from one ESXi host to another and updated /etc/sysconfig/network-scripts/ifcfg-eth0, /etc/sysconfig/network-scripts/ifcfg-eth1 and /etc/udev/rules.d/70-persistent-net.rules to reflect the new MAC addresses.

When I power on the network comes up fine and I can run ifconfig and see the network interfaces as up. However look at these commands:

Code:
# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:D4:BD:B0
          inet addr:10.0.0.13  Bcast:10.255.255.255  Mask:255.0.0.0
          inet6 addr: fe80::20c:29ff:fed4:bdb0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:971 errors:0 dropped:0 overruns:0 frame:0
          TX packets:539 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:95302 (93.0 KiB)  TX bytes:63405 (61.9 KiB)

eth1      Link encap:Ethernet  HWaddr 00:0C:29:D4:BD:BA
          inet addr:192.168.0.50  Bcast:192.255.255.255  Mask:255.0.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:57 errors:0 dropped:0 overruns:0 frame:0
          TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5752 (5.6 KiB)  TX bytes:5752 (5.6 KiB)

# nslookup google.com
Server:         10.0.0.6
Address:        10.0.0.6#53

Non-authoritative answer:
Name:   google.com
Address: 173.194.34.137
Name:   google.com
Address: 173.194.34.142
Name:   google.com
Address: 173.194.34.136
Name:   google.com
Address: 173.194.34.128
Name:   google.com
Address: 173.194.34.129
Name:   google.com
Address: 173.194.34.134
Name:   google.com
Address: 173.194.34.131
Name:   google.com
Address: 173.194.34.130
Name:   google.com
Address: 173.194.34.133
Name:   google.com
Address: 173.194.34.135
Name:   google.com
Address: 173.194.34.132


# ping google.com
PING google.com (173.194.34.132) 56(84) bytes of data.
From 192.168.0.50 icmp_seq=2 Destination Host Unreachable
From 192.168.0.50 icmp_seq=3 Destination Host Unreachable
From 192.168.0.50 icmp_seq=4 Destination Host Unreachable
^C
--- google.com ping statistics ---
7 packets transmitted, 0 received, +3 errors, 100% packet loss, time 6406ms
pipe 3


# wget https://s3.amazonaws.com/Minecraft.Download/versions/1.6.4/minecraft_server.1.6.4.jar
--2013-09-22 11:30:24--  https://s3.amazonaws.com/Minecraft.Download/versions/1.6.4/minecraft_server.1.6.4.jar
Resolving s3.amazonaws.com... 176.32.101.82
Connecting to s3.amazonaws.com|176.32.101.82|:443... failed: No route to host.
Any ideas what I need to do to fix?
 
Old 09-22-2013, 06:57 AM   #2
cospengle
Member
 
Registered: Feb 2008
Location: Armidale, NSW, Australia
Distribution: Fedora 8
Posts: 32

Rep: Reputation: 6
Looks like you may have an incorrect default gateway address.

What is the output of the route command?
 
1 members found this post helpful.
Old 09-22-2013, 07:42 AM   #3
keymoo
Member
 
Registered: Jan 2002
Location: UK
Distribution: Desktop - Ubuntu, Server - Debian, CentOS
Posts: 72

Original Poster
Rep: Reputation: 15
Ah ha!, I think you might be right, how do I change that? The default gateway should be 10.0.0.6

Code:
# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
link-local      *               255.255.0.0     U     1002   0        0 eth0
link-local      *               255.255.0.0     U     1003   0        0 eth1
192.0.0.0       *               255.0.0.0       U     0      0        0 eth1
10.0.0.0        *               255.0.0.0       U     0      0        0 eth0
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth1

# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=aluminium.localdomain
GATEWAY=10.0.0.6

Last edited by keymoo; 09-22-2013 at 07:45 AM. Reason: Added /etc/sysconfig/network
 
Old 09-22-2013, 07:51 AM   #4
keymoo
Member
 
Registered: Jan 2002
Location: UK
Distribution: Desktop - Ubuntu, Server - Debian, CentOS
Posts: 72

Original Poster
Rep: Reputation: 15
Fixed it with
Code:
ip route replace default via 10.0.0.6 dev eth0
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
no route to host srinivasmmdl Linux - Newbie 4 09-23-2011 02:40 AM
telnet: Unable to connect to remote host: No route to host grob115 Linux - Networking 3 07-30-2010 10:18 AM
ssh: connect to host .....No route to host soumyacs Linux - Newbie 5 10-27-2009 10:03 AM
no route to host Chocolate Linux - Networking 3 11-22-2006 02:15 PM
No route to host senzoga Linux - Networking 1 07-14-2004 06:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration