繁体中文
设为首页
加入收藏
当前位置:技术首页 >> 网络 >> 路由技术 >> cisco以太网经典配置

cisco以太网经典配置

2002-11-14 19:58:44  作者:itzero  来源:ITZERO收集整理  浏览次数:120  文字大小:【】【】【
简介:  很经典啊,我用的。   Configurations   The configurations in this document were implemented in an isolated lab environment. The configurations were cleared by issuing the write erase comma ...
关键字:以太网

  很经典啊,我用的。
  Configurations
  The configurations in this document were implemented in an isolated lab environment. The configurations were cleared by issuing the write erase command on the routers, and the clear config all command on the switches to ensure that all devices have a default configuration. Make sure you understand the potential impact of any configuration or command on your network before using it.
  
  Catalyst 6500 Switch
  
  Note: The following screen captures show the commands that were entered on the Catalyst 6500 switch. Comments between the commands are added in blue italics to explain certain commands and steps.
  
  !-- Set the IP address and default gateway for VLAN 1 for management purposes.
  
  Catalyst6500> (enable) set int sc0 10.10.10.2 255.255.255.0
  Interface sc0 IP address and netmask set.
  Catalyst6500> (enable) set ip route default 10.10.10.1
  Route added.
  !-- Set the VTP mode.
  !-- In our example, we have set the mode to be transparent. !-- Depending on your network, set the VTP mode accordingly. !-- For details on VTP, refer to Understanding and Configuring VLAN Trunk Protocol (VTP).
  
  Catalyst6500> (enable) set vtp mode transparent
  VTP domain modified
  
  !-- Adding VLAN 2. VLAN 1 already exists by default.
  Catalyst6500> (enable) set vlan 2
  VLAN 2 configuration successful
  
  !-- Adding port 3/4 to VLAN 2. Port 3/3 is already in VLAN 1 by default.
  Catalyst6500> (enable) set vlan 2 3/4
  
  VLAN 2 modified.
  VLAN 1 modified.
  VLAN Mod/Ports
  ---- -----------------------
  2 3/4
  
  ! -- Set the port speed and duplex at 100 and full. One of
  !-- the requirements for EtherChannel to work is for speed and duplex to be the same on
  !-- both sides. To guarantee this, we will hard code both speed and duplex on ports 3/1 and 3/2.
  
  Catalyst6500> (enable) set port speed 3/1-2 100
  Ports 3/1-2 transmission speed set to 100Mbps.
  Catalyst6500> (enable) set port duplex 3/1-2 full
  Ports 3/1-2 set to full-duplex.
  
  ! -- Enable FEC on ports 3/1 and 3/2.
  ! -- Becuase routers do not understand Port Aggregation Protocol(PAgP),
  ! -- we set the channel mode to on which causes ports to channel,
  ! -- but not generate PAgP frames.
  
  
  Catalyst6500> (enable) set port channel 3/1-2 on
  Port(s) 3/1-2 are assigned to admin group 105.
  Port(s) 3/1-2 channel mode set to on.
  
  ! -- Enable trunking on ports 3/1 and 3/2.
  ! -- Becuase routers do not understand Dynamic Trunking Protocol(DTP),
  ! -- we set the trunking mode to nonegotiate which causes ports to trunk,
  ! -- but not generate DTP frames.
  
  
  ! -- Notice that becuase we configured EtherChannel first,
  ! -- any trunk settings applied now to one port automatically apply to all other ports in the channel.
  
  ! -- Enter the trunking encapsulation as either isl ...
  
  Catalyst6500> (enable) set trunk 3/1 nonegotiate isl Port(s) 3/1-2 trunk mode set to nonegotiate.
  Port(s) 3/1-2 trunk type set to isl.
  
  ! -- ... or as dot1q.
  ! -- Make sure the native VLAN(default is VLAN 1) matches across the link.
  ! -- For more information on the native VLAN and 802.1q trunking, refer to
  ! -- Trunking Between Catalyst 4000, 5000, and6000 Family Switches Using 802.1q Encapsulation.
  
  Catalyst6500> (enable) set trunk 3/1 nonegotiate dot1q
  Port(s) 3/1-2 trunk mode set to nonegotiate.
  Port(s) 3/1-2 trunk type set to dot1q.
  
  Catalyst6500> (enable) show config
  This command shows non-default configurations only.
  Use 'show config all' to show both default and non-default configurations.
  .........
  ..................
  ..
  
  begin
  !
  # ***** NON-DEFAULT CONFIGURATION *****
  !
  !
  #time: Thu May 2 2002, 01:26:26
  !
  #version 5.5(14)
  !
  !
  #system
  set system name Catalyst6500
  !
  #!
  #vtp
  set vtp mode transparent
  set vlan 1 name default type ethernet mtu 1500 said 100001 state active
  set vlan 2 name VLAN0002 type ethernet mtu 1500 said 100002 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 ieee
  set vlan 1005 name trnet-default type trbrf mtu 1500 said 101005 state active stp ibm
  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 1 10.10.10.2/255.255.255.0 10.10.10.255
  
  set ip route 0.0.0.0/0.0.0.0 10.10.10.1 !
  #set boot command
  set boot config-register 0x2102
  set boot system flash bootflash:cat6000-sup.5-5-14.bin
  !
  #port channel
  set port channel 3/1-2 105
  !
  # default port status is enable
  !
  !
  #module 1 empty
  !
  #module 2 : 2-port 1000BaseX Supervisor
  !
  #module 3 : 48-port 10/100BaseTX Ethernet
  set vlan 2 3/4
  set port disable 3/5
  
  set port speed 3/1-2 100
  set port duplex 3/1-2 full
  set trunk 3/1 nonegotiate isl 1-1005
  set trunk 3/2 nonegotiate isl 1-1005
  
  !-- If IEEE 802.1q is configured,
  !-- you will see the following output instead:
  
  set trunk 3/1 nonegotiate dot1q 1-1005
  set trunk 3/2 nonegotiate dot1q 1-1005
  
  
  set port channel 3/1-2 mode on
  !
  #module 4 : 24-port 100BaseFX MM Ethernet
  !
  #module 5 empty
  !
  #module 6 empty
  !
  #module 15 empty
  !
  #module 16 empty
  end
  
  
  Cisco 7500 Router
  
  Note: The following screen captures show the commands that were entered on the Cisco 7500 router. Comments between the commands are added in blue italics to explain certain commands and steps.
  
  ! -- Configure a port-channel interface to enable FEC.
  
  7500#configure terminal
  Enter configuration commands, one per line. End with CNTL/Z.
  
  7500(config)#int port-channel 1
  01:34:10: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed
  state to down
  
  ! -- Configure full-duplex to match the duplex setting on the Catalyst switch side.
  
  7500(config-if)#full-duplex
  7500(config-if)#exit
  
  ! -- If using ISL trunking, configure two port-channel sub-interfaces and enable ISL trunking
  ! -- by issuing the encapsulation isl command.
  ! -- Configure IP addresses for InterVLAN routing.
  
  7500(config)#int port-channel 1.1
  7500(config-subif)#encapsulation isl 1
  7500(config-subif)#ip address 10.10.10.1 255.255.255.0
  7500(config-subif)#exit
  
  7500(config)#int port-channel 1.2
  7500(config-subif)#encapsulation isl 2
  7500(config-subif)#ip address 10.10.11.1 255.255.255.0
  7500(config-subif)#exit
  
  
  ! -- If using 802.1q trunking, configure two port-channel sub-interfaces, enable 802.1q trunking
  ! -- by issuing the encapsulation dot1Q native command and configure the IP addresses for
  ! -- InterVLAN routing.
  
  Note: The encapsulation dot1Q 1 native command was added in Cisco IOS version 12.1(3)T. If you are using an



点击收藏到

责任编辑:itzero

本文引用地址: http://tech.itzero.com/2002/1114/16934.html 请粘贴到你的QQ/MSN上推荐给你的好友

相关文章
万兆铜缆以太网的布线技术介绍
全方位透视万兆铜缆以太网布线
以太网交换机的堆叠与级联基础
四招保障以太网络安全
以太网的发展历程及IEEE的标准
 

最新文章

更多

· 路由器问题故障排除方法
· 图解交换机与路由器组网...
· 提高城域网路由器网络层...
· 常见宽带路由器设置方法...
· 常见宽带路由器设置方法...
· 深入了解路由器与交换机...
· 深入了解路由器与交换机...
· 阻挡入侵狙击攻略 配置安...
· 如何实现两条DDN专线相互...
· 不配置回指路由 多网段网...

热点文章

更多

· 通过路由器实现用户定时...
· Cisco高档路由器故障排除...
· 调教路由器 让网络管理效...
· 从路由器底层入手 深度透...
· 最新路由交换测试技术介绍
· 如何提高企业路由器性能
· 专家称网真应用需要升级...
· 路由器密码、原有配置轻...
· 不配置回指路由 多网段网...
· 如何实现两条DDN专线相互...

其它推荐