How to Enable Internet for Guest Virtual Machine using Datacard Tata Photon. Table of Contents 1) Host, Guest and VBox version.... 2 2) Check your current Host and add 3 rd Adapter to Host windows... 3 3) Now let s start to configure to enable Internet in Guest Solaris.... 6 (a) Add 3 rd Network adapter to Guest Solaris VM and attach to Host-only Adapter as below.... 6 (b) Start the Guest VM Solaris and login with putty to check the newly added Network interface (e1000g2)... 7 4) Configure New IP (192.168.137.10) for Guest Solaris for 3 rd added network interface (e1000g2)... 8 (a) Create a file for new interface (e1000g2) as below, so that IP persist the reboot.... 9 (b) Add the new IP details to /etc/host and name as oratata or (any name)... 9 (c) Add the new net mask to /etc/netmasks file... 9 (d) Add the 3 rd Adapter IP as Default Gateway details to /etc/defaultrouter... 10 (e) add the 3 rd Adapter IP as DNS server or your ISPs DNS server details to /etc/resolv.conf... 10 (f) Add dns keyword after files keyword to /etc/nsswitch.conf... 10 (g) Shutdown the Guest VM Solaris and start again.... 10 (h) Test DNS using dig, if website is responding with provided address/url.... 11 (i) Now open the www.google.com site from Browser.... 12 1 P a g e
1) Host, Guest and VBox version. Host: Windows 7 32 Bit Virtual Box: 4.2.18 r88780 Guest: Solaris 10 2 P a g e
2) Check your current Host and add 3 rd Adapter to Host windows Check existing adapters and Internet / Tata Photon Network IP ================================================== Add one more Host Only Network Adapter to windows: From Virtual Box Manager click File -> Preferences Menu. 3 P a g e
Click add button to add 3 rd Host Only Network Adapter to windows as shown below. 3 rd Host Only Network Adapter is added as shown below. Verify from DOS prompt if the 3 rd Adapter is added. 4 P a g e
Now Let s Share the Tata Photon Network with 3 rd added Adapter. In Windows, Go to -> Control Panel->Network and Internet-> Network and Sharing Centre -> On Left hand side click on Change adapter settings. OR Start -> Run -> type ncpa.cpl -> OK Right click on Tata Indicom -> Click Properties as below Click on sharing tab and select the 3 rd network adapter from drop down as Highlighted below. Also select checkbox allow other network Click on OK above as shown above. 5 P a g e
As above it is asking to change the IP address for 3 rd Adapter i.e. 192.168.137.1 Once you click on Yes as shown above, you will see one more dialog box as below as Internet was ON, and then click OK. Verify the changed IP address for 3 rd adapter from DOS command prompt => ipconfig Now Disconnect the Tata photon and connect again. 3) Now let s start to configure to enable Internet in Guest Solaris. (a) Add 3 rd Network adapter to Guest Solaris VM and attach to Host-only Adapter as below. 6 P a g e
Click on your Solaris Guest VM machine and then click on network as below Change the options as per highlighted/shown below. (b) Start the Guest VM Solaris and login with putty to check the newly added Network interface (e1000g2) 7 P a g e
4) Configure New IP (192.168.137.10) for Guest Solaris for 3 rd added network interface (e1000g2) dladm show-link e1000g0 type: non-vlan mtu: 1500 device: e1000g0 e1000g1 type: non-vlan mtu: 1500 device: e1000g1 e1000g2 type: non-vlan mtu: 1500 device: e1000g2 dladm show-dev e1000g0 link: up speed: 1000 Mbps duplex: full e1000g1 link: up speed: 1000 Mbps duplex: full e1000g2 link: unknown speed: 0 Mbps duplex: half Note: Make sure while configuring the new IP address (192.168.137.10) for interface e1000g2 address should be in the range of 192.168.137.1 which was provided to us while sharing the Tata photon with 3rd adapter. Our New IP for Guest Solaris would be 192.168.137.10. Execute below commands: ------------------------------ dladm show-dev ifconfig e1000g2 plumb up ifconfig e1000g2 ifconfig e1000g2 192.168.137.10 netmask 255.255.255.0 broadcast + up ifconfig e1000g2 8 P a g e
(a) Create a file for new interface (e1000g2) as below, so that IP persist the reboot. ls -ltr /etc/hostname.* -rw-r--r-- 1 root root 38 Oct 12 20:26 /etc/hostname.e1000g0 -rw-r--r-- 1 root root 36 Oct 12 23:44 /etc/hostname.e1000g1 cat /etc/hostname.e1000g0 (This is existing interface file) 192.168.56.2 netmask 255.255.255.0 New ==== vi /etc/hostname.e1000g2 192.168.137.10 netmask 255.255.255.0 cat /etc/hostname.e1000g2 192.168.137.10 netmask 255.255.255.0 -------------------------------------------------------------------------- (b) Add the new IP details to /etc/host and name as oratata or (any name) cat /etc/hosts Internet host table ::1 localhost 127.0.0.1 localhost 192.168.56.2 orasolaris1 loghost 192.168.0.103 oranet loghost 192.168.137.10 oratata -------------------------------------------------------------------------- (c) Add the new net mask to /etc/netmasks file vi /etc/netmasks The netmasks file associates Internet Protocol (IP) address masks with IP network numbers. network-number netmask The term network-number refers to a number obtained from the Internet Network Information Center. Both the network-number and the netmasks are specified in "decimal dot" notation, e.g: 128.32.0.0 255.255.255.0 192.168.56.0 255.255.255.0 192.168.0.0 255.255.255.0 192.168.137.0 255.255.255.0 -------------------------------------------------------------------------- 9 P a g e
(d) Add the 3 rd Adapter IP as Default Gateway details to /etc/defaultrouter Follow any one =============== vi /etc/defaultrouter 192.168.137.1 OR route -p add default 192.168.137.1 add net default: gateway 192.168.137.1 add persistent net default: gateway 192.168.137.1 route -p show persistent: route add default 192.168.137.1 -------------------------------------------------------------------------- (e) add the 3 rd Adapter IP as DNS server or your ISPs DNS server details to /etc/resolv.conf vi /etc/resolv.conf nameserver 192.168.137.1 cat /etc/resolv.conf nameserver 192.168.0.1 nameserver 192.168.137.1 -------------------------------------------------------------------------- (f) Add dns keyword after files keyword to /etc/nsswitch.conf cat /etc/nsswitch.conf grep hosts: "hosts:" and "services:" in this file are used only if the hosts: files vi /etc/nsswitch.conf. hosts: files dns. cat /etc/nsswitch.conf grep dns hosts: files dns (g) Shutdown the Guest VM Solaris and start again. init 0 10 P a g e
(h) Test DNS using dig, if website is responding with provided address/url. ping www.google.com www.google.com is alive dig www.google.com ; <<>> DiG 9.6.1-P3 <<>> www.google.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1800 ;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;www.google.com. IN A ;; ANSWER SECTION: www.google.com. 137 IN A 74.125.128.147 www.google.com. 137 IN A 74.125.128.103 www.google.com. 137 IN A 74.125.128.104 www.google.com. 137 IN A 74.125.128.99 www.google.com. 137 IN A 74.125.128.105 www.google.com. 137 IN A 74.125.128.106 ;; Query time: 93 msec ;; SERVER: 192.168.137.153(192.168.137.1) ;; WHEN: Sun Oct 13 16:32:07 2013 ;; MSG SIZE rcvd: 128 nslookup www.google.com Server: 192.168.137.1 Address: 192.168.137.153 Non-authoritative answer: Name: www.google.com Address: 74.125.128.99 Name: www.google.com Address: 74.125.128.103 Name: www.google.com Address: 74.125.128.105 Name: www.google.com Address: 74.125.128.106 Name: www.google.com Address: 74.125.128.147 Name: www.google.com Address: 74.125.128.104 ping www.yahoo.com www.yahoo.com is alive nslookup www.yahoo.com Server: 192.168.137.1 Address: 192.168.137.153 Non-authoritative answer: www.yahoo.com canonical name = fd-fp3.wg1.b.yahoo.com. fd-fp3.wg1.b.yahoo.com canonical name = ds-fp3.wg1.b.yahoo.com. ds-fp3.wg1.b.yahoo.com canonical name = ds-sg-fp3-lfb.wg1.b.yahoo.com. ds-sg-fp3-lfb.wg1.b.yahoo.com canonical name = ds-sg-fp3.wg1.b.yahoo.com. Name: ds-sg-fp3.wg1.b.yahoo.com Address: 106.10.139.246 11 P a g e
dig www.yahoo.com ; <<>> DiG 9.6.1-P3 <<>> www.yahoo.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2035 ;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;www.yahoo.com. IN A ;; ANSWER SECTION: www.yahoo.com. 116 IN CNAME fd-fp3.wg1.b.yahoo.com. fd-fp3.wg1.b.yahoo.com. 116 IN CNAME ds-fp3.wg1.b.yahoo.com. ds-fp3.wg1.b.yahoo.com. 55 IN CNAME ds-sg-fp3-lfb.wg1.b.yahoo.com. ds-sg-fp3-lfb.wg1.b.yahoo.com. 295 IN CNAME ds-sg-fp3.wg1.b.yahoo.com. ds-sg-fp3.wg1.b.yahoo.com. 53 IN A 106.10.139.246 ;; Query time: 527 msec ;; SERVER: 192.168.137.153(192.168.137.1) ;; WHEN: Sun Oct 13 16:34:08 2013 ;; MSG SIZE rcvd: 147 (i) Now open the www.google.com site from Browser. 12 P a g e
REF ==== http://kenfallon.com/dns-working-but-not-resolving/ $ ping www.google.com ping: unknown host www.google.com The point here is that dig bypasses the host file and goes directly to the dns servers, while ping will obey the Name Service Switch settings as defined in /etc/nsswitch.conf. The solution is simply to edit the file and add the word dns to the line ipnodes: files ipnodes: files dns 13 P a g e
Just For info ============== route -p show persistent: route add default 192.168.137.1 route -p delete default 192.168.137.1 delete net default: gateway 192.168.137.1 delete persistent net default: gateway 192.168.137.1 route -p show No persistent routes are defined 14 P a g e