Configuring Ethernet Interface Features
Problem
You want to force a particular Ethernet speed or duplex setting.
Solution
Cisco routers allow you to adjust several different Layer 1 and 2 parameters on Ethernet interfaces, depending on the specific hardware. On interfaces that support more than one medium, you can specify which media type you want to use with the media-type command:
Router1#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router1(config)#interface FastEthernet0/0Router1(config-if)#media-type 100BaseXRouter1(config-if)#duplex fullRouter1(config-if)#speed 100Router1(config-if)#exitRouter1(config)#endRouter1#
You can also adjust parameters such as the ARP timeout interval, the MAC address, and the keepalive timer on the interface:
Router1#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router1(config)#interface FastEthernet0/0Router1(config-if)#mac-addressRouter1(config-if)#0AAA.ABCD.0101arp timeoutRouter1(config-if)#60keepaliveRouter1(config-if)#5exitRouter1(config)#endRouter1#
Discussion
Most of the time, you will just want to use the default options when setting up Ethernet interfaces. By default, most Ethernet modules will automatically sense which media type is in use, as well as the duplex and speed settings. In this example, we have explicitly forced the router to use its 100BaseX medium, full duplex, and 100Mbps speed settings:
Router1(config)#interface FastEthernet0/0 Router1(config-if)# ...