パソコン汎用

What?

ブリッジをどうやって作るかについて。

よくひっかかるので、解説を。

環境

Ubuntu16.04でやりますた。

Before After

Before

*** /etc/network/interfaces ***
auto enp4s0
iface enp4s0 inet static
       address 192.168.1.93
       gateway 192.168.1.1
       netmask 255.255.255.0
       dns-nameservers 192.168.1.2 192.168.1.1

After

*** /etc/network/interfaces ***
#auto enp4s0
#iface enp4s0 inet dhcp
#iface enp4s0 inet static
#       address 192.168.1.93
#       gateway 192.168.1.1
#       netmask 255.255.255.0
#       dns-nameservers 192.168.1.2 192.168.1.1
auto br0
iface br0 inet static
     address 192.168.1.93
     netmask 255.255.255.0
     network 192.168.1.0
     broadcast 192.168.1.255
     gateway 192.168.1.1
     dns-nameservers 192.168.1.2 192.168.1.1
     bridge_ports enp4s0
     bridge_stp off
     bridge_maxwait 0

これで、ネットワークを切り直すか再起動。

テスト

別のマシンからログイン。

$ ssh 192.168.1.93 -l ubuntu
password: *
$

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2017-09-12 (火) 01:23:41