LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 12-18-2013, 12:22 AM   #1
just.srad
Member
 
Registered: Apr 2008
Location: Singapore
Distribution: Slackware 14.0
Posts: 127

Rep: Reputation: 15
Bridge : relationship between br0 and eth0


Anyone here could point me to a good link where i can look for information regarding the bridge br0 in regard to the KVM i am trying to install Red Hat on via FTP..

i am able to load the initial files to start off the Red Hat installation via FTP..but once the installation started, the connection to the FTP is lost..

i believe, it has to do with the network connection within the KVM itself..
but i couldn't figure out.

Could someone with the knowledge able to enlighten me.

Thanks in advance,

Justin
 
Old 12-18-2013, 06:22 AM   #2
berndbausch
Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian
Posts: 265

Rep: Reputation: 46
What exactly are you doing? I gather you are installing RHEL on a virtual machine, right? So:
  • How is this machine configured, in particular the network.
  • How are you installing it.
  • If you are using virt-install, it would be great to have the full command.
  • Where is the ftp server.
  • What can you load from the ftp server, and where precisely does the connection break down.
  • If you use kickstart, show us the kickstart file.
  • Probably more questions when the initial ones have been answered.
  • RHEL version of the host and the guest (not that it would matter much, but perhaps...)
 
Old 12-18-2013, 06:04 PM   #3
just.srad
Member
 
Registered: Apr 2008
Location: Singapore
Distribution: Slackware 14.0
Posts: 127

Original Poster
Rep: Reputation: 15
Thanks for your reply, berndbausch.

I will try to figure out again .. and will be using the network diagram i have found in the link below:
http://libvirt.org/archnetwork.html

Hopefully i could get it work this time. Else i will post more details of what i have done.
 
Old 12-19-2013, 06:44 PM   #4
just.srad
Member
 
Registered: Apr 2008
Location: Singapore
Distribution: Slackware 14.0
Posts: 127

Original Poster
Rep: Reputation: 15
I have a quick question in mind..

Does the NAT (default configuration by KVM) allow the installation of the Red Hat over FTP ?

or do i need to configure a Bridge or Routed configuration for the VM?

Thanks
 
Old 12-20-2013, 12:15 AM   #5
berndbausch
Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian
Posts: 265

Rep: Reputation: 46
Quote:
Originally Posted by just.srad View Post
I have a quick question in mind..

Does the NAT (default configuration by KVM) allow the installation of the Red Hat over FTP ?

or do i need to configure a Bridge or Routed configuration for the VM?

Thanks
Hi. Sorry that I didn't understand your original request and fired back with a list of questions to be answered.

In any case, I have been able to do an ftp installation, even unattended using kickstart, on a KVM virtual machine attached to the host with NAT.
My ftp server was on the host.

Now I did find out that guest-to-guest networking can be tricky. If your ftp server is on another KVM guest, this could be the reason for your trouble. I solved my problem by tweaking the host's firewall.
 
Old 12-23-2013, 03:17 PM   #6
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,060

Rep: Reputation: 88
You do fresh installation, not upgrade, the network configuration could be lost.
 
Old 12-28-2013, 05:21 PM   #7
just.srad
Member
 
Registered: Apr 2008
Location: Singapore
Distribution: Slackware 14.0
Posts: 127

Original Poster
Rep: Reputation: 15
Created a bridge br0 ; but not working as expected

I have created a bridge based on the instructions found on IBM website http://pic.dhe.ibm.com/infocenter/ln...stallstart.htm and under the section "Configuring the network"

ifcfg-eth0
Quote:
DEVICE=eth0
TYPE=Ethernet
HWADDR=BC:5F:F4:45:F4:B6
ONBOOT=yes
NM_CONTROLLED=no
BRIDGE=br0
ifcfg-br0
Quote:
DEVICE=br0
TYPE=Bridge
NM_CONTROLLED=no
BOOTPROTO=dhcp
NETMASK=255.255.255.0
ONBOOT=yes
i am able to access the internet on my host machine, however, in my VM (Centos 5.10) , i;m not able to launch a webpage says "google.com". But if i ping "www.google.com",it could resolve to it's IP address. And if i ping to it's ip address which is "74.125.135.184" there is no reply, the cursor just blinks on the next line.

In the VM, the ifconfig shows the only the eth0 and lo. Is there other adapter need to be shown and activated?

Anyone could enlighten me on this.

Thanks in advance.
 
Old 12-30-2013, 03:22 PM   #8
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,060

Rep: Reputation: 88
It should show bridge interface in ifconfig output. How do you setup bridge? I know you give a link but I can't find out which link point to setup bridge interface.
 
Old 12-30-2013, 10:25 PM   #9
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 6.5
Posts: 483

Rep: Reputation: 85
in /etc/sysconfig/network-scripts/

ifcfg-br1

Code:
DEVICE=br1
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Bridge
STP=on
DELAY=0
BOOTPROTO=none
IPADDR=192.168.x.2
GATEWAY=192.168.x.1
NETMASK=255.255.255.0
DNS1=192.168.x.1
ifcfg-eth0
Code:
DEVICE=eth0
HWADDR=50:E5:XX:XX:XX:73
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
BRIDGE="br1"
BOOTPROTO=none
IPV6INIT=no
USERCTL=no
then also make sure you have forwarding enabled

/etc/sysctl.conf
Code:
# Controls IP packet forwarding
net.ipv4.ip_forward = 0 set 0 to 1 in your case. i use vms too but i pass a nic to a firewall and the bridge is on the lan side so i don't need the packets to be forwarded. I think this is your missing step.

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1

# Disable netfilter on bridges.
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0

# Controls the default maxmimum size of a mesage queue
kernel.msgmnb = 65536

# Controls the maximum size of a message, in bytes
kernel.msgmax = 65536

# Controls the maximum shared segment size, in bytes
kernel.shmmax = 68719476736

# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296
then run
Code:
#service network restart
All the above goes on your host not virtual machines. then when you use the virtual machine add it's nic to the bridge./ once the instalation starts, make sure to enable the nic in the installation menu.

Last edited by ericson007; 12-30-2013 at 10:53 PM.
 
Old 01-01-2014, 12:42 AM   #10
just.srad
Member
 
Registered: Apr 2008
Location: Singapore
Distribution: Slackware 14.0
Posts: 127

Original Poster
Rep: Reputation: 15
Thanks Ericson, i will take note of your feedback.

Nini09, actually i;m not too familiar with the bridge setup .. so hopefully someone could advise you.

I did manage to make it work by follow the instructions on the link this time round. Now the KVM is able to install a VM (Centos 5.10) via FTP (from another machine).

Now i am able to proceed with my study of the RHCSA ..Wish me goodluck !

Thanks everyone for the feedback. :-)
 
Old 01-01-2014, 01:04 AM   #11
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 6.5
Posts: 483

Rep: Reputation: 85
Good stuff mate!
The Michael Jang book is pretty good for that. I have it even though not really intending to do the exam, but it does look like it will work rather well.

For your vm's the main thing you are after is to do nat. You don't need a bridge per se. A bridge will allow access to virtual machines from your whole network. The labs are configured on a virtual network , the virtual network hosts should be able to connect to each other and then to get them to download the updates or access the net, you need nat translation and thus forwarding of packets via sysctl.conf will be required.

Best of luck. The rhcsa is actually pretty interesting!
 
Old 01-03-2014, 03:20 AM   #12
just.srad
Member
 
Registered: Apr 2008
Location: Singapore
Distribution: Slackware 14.0
Posts: 127

Original Poster
Rep: Reputation: 15
That's a good pointer on the nat translation stuff.. Thanks ericson.
 
  


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
Single direction redirection on bridge br0 systemlordanubis Linux - Networking 2 02-16-2011 04:25 PM
Bridge br0 on FC12 , No Network mickeyboa Fedora 3 05-10-2010 08:00 AM
Cannot setup bridge br0 without cutting all internet. SimbaSpirit Linux - Newbie 2 05-26-2008 09:52 PM
Bridging interfaces (eth0 + eth1 = br0) Mithrilhall Linux - Networking 1 10-27-2007 06:35 AM
br0 with ath0 and eth0 not working on ixp vinodl Debian 0 09-16-2006 07:37 AM


All times are GMT -5. The time now is 04:46 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration