I'm running a Fedora 17 desktop system that I've decided to put an OEL 6 virtual machine on. I built the VM first with virtual network NAT the default but discovered that only the host could communicate with it. After reading the available documentation (which I probably should have done first) I found that I needed to use a bridged network on the host so the VM would be available on my LAN. So I set about to do this.
This is the beginning of networking adventure. No problem getting Network Manager turned off and the old network service running. NO problem getting the ifcfg-br0 file built or editing the ifcfg-p2p1 file. Networking on the host is working fine. I have several devices (computers, ipad, iphone, TV equip) all on my home network and my wireless router is a DLink. If I use DHCP, which I had been using, my netmask was 255.255.255.0 so I couldn't connect with the 192.168.122.0 network which I guess is the default for a VM. I couldn't figure out how to get a different netmask from the DHCP of this router so I changed my host and some of the other devices to a manual network setup with a netmask of 255.255.0.0.
I added a FORWARD directive to iptables to forward all LAN traffic to the bridged interface.
Now I can access the VM from other systems on my network JUST NOT FROM THE HOST. From the VM I can access other devices in my home network BUT NOT THE HOST.
I have searched documentation, googled and such but am not able to find the solution or at least not able to understand it if I have found it.
Here some specifics from my host:
SU: # ifconfig -a
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9000
inet 192.168.0.115 netmask 255.255.0.0 broadcast 192.168.255.255
inet6 fe80::f66d:4ff:fee2:19e2 prefixlen 64 scopeid 0x20<link>
ether f4:6d:04:e2:19:e2 txqueuelen 0 (Ethernet)
RX packets 251530 bytes 179969189 (171.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 203241 bytes 21462634 (20.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 1719088 bytes 457429189 (436.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1719088 bytes 457429189 (436.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
p6p1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9000
inet6 fe80::f66d:4ff:fee2:19e2 prefixlen 64 scopeid 0x20<link>
ether f4:6d:04:e2:19:e2 txqueuelen 1000 (Ethernet)
RX packets 280003 bytes 191225967 (182.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 205160 bytes 21635437 (20.6 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:ac:e1:21 txqueuelen 0 (Ethernet)
RX packets 1793 bytes 104681 (102.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3396 bytes 514199 (502.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0-nic: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 52:54:00:ac:e1:21 txqueuelen 500 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9000
inet6 fe80::fc54:ff:fe00:600 prefixlen 64 scopeid 0x20<link>
ether fe:54:00:00:06:00 txqueuelen 500 (Ethernet)
RX packets 523 bytes 49219 (48.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 12845 bytes 1922090 (1.8 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
SU: # brctl show
bridge name bridge id STP enabled interfaces
br0 8000.f46d04e219e2 no p6p1
vnet0
virbr0 8000.525400ace121 yes virbr0-nic
SU: # iptables -L -v
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT udp -- virbr0 any anywhere anywhere udp dpt:domain
0 0 ACCEPT tcp -- virbr0 any anywhere anywhere tcp dpt:domain
0 0 ACCEPT udp -- virbr0 any anywhere anywhere udp dpt:bootps
0 0 ACCEPT tcp -- virbr0 any anywhere anywhere tcp dpt:bootps
2048K 794M ACCEPT all -- any any anywhere anywhere state RELATED,ESTABLISHED
8 696 ACCEPT icmp -- any any anywhere anywhere
114 6793 ACCEPT all -- lo any anywhere anywhere
828 69822 ACCEPT udp -- any any anywhere anywhere state NEW udp dpt:netbios-ns
1707 420K ACCEPT udp -- any any anywhere anywhere state NEW udp dpt:netbios-dgm
0 0 ACCEPT tcp -- any any anywhere anywhere state NEW tcp dpt:netbios-ssn
6 360 ACCEPT tcp -- any any anywhere anywhere state NEW tcp dpt:microsoft-ds
0 0 ACCEPT udp -- any any anywhere anywhere state NEW udp dpt:netbios-ns
0 0 ACCEPT udp -- any any anywhere anywhere state NEW udp dpt:netbios-dgm
1 60 ACCEPT tcp -- any any anywhere anywhere state NEW tcp dpt:ssh
0 0 ACCEPT udp -- any any anywhere anywhere state NEW udp dpt:ipp
990 257K ACCEPT udp -- any any anywhere 224.0.0.251 state NEW udp dpt:mdns
0 0 ACCEPT tcp -- any any anywhere anywhere state NEW tcp dpt:ipp
0 0 ACCEPT udp -- any any anywhere anywhere state NEW udp dpt:ipp
26298 4053K REJECT all -- any any anywhere anywhere reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- any any anywhere anywhere PHYSDEV match --physdev-is-bridged
0 0 ACCEPT all -- any virbr0 anywhere 192.168.122.0/24 state RELATED,ESTABLISHED
0 0 ACCEPT all -- virbr0 any 192.168.122.0/24 anywhere
0 0 ACCEPT all -- virbr0 virbr0 anywhere anywhere
0 0 REJECT all -- any virbr0 anywhere anywhere reject-with icmp-port-unreachable
0 0 REJECT all -- virbr0 any anywhere anywhere reject-with icmp-port-unreachable
0 0 REJECT all -- any any anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT 706K packets, 217M bytes)
pkts bytes target prot opt in out source destination
SU: # route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 br0
192.168.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br0
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
From the VM:$ ifconfig -a
eth0 Link encap:Ethernet HWaddr 52:54:00:00:06:00
inet addr:192.168.122.30 Bcast:192.168.255.255 Mask:255.255.0.0
inet6 addr: fe80::5054:ff:fe00:600/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:26073 errors:0 dropped:0 overruns:0 frame:0
TX packets:562 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3249911 (3.0 MiB) TX bytes:53292 (52.0 KiB)
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:16436 Metric:1
RX packets:43 errors:0 dropped:0 overruns:0 frame:0
TX packets:43 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4184 (4.0 KiB) TX bytes:4184 (4.0 KiB)
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.0.0 U 1 0 0 eth0
Sorry for the long drawn out tale but I really would appreciate any assistance anyone out there could give.
Thanks