0

I'm trying to configure Bridged Network by creating a network script at /etc/sysconfig/network-scripts/ifcfg-br0:

DEVICE="br0"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Bridge"
BOOTPROTO="static"
IPADDR="10.110.10.15"
GATEWAY="10.110.10.1"
DNS1="8.8.8.8"
DNS2="8.8.4.4"
MTU="1500"
NETMASK="255.255.255.0"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="yes"
IPV6INIT="no"
NAME="System br0"

Where can I find appropriate IPADDR, GATEWAY, NETMASK ?

And for /etc/sysconfig/network-scripts/ifcfg-eth0:

DEVICE="eth0"
BOOTPROTO="none"
HOSTNAME="localhost.localdomain"
HWADDR="00:9C:02:97:86:70"
IPV6INIT="no"
MTU="1500"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"
NAME="System eth0"
BRIDGE="br0"

Where can I find HWADDR ?

  • I try to find out what is gateway for my server. "Route" command shows me this: Destination --- Gateway --- Iface: default --- gateway --- eth0; 10.9.7.196 --- 0.0.0.0 --- eth0; 192.168.122.0 --- 0.0.0.0 --- virbr0. But 0.0.0.0 gateway doesn't work properly for ifcfg-br0. – kirill fedorov Sep 13 '17 at 11:35
  • You can always edit your own questions (and answers), regardless of reputation and that is the preferred way to add more info or to clarify things. Please don't use comments for that. – HBruijn Sep 13 '17 at 13:34
2

The IPADDR / GATEWAY / NETMASK are determined by your network provider. Use the same values you already had used for eth0 before setting up bridging. The bridge does not have to use static address assignment - it is valid to have BOOTPROTO=dhcp and let it be dynamically assigned if that's what your eth0 config originally used.

HWADDR is just another name for MAC address - you can see it from 'ifconfig' or 'ip' command output.

1

Where can I find appropriate IPADDR, GATEWAY, NETMASK ?

Your network provider typically assigns them to you...

Where can I find HWADDR ?

The HardWare ADDress, also know as the MAC-address is a unique identifier assigned to network interfaces at the hardware level (although in some drivers you can override it in software and in for instance virtual servers it is obviously also a configurable property set on the hypervisor).
You can display it with ip addr show, cat /sys/class/net/*/address or ifconfig -a.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.