Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: KVM & networking question

  1. #1
    Join Date
    Jul 2008
    Beans
    9

    Post KVM & networking question

    I am pretty new to Ubuntu, hope someone can point me in the right direction:

    - I have ubuntu 14.04.2 LTS installed on a machine on my home network, this is the host
    - I am running KVM
    - I have a VM also running Ubuntu 14.04.2 for Apache2, this is the guest
    - I want to host a website in this Web Server that is available from other machines on my home network

    I think I need to use a bridged network interface on my host.

    I went thru the setting up a bridge network section in: https://help.ubuntu.com/community/KVM/Networking

    I can see the web page in a browser in the guest and the host, but not from a separate machine on my home network. Right now I am not using DNS, I just enter the ip address of the guest into the address on the browser.

    I can't ping the guest from the other machine.

    Any ideas what I am missing? I am not sure where to start looking for the problem.

    thanks, in advance, for any help!

    - Derrick

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: KVM & networking question

    What is the IP for the host and the guest? What are the other network settings like netmask, gateway, DNS for each?

    Any firewall settings?

    If you are willing to always use the IP address, fine.
    Or you can have your router run DNS and provide DHCP reservations.
    Or you can modify the /etc/hosts file on every machine in the house.

    I do both. Ansible makes keeping the /etc/hosts files consistent fairly easy.
    Last edited by TheFu; May 6th, 2015 at 10:16 AM.

  3. #3
    Join Date
    Jul 2008
    Beans
    9

    Re: KVM & networking question

    Thanks for responding. Here is info you asked for:

    host
    derrick@derrick-Inspiron-3847:~$ ifconfig
    br0 Link encap:Ethernet HWaddr b0:83:fe:50:13:ee
    inet addr:192.168.0.7 Bcast:192.168.0.255 Mask:255.255.255.0
    inet6 addr: fe80::b283:feff:fe50:13ee/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:45543 errors:0 dropped:0 overruns:0 frame:0
    TX packets:53657 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:11190836 (11.1 MB) TX bytes:25489222 (25.4 MB)

    eth0 Link encap:Ethernet HWaddr b0:83:fe:50:13:ee
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:62044 errors:0 dropped:0 overruns:0 frame:0
    TX packets:53657 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:15446462 (15.4 MB) TX bytes:25489222 (25.4 MB)

    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:65536 Metric:1
    RX packets:132336 errors:0 dropped:0 overruns:0 frame:0
    TX packets:132336 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:87523582 (87.5 MB) TX bytes:87523582 (87.5 MB)

    virbr0 Link encap:Ethernet HWaddr fe:54:00:63:4a:ff
    inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:3107 errors:0 dropped:0 overruns:0 frame:0
    TX packets:3020 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:470791 (470.7 KB) TX bytes:3888937 (3.8 MB)

    vnet0 Link encap:Ethernet HWaddr fe:54:00:63:4a:ff
    inet6 addr: fe80::fc54:ff:fe63:4aff/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:3107 errors:0 dropped:0 overruns:0 frame:0
    TX packets:24399 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:500
    RX bytes:514289 (514.2 KB) TX bytes:5004558 (5.0 MB)

    wlan0 Link encap:Ethernet HWaddr ec:0e:c4:5a:53:4f
    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)

    guest
    derrick@derrick-Inspiron-3847:~$ ifconfig
    br0 Link encap:Ethernet HWaddr b0:83:fe:50:13:ee
    inet addr:192.168.0.7 Bcast:192.168.0.255 Mask:255.255.255.0
    inet6 addr: fe80::b283:feff:fe50:13ee/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:45543 errors:0 dropped:0 overruns:0 frame:0
    TX packets:53657 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:11190836 (11.1 MB) TX bytes:25489222 (25.4 MB)

    eth0 Link encap:Ethernet HWaddr b0:83:fe:50:13:ee
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:62044 errors:0 dropped:0 overruns:0 frame:0
    TX packets:53657 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:15446462 (15.4 MB) TX bytes:25489222 (25.4 MB)

    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:65536 Metric:1
    RX packets:132336 errors:0 dropped:0 overruns:0 frame:0
    TX packets:132336 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:87523582 (87.5 MB) TX bytes:87523582 (87.5 MB)

    virbr0 Link encap:Ethernet HWaddr fe:54:00:63:4a:ff
    inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:3107 errors:0 dropped:0 overruns:0 frame:0
    TX packets:3020 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:470791 (470.7 KB) TX bytes:3888937 (3.8 MB)

    vnet0 Link encap:Ethernet HWaddr fe:54:00:63:4a:ff
    inet6 addr: fe80::fc54:ff:fe63:4aff/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:3107 errors:0 dropped:0 overruns:0 frame:0
    TX packets:24399 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:500
    RX bytes:514289 (514.2 KB) TX bytes:5004558 (5.0 MB)

    wlan0 Link encap:Ethernet HWaddr ec:0e:c4:5a:53:4f
    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)

    Firewall - I have a firewall on my router which is enabled. I just have the default Ubuntu install on the host, I haven't done anything a software firewall there.
    I am willing to use the IP address, at least for now. I may setup dns on the router at a later time, but one thing at a time.

    thanks again for any suggestions!
    - Derrick

  4. #4
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: KVM & networking question

    The GuestOS must have a different IP on 192.168.0.x/24.
    Or did you show the wrong output? wlan shouldn't be seen any any guestOS. You must boot into the guestOS to get the IP from it.

    Also - it would be helpful for reading if "code tags" are used so things line up.

  5. #5
    Join Date
    Jul 2008
    Beans
    9

    Re: KVM & networking question

    Oops, sorry, my mistake:

    Code:
    Host - derrick-Inspiron-3847
    
    derrick@derrick-Inspiron-3847:~$ ifconfig
    br0       Link encap:Ethernet  HWaddr b0:83:fe:50:13:ee  
              inet addr:192.168.0.7  Bcast:192.168.0.255  Mask:255.255.255.0
              inet6 addr: fe80::b283:feff:fe50:13ee/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:79396 errors:0 dropped:0 overruns:0 frame:0
              TX packets:94908 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:21062380 (21.0 MB)  TX bytes:51411515 (51.4 MB)
    
    eth0      Link encap:Ethernet  HWaddr b0:83:fe:50:13:ee  
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:99461 errors:0 dropped:0 overruns:0 frame:0
              TX packets:94907 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:26247806 (26.2 MB)  TX bytes:51411449 (51.4 MB)
    
    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:65536  Metric:1
              RX packets:252708 errors:0 dropped:0 overruns:0 frame:0
              TX packets:252708 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:196615656 (196.6 MB)  TX bytes:196615656 (196.6 MB)
    
    virbr0    Link encap:Ethernet  HWaddr fe:54:00:63:4a:ff  
              inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:7249 errors:0 dropped:0 overruns:0 frame:0
              TX packets:7386 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:982978 (982.9 KB)  TX bytes:9812951 (9.8 MB)
    
    vnet0     Link encap:Ethernet  HWaddr fe:54:00:63:4a:ff  
              inet6 addr: fe80::fc54:ff:fe63:4aff/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:7249 errors:0 dropped:0 overruns:0 frame:0
              TX packets:31410 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:500 
              RX bytes:1084464 (1.0 MB)  TX bytes:11066222 (11.0 MB)
    
    wlan0     Link encap:Ethernet  HWaddr ec:0e:c4:5a:53:4f  
              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)
    
    derrick@derrick-Inspiron-3847:~$
    
    
    Guest - derrick-Standard-PC-i440FX-PIIX-1996 (name assigned by KVM)
    
    derrick@derrick-Standard-PC-i440FX-PIIX-1996:~$ ifconfig
    eth0      Link encap:Ethernet  HWaddr 52:54:00:63:4a:ff  
              inet addr:192.168.122.60  Bcast:192.168.122.255  Mask:255.255.255.0
              inet6 addr: fe80::5054:ff:fe63:4aff/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:31557 errors:0 dropped:4 overruns:0 frame:0
              TX packets:7347 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:11171283 (11.1 MB)  TX bytes:1096902 (1.0 MB)
    
    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:65536  Metric:1
              RX packets:1643 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1643 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:150301 (150.3 KB)  TX bytes:150301 (150.3 KB)
    KVM assigns ip address in a different range than what I have setup on my router. Router DHCP config'd to assign: 192.168.0.2-100, KVM assigns this VM: 192.168.122.60

    I don't understand why VM's don't just use DHCP like a regular computer, but maybe it's because there isn't a physical NIC so KVM has to either do bridging or NAT? My lack of networking knowledge is showing!

    thanks,
    - Derrick
    Last edited by Bucky Ball; May 6th, 2015 at 06:49 PM. Reason: Added code tags.

  6. #6
    Join Date
    Jul 2008
    Beans
    9

    Re: KVM & networking question

    Shoot - when I created message it kept formatting but when I posted it went away. How do I use code tags to avoid this?

    Sorry!
    - Derrick

  7. #7
    Join Date
    Feb 2008
    Location
    Land of fire and drought
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: KVM & networking question

    [code] tags, please, as requested.

    I have done the last post for you. Please see the last link in my signature. Thanks.

    * Oops, just saw your last post. Apologies. I have added code tags to your last terminal output posted. Edit that and have a look.

  8. #8
    Join Date
    Jul 2008
    Beans
    9

    Re: KVM & networking question

    Nevermind - found a description: http://ubuntuforums.org/showthread.p...8#post12776168

    will repost with code tags - give me a minute.

    thx

  9. #9
    Join Date
    Feb 2008
    Location
    Land of fire and drought
    Beans
    Hidden!
    Distro
    Xubuntu

  10. #10
    Join Date
    Jul 2008
    Beans
    9

    Re: KVM & networking question

    host - derrick-Inspiron-3847
    Code:
    derrick@derrick-Inspiron-3847:~$ ifconfig
    br0       Link encap:Ethernet  HWaddr b0:83:fe:50:13:ee  
              inet addr:192.168.0.7  Bcast:192.168.0.255  Mask:255.255.255.0
              inet6 addr: fe80::b283:feff:fe50:13ee/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:79396 errors:0 dropped:0 overruns:0 frame:0
              TX packets:94908 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:21062380 (21.0 MB)  TX bytes:51411515 (51.4 MB)
    
    eth0      Link encap:Ethernet  HWaddr b0:83:fe:50:13:ee  
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:99461 errors:0 dropped:0 overruns:0 frame:0
              TX packets:94907 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:26247806 (26.2 MB)  TX bytes:51411449 (51.4 MB)
    
    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:65536  Metric:1
              RX packets:252708 errors:0 dropped:0 overruns:0 frame:0
              TX packets:252708 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:196615656 (196.6 MB)  TX bytes:196615656 (196.6 MB)
    
    virbr0    Link encap:Ethernet  HWaddr fe:54:00:63:4a:ff  
              inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:7249 errors:0 dropped:0 overruns:0 frame:0
              TX packets:7386 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:982978 (982.9 KB)  TX bytes:9812951 (9.8 MB)
    
    vnet0     Link encap:Ethernet  HWaddr fe:54:00:63:4a:ff  
              inet6 addr: fe80::fc54:ff:fe63:4aff/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:7249 errors:0 dropped:0 overruns:0 frame:0
              TX packets:31410 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:500 
              RX bytes:1084464 (1.0 MB)  TX bytes:11066222 (11.0 MB)
    
    wlan0     Link encap:Ethernet  HWaddr ec:0e:c4:5a:53:4f  
              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)
    Guest - derrick-Standard-PC-i440FX-PIIX-1996
    Code:
    derrick@derrick-Standard-PC-i440FX-PIIX-1996:~$ ifconfig
    eth0      Link encap:Ethernet  HWaddr 52:54:00:63:4a:ff  
              inet addr:192.168.122.60  Bcast:192.168.122.255  Mask:255.255.255.0
              inet6 addr: fe80::5054:ff:fe63:4aff/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:31557 errors:0 dropped:4 overruns:0 frame:0
              TX packets:7347 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:11171283 (11.1 MB)  TX bytes:1096902 (1.0 MB)
    
    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:65536  Metric:1
              RX packets:1643 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1643 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:150301 (150.3 KB)  TX bytes:150301 (150.3 KB)

    KVM assigns ip address in a different range than what I have setup on my router. Router DHCP config'd to assign: 192.168.0.2-100, KVM assigns this VM: 192.168.122.60

    I don't understand why VM's don't just use DHCP like a regular computer, but maybe it's because there isn't a physical NIC so KVM has to either do bridging or NAT? My lack of networking knowledge is showing!

    thanks,
    - Derrick

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •