반응형

1. nmcli를 사용하여 소프트웨어 브릿지를 생성

# nmcli connection add type bridge con-name br1 ifname br1

Connection 'br1' (f463e38a-4ec8-47fd-9b9a-7ebecfe71964) successfully added.


2. br1에 대해 IP 설정 및 manual 모드로 변경

# nmcli connection modify br1 ipv4.addresses 192.168.0.100/24
# nmcli connection modify br1 ipv4.method manual


3. eno1를 br1에 대한 포트 인터페이스로 지정

# nmcli connection add type bridge-slave con-name br1-port ifname eno1 master br1

Connection 'br1-port' (8ffca59e-9d9a-4940-b9fb-2a474c5c7535) successfully added.


4. 설정 확인

# cat /etc/sysconfig/network-scripts/ifcfg-br1

DEVICE=br1
STP=yes
TYPE=Bridge
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=br1
UUID=f463e38a-4ec8-47fd-9b9a-7ebecfe71964
ONBOOT=yes
IPADDR0=192.168.0.100
PREFIX0=24
BRIDGING_OPTS=priority=32768
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes


# ip link

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
    link/ether 52:54:00:00:0b:0b brd ff:ff:ff:ff:ff:ff
4: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br1 state UP mode DEFAULT qlen 1000
    link/ether 5a:eb:7d:de:02:28 brd ff:ff:ff:ff:ff:ff
6: eno2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
    link/ether 12:f0:58:d4:ec:07 brd ff:ff:ff:ff:ff:ff
7: br1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT
    link/ether 5a:eb:7d:de:02:28 brd ff:ff:ff:ff:ff:ff


# brctl show

bridge name    bridge id        STP enabled    interfaces
br1        8000.5aeb7dde0228    yes        eno1


# ping -I br1 192.168.0.254

PING 192.168.0.254 (192.168.0.254) from 192.168.0.100 br1: 56(84) bytes of data.
64 bytes from 192.168.0.254: icmp_seq=1 ttl=64 time=0.068 ms
64 bytes from 192.168.0.254: icmp_seq=2 ttl=64 time=0.052 ms


반응형

'Linux > CentOS' 카테고리의 다른 글

[CentOS7] unbound DNS  (0) 2015.03.17
[CentOS7] Firewalld  (0) 2015.03.17
[CentOS7] Network Teaming  (0) 2015.03.17
[CentOS7] NFS  (0) 2015.03.17
[CentOS7] iSCSI  (0) 2015.03.17
  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 카카오스토리 공유하기