SwitchA (config-vlan2)#vlan 3
SwitchA (config-vlan3)#port e 0/10
SwitchA (config-vlan4)#interface e 0/1
SwitchA (config-if-Ethernet0/1)#trunk all
SwitchA (config-if-Ethernet0/1)#gvrp enable
SwitchA (config-if-Ethernet0/1)#interface vlan 2
//进入VLAN 2的虚接口配置模式
SwitchA (config-VLAN-Interface2)#ip address 10.1.1.100 255.255.255.0
//配置VLAN 2虚接口的IP地址
SwitchA (config-VLAN-Interface2)#interface vlan 3
SwitchA (config-VLAN-Interface3)#ip address 10.1.2.100 255.255.255.0
SwitchA (config-VLAN-Interface3)#interface vlan 4
SwitchA (config-VLAN-Interface4)#ip address 10.1.3.100 255.255.255.0
SwitchA (config-VLAN-Interface4)#exit
SwitchA (config)#rule-map l3 net1tonet2 10.1.1.0 255.255.255.0 10.1.2.0 255.255.255.0
//定义流分类规则
SwitchA (config)#flow-action net1tonet2 deny //定义流的动作
SwitchA (config)#acl net1tonet2 net1tonet2 net1tonet2 //定义访问控制列表
SwitchA (config)#access-group net1tonet2 //将ACL定义的访问控制策略激 现在让我们看一看show running-config的信息:
SwitchA(config)#show running-config Building running configuration... Current configuration is : hostname SwitchA
rule-map l3 net1tonet2 10.1.1.0 255.255.255.0 10.1.2.0 255.255.255.0 flow-action net1tonet2 deny
acl net1tonet2 net1tonet2 net1tonet2
access-group net1tonet2
link-aggregation Ethernet0/1 to Ethernet0/2 ingress-egress gvrp enable interface Aux0/0 vlan 1 vlan 2
port Ethernet0/9 vlan 3
port Ethernet0/10
vlan 4
interface Ethernet0/1
trunk all
gvrp enable
interface Ethernet0/10 interface NULL0
interface VLAN-Interface2
ip address 10.1.1.100 255.255.255.0 interface VLAN-Interface3
ip address 10.1.2.100 255.255.255.0 interface VLAN-Interface4
ip address 10.1.3.100 255.255.255.0 line aux 0
no login
line vty 0 4 end
SwitchB#show running-config
Building running configuration... Current configuration is : hostname SwitchB
gvrp !
interface Aux0/0 !
vlan 1 !
vlan 2 !
vlan 4 !
interface Ethernet0/1
switchport mode trunk
switchport trunk allowed vlan all gvrp !
interface Ethernet0/10
switchport access vlan 4 !
interface Ethernet0/11
???. !
interface Ethernet0/2
switchport mode trunk
switchport trunk allowed vlan all gvrp !
interface Ethernet0/20
???
interface Ethernet0/8 !
interface Ethernet0/9
switchport access vlan 2 !
interface NULL0 !
link-aggregation Ethernet0/1 to Ethernet0/2 ingress-egress !
line aux 0
no login
line vty 0 4 ! end
-------------------------------------------------------------------------------- -- 作者:admin
-- 发布时间:2005-4-18 9:46:45
--
4.6 以太交换网安全
仍然沿用练习五的组网图。有时候我们必须远程登录来配置交换机,所以我们需要配置交换机的远程登录,同时我们应避免这些交换机的非法访问。在这个练习中,你需要配置SwitchA使PCA和PCC能telnet上SwitchA并远程配置。
配置如下:
SwitchA(config)#enable password 0 huawei //配置进入特权模式的密码
SwitchA(config)#line vty 0 4 //进入line配置模式
SwitchA(config-line-vty0-4)#login local //使能本地口令验证
SwitchA(config-line-vty0-4)#exit
SwitchA(config)#user huawei password 0 huawei //配置本地验证的用户名及密码
如果你的配置已正常运行,你可以在PCA或PCC上用“telnet 10.1.1.100”登录SwitchA,然后输入正确的用户名和密码,你就能从PC机远程配置SwitchA了。
问题:
你能使SwitchB能远程登录,并从PCA、PCC以及SwitchA上配置它吗?
实验二 使用华为Quidway系列交换机复杂组网2.1 实验目的1、 让学员学会如何设计和构建一个典型的交换网络。
2、 让学员学会如何在交换网络中配置生成树协议(STP),STP在交换机之间是如何工作的,如何通过改变STP的参数来改变生成树的状态。另外,学员应能通过debug信息分析STP的构建过程。
3、 让学员学会GVRP的动态注册过程。
4、 让学员学会如何利用三层交换机实现不同VLAN间的通信以及如何限制不同VLAN间的通信。
5、 让学员学会如何远程配置交换机以及如何保护交换机不受非法登录。
6、 让学员学会交换机的其他配置,例如:端口聚合、ACL、端口监控。
7、 让学员具备在三层交换机和路由器上配置OSPF动态路由协议的能力,使得交换网中