国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 網絡通信 > 正文

65xx系列交換機配置(Native IOS)(下)

2019-11-05 02:08:14
字體:
來源:轉載
供稿:網友

  5.4(2)    8.2(0.56)TET Ok
  
  Mod
  Sub-Module         Model       Serial    Hw   Statu
  s
  --- --------------------------- ------------------ ------------ -------
  -------
  5 Policy Feature Card 3    WS-F6K-PFC3A    SAD0752009D  2.0  Ok
  5 MSFC3 Daughterboard     WS-SUP720     SAD075109HX  2.0  Ok
  6 Policy Feature Card 3    WS-F6K-PFC3A    SAD0751085J  2.0  Ok
  6 MSFC3 Daughterboard     WS-SUP720     SAD0751077C  2.0  Ok
  7 Inline Power Module     WS-F6K-PWR            0.0  Ok
  
  Mod Online Diag Status
  --- -------------------
  2 Pass
  3 Pass
  5 Pass
  6 Pass
  7 Pass
  
  3.3. 配置機器名、telnet、密碼
  
  在全局模式下,用conf t,進入配置模式,進行以下配置:
  #conf t
  #clock timezone GMT 8 ;配置時區
  #clock set 13:30:21 31 JAN 2004 ;配置交換機時間
  #clock calendar-valid ;使能硬件時鐘同步
  #service timestamps debug datetime localtime ;配置系統debug記錄時間格式
  #service timestamps log datetime localtime ;配置系統日志記錄時間格式
  #service passWord-encryption ;配置使用加密服務,主要針對口令加密
  #hostname xxxx ;配置交換機名稱
  #enable secret 0 xxxxx ;配置enable口令
  #copy run start ;將配置信息保存到NVRAM中,重啟動不會丟失
  #line vty 0 4 ;配置telnet
  #exec-timeout 30 0
  #password 0 xxxx
  #login
  
  3.4. 配置snmp
  
  #conf t
  #snmp-server community cisco ro(只讀) ;配置只讀通信字符串
  #snmp-server community secret rw(讀寫) ;配置讀寫通信字符串
  #snmp-server enable traps ;配置網關SNMP TRAP
  #snmp-server host 10.254.190.1 rw ;配置網關工作站地址
  
  3.5. 啟動三層功能
  
  #ip routing ;啟動路由功能
  
  3.6. 查看和配置系統環境變量
  
  使用show bootvar命令查看系統啟動環境變量,包括BOOT, BOOTLDR, and
  CONFIG_FILE參數:
  Router# show bootvar
  BOOT variable = slot0:c6sup22-jsv-mz.121-5c.EX.bin,1;
  CONFIG_FILE variable does not exist
  BOOTLDR variable = bootFlash:c6msfc2-boot-mz.121-3a.E4
  Configu
  ration register is 0x2
  Router#
  改變BOOT,、BOOTLDR、CONFIG_FILE 這三個環境變量使用命令:
  BOOT #boot system
  BOOTLDR #boot bootldr
  CONFIG_FILE #boot config
  
  4. 端口設置
  
  4.1. 端口基本設置
  
  Cisco 65xx系列交換機的端口缺省都是路由模式,一般都會配置為交換端口使用,進
  入端口配置模式:
  對于單一端口,在配置模式下輸入:interface Ethernet,Fast Ethernet,Gigabit
  Ethernet x/y, x為槽位號,y為端口號。
  對于一組端口,可以使用以下的命令進入,例如:
  Router(config)# interface range fastethernet 5/1 - 5   或:
  Router(config-if)# interface range gigabitethernet 2/1 - 2, gigabitethernet
  3/1 - 2
  進行端口配置模式后,可以shutdown,或no shutdown端口,并可以對端口進行配置,
  快速以太端口有全雙工、半雙工和自動協商模式,假如知道對端連接的設備是采用何
  種方式,最好采用手工設置方式固定端口的模式和速率。
缺省是自動協商模式。
  快速以太端口的速率可以設置為100M,也可以設置為10M和自動協商。缺省是自動協
  商方式。如:
  Router(config-if)#speed [10 100 auto](速度)
  Router(config-if)# duplex [auto full half](雙工)
  或添加注釋,如:
  Router(config-if)# description Channel-group to "Marketing"
  
  4.2. 配置二層交換接口
  
  (以fastethernet為例,gigabitethernet一樣)
  Router(config)# interface fastethernet x/y
  Router(config-if)# shutdown
  Router(config-if)# switchport ;6500上缺省端口為路由端口,需要寫switchport
  將端口設置為交換端口
  Router(config-if)# switchport mode access
  Router(config-if)# switchport access vlan x
  Router(config-if)# no shutdown
  Router(config-if)# end
  
  清除二層接口配置
  (以fastethernet為例,gigabitethernet一樣)
  Router(config)# interface fastethernet x/y
  Router(config-if)# no switchport
  Router(config-if)# end
  注:使用default interface {ethernet fastethernet gigabitethernet}
  slot/port,使端口回到原來的缺省配置。
  
  4.3. 配置三層路由端口
  
  6500的端口缺省就是具有三層交換的端口,用來跟其他設備的連接,當將一個端口配
  置成三層端口之后,就可以在此端口上分配IP地址了。
  Router(config)# interface fastethernet x/y
  Router(config)# ip add x.x.x.x x.x.x.x
  Router(config)# no shutdown
  
  4.4. 配置端口Trunk
  
  將一個二層端口配置為Trunk模式:
  Router(config)# interface fastethernet x/y (以fastethernet為例,
  gigabitethernet一樣)
  Router(config-if)# shutdown
  Router(config-if)# switchport
  Router(config-if)# switchport trunk encapsulation dot1q
  Router(config-if)# switchport mode trunk
  Router(config-if)# no shutdown
  Router(config-if)# end
  Router# exit
  
  4.5. Ethernaet Channel
  
  Router(config)# interface range gigabitethernet1/1 - 2
  Router(config-if)#no ip address
  Router(config-if)#switchport
  Router(config-if)#switchport trunk encapsulation dot1q
  Router(config-if)#switchport mode trunk
  Router(config-if)#switchport trunk native vlan 1
  Router(config-if)#channel-group 1 mode on
  R>interface Port-channel1 ;自動產生,并且一定要如下所示,否則可能會有問題。
  switchport
  switchport trunk encapsulation dot1q
  switchport mode trunk
  !
  interface GigabitEthernet1/1
   no ip address
   switchport
   switchport trunk encapsulation dot1q
   switchport trunk native vlan 1
   channel-group 1 mode on
  !
  interface GigabitEthernet1/2
   no ip address
   switchport
   switchport trunk encapsulation dot1q
   switchport trunk native vlan 1
   channel-group 1 mode on
  假如有問題,使用命令#no int port-channel 1 ,#int g2/1 -2 ,#no switchport
  
  4.6. 查看端口配置
  Router# show running-config interface fastethernet 5/8
  Router# show interfaces fastethernet 5/8 switchport
  Router# show running-config interface port-channel 1
  Router# show spanning-tree interface fastethernet 4/4
  
  5. 配置VLAN
  
  5.1. 配置VTP
  
  VTP是一個2層信息協議,包括版本1和2。
一個網絡設備只能屬于一個VTP domain。
  缺省, Catalyst 6500交換機配置為VTP server mode,在沒有治理域的狀態。直到
  在一個trunk鏈路上收到其他域的宣告或手工配置治理域。VTP并不是一定要配置,
  但是配置可以簡化配置復雜度和易于治理。
  VTP PRuning(VTP裁剪)增強了網絡帶寬利用率。結合VTP,使得沒有必要接收某個
  vlan的廣播信息的交換機被裁剪,免于接收包括broadcast, multicast, unknown,
  and flooded unicast的包。
  Router(config)# vtp domain domain_name
  Router(config)# vtp mode {client server transparent}
  Router(config)# vtp version {1 2}
  Router(config)# vtp password password_string
  Router(config)# vtp pruning
  Router# show vtp status
  
  5.2. 配置VLAN端口
  
  5.3. 創建VLAN
  
  缺省狀態下,所有的二層端口均屬于vlan1,vlan的配置方法如下:
  命令 目的
  Step 1  Router# vlan database 進入vlan配置方式.
  Step 2  Router(vlan)# vlan vlan_ID 加入一個VLAN.
  Step 3 Router(vlan)# vtp domain name 設置vtp域名
  Step 3  Router(vlan)# exit 更新VLAN數據庫,并在治理域內廣播,退到全局模
  式
  Step 4  Router# show vlan name vlan_name 驗證VLAN配置
  
  刪除配置好的vlan
  Router# vlan database
  Router(vlan)# no vlan x
  Deleting VLAN 3...
  Router(vlan)# exit
  
  5.4. 給vlan分配端口
  
  Router(config)# interface fastethernet x/y
  Router(config-if)# shutdown
  Router(config-if)# switchport
  Router(config-if)# switchport mode access
  Router(config-if)# switchport access vlan x
  Router(config-if)# no shutdown
  Router(config-if)# end
  Router# exit
  
  5.5. 配置vlan地址
  
  Router(config)# interface vlan x
  Router(config)# ip add x.x.x.x x.x.x.x
  
  6. 配置HSRP
  
  不同網段之間的通信都是通過在終端工作站上設定缺省網關來實現的,為了實現冗
  余,每臺交換機上必然要配置相同的網段,那么就會在一個網段中出現2個不同地址
  的路由。
  
  接口(對于工作站就是缺省網關),當1條上聯鏈路失效時,數據必然會從另
  外1條鏈路傳輸到另外一臺交換機上進行處理,這時就存在缺省網關變更的問題。
  為了消除當一條鏈路失效導致的工作站缺省網關重新定義的問題,我們使用Cisco公
  司專有HSRP(Hot Standby Redundant Protocol)技術來解決這個問題。
  HSRP技術就是將分布在2臺交換機上相同網段的不同路由接口IP地址映射為一個虛
  擬IP地址來消除工作站缺省網關重新定義的問題。配置如下:
  
  在其中一臺65xx上按下面模版進行配置
  interface Vlan x
   ip address x.x.x.x x.x.x.x
   no ip redirects
   no ip directed-broadcast
   standby 1 ip y.y.y.y
   standby 1 priority 100
   standby 1 preempt
  standby 1 authentication secret
  
  在另一臺65xx上按下面模版進行配置
  interface Vlan x
   ip address x.x.x.x x.x.x.x
   no ip redirects
   no ip directed-broadcast
  standby 1 ip y.y.y.y
   standby 1 priority 110 ;這個優先級高,成為Master
   standby 1 preempt
  standby 1 authentication secret
  
  7. 配置NTP
  
  NTP (Network Time Protocol) 為路由器、交換機和工作站之間提供了一種時間同步
  的機制。時間同步了,多臺網絡設備上的相關事件記錄可以放在一起看,更為清楚,
  方便了分析較復雜的故障和安全事件等。
  (1)本地時鐘設置:
  clock timezone Peking +8 ;定義時區
  clock calendar-valid ;答應使用硬件calendar作為時鐘源
  clock set hh:mm:ss month year ;如clock set 14:02:30 10 December 2003
  clock update-calendar ;更新硬件時鐘
  (2)ntp server
  ntp calendar-update ;答應NTP定期更新calendar
  ntp master 3 ;答應本機作為NTP協議的主時鐘,精度級別3,供其它對等體同步用。

  ntp source int vlan 7 ;設置ntp時鐘原的端口或IP地址
  (3)常用的調試命令有:
  show ntp status
  show ntp associations
  
  8. 配置鏡像端口
  
  在交換機上配置鏡像端口(Mirroring Port)用于建立內部網絡的監控端口,以便收
  集相關被監測端口的數據流量,進行數據流監控及分析。我們這里配置鏡像端口用于
  配置入侵檢測設備(鏡像端口)的檢測口檢測一級防火墻和二級防火墻的內網接口,
  以探測是否有入侵行為發生。
  #monitor session 1 source interface Fa7/14 - 19 rx
  #monitor session 1 destination interface Fa7/22
  #monitor session 2 source interface Fa7/24
  #monitor session 2 destination interface Fa7/25
  
  9. 升級配置
  
  9.1. 交換機IOS保存和升級
  
  交換機的IOS保存和升級是采用TFTP協議完成,所以首先你必須要下載一個TFTP軟
  件,然后按照下面的步驟來進行:
  1.在你的機器上啟動TFTP 。
  2.登陸到交換機,然后在enable狀態下輸入如下命令來完成IOS的保存:
  switch#copy flash tftp
  Source IP address or hostname [171.68.206.171]?
  Source filename []? cat6000-sup2k8.7-1-1.bin
  Destination filename [cat6000-sup2k8.7-1-1.binn]?
  Loading cat6000-sup2k8.7-1-1.bin to 171.68.206.171 (via VLAN1):  !!!!
  !!!!!!!!!!!
  [OK - 1125001 bytes]
  3.假如你要升級IOS文件,那么你首先要檢查flash空間是否夠,假如空間不夠的
  話,則需要先刪除原來的IOS然后再升級。按照如下命令來完成IOS的升級:
  switch#copy tftp flash
  Source IP address or hostname []? 171.68.206.171
  Source filename []? cat6000-sup2k8.7-1-1.bin
  Destination filename [cat6000-sup2k8.7-1-1.bin]? y
  Loading cat6000-sup2k8.7-1-1.bin
  from 171.68.206.171 (via VLAN1):  !!!!
  !!!!!!!!!!!
  [OK - 1125001 bytes]
  
  9.2. 配置從另外一個版本的IOS啟動
  
  假如交換機FLASH容量答應的話,我們可以在不刪除原有交換機內部IOS軟件的情況
  下配置交換機從另外一個版本的IOS啟動,這樣可以避免一定程度上由于刪除原有
  IOS軟件帶來的風險。
  
  1.拷貝新的IOS到交換機的FLASH內。假設新的IOS軟件名稱為
  cat6000-sup2k8.7-1-1.bin
  # copy tftp flash
  2.配置從新的IOS軟件引導
  # boot system flash [flash-fs:][partition-number:][filename]
  #boot system flash sup-bootflash: cat6000-sup2k8.7-1-1.bin

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 石阡县| 岱山县| 文昌市| 茌平县| 渝北区| 阜平县| 金川县| 山东省| 赞皇县| 弥勒县| 乌审旗| 东兴市| 丹东市| 古蔺县| 罗甸县| 平果县| 昌乐县| 彰化市| 淮阳县| 麻城市| 洱源县| 裕民县| 新竹市| 比如县| 扬中市| 金坛市| 贡嘎县| 望奎县| 红河县| 新宾| 师宗县| 和硕县| 新兴县| 嘉兴市| 通江县| 田林县| 宜阳县| 贵州省| 张家港市| 新巴尔虎左旗| 广安市|