交换机:
Ruijie>en
Ruijie#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Ruijie(config)#int f0/0
Ruijie(config-FastEthernet 0/0)#switchport mode trunk
Ruijie(config-FastEthernet 0/0)#end
Ruijie#*Oct 24 11:42:21: %SYS-5-CONFIG_I: Configured from console by console
Ruijie#sh vlan
Ruijie#sh int f0/0 switchport
Interface Switchport Mode Access Native Protected VLAN lists
------------------------ ---------- --------- ------ ------ --------- ----------
FastEthernet 0/0 enabled TRUNK 1 1 Disabled ALL
路由器:(实现单臂路由vlan11和vlan22间的通信,评分ruijie#sh run)
Ruijie>en
Ruijie#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Ruijie(config)#int f0/0.11(对应vlan11)
Ruijie(config-if-FastEthernet 0/1)#no ip address
Ruijie(config-if-FastEthernet 0/1)#no shut
Ruijie(config-if-FastEthernet 0/1)#exit
Ruijie(config)#int f0/11
Ruijie(config-subif)#encapsulation dot1Q 11
Ruijie(config-subif)#ip address 192.168.10.1 255.255.255.0
Ruijie(config-subif)#exit
Ruijie(config)#int f0/0.22(对应vlan22)
Ruijie(config-subif)#en
Ruijie(config-subif)#encapsulation dot1Q 22
Ruijie(config-subif)#ip address 192.168.20.1 255.255.255.0
Ruijie(config-subif)#end
Ruijie#sh route
Ruijie#sh ip route
二层交换机,config模式下
(评分:L2#show mointor session 4(下面session后是几就是几)
monitor session 4 source int fa0/15 both(监控口)
monitor session 4 destination int fa0/13(受控制口)