配置流程
1)在交换机上创建vlan
vlan batch 10 20 30
2)配置vlan端口
int g0/0/1
port link-type access
port default vlan 10
3)将与路由器相连的接口设置为trunk
int g0/0/4
port link-type trunk
port trunk allow-pass vlan 10 20 30
4)配置路由器
int g0/0/0.1
dot1q terminal vid 10 //启用802.1q协议,启用vlan 10
ip address 10.1.1.1 24
arp broadcast enable
路由器的完整配置
display current-configuration
[V200R003C00]
#
sysname r1
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
drop illegal-mac alarm
#
set cpu-usage threshold 80 restore 75
#
dhcp enable
#
ip pool dhcp10
gateway-list 10.1.1.1
ne服务器托管网twork 10.1.1.0 mask 255.255.255.0
lease day 5 hour 5 minute 30
dns-list 8.8.8.8
#
aaa
authentication-scheme default
a服务器托管网uthorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
#
interface GigabitEthernet0/0/0.1
dot1q termination vid 10
ip address 10.1.1.1 255.255.255.0
arp broadcast enable
dhcp select global
#
interface GigabitEthernet0/0/0.2
dot1q termination vid 20
ip address 20.1.1.1 255.255.255.0
arp broadcast enable
#
interface GigabitEthernet0/0/0.3
dot1q termination vid 30
ip address 30.1.1.1 255.255.255.0
arp broadcast enable
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
机房租用,北京机房租用,IDC机房托管, http://www.fwqtg.net
1. 泛型编程 2. 模板:参数类型化 3. 模板分类 3.1 函数模板 概念 实例化:隐服务器托管网式实例化,显式实例化 3.2 类模板 4. 在模板参数列表中:class和typename 5.模板参数列表:template 类型参数:T就是类型参数 非类…