# Networking problems with Linux/Solaris under Vmware



## fiftyfour (Nov 30, 2007)

New here, and sorry to enter with such a problematic question...

Anyway, I've got RHEL5 and Solaris 10 running under VMWare Workstation 6.0 on my Windows XP system. It's going great but there's just one problem, and it's the network: I can't connect to hardly any websites, the only exception being www.redhat.com (I have no idea why), and even that doesn't work sometimes.

Networking is set on bridged, which connects to my ADSL router/gateway at 10.1.1.1. Addresses are assigned by DHCP. There is another wireless router on this network. Both are DLink. (I doubt it is a Windows or networking hardware problem, which is eliminated later...)

My desktop is an Athlon 64 3000+, 2gb of RAM. Each virtual machine is allocated 512mb and swap is on.

Since both RHEL and Solaris show exactly the same symptoms, I'll just put one set of the diagnostic data here.

A quick look at ifconfig:


```
[[email protected] ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:64:7C:DC  
          inet addr:10.1.1.5  Bcast:10.255.255.255  Mask:255.0.0.0
          inet6 addr: fe80::20c:29ff:fe64:7cdc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1759 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2039 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1406588 (1.3 MiB)  TX bytes:223739 (218.4 KiB)
          Interrupt:169 Base address:0x2000 

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:2429 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2429 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:3435236 (3.2 MiB)  TX bytes:3435236 (3.2 MiB)
```
Which looks fine. This is the RHEL system, Solaris was assigned to 10.1.1.6 (not an IP problem)

dig:


```
[[email protected] ~]# dig www.google.co.nz

; <<>> DiG 9.3.3rc2 <<>> www.google.co.nz
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44936
;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.co.nz.              IN      A

;; ANSWER SECTION:
www.google.co.nz.       10000   IN      A       74.125.19.99

;; Query time: 8 msec
;; SERVER: 10.1.1.1#53(10.1.1.1)
;; WHEN: Sat Dec  1 21:34:13 2007
;; MSG SIZE  rcvd: 50
```
So the host lookup is alright and the DNS is resolving. Which is also corroborated by Firefox hanging at "Connecting to www.google.nz".

Now I wouldn't be worried, but this is why I'm a bit frustrated:


```
[[email protected] ~]# tracert www.freshrpms.net
traceroute to www.freshrpms.net (195.10.6.66), 30 hops max, 40 byte packets
 1  mygateway1.ar7 (10.1.1.1)  3.080 ms  3.352 ms  4.650 ms
 2  210 (210.55.64.128)  92.254 ms  98.835 ms  111.442 ms
 3  mygateway1.ar7 (10.1.1.1)  5.752 ms  6.176 ms  6.520 ms
[[email protected] ~]#
```
The link just kills itself. Sometimes it hangs too.

I can't update via yum, and also rpm, wget time out. No idea. Moving right along...


```
[[email protected] ~]# ifconfig eth0 flush
flush: Host name lookup failure

[[email protected] ~]# ifconfig eth0 plumb
plumb: Host name lookup failure
```
Nope, doesn't work either.

That's pretty much it. I haven't touched the VMWare settings, and DHCP server is on, everything seems to be fine. I can ping my RHEL system (10.1.1.5) from my Windows system, returning ~1ms.

On Solaris 10:


```
bash-3.00# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
e1000g0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 2
        inet 10.1.1.6 netmask ff000000 broadcast 10.255.255.255
        ether 0:c:29:2d:d7:40
bash-3.00# traceroute www.google.com
traceroute to www.google.com (74.125.19.147), 30 hops max, 40 byte packets
 1  *^C
bash-3.00# traceroute www.google.com
traceroute to www.google.com (74.125.19.147), 30 hops max, 40 byte packets
 1  *^C
bash-3.00# traceroute www.google.com
traceroute to www.google.com (74.125.19.147), 30 hops max, 40 byte packets
 1  mygateway1.ar7 (10.1.1.1)  0.979 ms  1.025 ms  0.725 ms
 2  210-55-64-128.adsl.netgate.net.nz (210.55.64.128)  53.282 ms  46.506 ms  44.980 ms
 3  * * *
 4 ^C
```
The connection times out. Out of about 20 tries, www.google.co.nz pops out about once.

On my windows machine:


```
ping www.google.co.nz

Pinging www.l.google.com [74.125.19.147] with 32 bytes of data:

Reply from 74.125.19.147: bytes=32 time=202ms TTL=244
Reply from 74.125.19.147: bytes=32 time=224ms TTL=246

Ping statistics for 74.125.19.147:
    Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 202ms, Maximum = 224ms, Average = 213ms
Control-C
```
Nothing wrong at all;

To make things even more perplexing, the networking works fine under knoppix, and I connect to anything I would be able to on Windows.

Any ideas?

[edit: -- Vmware tools is also installed in both vm's, if it matters.]


----------



## tomdkat (May 6, 2006)

fiftyfour said:


> I can't update via yum, and also rpm, wget time out. No idea. Moving right along...
> 
> 
> ```
> ...


I don't think "flush" and "plumb" are valid options for the Linux implementation of ifconfig. Those "feel" like options for Solaris (and ilk) but our SPARC5 box is down right now so I can't confirm. I know you can issue "up" and "down" options to ifconfig to vary the specified interface up or down. Sorry I can't provide any more assistance since I haven't played with VMware in years and am not familiar with current implementations.

Could you possibly post the output of a "route" command (maybe route -a) to see how the routing tables are setup on each *nix guest? This might help to determine if the DHCP setup was completed or not. Also, can you post the contents of /etc/resolv.conf?

Peace...


----------



## RobLinux (Nov 7, 2007)

You have a private network address 10.1.1.5 which is bridged. So what software have you set up to translate those addresses into valid Internet ones, that are routable?

Can you run a proxy cache on XP, that your virtual machine connects to and get XP to fetch the files, if it won't do NAT? M$ might have this weird idea about machines being servers or destkops and stuff, and like to charge ppl to the max for "server features".


----------



## fiftyfour (Nov 30, 2007)

@TomDKat:

Sorry about the flush and plumb, after checking they are quite solaris specific. Doing a plumb on solaris just returns that the NIC (I think e1000g0 on my comp) is installed and then it exits.


```
less /etc/resolv.conf:

; generated by /sbin/dhclient-script
nameserver 10.1.1.1
search localdomain


route: (route -a doesn't work)

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
169.254.0.0     *               255.255.0.0     U     0      0        0 eth0
10.0.0.0        *               255.0.0.0       U     0      0        0 eth0
default         mygateway1.ar7  0.0.0.0         UG    0      0        0 eth0
```
Just for the sake of double checking:
[[email protected] ~]# route del default gw mygateway1.ar7 
[[email protected] ~]# route add default gw 10.1.1.1
Returns the same as above.

I also tried pointing the DNS directly to 202.27.158.40 instead of 10.1.1.1, which is the DNS for Telecom NZ/Xtra ADSL. Still does the same thing.

@Rob:

I think it's some VMWare implementation that allocates, DHCP wise, addresses to the vms individually, to form an internal network and then all internet traffic go through the host machine. Or maybe it does some tricks with the router? I'm not too familiar with the specifics of VMWare networking -- sorry. VMWare installs extra network drivers and such -- it's probably handled mostly by itself.

Otherwise I have no more clues than you do.


----------



## tomdkat (May 6, 2006)

Can you post "ipconfig /all" output from Windows to see it's DHCP settings? I wonder if it's getting a private IP like the VMware guests.

Peace...


----------



## RobLinux (Nov 7, 2007)

fiftyfour said:


> I think it's some VMWare implementation that allocates, DHCP wise, addresses to the vms individually, to form an internal network and then all internet traffic go through the host machine. Or maybe it does some tricks with the router? I'm not too familiar with the specifics of VMWare networking -- sorry. VMWare installs extra network drivers and such -- it's probably handled mostly by itself.


I never ran VMware, but a colleauge did (an early version though) and there was a problem, going out beyond the box, may be there's some configuration to permit the "sandboxed" stuff to connect to the net. Something has to do NAT and make it work. Saying it's "Bridged" may mean the XP & VM act like they're on the same net.

Just trying to step back and have the overview taken into consideration, in case it is suddenly obvious, rather than get into details of Linux v Solaris ifconfig commands.

If you had symptoms that, file transfers start, but then stop after a bit and stall, I'd wonder how the Do Not Fragment bit was handled.

You see Solaris & Linux are proper server OSes with decent networking stacks, not "well it works" desktop settings and you can't get a quart in a pint pot without spilling something.

But I just don't trust Windows.... it's probably something simple.


----------



## fiftyfour (Nov 30, 2007)

ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . : mydesktop
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter VMware Network Adapter VMnet8:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : VMware Virtual Ethernet Adapter for
VMnet8
Physical Address. . . . . . . . . : 00-50-56-C0-00-08
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :

Ethernet adapter VMware Network Adapter VMnet1:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : VMware Virtual Ethernet Adapter for
VMnet1
Physical Address. . . . . . . . . : 00-50-56-C0-00-01
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.71.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :

Ethernet adapter Local Connection:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : NVIDIA nForce Networking Controller
Physical Address. . . . . . . . . : 00-15-F2-54-31-23
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 10.1.1.8
Subnet Mask . . . . . . . . . . . : 255.0.0.0
Default Gateway . . . . . . . . . : 10.1.1.1
DNS Servers . . . . . . . . . . . : 202.27.158.40

I've had some IP conflicts (I have no idea what's on with Wi-Fi sometimes) with other family members trying to use the network at the same time so I assigned my Windows desktop's address manually. However DHCP is allowed on the ADSL router.

@Rob

How would I check the Do Not Fragment Bit?

As for Windows networking, well, I'd definitely agree that it is "well it works" on Windows -- while Linux's network stack is a notch more flexible and stable I'd say that there are a few things to catch up, especially wireless (of course, manufacturers usually take Windows as the de facto standard), which can be a huge pain at times. There have been huge improvements but I'd say it still lags behind Windows Zero-conf...well, when zeroconf decides to work. That is, *if* it doesn't hang and needs a few reboots and yanking the wireless switch...

Also, it seems that DHCP is handled by Linux by dhcpd which loads up _after_ ifconfig ups the connection (and registers the previous IP) -- sometimes causing conflicts. I'm not sure whether this is just a configuration problem or not, but it does need a bit fiddling when I'm using Debian.


----------



## RobLinux (Nov 7, 2007)

So you have :

10.1.1.1 - GW Router, assigns all 10.1.1.X addresses via DHCP server
10.1.1.8 - Windows

VMware is an ethernet bridge of a virtual Interface

10.1.1.5 - Linux
10.1.1.5 - Solaris

The 192.168.X.X must be VMware defaults that aren't actually used, as the DHCP client sends packets via broadcast and lease an IP address, from their server. Those interfaces have to be on different networks.

The GW router is doing NAT for you, to the ADSL line.

Because you have partial access, not complete no access, it can't be lack of default gateways, not accessing DNS servers set etc. You can check with, netstat -nr, that you have a default route set :
[email protected]:~> netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
86.1.160.0 * 255.255.252.0 U 0 0 0 eth1
link-local * 255.255.0.0 U 0 0 0 eth0
10.0.0.0 * 255.0.0.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default cpc4-basf4-0-0- 0.0.0.0 UG 0 0 0 eth1
[email protected]:~> netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
86.1.160.0 0.0.0.0 255.255.252.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 86.1.160.1 0.0.0.0 UG 0 0 0 eth1

The first configuration likely error I now see is that you have 2 Dlinks and you don't know about RFC 1918 and Internet routing, so they both most lkely use the same network 10.X.X.X, but actually the WLAN ought to be on a different network if it's routing, and the Wireless D-Link should lease it's 10.1.X.X address via DHCP from the GW Internet router.

So either configure both routers, to use subnet mask, and use 10.1.X.X and 10.9.X.X to seperate your wired, and wireless networks (presuming you didn't configure bridging so that it's all 10.X.X.X for real but then you wouldn't have IP address conflicts would you, and you would have configured seperate address spaces for each DHCP server wouldn't you)!
Or use http://en.wikipedia.org/wiki/Private_network and set the WLAN to be 172.27.X.X or similar.

As is, probably the WLAN D-Link will allocate duplicate IPs by same DHCP alogorithm, every time a wireless devices uses DHCP, so do fix that. You might even have ICMP redirects going on or arp hacks (which I have used), because there's a feature to support clients with broken subnetting. That allows the WLAN router to claim addresses via arp, and be routed to; which if they clash with your wired LAN would lead to unpredictable connections dropping. My guess is the VMware stuff is fairly new, and you have wireless devices which are given 10.1.1.6 & 10.1.1.5 by the 2nd Dlink.

On the main problem, it smelled of IP options to me. The thing is VMware make it look like it's bridiging from what you've shown. I just wonder how they'd avoid the Windows stack, and whether Firewall software is dropping ICMP packets and such that Solaris/Linux need to tune themselves.

See http://lwn.net/Articles/92727/ for an idea of the kind of thing I have in mind. http://people.netfilter.org/~rusty/ipchains/HOWTO-5.html explains the kind of thing firewalls should be passing through.


----------

