How to get network in Zone/Brandz?
I have tried Zones/Brandz with ZFS and it is veeeeery neat. However I have problems with setting up the network. After messing around in a clone, I got network working sometimes. Other times, not.
For Zones I config network by login with "zlogin -C myzone" and then it starts "sys-unconfig" and asks me questions. Or else I could manually start "sys-unconfig". I can ping and browse the web. For Brandz, I config network by starting in the Centos clone, the GUI desktop with command: startx -- /usr/X11R6/bin/Xnest :1 And then the linux desktop starts, and I can configure network via: start button - system settings - network. And I can browse the web and ping everything. But when I reboot Solaris, the network in my zones doesnt work correctly anymore. I can ping each zone on my computer, but I cannot ping an external website. Why is that? Must I somehow modify the global zone? Must I add all zones in /etc/hosts? Must I enable a service? Is there a list of files to edit, somewhere? |
A zone network configuration is normally preserved between reboots. Check the /etc/sysconfig/network and /etc/nsswitch.conf files.
Are the brandz and the global zone on the same network ? |
It seems that Ive configured my Solaris network errorneously from the first start. I have DHCP and dynamical IP. Instead of messing with /etc/hosts etc files, I just did an "sys-unconfig" and answered YES on the DHCP question. And everything worked (I tried "ifconfig -a dhcp start" or something similar command).
Regarding Zones, it seems that the network is functioning properly now. Regarding BrandZ, Ive struggled around a bit more and can get the network to work when I do a new install and config of CentOS. But when I reboot the computer I have problems with the BrandZ network, it doesnt work. If they are on the same network, I dont know. For my Brandz I chose 192.168.0.210 when configuring it with zonecfg command. When booting it and logging in for the first time with "zlogin -C myzone" I answered yes on DNS name service and configured it. My global zone has no /etc/sysconfig/network file, here is nsswitch.conf: passwd: files group: files #hosts: files # Commented out by DHCP hosts: files dns # Added by DHCP #ipnodes: files # Commented out by DHCP ipnodes: files dns # Added by DHCP networks: files protocols: files rpc: files ethers: files netmasks: files bootparams: files publickey: files # At present there isn't a 'files' backend for netgroup; the system will # figure it out pretty quickly, and won't use netgroups at all. netgroup: files automount: files aliases: files services: files printers: user files auth_attr: files prof_attr: files project: files tnrhtp: files tnrhdb: files and my BrandZ: /etc/sysconfig/network NETWORKING=yes HOSTNAME=myzone /etc/nsswitch.conf passwd: files nis shadow: files nis group: files nis #hosts: db files nisplus nis dns hosts: files nis dns # Example - obey only what nisplus tells us... #services: nisplus [NOTFOUND=return] files #networks: nisplus [NOTFOUND=return] files #protocols: nisplus [NOTFOUND=return] files #rpc: nisplus [NOTFOUND=return] files #ethers: nisplus [NOTFOUND=return] files #netmasks: nisplus [NOTFOUND=return] files bootparams: nisplus [NOTFOUND=return] files ethers: files netmasks: files networks: files protocols: files nis rpc: files services: files nis netgroup: files nis publickey: nisplus automount: files nis aliases: files nisplus |
I dont get it. One minute after I posted, I tried to ping from BrandZ again, and now it worked to ping. The network is functioning in BrandZ. Is there some time limit somewhere in Brandz?
|
No limitation I'm aware of.
Are the NIS properly configured ? |
Quote:
I only configured DHCP in the global zone, and DNS in Zones. All this via sys-unconfig. Now I added all zones and brandz to global zone, /etc/hosts. Is there some time limit in /etc/hosts or something like that? It waits 30secs, and then continues? |
Quote:
You can simply remove the nis keyword everywhere it appears in the Linux /etc/nsswitch.conf file. |
I have removed all "nis" entries. But still it doesnt work upon boot. If I wait 10 minutes or so, the network suddenly works.
The "nisplus" things doesnt interfere? Should I remove them too? EDIT: I dont get it. The Solaris Zones have the same problem. They dont work upon boot. I must have forgot something? |
Can you give details about the how the network doesn't work with your zones ?
On the global zone, run "ifconfig -a" and "netstat -rn" when the problem occur. |
Output with no zones running:
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 vfe0: flags=201004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu 1500 index 2 inet 192.168.0.183 netmask ffffff00 broadcast 192.168.0.255 ether 0:b:6a:b8:e0:d5 lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1 inet6 ::1/128 bash-3.00# netstat -rn Routing Table: IPv4 Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ---------- --------- default 192.168.0.1 UG 1 27 vfe0 192.168.0.0 192.168.0.183 U 1 1 vfe0 127.0.0.1 127.0.0.1 UH 1 316 lo0 Routing Table: IPv6 Destination/Mask Gateway Flags Ref Use If --------------------------- --------------------------- ----- --- ------- ----- ::1 ::1 UH 1 0 lo0 Output in the global zone after starting the solaris zone: ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 lo0:1: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 zone solariszone1 inet 127.0.0.1 netmask ff000000 vfe0: flags=201004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu 1500 index 2 inet 192.168.0.183 netmask ffffff00 broadcast 192.168.0.255 ether 0:b:6a:b8:e0:d5 vfe0:1: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 2 zone solariszone1 inet 192.168.0.210 netmask ffffff00 broadcast 192.168.0.255 lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1 inet6 ::1/128 bash-3.00# netstat -rn Routing Table: IPv4 Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ---------- --------- default 192.168.0.1 UG 1 56 vfe0 192.168.0.0 192.168.0.183 U 1 2 vfe0 127.0.0.1 127.0.0.1 UH 1 316 lo0 Routing Table: IPv6 Destination/Mask Gateway Flags Ref Use If --------------------------- --------------------------- ----- --- ------- ----- ::1 ::1 UH 1 0 lo0 |
I see nothing wrong in your configuration with zolariszone1 running.
You do not tell what command you use that fails when the network isn't working. |
From within the zone I can ping the global zone. But I can not ping any external computer on the internet:
bash-3.00# ping 192.168.0.183 192.168.0.183 is alive bash-3.00# ping www.google.se ^C It just sits and waits here until I break. |
You just need to configure the DNS on your zone for this to work.
Have a look at the /etc/resolv.conf and /etc/nsswitch.conf files on the global zone and use them as a reference for your non global zones. |
It works! I, too, love you! MOAHAHAHAHAHAAAA!!!!
|
All times are GMT -5. The time now is 03:17 PM. |