交换机的vla模式(交换机在什么模式下划分vla)
导语:配置交换机bride模式划分vlan并关闭LLDP的PVID不一致检查的功能
以下为交换机配置,1口为三层路由模式,2-5口为二层bride模式,Enter代表回车键,
配置步骤:
划分vlan—定义vlan相应端口bridge模式—启用dhcp并配置地址池—配置交换机三层地址及转发地址——配置路由器地址及路由
system-view
lldp ignore-pvid-inconsistency
Enter
vlan 10
name vlan10
interface vlan10
ip address 192.168.1.1 24
vlan 20
name vlan20
interface vlan20
ip address 192.168.2.1 24
vlan 30
name vlan30
interface vlan30
ip address 192.168.3.1 24
Enter
interface GigabitEthernet 1/0/2
port link-mode bridge
port access vlan 10
undo shutdown
interface GigabitEthernet 1/0/3
port link-mode bridge
port access vlan 10
undo shutdown
interface GigabitEthernet 1/0/4
port link-mode bridge
port access vlan 20
undo shutdown
interface GigabitEthernet 1/0/5
port link-mode bridge
port access vlan 30
undo shutdown
quit
Enter
dhcp enable
dhcp server ip-pool vlan10
network 192.168.1.0 24
dns-list 114.114.114.114
gateway-list 192.168.1.1
forbidden-ip 192.168.1.1
forbidden-ip 192.168.1.254
dhcp server ip-pool vlan20
network 192.168.2.0 24
dns-list 114.114.114.114
gateway-list 192.168.2.1
forbidden-ip 192.168.2.1
forbidden-ip 192.168.2.254
dhcp server ip-pool vlan30
network 192.168.3.0 24
dns-list 114.114.114.114
gateway-list 192.168.3.1
forbidden-ip 192.168.3.1
forbidden-ip 192.168.3.254
Enter
interface gigabitethernet 1/0/1
port link-mode route
ip address 192.168.4.1 24
undo shutdown
ip route 0.0.0.0 0 192.168.4.254
save
配置路由器地址及路由
system-view
interface gigabitethernet0/0
ip address 192.168.4.254 24
undo shutdown
ip route-static 192.168.1.0 24 192.168.4.1
ip route-static 192.168.2.0 24 192.168.4.1
ip route-static 192.168.3.0 24 192.168.4.1
save
免责声明:本站部份内容由优秀作者和原创用户编辑投稿,本站仅提供存储服务,不拥有所有权,不承担法律责任。若涉嫌侵权/违法的,请与我联系,一经查实立刻删除内容。本文内容由快快网络小嫣创作整理编辑!