Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> could not connect internet
yellowhat
 Posted: Mar 16 2012, 03:13 PM
Quote Post


SLF Member
***

Group: Members
Posts: 76
Member No.: 707
Joined: 18-August 11









My box is SL 6.1 x86 installed at virtualbox hosted by windows 7 x64.

My problem is could not connect internet.

eth0 file is this.

CODE
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
TYPE=Ethernet
IPV4_FAILURE_FATAL=no
IPV6INIT=no
NAME="sl eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
DNS2=168.126.63.2
DNS1=168.126.63.1
USERCTL=no
BOOTPROTO=none
BROADCAST=192.168.0.255
IPADDR=192.168.0.4
NETMASK=255.255.255.0
NETWORK=192.168.0.0
GATEWAY=192.168.0.1
HWADDR=08:00:27:d3:08:db
PREFIX=24
DEFROUTE=yes


and "ifconfig eth0" is here.

QUOTE
[root@localhost Documents]# ifconfig
eth0      Link encap:Ethernet  HWaddr x:x:x:x:x:x
          inet addr:192.168.0.4  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: x::x:x:x:x/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:426 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 cool.gif  TX bytes:24879 (24.2 KiB)



And ping could not work.
QUOTE
[root@localhost Documents]# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
From 192.168.0.4 icmp_seq=1 Destination Host Unreachable
From 192.168.0.4 icmp_seq=2 Destination Host Unreachable


Please let me know how to resolve this problem.

Thanks in advance.
PM
^
geraldf
 Posted: Mar 16 2012, 08:52 PM
Quote Post


SLF Newbie


Group: Members
Posts: 4
Member No.: 1377
Joined: 15-March 12









You have to enable "Bridged Networking" in VirtualBox to get ping working.

Best regards
PM
^
yellowhat
 Posted: Mar 17 2012, 01:00 AM
Quote Post


SLF Member
***

Group: Members
Posts: 76
Member No.: 707
Joined: 18-August 11









QUOTE (geraldf @ Mar 17 2012, 05:52 AM)
You have to enable "Bridged Networking" in VirtualBox to get ping working.

Best regards


Yes, installed "bridged adpter".
PM
^
geraldf
 Posted: Mar 17 2012, 12:47 PM
Quote Post


SLF Newbie


Group: Members
Posts: 4
Member No.: 1377
Joined: 15-March 12









What kind of system is 192.168.0.1?
Your router? Your Win 7 workstation?

Maybe a firewall blocks your ping requests.
PM
^
yellowhat
 Posted: Mar 18 2012, 06:55 AM
Quote Post


SLF Member
***

Group: Members
Posts: 76
Member No.: 707
Joined: 18-August 11









QUOTE (geraldf @ Mar 17 2012, 09:47 PM)
What kind of system is 192.168.0.1?
Your router? Your Win 7 workstation?
Maybe a firewall blocks your ping requests.



The 192.168.0.1 is internet sharing router's gateway adddress.

And this is iptables.

CODE
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Generated by webmin
*mangle
:FORWARD ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
COMMIT
# Completed
# Generated by webmin
*nat
:OUTPUT ACCEPT [0:0]
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
COMMIT
# Completed




PM
^
feedmebits
 Posted: Mar 19 2012, 01:02 PM
Quote Post


SLF Member
***

Group: Members
Posts: 85
Member No.: 953
Joined: 20-October 11









try doing it via dhcp first to see if that works, if you get that to work then try doing static ip.


/etc/sysconfig/network-scripts/ifcfg-eth0

change: NM_CONTROLLED="no" to "yes"
change: ONBOOT="no" to "yes"

add: BOOTPROTO="dhcp"

save

service network restart and try again.

If you're using your windows7 machine as a host and bridging the nic I would think your gateway would need to be your host. Cuz your virtual nic is is connected to your physical nic and from there it goes to your router.


--------------------
user posted image
PM
^
yellowhat
 Posted: Mar 21 2012, 03:37 PM
Quote Post


SLF Member
***

Group: Members
Posts: 76
Member No.: 707
Joined: 18-August 11









feedmebits/

Thanks, but same result.

And I re-installed and upgraded scientific linux 6.1 to 6.2 x86, but still could not connect with internet.

At this time the problem is different.

QUOTE
[root@maestro ~]# service network restart
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:  Device eth0 does not seem to be present, delaying initialization.
                                                          [FAILED]


ifcfg-eth0
CODE
TYPE=Ethernet
BOOTPROTO=static
IPADDR=192.168.0.4
PREFIX=24
GATEWAY=192.168.0.1
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="eth0"
UUID=d279b508-fa23-4f9f-81c8-d98ae0875eab
ONBOOT=yes
HWADDR=08:00:27:AE:64:B2
DNS2=168.126.63.2
DNS1=168.126.63.1
DEVICE=eth0
USERCTL=yes
NM_CONTROLLED="yes"


I disabled host and guest firewalls and vaccines. Actullay this problem came after upgrade of 6.1. Before this proble, I used this net work settings several years.

If downgrading SL to 6.0 or 6.1 is easy, I want to downgrade to 6.0.
PM
^
SFMDS
 Posted: Nov 2 2012, 02:27 AM
Quote Post


SLF Newbie


Group: Members
Posts: 1
Member No.: 2011
Joined: 2-November 12









Was a final solution posted? Could be a missing or wrong MACmissing or wrong MAC. Try these:

ip -o link
/var/log/messages
cd /sys/class/net;ls -al
/var/log/messages
/var/log/secure
/var/log/dmesg

Or you may need to rename it through udev rules.

Cheers,
PM
^
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll