实验目的
1、理解双工模式和接口速率
2、掌握更改双工模式的配置
3、掌握更改接口速率的配置
4、掌握VLAN的配置
5、掌握ACL的基础配置
实验内容
某企业新建网络,购置了4台交换机,SW1、SW2、SW3、SW4。其中SW2、SW3和SW4为接入层交换机,SW1为汇聚交换机,要求如下:
1、需对4台交换机进行配置,确保交换机接口使用全双工模式,并根据需要配置接口速率。
2、市场部、技术部和财务部(分别属于VLAN10、VLAN20、VLAN30),市场部和技术部能互相访问,技术部与财务部能互相访问,但市场部与财务部不能互相访问。
网络拓扑
实验配置步骤如下:
市场部PC1配置如下:
IP地址:192.168.10.1
子网掩码:255.255.255.0
网关:192.168.10.254
技术部PC2配置如下:
IP地址:192.168.20.1
子网掩码:255.255.255.0
网关:192.168.20.254
财务部PC3配置如下:
IP地址:192.168.30.1
子网掩码:255.255.255.0
网关:192.168.30.254
接入层交换机SW2的配置如下:
sysname SW2
vlan batch 10 20
interface Ethernet0/0/1
undo negotiation auto
duplex full
port link-type trunk
port trunk allow-pass vlan 10 20
interface Ethernet0/0/2
undo negotiation auto
speed 10
port link-type access
port default vlan 10
接入层交换机SW3的配置如下:
sysname SW3
vlan batch 10 20
interface Ethernet0/0/1
undo negotiation auto
duplex full
port link-type trunk
port trunk allow-pass vlan 20 30
interface Ethernet0/0/2
port link-type access
port default vlan 20
接入层交换机SW4的配置如下:
sysname SW4
vlan batch 20 30
interface Ethernet0/0/1
undo negotiation auto
duplex full
port link-type trunk
port trunk allow-pass vlan 20 30
interface Ethernet0/0/2
undo negotiation auto
speed 10
port link-type access
port default vlan 30
汇聚层交换机SW1的配置如下:
sysname SW1
vlan batch 10 20 30
acl number 2000
rule 5 deny source 192.168.10.0 0.0.0.255
interface Vlanif10
ip address 192.168.10.254 255.255.255.0
#
interface Vlanif20
ip address 192.168.20.254 255.255.255.0
interface Vlanif30
ip address 192.168.30.254 255.255.255.0
interface GigabitEthernet0/0/1
undo negotiation auto
duplex full
port link-type trunk
port trunk allow-pass vlan 10 20
interface GigabitEthernet0/0/2
undo negotiation auto
duplex full
port link-type trunk
port trunk allow-pass vlan 20 30
interface GigabitEthernet0/0/3
undo negotiation auto
duplex full
port link-type trunk
port trunk allow-pass vlan 20 30
traffic-filter outbound acl 2000
领取专属 10元无门槛券
私享最新 技术干货