今天上午我和典总一起去学校网络中心进行了网络维护的工作,
到了301,黄老师首先交代了今天的任务,
1.把学校内部的ip地址进行修改,
2.把第三台华为3552加进去,把第一二台交换机负责的部分vlan切换到第三台交换机上。
3.把SSL,VPN切换到cams,
4.把学生区的交换机cams认证切换过来(采用的方式是把新的服务器上的ip该成老的,
新的改成40,老的改成50网段)
分配给典总的活是对7609交换机的两个模块进行配置。再登陆华为的3552,
把原来负担在2台机器上的认证vlan分配到3台机器上来。
(主要涉及的机器有2个防火墙模块及一个交换机模块,以及3台华为的3552 portal认证服务器)
具体的内容是利用软件ASDM对防火墙进行管理,利用crt telnet 7609的交换机模块进行相应
ip,路有策略的修改。
我们需要修改不同的vlan的ip,以及该vlan出口的网关的ip,以及gateway ip,
active ip,standby ip,同时原来7609中防火墙模块和交换机模块之间
的路由策略里的ip都要换成改动后的ip。
(asdm这款软件功能实在是强大,我们利用它可以在图形化的界面上修改防火墙的
配置。)
另外一个任务是新增了一台3552,我们要把原来的2台3552负载的vlan划分到3台
3552里去,比较麻烦的一个是要把原来3552上portal认证的free-user移动一部分到
新3552上去。
网络的拓扑结构简图如下:
配置过程中,我们发现一个问题,ping 7609的 两个接口都不通,(ping 202.197.53.254,ping 10.0.0.1不通)
开始我们还认为是网络或者配置的问题,
后面才得出结论,原来防火墙的端口默认对ping都是阻止的,所以才会出现不通的情况。
几个新学的操作命令及其概念:
1)切换到不同的虚拟防火墙模块
FWSM#changeto context **
7609上可以虚拟小型的防火墙,用来在不同的VLAN之间管理流量,而上面的操作命令是指
切换到某一个虚拟防火墙上,对它进行进一步的配置.
2)修改策略路由的配置:
show route-map |include 202.197.48.86
ip default next-hop 202.197.48.86
......
7609#config t
7609(config)#route-map ForTDXQ_pbr 10
(config-route-map)#no set ip default next-hop 202.197.48.86
(config-route-map)#set ip default next-hop 10.0.17.5
上面首先查询下一跳目标地址为202.197.48.86的ip,
然后修改它的ip地址为10.0.17.5
3)在3552上添加portal认证的free-user
在Portal上的free-user是不需要进行portal认证就可以直接上网的ip
在Portal上添加free-user的方法如下
进入配置界面:
[Huawei] portal free-user mac xx-xx-xx ip yy.yy.yy.yy vlan ii interface gi/0/i
在Portal上去除free-user的方法
进入配置界面:
[Huawei] undo portal free-user mac xx-xx-xx
4)在3552上增加被管理的vlan(见附录1
#allowed vlan add 65
配置允许VLAN列表
switchport trunk allowed vlan {add | all | except | remove} vlan-list
add:将VLAN添加到允许中继运载的VLAN列表
all:允许中继链路在所有的VLAN,这是一个默认值
except:除了VLAN-list指定的VLAN外,其他的VLAN都允许
remove:将vlan-list指定的VLAN从允许列表中移除
vlan-list:可以使用单个(1-4094)或者一个范围(不能出现空格)
5)接口计数器清零
虽然没有可靠性命令,可以考虑定期使用的一个重要命令是clear conuter EXEC命令。此命令的功能是清楚或重置接口计数器。此命令的 一般格式取决于正在使用的路由器。下面显示的是第二种格式用于Cisco7000系列产品:
clear counter [type number]
clear counter [type slot/port]
type表示特定的接口类型。如果你不指定特定接口,所有接口的计数器都被清除。
6)进入7609防火墙模块(8号插槽)
7609#session slot 8 processor 1
FWSM#
7) show spanning tree
Use the show spanning-tree command to display spanning tree state information. show spanning-tree [bridge_group | active | backbonefast | {bridge [id]}| brief | inconsistentports | {interface type} | root | summary [total] | uplinkfast | {Vlan vlan_id} | pathcost method]
8)在防火墙上vlan配置
switch#vlan database ;进入VLAN设置
switch(vlan)#vlan 2 ;建VLAN 2
switch(vlan)#no vlan 2 ;删vlan 2
switch(config)#int f0/1 ;进入端口1
switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2
附录1 交换机上配置,允许中继某个vlan
---------------------------------------------------------------------------------------------------------------
封装配置
1. 进入中继接口配置模式
interface f0/24
2. 设置中继接口的封装类型
· switchport trunk encapsulation isl:中继接口的类型为cisco专有的isl(3550)
· switchport trunk encapsulation dot1q:中继接口的类型为 IEEE 802.1Q (2950)
· switchport trunk encapsulation negotiate:根据相邻接口的类型来协商封装类型
允许中继访问的VLAN
在默认情况下,交换机的中继接口发送和接收来自所有VLAN(1-4094)数据流量。我们可以使用命令将一些VLAN从允许访问的VLAN列表中删除,使得这些VLAN在中继链路上不装载。
配置步骤:
1. 进入接口模式 interface f0/24
2. 将接口配置为中继模式(如果已经是中继接口就不需要)
switchport mode trunk
3. 配置允许VLAN列表
switchport trunk allowed vlan {add | all | except | remove} vlan-list
· add:将VLAN添加到允许中继运载的VLAN列表
· all:允许中继链路晕在所有的VLAN,这是一个默认值
· except:除了VLAN-list指定的VLAN外,其他的VLAN都允许
· remove:将vlan-list指定的VLAN从允许列表中移除
· vlan-list:可以使用单个(1-4094)或者一个范围(不能出现空格)
4.查看配置结果
show running interface f0/24 //查看中继接口配置
show interface f0/24 switchport //查看中继接口的状态
如:
show running interface f0/24
show interface f0/24 switchport
Name: Fa0/24
Switchport: Enabled
Administrative Mode: dynamic desirable
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Appliance trust: none
------------------------------------------------------------------
conf t
interface f0/24
switchport trunk allowed vlan remove 3,5,6-10
end
----------------------------------------------------------------------------------------------------------------------