Monday, October 8, 2012

about interface cisco


This example shows how to reenable all Fast Ethernet interfaces 5/1 to 5/5:

Switch(config)# interface range fastethernet 5/1 - 5 

Switch(config-if-range)# no shutdown 

Switch(config-if-range)#

*Oct  6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet5/1, changed state to up

*Oct  6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet5/2, changed state to up

*Oct  6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet5/3, changed state to up

*Oct  6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet5/4, changed state to up

*Oct  6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet5/5, changed state to up

*Oct  6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/

5, changed state to up

*Oct  6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/

3, changed state to up

*Oct  6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/

4, changed state to up

Switch(config-if)#


This example shows how to use a comma to add different interface type strings to the range to reenable all Fast Ethernet interfaces in the range 5/1 to 5/5 and both Gigabit Ethernet interfaces 1/1 and 1/2:

Switch(config-if)# interface range fastethernet 5/1 - 5, gigabitethernet 1/1 - 2 

Switch(config-if)# no shutdown 

Switch(config-if)#

*Oct  6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet5/1, changed state to up

*Oct  6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet5/2, changed state to up

*Oct  6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet5/3, changed state to up

*Oct  6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet5/4, changed state to up

*Oct  6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet5/5, changed state to up

*Oct  6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet1/1, changed state to

 up

*Oct  6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet1/2, changed state to

 up

*Oct  6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/

5, changed state to up

*Oct  6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/

3, changed state to up

*Oct  6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/

4, changed state to up

Switch(config-if)#


If you enter multiple configuration commands while you are in interface-range configuration mode, each command is run as it is entered (they are not batched together and run after you exit interface-range configuration mode). If you exit interface-range configuration mode while the commands are being run, some commands might not be run on all interfaces in the range. Wait until the command prompt is displayed before exiting interface-range configuration mode.


Defining and Using Interface-Range Macros

You can define an interface-range macro to automatically select a range of interfaces for configuration. Before you can use the macro keyword in the interface-range macro command string, you must define the macro.
To define an interface-range macro, perform this task:

Command
Purpose
Switch(config)# define interface-range macro_name 
{vlan vlan_ID - vlan_ID} | {{fastethernet | 
gigabitethernet} slot/interface interface} 
[, {vlan vlan_ID - vlan_ID} {{fastethernet | 
gigabitethernet} slot/interface - interface}] 
Defines the interface-range macro and saves it in the running configuration file.

This example shows how to define an interface-range macro named enet_list to select Fast Ethernet interfaces 5/1 through 5/4:
Switch(config)# define interface-range enet_list fastethernet 5/1 - 4 

To show the defined interface-range macro configuration, perform this task:

Command
Purpose
Switch# show running-config 
Shows the defined interface-range macro configuration.

This example shows how to display the defined interface-range macro named enet_list:
Switch# show running-config | include define 
define interface-range enet_list FastEthernet5/1 - 4
Switch#

To use an interface-range macro in the interface range command, perform this task:

Command
Purpose
Switch(config)# interface range macro 
name 
Selects the interface range to be configured using the values saved in a named interface-range macro.

This example shows how to change to the interface-range configuration mode using the interface-range macro enet_list:
Switch(config)# interface range macro enet_list 
Switch(config-if)#

Deploying 10-Gigabit Ethernet and a Gigabit Ethernet SFP Ports


Note On a Catalyst 4510R series switch, if you enable both the 10-Gigabit Ethernet and Gigabit Ethernet SFP uplink ports, you must re-boot the switch. On the Catalyst 4503, 4506, and 4507R series switches, this capability is automatically enabled.

Prior to Cisco Release 12.2(25)SG, the Cisco Catalyst 4500 Supervisor Engine V-10GE allowed you to enable either the dual wire-speed 10-Gigabit Ethernet ports, or four alternatively wired Gigabit Ethernet SFP uplink ports. With Cisco Release 12.2(25)SG, you can simultaneously deploy the dual 10 Gigabit Ethernet ports and the four Gigabit Ethernet SFP ports. This capability is supported on the Catalyst 4503, Catalyst 4506, and Catalyst 4507R chassis.
When deploying a Catalyst 4510R chassis, one of three configurations is supported:
Enable the dual 10 -Gigabit Ethernet ports (X2 optics) only.
Enable the four Gigabit Ethernet ports (SFP optics) only.
Enable both the dual 10 Gigabit Ethernet and the four Gigabit Ethernet ports, with the understanding that the tenth slot (Flex-Slot) will only support a 2-port gigabit interface converter (GBIC) line card (WS-X4302-GB) when in this mode.
To select the 10-Gigabit Ethernet and/or the Gigabit Ethernet SFP uplink ports, perform this task:

 
Command
Purpose
Step 1 
Switch# configure terminal
Establishes global configuration mode.
Step 2 
Switch(config)# hw-module uplink select [all | 
gigabitethernet | tengigabitethernet]
Selects the port type to enable.
The following example shows how to enable both 10-Gigabit Ethernet and Gigabit Ethernet SFP uplink ports on a Catalyst 4510R series switch:
Switch# configure terminal
Switch(config)# hw-module uplink select all
Warning: This configuration mode will place slot 10 in flex slot mode

Digital Optical Monitoring Transceiver Support

Command line interface (CLI) commands (show inventory, show idprom interface) are used on transceivers to obtain serail number, model name, inventory information.
The following commands are specific to the transceivers that support the DOM capability:
Display current values and thresholds for all sensor on a particular interface transceiver:
show interfaces transceiver [detail] [threshold]
Enable/Disable the entSensorThresholdNotification for all sensors in all the transceivers:
snmp-server enable trap transceiver
Enable/Disable transceiver monitoring:
transceiver type all

Note This feature is only available when a DOM capable transceiver is present and configured for monitoring. The frequency at which the sensor information is refreshed depends on default values configured in the transceiver SEEPROM (Serial Electrically Erasable Programmable Read Only Memory).

Configuring Optional Interface Features

The following subsections describe optional procedures:

Configuring Ethernet Interface Speed and Duplex Mode

Speed and Duplex Mode Configuration Guidelines


Note You do not configure the client device for autonegotiation. Rather, you configure the switch with the speed, or range of speeds, that you want to autonegotiate.

You can configure the interface speed and duplex mode parameters to auto and allow the Catalyst 4500 series switch to negotiate the interface speed and duplex mode between interfaces. If you decide to configure the interface speed and duplex commands manually, consider the following:
If you enter the no speed command, the switch automatically configures both interface speed and duplex to auto.
When you set the interface speed to 1000 (Mbps) or auto 1000, the duplex mode is full duplex. You cannot change the duplex mode.
If the interface speed is set to 10 or 100, the duplex mode is set to half duplex by default unless you explicitly configure it.

Caution Changing the interface speed and duplex mode configuration might shut down and restart the interface during the reconfiguration.

Setting the Interface Speed

If you set the interface speed to auto on a 10/100-Mbps Ethernet interface, speed and duplex are autonegotiated. The forced 10/100 autonegotiation feature allows you to limit interface speed auto negotiation up to 100 Mbps on a 10/100/1000BASE-T port.
To set the port speed for a 10/100-Mbps Ethernet interface, perform this task:

 
Command
Purpose
Step 1 
Switch(config)# interface fastethernet slot/interface
Specifies the interface to be configured.
Step 2 
Switch(config-if)# speed [10 | 100 | auto [10 | 100]] 
Sets the interface speed of the interface.
This example shows how to set the interface speed to 100 Mbps on the Fast Ethernet interface 5/4:
Switch(config)# interface fastethernet 5/4
Switch(config-if)# speed 100

This example shows how to allow Fast Ethernet interface 5/4 to autonegotiate the speed and duplex mode:
Switch(config)# interface fastethernet 5/4
Switch(config-if)# speed auto

Note This is analogous to specifying speed auto 10 100.

This example shows how to limit the interface speed to 10 and 100 Mbps on the Gigabit Ethernet interface 1/1 in auto-negotiation mode:
Switch(config)# interface gigabitethernet 1/1
Switch(config-if)# speed auto 10 100

This example shows how to limit speed negotiation to 100 Mbps on the Gigabit Ethernet interface 1/1:
Switch(config)# interface gigabitethernet 1/1
Switch(config-if)# speed auto 100

Note Turning off autonegotiation on a Gigabit Ethernet interface will result in the port being forced into 1000 Mbps and full-duplex mode.

To turn off the port speed autonegotiation for Gigabit Ethernet interface 1/1, perform this task:

 
Command
Purpose
Step 1 
Switch(config)# interface gigabitethernet1/1 
Specifies the interface to be configured.
Step 2 
Switch(config-if)# speed nonegotiate 
Disables autonegotiation on the interface.
To restore autonegotiation, enter the no speed nonegotiate command in the interface configuration mode.

Note For the blocking ports on the WS-X4416 module, do not set the speed to autonegotiate.

Setting the Interface Duplex Mode


Note When the interface is set to 1000 Mbps, you cannot change the duplex mode from full duplex to half duplex.

To set the duplex mode of a Fast Ethernet interface, perform this task:

 
Command
Purpose
Step 1 
Switch(config)# interface fastethernet 
slot/interface 
Specifies the interface to be configured.
Step 2 
Switch(config-if)# duplex [auto | full | half] 
Sets the duplex mode of the interface.
This example shows how to set the interface duplex mode to full on Fast Ethernet interface 5/4:
Switch(config)# interface fastethernet 5/4
Switch(config-if)# duplex full

Displaying the Interface Speed and Duplex Mode Configuration

To display the interface speed and duplex mode configuration for an interface, perform this task:

Command
Purpose
Switch# show interfaces [fastethernet | 
gigabitethernet | tengigabitethernet] 
slot/interface 
Displays the interface speed and duplex mode configuration.

This example shows how to display the interface speed and duplex mode of Fast Ethernet interface 6/1:
Switch# show interface fastethernet 6/1
FastEthernet6/1 is up, line protocol is up 
  Hardware is Fast Ethernet Port, address is 0050.547a.dee0 (bia 0050.547a.dee0)
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, 
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)
  Full-duplex, 100Mb/s
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:54, output never, output hang never
  Last clearing of "show interface" counters never
  Input queue: 50/2000/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     50 packets input, 11300 bytes, 0 no buffer
     Received 50 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 input packets with dribble condition detected
     1456 packets output, 111609 bytes, 0 underruns
     0 output errors, 0 collisions, 0 interface resets
     0 babbles, 0 late collision, 0 deferred
     1 lost carrier, 0 no carrier
     0 output buffer failures, 0 output buffers swapped out
Switch#

Adding a Description for an Interface

You can add a description about an interface to help you remember its function. The description appears in the output of the following commands: show configuration, show running-config, and
show interfaces.
To add a description for an interface, enter the following command:

Command
Purpose
Switch(config-if)# description string 
Adds a description for an interface.

This example shows how to add a description on Fast Ethernet interface 5/5:
Switch(config)# interface fastethernet 5/5 
Switch(config-if)# description Channel-group to "Marketing" 

Configuring Flow Control

Gigabit Ethernet ports use Flow Control to slow-down the transmission of incoming packets. If a buffer on a Gigabit Ethernet port runs out of space, the port transmits a special packet that requests remote ports to delay sending packets for a period of time. The port can also receive this special packet from its link-partner for the same purpose. This special packet is called a pause frame.
The default settings for Gigabit Ethernet interfaces are as follows:
Sending pause frames is off—non-oversubscribed Gigabit Ethernet interfaces.
Receiving pause frames is desired—non-oversubscribed Gigabit Ethernet interfaces.
Sending pause frames is on—Oversubscribed Gigabit Ethernet interfaces.
Receiving pause frames is desired—Oversubscribed Gigabit Ethernet interfaces
The default settings for Tengigabit Ethernet interfaces are as follows:
Sending pause frames is off.
Receiving pause frames is on.

Note desired is not a flow control option on these links

To configure flow control, perform this task:

 
Command
Purpose
Step 1 
Switch# configure terminal
Enters global configuration mode.
Step 2 
Switch(config)# interface 
interface-id
Enters interface configuration mode and specifies the interface to be enabled for flowcontrol.
Step 3 
Switch(config-if)# flowcontrol 
{receive | send} {off | on | 
desired}
Configures a Gigabit Ethernet port to send or receive pause frames.
Step 4 
Switch(config-if)# end
Returns to configuration mode.
Step 5 
Switch(config)# end
Returns to privileged EXEC mode.
This example shows how to configure flow control on an oversubscribed Gigabit Ethernet port 7/5:
Switch# configure terminal
Switch(config)# interface g7/5
Switch(config-if)# flowcontrol send on
Switch(config-if)# end
Switch)# show inmterfaces gigabitEthernet 7/5 capabilities
GigabitEthernet7/5
  Model:                 WS-X4548-GB-RJ45-RJ-45
  Type:                  10/100/1000-TX
  Speed:                 10,100,1000,auto
  Duplex:                half,full,auto
  Trunk encap. type:     802.1Q,ISL
  Trunk mode:            on,off,desirable,nonegotiate
  Channel:               yes
  Broadcast suppression: percentage(0-100), hw
  Flowcontrol:           rx-(off,on,desired),tx-(off,on,desired)
  VLAN Membership:       static, dynamic
  Fast Start:            yes
  Queuing:               rx-(N/A), tx-(1p3q1t, Sharing/Shaping)
  CoS rewrite:           yes
  ToS rewrite:           yes
  Inline power:          no
  SPAN:                  source/destination
  UDLD:                  yes
  Link Debounce:         no
  Link Debounce Time:    no
  Port Security:         yes
  Dot1x:                 yes
  Maximum MTU:           1552 bytes (Baby Giants)
  Multiple Media Types:  no
  Diagnostic Monitoring: N/A

Switch)# show flowcontrol interface GigabitEthernet 7/5
Port       Send FlowControl  Receive FlowControl  RxPause TxPause
           admin    oper     admin    oper
---------  -------- -------- -------- --------    ------- -------
Gi7/5      on       off      desired  off         0       0

This example shows the output of the show interfaces and show flowcontrol commands on an non-overscribed Gigabit Ethernet port 5/5:
Switch# show interfaces gigabitEthernet 5/5 capabilities
GigabitEthernet5/5
  Model:                 WS-X4306-GB-Gbic
  Type:                  No Gbic
  Speed:                 1000
  Duplex:                full
  Trunk encap. type:     802.1Q,ISL
  Trunk mode:            on,off,desirable,nonegotiate
  Channel:               yes
  Broadcast suppression: percentage(0-100), hw
  Flowcontrol:           rx-(off,on,desired),tx-(off,on,desired)
  VLAN Membership:       static, dynamic
  Fast Start:            yes
  Queuing:               rx-(N/A), tx-(1p3q1t, Sharing/Shaping)
  CoS rewrite:           yes
  ToS rewrite:           yes
  Inline power:          no
  SPAN:                  source/destination
  UDLD:                  yes
  Link Debounce:         no
  Link Debounce Time:    no
  Port Security:         yes
  Dot1x:                 yes
  Maximum MTU:           9198 bytes (Jumbo Frames)
  Multiple Media Types:  no
  Diagnostic Monitoring: N/A

Switch# show flowcontrol interface gigabitEthernet 5/5
Port       Send FlowControl  Receive FlowControl  RxPause TxPause
           admin    oper     admin    oper
---------  -------- -------- -------- --------    ------- -------
Gi5/5      off      off      desired  off         0       0

This example shows the output of the show interfaces and show flowcontrol commands on an unsupported Fast Ethernet port 3/5:
Switch# show interfaces fa3/5 capabilities
FastEthernet3/5
  Model:                 WS-X4148-RJ-45
  Type:                  10/100BaseTX
  Speed:                 10,100,auto
  Duplex:                half,full,auto
  Trunk encap. type:     802.1Q,ISL
  Trunk mode:            on,off,desirable,nonegotiate
  Channel:               yes
  Broadcast suppression: percentage(0-100), sw
  Flowcontrol:           rx-(none),tx-(none)
  VLAN Membership:       static, dynamic
  Fast Start:            yes
  Queuing:               rx-(N/A), tx-(1p3q1t, Shaping)
  CoS rewrite:           yes
  ToS rewrite:           yes
  Inline power:          no
  SPAN:                  source/destination
  UDLD:                  yes
  Link Debounce:         no
  Link Debounce Time:    no
  Port Security:         yes
  Dot1x:                 yes
  Maximum MTU:           1552 bytes (Baby Giants)
  Multiple Media Types:  no
  Diagnostic Monitoring: N/A

Switch# show flowcontrol interface fa3/5
Port       Send FlowControl  Receive FlowControl  RxPause TxPause
           admin    oper     admin    oper
---------  -------- -------- -------- --------    ------- -------
Fa3/5      Unsupp.  Unsupp.  Unsupp.  Unsupp.      0       0

Configuring Jumbo Frame Support

These subsections describe jumbo frame support:

Ports and Modules that Support Jumbo Frames

The following ports and modules support jumbo frames:
Supervisor uplink ports
WS-X4306-GB: all ports
WS-X4232-GB-RJ: ports 1-2
WS-X4418-GB: ports 1-2
WS-X4412-2GB-TX: ports 13-14
Each of the last three modules has two non-blocking ports that can support jumbo frames. Other ports are over-subscribed ports and cannot support jumbo frames.

Understanding Jumbo Frame Support

These sections describe jumbo frame support:

Jumbo Frame Support Overview

A jumbo frame is a frame larger than the default Ethernet size. Enable jumbo frame support by configuring a larger-than-default maximum transmission unit (MTU) size on a port or interface.
Catalyst 4500 series switch Ethernet LAN ports configured with a nondefault MTU size accept frames containing packets with a size between 1500 and 9198 bytes. With a nondefault MTU size configured, the packet size of ingress frames is checked. If the packet is larger than the configured MTU, it is dropped.
For traffic that needs to be routed, the MTU of the egress port is checked. If the MTU is smaller than the packet size, the packet is forwarded to the CPU. If the "do not fragment bit" is not set, it is fragmented. Otherwise, the packet is dropped.

Note Jumbo frame support does not fragment Layer 2 switched packets.

The Catalyst 4500 series switch does not compare the packet size with the MTU at the egress port, but jumbo frames are dropped in ports that do not support them. The frames can be transmitted in ports that do support jumbo frames, even though the MTU is not configured to jumbo size.

Note Jumbo frame support is only configured per interface; jumbo frame support cannot be configured globally.

Ethernet Ports

These sections describe configuring nondefault MTU sizes on Ethernet ports:
Ethernet Port Overview
With Cisco IOS Release 12.2(25)EW, configuring a nondefault MTU size on certain Ethernet ports limits the size of ingress packets. The MTU does not impact the egress packets.
With releases earlier than Cisco IOS Release 12.1(13)EW, you can configure the MTU size only on Gigabit Ethernet.
Layer 3 and Layer 2 EtherChannels
With Release Cisco IOS Release 12.2(25)EW and later releases, you can configure all the interfaces in an EtherChannel provided that they have the same MTU. Changing the MTU of an EtherChannel changes the MTU of all member ports. If the MTU of a member port cannot be changed to the new value, that port is suspended (administratively shut down). A port cannot join an EtherChannel if the port has a different MTU. If a member port of an EtherChannel changes MTU, the member port is suspended.

VLAN Interfaces

If switch ports reside in the same VLAN, either configure all of the switch ports to handle jumbo frames and support the same MTU size, or configure none of them. However, such uniformity of MTU size in the same VLAN is not enforced.
When a VLAN has switch ports with different MTU size, packets received from a port with a larger MTU might be dropped when they are forwarded to a port with a smaller MTU.
If the switch ports in a VLAN have jumbo frames enabled, the corresponding SVI can have jumbo frames enabled. The MTU of an SVI should always be smaller than the smallest MTU among all the switch ports in the VLAN, but this condition is not enforced.
The MTU of a packet is not checked on the ingress side for an SVI; it is checked on the egress side of an SVI. If the MTU of a packet is larger than the MTU of the egress SVI, the packet will be sent to the CPU for fragmentation processing. If the "do not fragment" bit is not set, the packet is fragmented. Otherwise, the packet is dropped.

Configuring MTU Sizes

To configure the MTU size, perform this task:

 
Command
Purpose
Step 1 
Switch(config)# interface {{vlan vlan_ID} | 
{{type1  slot/port} | {port-channel 
port_channel_number} slot/port}} 
Selects the interface to configure.
Step 2 
Switch(config-if)# mtu mtu_size
Configures the MTU size.
Switch(config-if)# no mtu 
Reverts to the default MTU size (1500 bytes).
Step 3 
Switch(config-if)# end 
Exits configuration mode.
Step 4 
Switch# show running-config interface 
[{fastethernet | gigabitethernet} slot/port] 
Displays the running configuration.
1 type = fastethernet, gigabitethernet, or tengigabitethernet

Note When configuring the MTU size for VLAN interfaces and Layer 3 and Layer 2 Ethernet ports, note that the supported MTU values are from 1500 to 9198 bytes.

This example shows how to configure the MTU size on Gigabit Ethernet port 1/1:
switch# conf t
switch(config)# int gi1/1
switch(config-if)# mtu 9198
switch(config-if)# end

This example shows how to verify the configuration:
switch# show interface gigabitethernet 1/2
GigabitEthernet1/2 is administratively down, line protocol is down
  Hardware is C6k 1000Mb 802.3, address is 0030.9629.9f88 (bia 0030.9629.9f88)
  MTU 9216 bytes, BW 1000000 Kbit, DLY 10 usec,
<...Output Truncated...>
switch#

Interacting with the Baby Giants Feature

The baby giants feature, introduced in Cisco IOS Release 12.1(12c)EW, uses the global command system mtu to set the global baby giant MTU. This feature also allows certain interfaces to support Ethernet payload size of up to 1552 bytes.
Both the system mtu command and the per-interface mtu command can operate on interfaces that can support jumbo frames, but the per-interface mtu command takes precedence.
For example, before setting the per-interface MTU for interface gi1/1, you issue the
system mtu 1550 command to change the MTU for gi1/1 to 1550 bytes. Next, you issue the per-interface mtu command to change the MTU for gi1/1 to 9198 bytes. Now, if you change the baby giant MTU to 1540 bytes with the command system mtu 1540, the MTU for gi1/1 remains unchanged at 9198 bytes.

Configuring Auto-MDIX on a Port

When automatic medium-dependent-interface crossover (auto-MDIX) is enabled on an port, the port automatically detects the required cable connection type (straight through or crossover) and configures the connection appropriately. When connecting switches without the auto-MDIX feature, you must use straight-through cables to connect to devices such as servers, workstations, or routers and crossover cables to connect to other switches or repeaters. With auto-MDIX enabled, you can use either type of cable to connect to other devices, and the interface automatically corrects for any incorrect cabling. For more information about cabling requirements, see the hardware installation guide.
Auto-MDIX is enabled by default. When you enable auto-MDIX, you must also set the speed on the port to auto so that for the feature to operate correctly. auto-MDIX is supported on copper media ports. It is not supported on fiber media ports.

Note The following linecards support Auto-MDIX by default, when port auto-negotiation is enabled: WS-X4448-GB-RJ45 and WS-X4548-GB-RJ45. You cannot disable them with the the mdix command.


Note The following linecards do not support Auto-MDIX, neither by default nor by CLI: WS-X4548-GB-RJ45V, WS-X4524-GB-RJ45V, and WS-X4506-GB-T.


Note The following linecards support Auto-MDIX through the CLI on their copper media ports: WS-X4124-RJ45, WS-X4148-RJ45 (hardware revision 3.0 or higher), and WS-X4232-GB-RJ45 (hardware revision 3.0 or higher).

Table 6-1 shows the link states that results from auto-MDIX settings and correct and incorrect cabling.
Table 6-1 Link Conditions and auto-MDIX Settings 
Local Side auto-MDIX
Remote Side auto-MDIX
With Correct Cabling
With Incorrect Cabling
On
On
Link up
Link up
On
Off
Link up
Link up
Off
On
Link up
Link up
Off
Off
Link up
Link down

To configure auto-MDIX on a port, perform the following task:

 
Command
Purpose
Step 1 
configure terminal
Enters global configuration mode
Step 2 
interface interface-id
Enters interface configuration mode for the physical interface to be configured.
Step 3 
speed auto
Configures the port to autonegotiate speed with the connected device.
Step 4 
mdix auto
Enables auto-MDIX on the port.
Step 5 
end
Returns to privileged EXEC mode.
Step 6 
show interfaces interface-id
Verifies the configuration of the auto-MDIX feature on the interface.
Step 7 
copy running-config startup-config
(Optional) Saves your entries in the configuration file.
To disable auto-MDIX, use the no mdix auto interface configuration command.
This example shows how to enable auto-MDIX on a port:
Switch# configure terminal
Switch(config)# interface fastethernet 6/5
Switch(config-if)# speed auto
Switch(config-if)# mdix auto
Switch(config-if)# end

Displaying the Interface auto-MDIX Configuration

To display the interface speed and duplex mode configuration for an interface, perform this task:

 
Command or Action
Purpose
Step 1 
Switch> enable
Enables privileged EXEC mode.
Enter your password if prompted.
Step 2 
Switch# show interfaces type slot/interface
Displays the interface auto-MDIX configuration setting and operational state.
Depending on how the speed auto and the mdix auto commands are configured on a supported linecard interface, the show interfaces command displays the following possible auto-MDIX statuses:
Table 6-2 shows the auto-MDIX setting and operational state and the status of auto-MDIX.
Table 6-2 Auto-MDIX and Operational State
Auto-MDIX Setting And Operational State
on an Interface
Description
Auto-MDIX on (operational: on)
Auto-MDIX is enabled and is fully functioning.
Auto-MDIX on (operational: off)
Auto-MDIX is enabled on this interface but it is not functioning. To allow auto-MDIX feature to function properly, you must also set the interface speed to be autonegotiated.
Auto-MDIX off
Auto-MDIX has been disabled with the
no mdix auto command.

This example show s how to display the auto-MDIX configuration setting and its operational state on Fast Ethernet interface 6/1:
Switch# show interfaces fastethernet 6/1
FastEthernet6/1 is up, line protocol is up (connected)
  Hardware is Fast Ethernet Port, address is 0001.64fe.e5d0 (bia 0001.64fe.e5d0)
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)
  Full-duplex, 100Mb/s, link type is auto, media type is 10/100BaseTX
  input flow-control is unsupported output flow-control is unsupported
  Auto-MDIX on (operational: on)
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:16, output never, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     511 packets input, 74464 bytes, 0 no buffer
     Received 511 broadcasts (511 multicasts)
     0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 input packets with dribble condition detected
     3552 packets output, 269088 bytes, 0 underruns
     0 output errors, 0 collisions, 0 interface resets
     0 babbles, 0 late collision, 0 deferred
     1 lost carrier, 0 no carrier
     0 output buffer failures, 0 output buffers swapped out
Switch#

Understanding Online Insertion and Removal

The online insertion and removal (OIR) feature supported on the Catalyst 4500 series switch allows you to remove and replace modules while the system is online. You can shut down the module before removal and restart it after insertion without causing other software or interfaces to shut down.
You do not need to enter a command to notify the software that you are going to remove or install a module. The system notifies the supervisor engine that a module has been removed or installed and scans the system for a configuration change. The newly installed module is initialized, and each interface type is verified against the system configuration; then the system runs diagnostics on the new interface. There is no disruption to normal operation during module insertion or removal.
If you remove a module and then replace it, or insert a different module of the same type into the same slot, no change to the system configuration is needed. An interface of a type that has been configured previously will be brought online immediately. If you remove a module and insert a module of a different type, the interface(s) on that module will be administratively up with the default configuration for that module.

Monitoring and Maintaining the Interface

The following sections describe how to monitor and maintain the interfaces:

Monitoring Interface and Controller Status

The Cisco IOS software for the Catalyst 4500 series switch contains commands that you can enter at the EXEC prompt to display information about the interface, including the version of the software and the hardware, the controller status, and statistics about the interfaces. The following table lists some of the interface monitoring commands. (You can display the full list of show commands by entering the show ? command at the EXEC prompt.) These commands are fully described in the Interface Command Reference.
To display information about the interface, perform this task:

 
Command
Purpose
Step 1 
Switch# show interfaces [type slot/interface]
Displays the status and configuration of all interfaces or of a specific interface.
Step 2 
Switch# show running-config 
Displays the configuration currently running in RAM.
Step 3 
Switch# show protocols [type slot/interface] 
Displays the global (system-wide) and interface-specific status of any configured protocol.
Step 4 
Switch# show version 
Displays the hardware configuration, software version, the names and sources of configuration files, and the boot images.

This example shows how to display the status of Fast Ethernet interface 5/5:
Switch# show protocols fastethernet 5/5 
FastEthernet5/5 is up, line protocol is up
Switch# 

Clearing and Resetting the Interface

To clear the interface counters shown with the show interfaces command, enter the following command:

Command
Purpose
Switch# clear counters {type slot/interface}
Clears interface counters.

This example shows how to clear and reset the counters on Fast Ethernet interface 5/5:
Switch# clear counters fastethernet 5/5 
Clear "show interface" counters on this interface [confirm] y 
Switch#
*Sep 30 08:42:55: %CLEAR-5-COUNTERS: Clear counter on interface FastEthernet5/5
by vty1 (171.69.115.10)
Switch#

The clear counters command (without any arguments) clears all the current interface counters from all interfaces.

Note The clear counters command does not clear counters retrieved with SNMP; it clears only those counters displayed with the EXEC show interfaces command.

Shutting Down and Restarting an Interface

You can disable an interface, which disables all functions on the specified interface and marks the interface as unavailable on all monitoring command displays. This information is communicated to other network servers through all dynamic routing protocols. The interface will not be mentioned in any routing updates.
To shut down an interface and then restart it, perform this task:

 
Command
Purpose
Step 1 
Switch(config)# interface {vlan vlan_ID} | 
{{fastethernet | gigabitethernet | 
tengigabitethernet} slot/port} | {port-channel 
port_channel_number}
Specifies the interface to be configured.
Step 2 
Switch(config-if)# shutdown 
Shuts down the interface.
Step 3 
Switch(config-if)# no shutdown 
Reenables the interface.
This example shows how to shut down Fast Ethernet interface 5/5:
Switch(config)# interface fastethernet 5/5 
Switch(config-if)# shutdown 
Switch(config-if)#
*Sep 30 08:33:47: %LINK-5-CHANGED: Interface FastEthernet5/5, changed state to a 
administratively down
Switch(config-if)# 

This example shows how to reenable Fast Ethernet interface 5/5:
Switch(config-if)# no shutdown 
Switch(config-if)#
*Sep 30 08:36:00: %LINK-3-UPDOWN: Interface FastEthernet5/5, changed state to up
Switch(config-if)# 

To verify whether an interface is disabled, enter the EXEC show interfaces command. An interface that has been shut down will appear as "administratively down."

Configuring Interface Link Status and Trunk Status Events

You can configure interface link status and trunk status events. On the Catalyst 4500 series switch, the following interface logging event notifications are supported both globally and per interface:
Enable/disable notification on the interface whenever its data link status is changed.
Enable/disable notification on the trunk interface whenever its trunking status is changed.
Use the [no] logging event link-status [use-global] command to enable/disable the interface link status event. Use the [no] logging event trunk-status [use-global] command to enable/disable the interface trunk status event.
Each interface link status logging event can be configured in one of the following states:
logging event link-status - Link status logging event is enabled explicitly on the interface regardless of the switch global setting.
no logging event link-status - Link status logging event is disabled explicitly on the interface regardless of the switch global setting.
logging event link-status use-global - This is the default link status logging event configuration on the interface; its configuration should follow the switch global link status logging event setting.
The interface trunk status logging event can be configured in the same configuration states.

Configuring Link Status Event Notification for an Interface

To enable/disable a link status logging event, enter one of the following commands:

Command
Purpose
Switch(config-if)# logging event link-status
Enables interface link status logging.
Switch(config-if)# no logging event link-status
Disables interface link status logging.
Switch(config-if)# logging event link-status use-global
Specifies the global default setting for interface link status logging.

Global Settings

You can also provide a global configuration for the corresponding logging event. A global configuration provides default logging settings for all interfaces. The [no] logging event link-status global command lets you enable/disable the interface link status logging for the entire switch. The [no] logging event trunk-status global command lets you enable/disable interface trunk status logging for the entire switch.
Each interface link status logging event, if not configured at the interface level, will use the following global logging event setting:
logging event link-status global - Link status logging event is enabled, if not configured on the interface.
no logging event link-status global - Link status logging event is disabled, if not configured on the interface.
The interface trunk status logging event has similar global configurations.

Configuring a Switch Global Link Status Logging Event

To enable/disable the global link status logging event, enter one of the following commands:

Command
Purpose
Switch(config-if)# logging event link-status global
Enables global link status logging.
Switch(config-if)# no logging event link-status global
Disables global link status logging.

Result

The following example displays a summary of the operating states for the interface logging event under different combinations of global and interface logging settings:
global setting       interface setting       actual logging state
--------------       -----------------       --------------------
     on                    on                       on
     off                   on                       on
     on                    off                      off
     off                   off                      off
     on                    default(use-global)      on
     off                   default(use-global)      off

The following example displays the configuration and logging message output for link status and trunk status logging events:
//
// The global link status and trunk status logging events are enabled.
//
Switch# show running | include logging
show running | include logging
logging event link-status global
logging event trunk-status global
Switch#

//
// The interface link status and trunk status logging settings
// are set to default values, which follow regardless of the global
// setting.
//
Switch# show running interface g1/4
Building configuration...

Current configuration: 97 bytes
!
interface GigabitEthernet1/4
 switchport trunk encapsulation dot1q
 switchport mode trunk
end
Switch#

//
// The trunk status logging messages for the interface are 
// displayed whenever the interface trunking status is changed.
// Here we change the other end node's trunking encapsulation 
// from dot1q to isl.
//
3d00h: %DTP-5-ILGLCFG: Illegal config(on,isl--on,dot1q) on Gi1/4
3d00h: %DTP-5-ILGLCFG: Illegal config(on,isl--on,dot1q) on Gi1/4
3d00h: %DTP-5-ILGLCFG: Illegal config(on,isl--on,dot1q) on Gi1/4

//
// The link and trunk status logging message for the interface 
// are displayed whenever the interface link status is changed.
// Here we do a "shut" and "no shut" on the other end link node.
//
3d00h: %DTP-5-NONTRUNKPORTON: Port Gi1/4 has become non-trunk
3d00h: %LINEPROTO-5-UPDOWN: Line protocol on Interface
GigabitEthernet1/4, changed state to down
3d00h: %LINK-3-UPDOWN: Interface GigabitEthernet1/4, changed state to
down
3d00h: %LINK-3-UPDOWN: Interface GigabitEthernet1/4, changed state to up
3d00h: %DTP-5-TRUNKPORTON: Port Gi1/4 has become dot1q trunk
3d00h: %LINEPROTO-5-UPDOWN: Line protocol on Interface
GigabitEthernet1/4, changed state to up 

Resetting the Interface to the Default Configuration

If you have configured a interface with many command lines and you want to clear all the configuration on that interface, you can use the default interface global configuration command, as follows:
Switch(config)# default interface fastEthernet 3/5
Interface FastEthernet3/5 set to default configuration

This command will clear all the configurations and shutdown the interface:
Switch# show run interface fastethernet 3/5
Building configuration...

Current configuration : 58 bytes
!
interface FastEthernet3/5
 no ip address
 shutdown
end

config SFP

Configuration

1. Media Type Selection
SFP Mode:
C892F(config)#int gigabitEthernet 0
C892F(config-if)#media-type ?
  rj45  Use RJ45 connector
  sfp   Use SFP connector
  
C892F(config-if)#media-type sfp 
GigabitEthernet0: Changing media to SFP.
You may need to update the speed and duplex settings for this interface.
C892F(config-if)#
RJ45 Mode:
C892F(config)#int gigabitEthernet 0
C892F(config-if)#media-type ?
  rj45  Use RJ45 connector
  sfp   Use SFP connector
  
C892F(config-if)#media-type rj45 
GigabitEthernet0: Changing media to RJ45.
You may need to update the speed and duplex settings for this interface.
C892F(config-if)#
Auto-Detect Mode:
C892F(config)#int gigabitEthernet 0
C892F(config-if)#no media-type 
GigabitEthernet0: Setting default media-type to UNKNOWN
GigabitEthernet0: Changing media to UNKNOWN.
You may need to update the speed and duplex settings for this interface.
C892F(config-if)#

2. Auto-Failover Mode
RJ45 Mode Switchover if SFP fails:
C892F(config)#int gigabitEthernet 0
C892F(config-if)#media-type sfp auto-failover 
GigabitEthernet0: Changing media to SFP.
You may need to update the speed and duplex settings for this interface.
SFP Mode Switchover if RJ45 fails:
C892F(config)#int gigabitEthernet 0
C892F(config-if)#media-type rj45 auto-failover 
GigabitEthernet0: Changing media to RJ45.
You may need to update the speed and duplex settings for this interface.
3. Speed & Duplex Settings
In RJ45 Mode:
C892F(config-if)#int gig0
C892F(config-if)#media-type rj45 
GigabitEthernet0: Changing media to RJ45.
You may need to update the speed and duplex settings for this interface.
C892F(config-if)#speed ?
  10    Force 10 Mbps operation
  100   Force 100 Mbps operation
  1000  Force 1000 Mbps operation
  auto  Enable AUTO speed configuration
C892F(config-if)#speed 100
C892F(config-if)#duplex ?
  auto  Enable AUTO duplex configuration
  full  Force full duplex operation
  half  Force half-duplex operation
C892F(config-if)#duplex full 
In SFP Mode (Only for GLC-GE-100FX):
C892F(config-if)#int gig0
C892F(config-if)#media-type sfp 
GigabitEthernet0: Changing media to SFP.
You may need to update the speed and duplex settings for this interface.
C892F(config-if)#speed ?
  100   Force 100 Mbps operation
C892F(config-if)#speed 100
C892F(config-if)#duplex ?
  full  Force full duplex operation
  half  Force half-duplex operation
C892F(config-if)#duplex full 
4. Configure Backup port
SFP mode with failover option to RJ45 prior switching to backup Fe8 Port:
C892F(config)#int gigabitEthernet 0 
C892F(config-if)#media-type sfp auto-failover 
GigabitEthernet0: Changing media to SFP.
You may need to update the speed and duplex settings for this interface.
C892F(config-if)#backup interface fastEthernet 8 
5. Ethernet CFM Configuration
C892F(config)#ethernet cfm ieee
C892F(config)#ethernet cfm global
C892F(config)#ethernet cfm traceroute cache
C892F(config)#ethernet cfm domain Customer_Domain level 7
C892F(config-ecfm)#service SID_CE1 vlan 711 direction down
C892F(config-ecfm-srv)#continuity-check
C892F(config-ecfm-srv)#service SID_CE2 vlan 721 direction down
C892F(config-ecfm-srv)#continuity-check
C892F(config-ecfm-srv)#continuity-check loss-threshold 2
C892F(config-ecfm-srv)#ethernet cfm logging
C892F(config)#interface gig0
C892F(config-if)#media-type sfp 
GigabitEthernet0: Changing media to SFP.
You may need to update the speed and duplex settings for this interface.
C892F(config-if)#ethernet cfm mep domain Customer_Domain mpid 921 vlan 721
C892F(config-if-ecfm-mep)#ethernet cfm mep domain Customer_Domain mpid 911 vlan 711
C892F(config-if-ecfm-mep)#interface gig0.100
C892F(config-subif)#encapsulation dot1Q 711
C892F(config-subif)#ip address 4.0.0.1 255.0.0.0
C892F(config-subif)#interface gig0.200
C892F(config-subif)#encapsulation dot1Q 721
C892F(config-subif)#ip address 2.0.0.1 255.0.0.0
C892F(config-subif)#end

Show Commands

1. Media Type Selection
In SFP Mode:
C892F#sh int gigabitEthernet 0 | include media
  Full Duplex, 1Gbps, media type is LX
C892F#sh controllers gigabitEthernet 0 | beg PHY
PHY Registers
-------------
  Register 0x00:   1000  01ED  0362  5D12  0461  41A0  0006  2001
  Register 0x08:   0000  0000  0000  xxxx  xxxx  xxxx  xxxx  C000
  Register 0x10:   0000  2000  0000  0000  0000  xxxx  xxxx  xxxx
  Register 0x18:   71E7  1000  0000  FFFF  7C4B  0000  0080  0000
  PHY Control (0x00):
  AUTONEG_EN 
  PHY Status (0x01):
  AUTONEG_DONE LINK_UP 
  Auto-Negotiation Advertisement (0x04):
  PAUSE 10FD 10HD 
  Link Partner Ability (0x05):
  100FD 100HD 10HD 
  1000BASE-T Control (0x09):
  M/S_AUTO DTE 
  1000BASE-T Status (0x0A):
  M/S_CFG_OK SLAVE 
Mode Control Register(0x1C) shadow(0x1F): = 0x7C4B
Auto-Detect Medium Register(0x1C) shadow(0x1E): = 0x7866
Misc control Register(0x18) shadow(111): = 0x71E7
SGMII slave Register(0x1C) shadow(0x15): = 0x57A8
Serdes 100FX control Register(0x1C) shadow(0x13): = 0x4C0A
Serdes 100FX Status Register(0x1C) shadow(0x11): = 0x4400
Register(0x1C) shadow(0x02): = 0xA02

= Media  Fiber Optic =

== SFP Registers ==

 Reg 0x00:   03  04  07  00  00  00  02  00
 Reg 0x08:   00  00  00  01  0D  00  0A  64
 Reg 0x10:   37  37  00  00  43  49  53  43
 Reg 0x18:   4F  2D  46  49  4E  49  53  41
 Reg 0x20:   52  20  20  20  00  00  90  65
 Reg 0x28:   46  54  4C  46  31  33  31  38
 Reg 0x30:   50  32  42  43  4C  2D  43  53
 Reg 0x38:   30  30  30  30  05  1E  00  EB
 Reg 0x40:   00  12  00  00  46  4E  53  31
 Reg 0x48:   32  33  34  30  48  55  47  20
 Reg 0x50:   20  20  20  20  30  38  30  38
 Reg 0x58:   32  31  20  20  08  00  00  F2
 Reg 0x60:   00  00  02  1B  DE  01  C2  85
 Reg 0x68:   92  2D  30  C4  EA  5D  35  AF
 Reg 0x70:   D6  25  64  00  00  00  00  00
 Reg 0x78:   00  00  00  00  73  A7  5B  FE

 SFP Registers Decode:
   identifier            0x03 (SFP)
   connector             0x07 (LC)
   sfp_transceiver_code  0x02 (1000BaseLX)
   encoding              0x01 (8B10B)
   br_nominal   (100MHz) 13
   length_9km   (100m)   10
   length_9m    (100m)   100
   length_50m   (100m)   55
   length_62_5m (100m)   55
   length_cu    (10m)    0
   vendor_name           CISCO-FINISAR   
   vendor_oui            0x00 90 65
   vendor_pn             FTLF1318P2BCL-CS0
   vendor_rev            0000
   cc_base               0xEB
   options[0]            0x00000000
   options[1]            0x00000012
   br_max (%)            0
   br_min (%)            0
   vendor_sn             FNS12340HUG     
   date_code             080821   (yymmddvv, v=vendor specific)
   cc_ext                0xF2
   Digital Diag Type     0x08 (Not available)

Tx/Rx Interrupt Counts 
 Tx Interrupts = 318136, Tx BD Service Count = 318184
 Rx Interrupts = 504755, Rx BD Service Count = 317212
In RJ45 Mode:
C892F#sh int gigabitEthernet 0 | include media
  Full Duplex, 1Gbps, media type is RJ45
C892F#sh controllers gigabitEthernet 0 | beg PHY
PHY Registers
-------------
  Register 0x00:   1000  79C9  0362  5D12  0401  0000  0064  2001
  Register 0x08:   0000  0200  0000  xxxx  xxxx  xxxx  xxxx  3000
  Register 0x10:   0000  2000  0000  0000  0000  xxxx  xxxx  xxxx
  Register 0x18:   71E7  1000  0000  FFFF  21DF  0000  0080  0000
  PHY Control (0x00):
  AUTONEG_EN 
  PHY Status (0x01):
  LINK_DOWN 
  Auto-Negotiation Advertisement (0x04):
  PAUSE 
  Link Partner Ability (0x05):
  
  1000BASE-T Control (0x09):
  M/S_AUTO DTE 1000FD 
  1000BASE-T Status (0x0A):
  M/S_CFG_OK SLAVE 
Mode Control Register(0x1C) shadow(0x1F): = 0x7C08
Auto-Detect Medium Register(0x1C) shadow(0x1E): = 0x7860
Misc control Register(0x18) shadow(111): = 0x71E7
SGMII slave Register(0x1C) shadow(0x15): = 0x5480
Serdes 100FX control Register(0x1C) shadow(0x13): = 0x4C0A
Serdes 100FX Status Register(0x1C) shadow(0x11): = 0x4400
Register(0x1C) shadow(0x02): = 0xA02

= Media  RJ45 =

Tx/Rx Interrupt Counts 
 Tx Interrupts = 318136, Tx BD Service Count = 318184
 Rx Interrupts = 504755, Rx BD Service Count = 317212
2. Auto Failover Mode
C892F#   sh run int gigabitEthernet 0
Building configuration...

Current configuration : 79 bytes
!
interface GigabitEthernet0
 no ip address
 media-type sfp auto-failover
end

During auto-failover operation, following msg will appear on screen:

%MAINBOARD_SFP-6-FAILOVER: SFP link down on port 0, now using RJ45 link

C892F#   sh run int gigabitEthernet 0
Building configuration...

Current configuration : 79 bytes
!
interface GigabitEthernet0
 no ip address
 media-type rj45 auto-failover
end

During auto-failover operation, following msg will appear on screen:

%MAINBOARD_SFP-6-FAILOVER: RJ45 link down on port 0, now using SFP link
3. Speed & Duplex Settings
C892F#sh int gigabitEthernet 0 | include Duplex
  Full Duplex, 1Gbps, media type is LX
C892F#sh int gigabitEthernet 0 | include Duplex
  Full Duplex, 100Mbps, media type is RJ45
4. Configure Backup port
C892F#sh run int gigabitEthernet 0
Building configuration...

Current configuration : 111 bytes
!
interface GigabitEthernet0
 backup interface FastEthernet8
 no ip address
 media-type sfp auto-failover
end
C892F#sh int gigabitEthernet 0 | include Backup
  Backup interface FastEthernet8, failure delay 0 sec, secondary disable delay 0 sec,
5. Ethernet CFM Configuration
C892F# show ethernet cfm maintenance-points remote
--------------------------------------------------------------------------------
MPID  Domain Name                                 MacAddress          IfSt  PtSt
 Lvl  Domain ID                                   Ingress                       
 RDI  MA Name                                     Type Id             SrvcInst  
      EVC Name                                                        Age       
--------------------------------------------------------------------------------
711   Customer_Domain                             001b.5428.e582      Up    Up  
 7    Customer_Domain                             Gi0.100                       
 -    SID_CE1                                     Vlan 711            N/A       
      N/A                                                             5s

Total Remote MEPs: 1

Show running-config

C892F#sh run
Building configuration...

Current configuration : 2346 bytes
!
! Last configuration change at 08:56:02 PDT Wed Sep 22 2010
! NVRAM config last updated at 08:16:26 PDT Wed Sep 22 2010
!
version 15.1
service timestamps debug datetime msec localtime show-timezone
service timestamps log datetime msec localtime show-timezone
no service password-encryption
!
hostname C892F
!
boot-start-marker
warm-reboot
boot-end-marker
!
!
logging buffered 100000
no logging console
!
no aaa new-model
ethernet cfm ieee 
ethernet cfm global
ethernet cfm traceroute cache
ethernet cfm domain C892F level 7
 mep archive-hold-time 1
 service vlan-id 1 port
  mep mpid 8191
!
ethernet cfm domain Customer_Domain level 7
 service SID_CE1 vlan 711 direction down
  continuity-check
 service SID_CE2 vlan 721 direction down
  continuity-check
  continuity-check loss-threshold 2
!
ethernet cfm logging
!
memory-size iomem 25
clock timezone PDT -7 0
!
!
ip source-route
!
!
!         
!
!
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
license udi pid CISCO892F-K9 sn FHK14197241
!
!
!
!
!
!
! 
!
!
!
!
!
!
!
!
interface Tunnel0
 no ip address
 shutdown
!
interface BRI0
 no ip address
 encapsulation hdlc
 shutdown
 no isdn termination multidrop
!
interface FastEthernet0
!
interface FastEthernet1
 shutdown
!
interface FastEthernet2
 shutdown
!
interface FastEthernet3
 shutdown
!
interface FastEthernet4
 shutdown
!         
interface FastEthernet5
 shutdown
!
interface FastEthernet6
 shutdown
!
interface FastEthernet7
 shutdown
!
interface FastEthernet8
 no ip address
 duplex auto
 speed auto
!
interface GigabitEthernet0
 mtu 9216
 backup interface FastEthernet8
 ip address 30.1.1.1 255.0.0.0
 media-type sfp auto-failover
 ethernet cfm mep domain Customer_Domain mpid 911 vlan 711
 ethernet cfm mep domain Customer_Domain mpid 921 vlan 721
!
interface GigabitEthernet0.100
 encapsulation dot1Q 711
 ip address 4.0.0.1 255.0.0.0
!
interface GigabitEthernet0.200
 encapsulation dot1Q 721
 ip address 2.0.0.1 255.0.0.0
!
interface Vlan1
 no ip address
 shutdown
!
interface Vlan2
 no ip address
 shutdown
!
interface GMPLS0
 no ip address
 shutdown
 no fair-queue
 no keepalive
!
no ip forward-protocol nd
!         
!
no ip http server
no ip http secure-server
!
logging esm config
!
!
!
!
!
!
control-plane
!
!
line con 0
 exec-timeout 0 0
line aux 0
line vty 0 4
 login
 transport input all
!
exception data-corruption buffer truncate
end   

Sunday, September 2, 2012

apache dan mysql

sebelumnya buka terminal dan login sebagai root
1. Install Mysql Server
 yum install mysql mysql-server
 kemudian start dan enable service Mysql
 systemctl start mysqld.service
 systemctl enable mysqld.service
 Testing Mysql 
 mysql -h localhost -u root -p
2. Install HTTPD (Apache) dan PHP
 yum install httpd php php-common
 kemudian start dan  enable service httpd
 /etc/init.d/httpd start
 # OR #
 service httpd start
 
 buat password mysql pertama kali adalah dengan : $ mysqladmin -u root password
Dan jika kita ingin merubah password, bisa kita lakukan dengan perintah :
$ mysqladmin -u root -p oldpassword # kemudian tekan enter maka akan di minta untuk memasukkan password yang baru
Atau dengan cara masuk ke database mysql :
mysql > use mysql;
mysql > update user set password = PASSWORD (“password baru”) where user = “root”;
mysql > flush privileges;
mysql > exit;



Standardnya aturan untuk melakukan back up adalah sebagai berikut:
mysqldump -u [username] -p[password] [nama_database] > nama_file_backup.sql
jadi implementasinya adalah sebagai berikut:
mysqldump -u root -prahasia database1 > /home/didik/database1.sql
yang dimaksud dengan /home/didik/database1.sql adalah PATH tempat penyimpanan file database1.sql tadi. Berarti file database1.sql disimpan di direktori /home/didik. PATH tersebut berlaku untuk sistem operasi LINUX, kalau pake Windows ya tinggal menyesuaikan. Path tersbut bisa menjadi C:\User\didik\Documents\
Nah, lalu kalo mau import database perintah yang digunakan adalah sebagai berikut:
mysql -u [username] -p[password] [nama_database] < file_database.sql
Jadi bisa diimplementasikan sebagai berikut:
mysql -u root -prahasia database1 < database1.sql
seperti biasa file database1.sql tadi juga diperhatikan letak direktorinya. Kalo ada dalam satu direktori tidak perlu menuliskan path secara lengkap. perlu diperhatikan juga penggunaan tanda < atau > karena kalau salah dalam memakai tanda tersebut bisa terjadi hal yang tidak diinginkan. pakai tanda < untuk import database dan pakai tanda > untuk export.

Thursday, July 12, 2012

Setting Apache di Ubuntu

1. HTTPD - Apache2 Web Server


1.1. Installation
The Apache2 web server is available in Ubuntu Linux. To install Apache2:

       • At a terminal prompt enter the following command:

                  sudo apt-get install apache2



1.2. Configuration
Apache2 is configured by placing directives in plain text configuration files. These directives are
separated between the following files and directories:
   • apache2.conf  : the main Apache2 configuration file. Contains settings that are global to Apache2.

   • conf.d : contains configuration files which apply globally to Apache2. Other packages that use
       Apache2 to serve content may add files, or symlinks, to this directory.

   • envvars : file where Apache2 environment variables are set.


   • httpd.conf : historically the main Apache2 configuration file, named after the httpd daemon.
      Now the file is typically empty, as most configuration options have been moved to the below
      referenced directories. The file can be used for user specific configuration options that globally
      effect Apache2.

   • mods-available : this directory contains configuration files to both load modules and configure
      them. Not all modules will have specific configuration files, however.

   • mods-enabled : holds symlinks to the files in /etc/apache2/mods-available. When a module
     configuration file is symlinked it will be enabled the next time apache2 is restarted.

   • ports.conf: houses the directives that determine which TCP ports Apache2 is listening on.

   • sites-available : this directory has configuration files for Apache2 Virtual Hosts. Virtual Hosts
      allow Apache2 to be configured for multiple sites that have separate configurations.

   • sites-enabled : like mods-enabled, sites-enabled contains symlinks to the /etc/apache2/sitesavailable               directory.
      Similarly when a configuration file in sites-available is symlinked, the site configured by it will be active      once Apache2 is restarted.



In addition, other configuration files may be added using the Include directive, and wildcards can be
used to include many configuration files. Any directive may be placed in any of these configuration
files. Changes to the main configuration files are only recognized by Apache2 when it is started or
restarted.


The server also reads a file containing mime document types; the filename is set by the TypesConfig
directive, typically via /etc/apache2/mods-available/mime.conf, which might also include
additions and overrides, and is /etc/mime.types by default.


1.2.1. Basic Settings
This section explains Apache2 server essential configuration parameters. Refer to the Apache2
Documentation for more details.


Apache2 ships with a virtual-host-friendly default configuration. That is, it is configured with a
single default virtual host (using the VirtualHost directive) which can modified or used as-is if you
have a single site, or used as a template for additional virtual hosts if you have multiple sites. If left
alone, the default virtual host will serve as your default site, or the site users will see if the URL
they enter does not match the ServerName directive of any of your custom sites. To modify the
default virtual host, edit the file /etc/apache2/sites-available/default.
The directives set for a virtual host only apply to that particular virtual host. If a directive
is set server-wide and not defined within the virtual host settings, the default setting is
used. For example, you can define a Webmaster email address and not define individual
email addresses for each virtual host.
If you wish to configure a new virtual host or site, copy that file into the same directory with a
name you choose. For example:

sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/mynewsite



Edit the new file to configure the new site using some of the directives described below.
• The ServerAdmin directive specifies the email address to be advertised for the server's
administrator. The default value is webmaster@localhost. This should be changed to an email
address that is delivered to you (if you are the server's administrator). If your website has a
problem, Apache2 will display an error message containing this email address to report the problem
to. Find this directive in your site's configuration file in /etc/apache2/sites-available.

• The Listen directive specifies the port, and optionally the IP address, Apache2 should listen on.
If the IP address is not specified, Apache2 will listen on all IP addresses assigned to the machine
it runs on. The default value for the Listen directive is 80. Change this to 127.0.0.1:80 to cause
Apache2 to listen only on your loopback interface so that it will not be available to the Internet,
to (for example) 81 to change the port that it listens on, or leave it as is for normal operation. This
directive can be found and changed in its own file, /etc/apache2/ports.conf

• The ServerName directive is optional and specifies what FQDN your site should answer to. The
default virtual host has no ServerName directive specified, so it will respond to all requests that
do not match a ServerName directive in another virtual host. If you have just acquired the domain
name ubunturocks.com and wish to host it on your Ubuntu server, the value of the ServerName
directive in your virtual host configuration file should be ubunturocks.com. Add this directive to
the new virtual host file you created earlier (/etc/apache2/sites-available/mynewsite).
You may also want your site to respond to www.ubunturocks.com, since many users will assume
the www prefix is appropriate. Use the ServerAlias directive for this. You may also use wildcards
in the ServerAlias directive.
For example, the following configuration will cause your site to respond to any domain request
ending in .ubunturocks.com.
ServerAlias *.ubunturocks.com



The DocumentRoot directive specifies where Apache2 should look for the files that make up the
site. The default value is /var/www, as specified in /etc/apache2/sites-available/default. If
desired, change this value in your site's virtual host file, and remember to create that directory if
necessary!
Enable the new VirtualHost using the a2ensite utility and restart Apache2:

sudo a2ensite mynewsite
sudo service apache2 restart


Be sure to replace mynewsite with a more descriptive name for the VirtualHost. One method
is to name the file after the ServerName directive of the VirtualHost.


Similarly, use the a2dissite utility to disable sites. This is can be useful when troubleshooting
configuration problems with multiple VirtualHosts:

sudo a2dissite mynewsite
sudo service apache2 restart

Tuesday, July 10, 2012

Membatasi Traffik Jaringan


Membatasi Traffik Jaringan Pada Cisco Switch

Kasus :  ada komputer yang terkena virus atau user nakal dengan download speed sehingga traffik  tinggi dan mengganggu user lain


perintah ini mulai pada cisco IOS versi 12.2(25). Contoh dengan Switch 2960 Series. Misalnya ada port switch dengan speed default 100Mbps, lalu kita ingin melimitasi menjadi 10Mb. Caranya adalah dengan menerapkan QOS pada switch tersebut :
Switch(config)# interface FastEthernet 0/1
Switch(config-if)# srr-queue bandwidth limit 10
Dengan perintah “srr-queue bandwidth limit 10″ maka kita akan melimitasi bandwith untuk outbound packetnya jadi tinggal 10% dari bandwith interfacenya. Jadi hanya 10Mb.
Jika ingin melimit bandwith hanya 1 Mb saja, Caranya adalah dengan mengganti terlebih dahulu speed pada interface tersebut menjadi 10Mb, kamudian baru dilimit dengan “srr-queue bandwidth limit 10″
Switch(config)# interface FastEthernet 0/1
Switch(config-if)# speed 10
Switch(config-if)# srr-queue bandwidth limit 10
Untuk lebih detail mengenai QOS pada switch 2950 silahkan lihat disini http://www.cisco.com/en/US/docs/switches/lan/catalyst2960/software/release/12.2_37_se/con