Ask Your Question
0

How do I get dhcp bridge to work in Fedora 17?

asked 2012-07-16 13:30:01 -0500

dehydratedpaani gravatar image

I'm new to fedora and learning things slowly. I cannot get bridging to work.I disabled NetworkManager. But everytime I restart network I get a error. Can someone please be kind enough to guide me whats going on here? I did the exact same steps in CentOS 6 and the bridge/ethernet came up/down with the network fine. What different do I do in Fedora to get this to work?

$ cat ifcfg-eth0 
NM_CONTROLLED="no"
HWADDR="6C:62:6D:E0:ED:47"
BOOTPROTO="dhcp"
DEVICE="eth0"
TYPE="ethernet"
BRIDGE="br0"
ONBOOT="yes"

$ cat ifcfg-br0 
NM_CONTROLLED="no"
HWADDR="6C:62:6D:E0:ED:47"
BOOTPROTO="dhcp"
DEVICE="br0"
TYPE="bridge"
ONBOOT="yes"

$ sudo chkconfig --list network

Note: This output shows SysV services only and does not include native
      systemd services. SysV configuration data might be overridden by native
      systemd configuration.

network         0:off   1:off   2:on    3:on    4:on    5:on    6:off

$ sudo service network restart
Restarting network (via systemctl):  Job failed. See system journal and 'systemctl status' for details.
                                                           [FAILED]
$ sudo service network status
Configured devices:
lo br0 eth0
Currently active devices:
lo virbr0

Why is eth0/br0 not active?

$ sudo service NetworkManager status
Redirecting to /bin/systemctl  status NetworkManager.service
NetworkManager.service - Network Manager
Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled)
Active: inactive (dead)
edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2012-07-16 16:19:12 -0500

This is what I use:

/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
HWADDR=AA:BB:CC:DD:EE:FF
ONBOOT=yes
BRIDGE=br0

Note: You should NOT change your HWADDR (this is your NIC MAC).

/etc/sysconfig/network-scripts/ifcfg-br0

DEVICE=br0
TYPE=Bridge
BOOTPROTO=dhcp
ONBOOT=yes
DELAY=0

NetworkManager does not yet manage bridges.

If that does not work for you, post the error message you are getting.

edit flag offensive delete link more
0

answered 2012-07-17 01:27:09 -0500

dehydratedpaani gravatar image

updated 2012-07-17 01:27:41 -0500

Update/Fix:

[root@desktop ~]# dmesg | grep eth
[    8.386196] r8169 0000:01:00.0: eth0: RTL8105e at 0xffffc9000037e000, 6c:62:6d:e0:ed:47, XID 00900000 IRQ 41
[    9.613880] udevd[329]: renamed network interface eth0 to p128p1

So udev was renaming my ethernet. Googling it a bit and I was told that the problem is in the:

/etc/udev/rules.d/70-persistent-net.rules

But udev has NOT made any such entries on my system:

[root@desktop network-scripts]# cd /etc/udev/rules.d/
[root@desktop rules.d]# ll
total 8
-rw-r--r--. 1 root root 1887 Jan 14  2012 60-fprint-autosuspend.rules
-rw-r--r--. 1 root root  771 Mar  7 18:52 90-alsa-tools-firmware.rules
[root@desktop rules.d]#

Thus I had to rename my ethernet to what udev renames it to, ie p128p1, and obviously also its filename, ie ifcfg-p128p1.

Now it works. But I would love to know how to make it work with the name eth0. I dont like the default ethernet name fedora picks.

Thanks for you help bodhi.zazen

Cheers!

edit flag offensive delete link more
0

answered 2012-07-16 23:15:39 -0500

dehydratedpaani gravatar image

Getting the same error when I restart network. But we might be getting somewhere. Please take a look below.

[root@desktop ~]# systemctl status NetworkManager.service NetworkManager.service - Network Manager
      Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; disabled)
      Active: inactive (dead)
      CGroup: name=systemd:/system/NetworkManager.service

[root@desktop ~]# systemctl status network.service 
network.service - LSB: Bring up/down networking
      Loaded: loaded (/etc/rc.d/init.d/network)
      Active: activating (start) since Tue, 17 Jul 2012 09:31:12 +0530; 45s ago
     Control: 460 (network)
      CGroup: name=systemd:/system/network.service
          โ”œ 460 /bin/bash /etc/rc.d/init.d/network start
          โ”œ 741 /bin/bash /etc/sysconfig/network-scripts/ifup-eth ...
          โ”” 778 /sbin/dhclient -H desktop -1 -q -lf /var/lib/dhcli...

Jul 17 09:31:14 desktop network[460]: Bringing up loopback interface:  [  OK  ]
Jul 17 09:31:15 desktop network[460]: Bringing up interface eth0:  ERROR   ...n.
Jul 17 09:31:15 desktop network[460]: [FAILED]
Jul 17 09:31:16 desktop network[460]: Bringing up interface br0:
Jul 17 09:31:16 desktop dhclient[778]: DHCPDISCOVER on br0 to 255.255.255.2...9)
Jul 17 09:31:19 desktop dhclient[778]: DHCPDISCOVER on br0 to 255.255.255.2...9)
Jul 17 09:31:27 desktop dhclient[778]: DHCPDISCOVER on br0 to 255.255.255.2...9)
Jul 17 09:31:47 desktop dhclient[778]: DHCPDISCOVER on br0 to 255.255.255.2...9)

It couldn't bring up eth0, so:

[root@desktop ~]# ifdown eth0 
Cannot find device "eth0"
interface eth0 does not exist!
bridge br0 is still up; can't delete it
[root@desktop ~]# ifconfig -a
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::44e:cff:fed2:19cb  prefixlen 64  scopeid 0x20<link>
        ether 06:4e:0c:d2:19:cb  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 15  bytes 2786 (2.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 16436
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        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

p128p1: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 6c:62:6d:e0:ed:47  txqueuelen 1000  (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
        device interrupt 42  base 0xe000  

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether a6:b4:d2:98:9c:f5  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX ...
(more)
edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-07-16 13:30:01 -0500

Seen: 6,235 times

Last updated: Jul 17 '12