ブリッジのネットワーク(linux)

bridge-utilsいれる。

br0作る

# brctl addbr br0
# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    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: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 70:e1:4c:68:18:a5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.11.251/24 brd 192.168.11.255 scope global enp2s0
       valid_lft forever preferred_lft forever
    inet6 fe80::72e1:4cff:fe68:18a5/64 scope link
       valid_lft forever preferred_lft forever
3: enp4s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 70:e1:4c:68:18:a6 brd ff:ff:ff:ff:ff:ff
5: wlp3s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 10:0b:a9:0f:57:e8 brd ff:ff:ff:ff:ff:ff
6: br0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether ea:c1:3f:53:9e:8d brd ff:ff:ff:ff:ff:ff

これを見る限り、enp2s0にアドレスが当たっているので、これを組みこむ。

/etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug enx3495db2b7800
#iface enx3495db2b7800 inet dhcp

#allow-hotplug enp2s0
#iface enp2s0 inet dhcp

auto enp2s0
iface enp2s0 inet manual

auto br0
iface br0 inet dhcp
bridge_ports enp2s0
bridge_stp off
bridge_maxwait 1

的な

bridged-network.txt · 最終更新: 2017/08/05 16:53 by admin
www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0