{"id":1976,"date":"2013-04-17T16:44:40","date_gmt":"2013-04-17T08:44:40","guid":{"rendered":"http:\/\/rmohan.com\/?p=1976"},"modified":"2013-04-17T17:28:49","modified_gmt":"2013-04-17T09:28:49","slug":"gigabit-ethernet-on-centos","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=1976","title":{"rendered":"Gigabit Ethernet on CentOS"},"content":{"rendered":"<p>o determine the current ethernet connection link speed you can use the following commands:<\/p>\n<div>\n<div id=\"highlighter_193570\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>\n<div><code>#dmesg | grep -i duplex<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<div>\n<div id=\"highlighter_138154\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>\n<div><code>tg3: eth0: Link is up at 100 Mbps, full duplex.<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<div>\n<div id=\"highlighter_37186\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>\n<div><code>#ethtool eth0<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<div>\n<div id=\"highlighter_323164\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>\n<div><code>Supported ports: [ TP ]<\/code><\/div>\n<div><code>Supported link modes:\u00a0\u00a0 10baseT<\/code><code>\/Half<\/code>\u00a0<code>10baseT<\/code><code>\/Full<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>100baseT<\/code><code>\/Half<\/code>\u00a0<code>100baseT<\/code><code>\/Full<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>1000baseT<\/code><code>\/Half<\/code>\u00a0<code>1000baseT<\/code><code>\/Full<\/code><\/div>\n<div><code>Supports auto-negotiation: Yes<\/code><\/div>\n<div><code>Advertised link modes:\u00a0 10baseT<\/code><code>\/Half<\/code>\u00a0<code>10baseT<\/code><code>\/Full<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>100baseT<\/code><code>\/Half<\/code>\u00a0<code>100baseT<\/code><code>\/Full<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>1000baseT<\/code><code>\/Half<\/code>\u00a0<code>1000baseT<\/code><code>\/Full<\/code><\/div>\n<div><code>Advertised auto-negotiation: Yes<\/code><\/div>\n<div><code>Speed: 1000Mb<\/code><code>\/s<\/code><\/div>\n<div><code>Duplex: Full<\/code><\/div>\n<div><code>Port: Twisted Pair<\/code><\/div>\n<div><code>PHYAD: 1<\/code><\/div>\n<div><code>Transceiver: internal<\/code><\/div>\n<div><code>Auto-negotiation: on<\/code><\/div>\n<div><code>Supports Wake-on: g<\/code><\/div>\n<div><code>Wake-on: d<\/code><\/div>\n<div><code>Current message level: 0x000000ff (255)<\/code><\/div>\n<div><code>Link detected:\u00a0<\/code><code>yes<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>To force the ethernet connection to Gigabit ethernet, edit your network settings:<\/p>\n<div>\n<div id=\"highlighter_204012\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>\n<div><code>#vim \/etc\/sysconfig\/network-scripts\/ifcfg-eth0<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>Add the following lines:<\/p>\n<div>\n<div id=\"highlighter_198249\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>\n<div><code>ETHTOOL_OPTS=&amp;quot;autoneg on speed 1000 duplex full&amp;quot;<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>Restart the network:<\/p>\n<div>\n<div id=\"highlighter_396950\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>\n<div><code>#service network restart<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>Once set run the following commands again to ensure that it worked:<\/p>\n<div>\n<div id=\"highlighter_268396\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>\n<div><code>#dmesg | grep -i duplex<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<div>\n<div id=\"highlighter_954034\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>\n<div><code>tg3: eth0: Link is up at 1000 Mbps, full duplex.<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<div>\n<div id=\"highlighter_880087\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>\n<div><code>#ethtool eth0<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<div>\n<div id=\"highlighter_124070\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>\n<div><code>Supported ports: [ TP ]<\/code><\/div>\n<div><code>Supported link modes:\u00a0\u00a0 10baseT<\/code><code>\/Half<\/code>\u00a0<code>10baseT<\/code><code>\/Full<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>100baseT<\/code><code>\/Half<\/code>\u00a0<code>100baseT<\/code><code>\/Full<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>1000baseT<\/code><code>\/Half<\/code>\u00a0<code>1000baseT<\/code><code>\/Full<\/code><\/div>\n<div><code>Supports auto-negotiation: Yes<\/code><\/div>\n<div><code>Advertised link modes:\u00a0 1000baseT<\/code><code>\/Full<\/code><\/div>\n<div><code>Advertised auto-negotiation: Yes<\/code><\/div>\n<div><code>Speed: 1000Mb<\/code><code>\/s<\/code><\/div>\n<div><code>Duplex: Full<\/code><\/div>\n<div><code>Port: Twisted Pair<\/code><\/div>\n<div><code>PHYAD: 1<\/code><\/div>\n<div><code>Transceiver: internal<\/code><\/div>\n<div><code>Auto-negotiation: on<\/code><\/div>\n<div><code>Supports Wake-on: g<\/code><\/div>\n<div><code>Wake-on: d<\/code><\/div>\n<div><code>Current message level: 0x000000ff (255)<\/code><\/div>\n<div><code>Link detected:\u00a0<\/code><code>yes<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>To determine what sort of ethernet card (NIC) is in your server:<\/p>\n<div>\n<div id=\"highlighter_734816\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>\n<div><code>#lspci|grep Eth<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<div>\n<div id=\"highlighter_879024\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>\n<div><code>01:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5722 Gigabit Ethernet PCI Express<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>To get statistics on your ethernet card (NIC):<\/p>\n<div>\n<div id=\"highlighter_684716\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>\n<div><code>#ethtool -S eth0<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<div>\n<div id=\"highlighter_292520\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>\n<div><code>NIC statistics:<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_octets: 2759019776<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_fragments: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_ucast_packets: 23966653<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_mcast_packets: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_bcast_packets: 222<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_fcs_errors: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_align_errors: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_xon_pause_rcvd: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_xoff_pause_rcvd: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_mac_ctrl_rcvd: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_xoff_entered: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_frame_too_long_errors: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_jabbers: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_undersize_packets: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_in_length_errors: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_out_length_errors: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_64_or_less_octet_packets: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_65_to_127_octet_packets: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_128_to_255_octet_packets: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_256_to_511_octet_packets: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_512_to_1023_octet_packets: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_1024_to_1522_octet_packets: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_1523_to_2047_octet_packets: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_2048_to_4095_octet_packets: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_4096_to_8191_octet_packets: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_8192_to_9022_octet_packets: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_octets: 31867950633<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_collisions: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_xon_sent: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_xoff_sent: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_flow_control: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_mac_errors: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_single_collisions: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_mult_collisions: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_deferred: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_excessive_collisions: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_late_collisions: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_collide_2times: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_collide_3times: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_collide_4times: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_collide_5times: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_collide_6times: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_collide_7times: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_collide_8times: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_collide_9times: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_collide_10times: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_collide_11times: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_collide_12times: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_collide_13times: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_collide_14times: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_collide_15times: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_ucast_packets: 32202050<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_mcast_packets: 6<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_bcast_packets: 5<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_carrier_sense_errors: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_discards: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_errors: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>dma_writeq_full: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>dma_write_prioq_full: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rxbds_empty: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_discards: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_errors: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>rx_threshold_hit: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>dma_readq_full: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>dma_read_prioq_full: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>tx_comp_queue_full: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>ring_set_send_prod_index: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>ring_status_update: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>nic_irqs: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>nic_avoided_irqs: 0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>nic_tx_threshold_hit: 0<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>o determine the current ethernet connection link speed you can use the following commands:<\/p>\n<p> #dmesg | grep -i duplex tg3: eth0: Link is up at 100 Mbps, full duplex. #ethtool eth0 Supported ports: [ TP ] Supported link modes: 10baseT\/Half 10baseT\/Full 100baseT\/Half 100baseT\/Full 1000baseT\/Half 1000baseT\/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT\/Half 10baseT\/Full 100baseT\/Half 100baseT\/Full [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/1976"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1976"}],"version-history":[{"count":5,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/1976\/revisions"}],"predecessor-version":[{"id":1979,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/1976\/revisions\/1979"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}