eth0 is not reachable from LAN after setup bridge

Support for security such as Firewalls and securing linux
Post Reply
mo.sihra@gmail.com
Posts: 3
Joined: 2019/02/06 18:10:00

eth0 is not reachable from LAN after setup bridge

Post by mo.sihra@gmail.com » 2019/02/06 18:20:16

hi,

I have setup a bridge on CentOS7.

ms@sun temp]$ sudo brctl show
bridge name bridge id STP enabled interfaces
br0 8000.b88584b608a6 yes eth0
virbr0 8000.5254006d40bb yes virbr0-nic

Here is ifcfg-eth0
::::::::::::::
HWADDR=B8:85:84:B6:08:A6
DEVICE=eth0
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
#NAME="Wired connection 1"
UUID=a079401d-ff63-48ec-b322-8073dbb59eac
ONBOOT=yes
IPADDR=192.168.0.50
PREFIX=24
IPADDR1=192.168.0.51
PREFIX1=24
IPADDR2=192.168.0.52
PREFIX2=24
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
DNS1=192.168.0.1
NM_CONTROLLED=no
BRIDGE=br0
ZONE=public


and ifcfg-br0
::::::::::::::
DEVICE=br0
ONBOOT=yes
TYPE=Bridge
BOOTPROTO=dhcp
STP=on
DELAY=0
NM_CONTROLLED=no

ms@sun temp]$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP group default qlen 1000
link/ether b8:85:84:b6:08:a6 brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 9c:b6:d0:c0:0e:7b brd ff:ff:ff:ff:ff:ff
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 52:54:00:6d:40:bb brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
5: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master virbr0 state DOWN group default qlen 1000
link/ether 52:54:00:6d:40:bb brd ff:ff:ff:ff:ff:ff
6: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether b8:85:84:b6:08:a6 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.22/24 brd 192.168.0.255 scope global dynamic br0
valid_lft 602316sec preferred_lft 602316sec
inet6 fd00:fc:8dad:e182:ba85:84ff:feb6:8a6/64 scope global mngtmpaddr dynamic
valid_lft 534931sec preferred_lft 401074sec
inet6 2607:fea8:d5f:f0b7:ba85:84ff:feb6:8a6/64 scope global mngtmpaddr dynamic
valid_lft 604303sec preferred_lft 172303sec
inet6 fe80::ba85:84ff:feb6:8a6/64 scope link
valid_lft forever preferred_lft forever
[ms@sun temp]$

[ms@sun temp]$ ifconfig -a
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.22 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fd00:fc:8dad:e182:ba85:84ff:feb6:8a6 prefixlen 64 scopeid 0x0<global>
inet6 fe80::ba85:84ff:feb6:8a6 prefixlen 64 scopeid 0x20<link>
inet6 2607:fea8:d5f:f0b7:ba85:84ff:feb6:8a6 prefixlen 64 scopeid 0x0<global>
ether b8:85:84:b6:08:a6 txqueuelen 1000 (Ethernet)
RX packets 57864 bytes 259997679 (247.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 50271 bytes 6144593 (5.8 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether b8:85:84:b6:08:a6 txqueuelen 1000 (Ethernet)
RX packets 202763 bytes 275820726 (263.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 51722 bytes 6247953 (5.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 19

Bridge works fine. I am able to connect to from CentOS7 IP: 192.168.0.50, after setup bridge I am not able to connect to CentOS from LAN 192.168.0.XX Ip e.g. ssh to 192.168.0.50.

Router: 192.168.0.1, CentOS IP 192.168.0.50, I have stopped NetworkManager and firewalld, using network service.
What am I missing when setup network or bridge? I want my Cent OS server be accessible from LAN e.g. from windows I should be able to http and ssh to Centos?

Please help.

Thanks.

Mo Sihra

User avatar
TrevorH
Forum Moderator
Posts: 27752
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: eth0 is not reachable from LAN after setup bridge

Post by TrevorH » 2019/02/06 18:30:57

The ip details that are on eth0 should be transferred to the bridge br0.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. Use the FAQ Luke

mo.sihra@gmail.com
Posts: 3
Joined: 2019/02/06 18:10:00

Re: eth0 is not reachable from LAN after setup bridge

Post by mo.sihra@gmail.com » 2019/02/06 23:33:23

Thank you. It worked. Great!!!!!!

Post Reply

Return to “CentOS 7 - Security Support”