Skip to Content
Cisco IOS Cookbook, 2nd Edition
book

Cisco IOS Cookbook, 2nd Edition

by Kevin Dooley, Ian Brown
December 2006
Intermediate to advanced
1188 pages
72h 8m
English
O'Reilly Media, Inc.
Content preview from Cisco IOS Cookbook, 2nd Edition

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 terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router1(config)#interface FastEthernet0/0
Router1(config-if)#media-type 100BaseX
Router1(config-if)#duplex full
Router1(config-if)#speed 100
Router1(config-if)#exit
Router1(config)#end
Router1#

You can also adjust parameters such as the ARP timeout interval, the MAC address, and the keepalive timer on the interface:

Router1#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router1(config)#interface FastEthernet0/0
Router1(config-if)#mac-address 0AAA.ABCD.0101
Router1(config-if)#arp timeout 60 
Router1(config-if)#keepalive 5
Router1(config-if)#exit
Router1(config)#end
Router1#

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)# ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

IP Routing on Cisco IOS, IOS XE, and IOS XR: An Essential Guide to Understanding and Implementing IP Routing Protocols

IP Routing on Cisco IOS, IOS XE, and IOS XR: An Essential Guide to Understanding and Implementing IP Routing Protocols

Brad Edgeworth, Aaron Foss, Ramiro Garza Rios
Cisco Software-Defined Access

Cisco Software-Defined Access

Srilatha Vemula, Jason Gooley, Roddie Hasan

Publisher Resources

ISBN: 0596527225Supplemental ContentErrata Page