沈 阳 大 学
课程设计说明书 NO.17
Switch1(config-if)#int e0/4
Switch1(config-if)#vlan-membership static 2
Switch1(config-if)#int e0/20
Switch(config-if)#vlan-membership static 2
Switch1(config-if)#int e0/21
Switch1(config-if)#vlan-membership static 2
Switch1(config-if)#
【注】"int"是"nterface"命令缩写,是接口的意思。"e0/3"是"ethernet 0/2"的缩写,代表交换机的0号模块2号端口。
(2). 名为"Switch2"的交换机的VLAN端口号配置如下:
Switch2(config)#int e0/2
Switch2(config-if)#vlan-membership static 3
Switch2(config-if)#int e0/3
Switch2(config-if)#vlan-membership static 3
Switch2(config-if)#int e0/4
Switch2(config-if)#vlan-membership static 3
Switch2(config-if)#int e0/15
Switch2(config-if)#vlan-membership static 3
Switch2(config-if)#int e0/16
Switch2(config-if)#vlan-membership static 3
Switch2(config-if)#
(3). 名为"Switch3"的交换机的VLAN端口号配置如下(它包括两个VLAN组的配置),先看VLAN 4(Huma)的配置代码:
Switch3(config)#int e0/2
Switch3(config-if)#vlan-membership static 4
Switch3(config-if)#int e0/3
Switch3(config-if)#vlan-membership static 4
沈 阳 大 学
课程设计说明书 NO.18
Switch3(config-if)#int e0/4
Switch3(config-if)#vlan-membership static 4
Switch3(config-if)#int e0/8
Switch3(config-if)#vlan-membership static 4
Switch3(config-if)#int e0/9
Switch3(config-if)#vlan-membership static 4
Switch3(config-if)#
下面是VLAN5(Info)的配置代码:
Switch3(config)#int e0/10
Switch3(config-if)#vlan-membership static 5
Switch3(config-if)#int e0/11
Switch3(config-if)#vlan-membership static 5
Switch3(config-if)#int e0/12
Switch3(config-if)#vlan-membership static 5
Switch3(config-if)#int e0/20
Switch3(config-if)#vlan-membership static 5
Switch3(config-if)#int e0/21
Switch3(config-if)#vlan-membership static 5
Switch3(config-if)#
为了验证我们的配置,可以在特权模式使用"show vlan"命令显示出刚才所做的配置,检查一下是否正确。
4.13路由器的配置
Press RETURN to get started!
Router>
Router>enable
Router#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#interface f
Router1(config)#interface fastEthernet 0/0
Router1(config-if)#ip address 192.168.1.254 255.255.255.0
Router1(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router1(config-if)#exit
Router(config)#interface f06/0
Router2(config-if)#ip add 192.168.2.254 255.255.255.0
Router2(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet6/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet6/0, changed state to up
Router2(config-if)#exit
Router3(config)#interface f1/0
Router3(config-if)#ip add 192.168.3.254 255 ^
% Invalid input detected at '^' marker.
Router3(config-if)#ip add 192.168.3.254 255.255.255.0
Router3(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up
Router(config-if)3#interface f7/0
Router(config-if)3#ip add 192.168.4.254 255.255.255.0
Router(config-if)3#no shutdown
%LINK-5-CHANGED: Interface FastEthernet7/0, changed state to up
上一页 [1] [2] [3] [4] [5] [6] [7] [8] 下一页