计算机网络实训——类似校园网的网络架构与配置
最近学校组织了一次计算机网络的课程
主要就是让我们搭建一个类似于校园网一样的网络结构
虽说做的比较粗糙,但还是决定记录一下!!!
网络架构拓扑图如下:
AR2表示外网,其他表示一个内部网络!
由于AR1和AR2没有serial接口,需自己加上接口插板!!
进行PC机的ip配置:
进入配置,进行设备的名字更改,并且创建好vlan
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info en
Info: Information center is disabled.
[Huawei]sysname SW3
在sw3上创建好VLAN10和VLAN20
[SW3]vlan 10
[SW3-vlan10]vlan 20 //创建vlan20
[SW3-vlan20]disp vlan //查看vlan
一些检查命令的使用:
display vlan //查看VLAN信息
display port vlan //查看接口类型
display this //查看当前模式下的配置信息
进入端口,设置端口e0/0/1和e0/0/2为access模式
设置端口e0/0/3和e0/0/4为trunk模式,并且允许所有vlan通过
[SW3-vlan20]int e0/0/1
[SW3-Ethernet0/0/1]port link-type acc //设置为access模式
[SW3-Ethernet0/0/1]port default vlan 10 //接口e0/0/3属于VLAN 10
[SW3-Ethernet0/0/1]int e0/0/2
[SW3-Ethernet0/0/2]port link-type acc
[SW3-Ethernet0/0/2]port defa vlan 20
[SW3-Ethernet0/0/2]q
[SW3]int e0/0/3
[SW3-Ethernet0/0/3]port link-type trunk //设置为trunk模式
[SW3-Ethernet0/0/3]port trunk allow-pass vlan all //允许所有vlan通过
[SW3-Ethernet0/0/3]int e0/0/4
[SW3-Ethernet0/0/4]port link-type trunk
[SW3-Ethernet0/0/4]port trunk allow-pass vlan all
[SW3-Ethernet0/0/4]q
使用display port vlan查看端口的vlan分配情况,以及模式
在sw1上进行端口的配置,在e0/0/4和e0/0/5和e0/0/6上进行配置
设置为trunk模式,并且允许所有的vlan通过!
[sw1]int e0/0/4
[sw1-Ethernet0/0/4]port link-type trunk
[sw1-Ethernet0/0/4]port trunk allow-pass vlan all
[sw1-Ethernet0/0/4]q
[sw1]int e0/0/5
[sw1-Ethernet0/0/5]port link-type trunk
[sw1-Ethernet0/0/5]port trunk allow-pass vlan all
[sw1-Ethernet0/0/5]int e0/0/6
[sw1-Ethernet0/0/6]port link-type trunk
[sw1-Ethernet0/0/6]port trunk allow-pass vlan all
[sw1-Ethernet0/0/6]q