扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
set password $2$hodC$6G9acb2epHleGd7Hy6qA8.
set enablepass $2$.dxG$ujEuGXH9VoewvKJeTqN.D. 给交换机设置使能口令
#system
set system name switch 设置交换机名字
set system highavailability enable 实现高性能热备
!
#!
#vtp
set vtp domain net 设置VTP 域名
set vlan 1 name default type ethernet mtu 1500 said 100001 state active
set vlan 1002 name fddi-default type fddi mtu 1500 said 101002 state active
set vlan 1004 name fddinet-default type fddinet mtu 1500 said 101004 state active stp ibm
set vlan 1005 name trnet-default type trbrf mtu 1500 said 101005 state active stp ibm
set vlan 10,20,30,40-41,50,60,70,80
set vlan 1003 name token-ring-default type trcrf mtu 1500 said 101003 state active mode srb aremaxhop 7 stemaxhop 7 backupcrf off
!
#ip
set interface sc0 20 10.35.50.253/255.255.255.0 10.35.50.255 设置交换机ip地址
需要根据交换机ip地址属于那个vlan来确定ip地址的vlan号
set ip route 0.0.0.0/0.0.0.0 10.35.50.254 设置交换机静态路由
set ip alias default 0.0.0.0
set ip alias apple 10.35.50.251 设置地址映射
举例:原来telnet 10.35.50.251 .现在可以直接telnet apple 。作用一样。
set ip alias apple2 10.35.50.250
!
#set boot command
set boot config-register 0x2
set boot system flash bootflash:cat6000-sup2.6-3-1.bin 设置启动交换机时加载系统操作系统。
!
#port channel
#module 1 : 2-port 1000BaseX Supervisor
!
#module 2 : 2-port 1000BaseX Supervisor
!
#module 3 : 8-port 1000BaseX Ethernet
set vlan 20 3/1-6 把端口划分进具体vlan里面,根据网络设计方案具体确定端口用户属于那个vlan
set vlan 60 3/7-8
set port name 3/1 ibmweb link 给端口命名,方便管理
!
#module 4 : 48-port 10/100BaseTX Ethernet
set vlan 20 4/5-48
set vlan 70 4/1-4
set trunk 4/5 on dot1q 1-1005,1025-4094 设置交换机间链路 干道(trunk)(此端口与2950交换机相连)
set port channel 4/5-6 mode off
!
#module 5 empty
!
#module 6 : 48-port 10/100BaseTX Ethernet
set vlan 20 6/1-48
set spantree portfast 6/6-12 enable 设置速端口 (减少收敛时间)
!
#module 7 empty
!
#module 8 : 48-port 10/100BaseTX Ethernet
set vlan 20 8/1-48
!
#module 9 empty
!
#module 15 : 1-port Multilayer Switch Feature Card
!
#module 16 : 1-port Multilayer Switch Feature Card
end
两个引擎模块上各有一个msfc2 模块互为热备且转发路由互为负载均衡。MSFC2多层交换模块提供交换机vlan间路由。
引擎一上msfc2配置(r1):
操作系统为cisco ios 12.1
Current configuration : 3422 bytes
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
service password-encryption
!
hostname r1 设置路由器主机名
!
boot system flash bootflash:c6msfc2-psv-mz.121-8a.E5 载入操作系统
enable secret 5 $1$gZQ6$pGpbM7yPeCoyTw1oGI9L/0 设置口令
!
username lxd password 7 060A1725
ip subnet-zero
!
!
interface Vlan10 进入vlan10接口
ip address 10.35.50.61 255.255.255.192 配置vlan10 ip地址
no ip redirects
standby priority 150 preempt 设置热备份路由权限(数字越高越大)
standby name webserver 设置端口名字
standby ip 10.35.50.62 设置虚拟网关IP地址
!
interface Vlan20
ip address 10.35.50.125 255.255.255.192
no ip redirects
standby priority 150 preempt
standby name txk
standby ip 10.35.50.126
!
interface Vlan30
ip address 10.35.50.189 255.255.255.192
no ip redirects
standby priority 150 preempt
standby name zhiandadui
standby ip 10.35.50.190
!
interface Vlan35
ip address 10.35.50.253 255.255.255.192
no ip redirects
standby priority 150 preempt
standby name wangguanzhongxin
standby ip 10.35.50.254
!
interface Vlan50
ip address 10.35.51.29 255.255.255.224
no ip redirects
standby priority 50 preempt
standby name julingdao
standby ip 10.35.51.30
!
interface Vlan51
ip address 10.35.51.61 255.255.255.224
no ip redirects
standby priority 50 preempt
standby name zhenfawei
standby ip 10.35.51.62
!
interface Vlan53
ip address 10.35.51.125 255.255.255.192
no ip redirects
standby priority 50 preempt
standby name xinjingdadui
standby ip 10.35.51.126
!
interface Vlan55
ip address 10.35.51.253 255.255.255.128
no ip redirects
standby priority 50 preempt
standby name office
standby ip 10.35.51.254
!
interface Vlan56
ip address 10.35.52.125 255.255.255.128
no ip redirects
standby priority 50 preempt
standby name 110
standby ip 10.35.52.126
!
interface Vlan57
ip address 10.35.52.157 255.255.255.224
no ip redirects
standby priority 50 preempt
standby name zhanbaoke
standby ip 10.35.52.158
!
interface Vlan58
ip address 10.35.52.189 255.255.255.224
no ip redirects
standby priority 50 preempt
standby name bagongshi
standby ip 10.35.52.190
!
interface Vlan59
ip address 10.35.52.221 255.255.255.224
no ip redirects
standby priority 50 preempt
standby name zhenzhizhu
standby ip 10.35.52.222
!
interface Vlan60
ip address 10.35.55.125 255.255.255.128
no ip redirects
standby priority 150 preempt
standby name sunserver
standby ip 10.35.55.126
!
interface Vlan70
ip address 10.35.55.250 255.255.255.128
no ip redirects
standby priority 50 preempt
standby name huaweirouter
standby ip 10.35.55.254
!
interface Vlan80
ip address 10.35.59.125 255.255.255.128
no ip redirects
standby priority 50 preempt
standby name chuoguanshu
standby ip 10.35.59.126
!
router ospf 100 打开ospf路由进程,进程号为100
log-adjacency-changes
network 10.35.50.0 0.0.0.63 area 2 对网段发布启用ospf协议,区域号为2
network 10.35.50.64 0.0.0.63 area 2
network 10.35.50.128 0.0.0.63 area 2
network 10.35.50.192 0.0.0.63 area 2
network 10.35.51.0 0.0.0.31 area 2
network 10.35.51.32 0.0.0.31 area 2
network 10.35.51.64 0.0.0.63 area 2
network 10.35.51.0 0.0.0.127 area 2
network 10.35.51.128 0.0.0.127 area 2
network 10.35.52.0 0.0.0.127 area 2
network 10.35.52.128 0.0.0.31 area 2
network 10.35.52.160 0.0.0.31 area 2
network 10.35.52.192 0.0.0.31 area 2
network 10.35.55.0 0.0.0.127 area 2
network 10.35.55.128 0.0.0.127 area 2
network 10.35.59.0 0.0.0.127 area 2
!
ip classless
ip route 0.0.0.0 0.0.0.0 10.35.55.253 设置默认路由
no ip http server
!
snmp-server community jyganet RO
!
!
line con 0
line vty 0 4 设置telnet 口令
password 7 082D544A
login local
!
end
引擎二上msfc2配置(r2):
操作系统为cisco ios 12.1
version 12.1
service timestamps debug uptime
service timestamps log uptime
service password-encryption
hostname 6509r2
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者