LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-06-2017, 07:38 AM   #1
kinv22
LQ Newbie
 
Registered: Sep 2017
Posts: 4

Rep: Reputation: Disabled
Public IP addresses with KVM/libvirt routed via the DSL line


I have 2 public IP addresses given to me by my ISP (a.a.a.8/30 with a.a.a.9 and a.a.a.10 usable IPs). These IPs are routed by the ISP via my DSL connection (ppp0 - b.b.b.b). For example, if I create a tap0 device and assign a.a.a.1 to it, I can ping/access ports on a.a.a.1 from an external host without any additional routes/iptables configuration.

I'd like to create two VMs with libvirt and assign those public IP addresses to the VMs. What would be the right network configuration for the VMs? I was told to create a bridge with ppp0 and VM interfaces but there's no way to bridge ppp0?
 
Old 09-06-2017, 03:33 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,809

Rep: Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604
Hello and welcome to LQ.

VM's usually have a few ways to connect to either the host, nic card or other vm's. What I think you are suggesting is a public bridge where the ip address of the host's nic is on a vm. One way is to follow this very confusing web page from KVM. https://www.linux-kvm.org/page/Networking

If you tell us your distro there may be more specific steps.
 
Old 09-06-2017, 07:33 PM   #3
kinv22
LQ Newbie
 
Registered: Sep 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
Hello and welcome to LQ.

VM's usually have a few ways to connect to either the host, nic card or other vm's. What I think you are suggesting is a public bridge where the ip address of the host's nic is on a vm. One way is to follow this very confusing web page from KVM. https://www.linux-kvm.org/page/Networking

If you tell us your distro there may be more specific steps.
Thank you for your reply. The host distribution is ubuntu 16.04. eth0 on the host is the physical dsl interface. I've tried different KVM network configurations (forward=route, bridge, etc) but there's no way to add ppp0 to the bridge? "can't add ppp0 to bridge br0: Invalid argument". When you say "the ip address of the host's nic is on a vm" which host nic are you referring to? The ppp0 interface? If you could provide an example that would be great.

This is what I have on the host:

eth0 --> ppp0 (assigned b.b.b.b)

The public IP addresses (a.a.a.9 and a.a.a.10) are routed via ppp0 to my host. I can create tap interfaces and assign these public IPs on the host. I'm just looking for a way to assign these IPs to VMs running on the host instead and still route them via ppp0 on the host.
 
Old 09-06-2017, 10:03 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,809

Rep: Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604
My guess is a gsm doesn't support bridging. Should support nat.

Wonder if there is any way to iptable it?
 
Old 09-06-2017, 11:15 PM   #5
kinv22
LQ Newbie
 
Registered: Sep 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
My guess is a gsm doesn't support bridging. Should support nat.

Wonder if there is any way to iptable it?
Was thinking the same thing. According to my ISP, it's a common scenario with public IPs routed via DSL.
 
Old 09-07-2017, 03:19 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,809

Rep: Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604
Exactly what type of network device are you trying to bridge to?
 
Old 09-07-2017, 09:18 PM   #7
kinv22
LQ Newbie
 
Registered: Sep 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
Exactly what type of network device are you trying to bridge to?
ppp0 is ppp over ethernet (eth0)
tap[01] are standard tap interfaces

My understanding was to bridge ppp0, tap0 and tap1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help to configure KVM network as routed mauromol Linux - Virtualization and Cloud 3 06-26-2015 05:29 PM
LAN full of public/routed ipv4 addresses - How to filter it? sparc86 Linux - Networking 7 06-04-2012 06:13 PM
LXer: Scripting KVM with Python, Part 2: Add a GUI to manage KVM with libvirt and Python LXer Syndicated Linux News 0 01-17-2012 09:11 PM
public ip X point A (linux box) <-> routed wireless net <-> public ip X point B tkmbe Linux - Wireless Networking 2 12-27-2011 06:03 AM
LXer: Set up Ubuntu 11.04 KVM to run is spice session on Fedora 14 KVM Server ( Libvirt Preview Env) LXer Syndicated Linux News 0 03-20-2011 01:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration