Configuring speed/duplex on SecurePlatform via ‘eth_set’ and ‘ethtool’ commands and ‘/etc/sysconfig/netconf.C’ file

 

Solution ID: sk61141

In order to set speed and/or duplex for Network Interface Card (NIC) on SecurePlatform, the following commands can be used:

  • ethtool (Linux tool, http://linux.die.net/man/8/ethtool)
    Usage: ethtool -s ethX [speed 10|100|1000] [duplex half|full] [autoneg on|off]

    NOTE: in order for the settings to be applied at each boot, the command for specific NIC should be added to a start-up script (e.g., to /etc/rc.d/rc.local)

  • eth_set (SecurePlatform shell script /bin/eth_set)
    Usage: eth_set  [<10h|10f|100h|100f|1000h|1000f|autoneg>]

    NOTE: this is the preferred command for SecurePlatform – the changes are applied and saved in /etc/sysconfig/netconf.C configuration file.

 

The following is the example from SecurePlatform – we set speed and duplex for NIC
and show how this changes are applied and saved in a configuration file:

    1. 10h : Speed = 10 Mbit/sec , Duplex = Half

      [Expert@FW]# eth_set eth0 10h
      Configured speed/duplex settings:        10h
      NIC reported speed/duplex settings:      10h
      NIC reported speed/duplex capabilities:  10h,100h,10f,100f,1000f,autoneg
      [Expert@FW]# 
      
      [Expert@FW]# ethtool eth0
      Settings for eth0:
              Supported ports: [ TP ]
              Supported link modes:   10baseT/Half 10baseT/Full 
                                      100baseT/Half 100baseT/Full 
                                      1000baseT/Full 
              Supports auto-negotiation: Yes
              Advertised link modes: Not reported
              Advertised auto-negotiation: No
              Speed: 10Mb/s
              Duplex: Half
              Port: Twisted Pair
              PHYAD: 1
              Transceiver: internal
              Auto-negotiation: off
              Supports Wake-on: umbg
              Wake-on: g
              Current message level: 0x00000007 (7)
              Link detected: yes
      [Expert@FW]# 
      
      [Expert@FW]# head -n 15 /etc/sysconfig/netconf.C
      (conf
              : (conns
                      : (conn
                              :ifname (eth0)
                              :type (1)
                              :dhcpc (0)
                              :ipaddr ("10.10.10.22/24")
                              :mtu (1500)
                              :onboot (1)
                              :iff-up (1)
                              :hwaddr ("00:11:22:33:44:55")
                              :ethtool (1)
                              :s-code (0)
                      )
                      : (conn
      [Expert@FW]#
    1. 10f : Speed = 10 Mbit/sec , Duplex = Full

      [Expert@FW]# eth_set eth0 10f
      Configured speed/duplex settings:        10f
      NIC reported speed/duplex settings:      off
      NIC reported speed/duplex capabilities:  10h,100h,10f,100f,1000f,autoneg
      [Expert@FW]# 
      
      [Expert@FW]# ethtool eth0
      Settings for eth0:
              Supported ports: [ TP ]
              Supported link modes:   10baseT/Half 10baseT/Full 
                                      100baseT/Half 100baseT/Full 
                                      1000baseT/Full 
              Supports auto-negotiation: Yes
              Advertised link modes: Not reported
              Advertised auto-negotiation: No
              Speed: 10Mb/s
              Duplex: Full
              Port: Twisted Pair
              PHYAD: 1
              Transceiver: internal
              Auto-negotiation: off
              Supports Wake-on: umbg
              Wake-on: g
              Current message level: 0x00000007 (7)
              Link detected: yes
      [Expert@FW]# 
      
      [Expert@FW]# head -n 15 /etc/sysconfig/netconf.C
      (conf
              : (conns
                      : (conn
                              :ifname (eth0)
                              :type (1)
                              :dhcpc (0)
                              :ipaddr ("10.10.10.22/24")
                              :mtu (1500)
                              :onboot (1)
                              :iff-up (1)
                              :hwaddr ("00:11:22:33:44:55")
                              :ethtool (2)
                              :s-code (0)
                      )
                      : (conn
      [Expert@FW]#
    1. 100h : Speed = 100 Mbit/sec , Duplex = Half

      [Expert@FW]# eth_set eth0 100h
      Configured speed/duplex settings:        100h
      NIC reported speed/duplex settings:      off
      NIC reported speed/duplex capabilities:  10h,100h,10f,100f,1000f,autoneg
      [Expert@FW]# 
      
      [Expert@FW]# ethtool eth0
      Settings for eth0:
              Supported ports: [ TP ]
              Supported link modes:   10baseT/Half 10baseT/Full 
                                      100baseT/Half 100baseT/Full 
                                      1000baseT/Full 
              Supports auto-negotiation: Yes
              Advertised link modes: Not reported
              Advertised auto-negotiation: No
              Speed: 100Mb/s
              Duplex: Half
              Port: Twisted Pair
              PHYAD: 1
              Transceiver: internal
              Auto-negotiation: off
              Supports Wake-on: umbg
              Wake-on: g
              Current message level: 0x00000007 (7)
              Link detected: yes
      [Expert@FW]# 
      
      [Expert@FW]# head -n 15 /etc/sysconfig/netconf.C
      (conf
              : (conns
                      : (conn
                              :ifname (eth0)
                              :type (1)
                              :dhcpc (0)
                              :ipaddr ("10.10.10.22/24")
                              :mtu (1500)
                              :onboot (1)
                              :iff-up (1)
                              :hwaddr ("00:11:22:33:44:55")
                              :ethtool (4)
                              :s-code (0)
                      )
                      : (conn
      [Expert@FW]#
    1. 100f : Speed = 100 Mbit/sec , Duplex = Full

      [Expert@FW]# eth_set eth0 100f
      Configured speed/duplex settings:        100f
      NIC reported speed/duplex settings:      off
      NIC reported speed/duplex capabilities:  10h,100h,10f,100f,1000f,autoneg
      [Expert@FW]# 
      
      [Expert@FW]# ethtool eth0
      Settings for eth0:
              Supported ports: [ TP ]
              Supported link modes:   10baseT/Half 10baseT/Full 
                                      100baseT/Half 100baseT/Full 
                                      1000baseT/Full 
              Supports auto-negotiation: Yes
              Advertised link modes: Not reported
              Advertised auto-negotiation: No
              Speed: 100Mb/s
              Duplex: Full
              Port: Twisted Pair
              PHYAD: 1
              Transceiver: internal
              Auto-negotiation: off
              Supports Wake-on: umbg
              Wake-on: g
              Current message level: 0x00000007 (7)
              Link detected: yes
      [Expert@FW]# 
      
      [Expert@FW]# head -n 15 /etc/sysconfig/netconf.C
      (conf
              : (conns
                      : (conn
                              :ifname (eth0)
                              :type (1)
                              :dhcpc (0)
                              :ipaddr ("10.10.10.22/24")
                              :mtu (1500)
                              :onboot (1)
                              :iff-up (1)
                              :hwaddr ("00:11:22:33:44:55")
                              :ethtool (8)
                              :s-code (0)
                      )
                      : (conn
      [Expert@FW]#
    1. 1000f : Speed = 1000 Mbit/sec , Duplex = Full

      NOTE: speed of 1000 Mbit/sec (1 Gb) can be set only in Full duplex, and has to be negotiated (advertised)

      [Expert@FW]# eth_set eth0 1000f
      Configured speed/duplex settings:        1000f
      NIC reported speed/duplex settings:      on
      NIC reported speed/duplex capabilities:  10h,100h,10f,100f,1000f,autoneg
      [Expert@FW]# 
      
      [Expert@FW]# ethtool eth0
      Settings for eth0:
              Supported ports: [ TP ]
              Supported link modes:   10baseT/Half 10baseT/Full 
                                      100baseT/Half 100baseT/Full 
                                      1000baseT/Full 
              Supports auto-negotiation: Yes
              Advertised link modes: 1000baseT/Full 
              Advertised auto-negotiation: Yes
              Speed: 1000Mb/s
              Duplex: Full
              Port: Twisted Pair
              PHYAD: 1
              Transceiver: internal
              Auto-negotiation: on
              Supports Wake-on: umbg
              Wake-on: g
              Current message level: 0x00000007 (7)
              Link detected: yes
      [Expert@FW]# 
      
      [Expert@FW]# head -n 15 /etc/sysconfig/netconf.C
      (conf
              : (conns
                      : (conn
                              :ifname (eth0)
                              :type (1)
                              :dhcpc (0)
                              :ipaddr ("10.10.10.22/24")
                              :mtu (1500)
                              :onboot (1)
                              :iff-up (1)
                              :hwaddr ("00:11:22:33:44:55")
                              :ethtool (32)
                              :s-code (0)
                      )
                      : (conn
      [Expert@FW]#
  1. Auto-Negotiation

    [Expert@FW]# eth_set eth0 autoneg
    Configured speed/duplex settings:        autoneg
    NIC reported speed/duplex settings:      on
    NIC reported speed/duplex capabilities:  10h,100h,10f,100f,1000f,autoneg
    [Expert@FW]# 
    
    [Expert@FW]# ethtool eth0
    Settings for eth0:
            Supported ports: [ TP ]
            Supported link modes:   10baseT/Half 10baseT/Full 
                                    100baseT/Half 100baseT/Full 
                                    1000baseT/Full 
            Supports auto-negotiation: Yes
            Advertised link modes:  10baseT/Half 10baseT/Full 
                                    100baseT/Half 100baseT/Full 
                                    1000baseT/Full 
            Advertised auto-negotiation: Yes
            Speed: 1000Mb/s
            Duplex: Full
            Port: Twisted Pair
            PHYAD: 1
            Transceiver: internal
            Auto-negotiation: on
            Supports Wake-on: umbg
            Wake-on: g
            Current message level: 0x00000007 (7)
            Link detected: yes
    [Expert@FW]# 
    
    [Expert@FW]# head -n 15 /etc/sysconfig/netconf.C
    (conf
            : (conns
                    : (conn
                            :ifname (eth0)
                            :type (1)
                            :dhcpc (0)
                            :ipaddr ("10.10.10.22/24")
                            :mtu (1500)
                            :onboot (1)
                            :iff-up (1)
                            :hwaddr ("00:11:22:33:44:55")
                            :ethtool (64)
                            :s-code (0)
                    )
                    : (conn
    [Expert@FW]#

 


Laisser un commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion / Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion / Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion / Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion / Changer )

Connexion à %s