- 架构图

- 说明
swithc位于eth1上。(有许多是在eth0上,判断方法:/proc/switch目录包含了正确的设备号,请确认)[Howto find out:/proc/switch directory appears to contain the right eth number for the switch. please confirm]
vlan0 仅表示所有的对外接口除了最后的那个。
vlan1 仅表示最后的那个对外接口。
注意:vlan0 是默认vlan,这意味着如果数据包是未加标签的,它将被视为vlan0的数据包。
3. 例子
config 'interface' 'lan'
option 'ifname' 'eth1.0'
option 'proto' 'static'
option 'ipaddr' '192.168.1.1'
option 'netmask' '255.255.255.0'
option 'defaultroute' '0'
option 'peerdns' '0'
option 'nat' '1'
config 'interface' 'extranet'
option 'ifname' 'eth1.1'
option 'proto' 'dhcp'
config 'interface' 'wan'
option 'ifname' 'eth0.2'
option 'proto' 'pppoe'
option 'username' 'szabozsolt-em'
option 'password' 'M3IuWBt4'
其中:
eth1.0表示eth1的第一个valn0
eth1.1表示eth1的第二个valn1
即eth1,eth0是物理网卡,eth1.0,eth1.1是虚拟网卡
- 默认配置示例

本文介绍了网络架构中关于switch的配置,强调了eth1上的vlan设置,其中eth1.0代表vlan0,用于所有对外接口,而eth1.1表示vlan1,仅用于最后一个对外接口。未标记的数据包被视为vlan0的一部分。配置示例展示了如何静态配置lan、extranet和wan接口,涉及pppoe拨号和DHCP获取IP地址。
1220

被折叠的 条评论
为什么被折叠?



