补充 Linux 网络桥接 部分.
Signed-off-by: chen.yang <chen.yang@yuzhen-iot.com>
This commit is contained in:
parent
e680b0f5b0
commit
4cee01b7b8
|
@ -5,6 +5,7 @@
|
|||
| /etc/systemd/system | Systemd 服务配置目录 |
|
||||
| /lib/firmware | 设备固件目录,该目录下保存着设备运行时所需的固件程序 |
|
||||
| /lib/systemd/system | Systemd unit files 一般指向 /usr/lib/systemd/system |
|
||||
| /proc/sys/net/ipv4/conf | 可在该目录下查看创建的和已经存在的网卡设备文件 |
|
||||
| /sys/class/drm/card\<n\>-\<Type\>-\<n\>/status | 显示设备状态 |
|
||||
| /sys/class/drm/card\<n\>-\<Type\>-\<n\>/modes | 显示设备所支持的显示模式 |
|
||||
| /sys/class/drm/card\<n\>-\<Type\>-\<n\>/edid | 如果包含 EDID,此节点为映射的 EDID 文件|
|
||||
|
|
|
@ -162,3 +162,21 @@ sudo systemctl restart networking.service
|
|||
```
|
||||
|
||||
一般而言,/etc/resolv.conf 文件是个软链接,其配置比较复杂,推荐使用 resolvconf 工具进行配置。
|
||||
|
||||
## 桥接
|
||||
|
||||
```bash
|
||||
# Create a new bridge and change its state to up
|
||||
ip link add name <bridge name> type bridge
|
||||
ip link set <bridge name> up
|
||||
# To add an interface (e.g. eth0) into the bridge, its state must be up
|
||||
ip link set <eth interface> up
|
||||
ip link set <eth interface> master <bridge name>
|
||||
# Show the existing bridges and associated interfaces
|
||||
bridge -d link
|
||||
# OR
|
||||
brctl show
|
||||
# This is how to remove an interface from a bridge
|
||||
ip link set <eth interface> nomaster
|
||||
ip link delete <bridge name> type bridge
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue