vlan

##############
router模拟pc##
##############

conf ter
no ip routing

interface Ethernet0/0
ip address 192.168.1.3 255.255.255.0
no shutdown
exit
ip default-gateway 192.168.1.254
exit

###################
router模拟switch ##
###################
conf ter
int f0/1
dup full
speed 100


vlan database
vlan 10
name vlan10
vlan 20
name vlan20
exit

conf ter
int f 0/1
sw mod ac
sw ac vlan 10
exit

conf ter
int f 0/4
sw tr enc dot
sw mod tr
exit

conf ter
int f 0/5
sw tr enc dot 
sw mod tr
exit

sh vlan-s

##############
单臂路由功能##
##############

conf ter
int f 0/0
no sh
exit
int f 0/0.10
en dot 10
ip add 192.168.1.254 255.255.255.0
no sh

conf ter
int f 0/0
no sh
exit
int f 0/0.20
en dot 10
ip add 192.168.2.254 255.255.255.0
no sh

################
VTP模式使用   ##
################

conf ter
vtp domain test
vtp mode server/client/transparent
vtp password amanda
vtp pruning
end

conf ter
int f 0/3
switchpor trunk pruning vlan remove 2-4,6,8
end

sh vtp status
sh int f 0/3 switchport
no vtp password
no vtp pruning

conf ter
vtp ver 2
no vtp ver 2
end

##############
静态vlan    ##
##############
client

conf ter
vmps server 4.4.4.4

sever比较不适用


###############
trunk基本操作##
###############
 
interface ranger fa 0/0-10,fa 0/15
show mac-address-table aging-time
show int trunk
interface fastethernet 0/1
shutdown
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1,3,12-17
switchport mode trunk
switchport trunk native vlan 99
switchport nonegotiate
no shutdown

interface fastethernet 0/1
switchport access vlan 30
switchport mode dot1q-tunnel (双tag端口)

猜你喜欢

转载自davidlee1986.iteye.com/blog/1919375