Вы находитесь на странице: 1из 8

How to Set 100Full Duplex on an HME device

The following may prove useful in support of this:

=====
How to force the HME card to work at 100mb (full-duplex).

If the auto negotiate does not work, then the 100-MB full-duplex mode
can be forced to run at 100-MB, Full-Duplex using the following:

Please try (if using /etc/rc2.d/S99...)

ndd -set /dev/hme instance 0


ndd -set /dev/hme adv_100T4_cap 0
ndd -set /dev/hme adv_100fdx_cap 1
ndd -set /dev/hme adv_100hdx_cap 0
ndd -set /dev/hme adv_10fdx_cap 0
ndd -set /dev/hme adv_10hdx_cap 0
ndd -set /dev/hme adv_autoneg_cap 0

or (if using /etc/system)

set hme:hme_adv_autoneg_cap=0
set hme:hme_adv_100T4_cap=0
set hme:hme_adv_100fdx_cap=1
set hme:hme_adv_100hdx_cap=0
set hme:hme_adv_10fdx_cap=0
set hme:hme_adv_10hdx_cap=0

Note that the order does make a difference.


The link is re-negotiated when the interface is
ifconfig'ed up or when ndd ndd adv_autoneg_cap command is executed.

======

How to force the HME card to work at 10mb (full-duplex).

The section "10FDX" includes how to force the HME card to work at 10 MB
(full-duplex). You can either put the commands in the /etc/system file
or in a startup script -- i.e. /etc/rc2.d/S99hme_config. Another way
is to make the changes from the command line -- using the "ndd" command using
the syntax below. But it is better to put the commands in /etc/system or a
startup script to preserve the environment accross reboots.
10FDX only

/etc/system

set hme:hme_adv_autoneg_cap=0
set hme:hme_adv_100T4_cap=0
set hme:hme_adv_100fdx_cap=0
set hme:hme_adv_100hdx_cap=0
set hme:hme_adv_10fdx_cap=1
set hme:hme_adv_10hdx_cap=0

ndd commands

ndd -set /dev/hme instance 0


ndd -set /dev/hme adv_100T4_cap 0
ndd -set /dev/hme adv_100fdx_cap 0
ndd -set /dev/hme adv_100hdx_cap 0
ndd -set /dev/hme adv_10fdx_cap 1
ndd -set /dev/hme adv_10hdx_cap 0
ndd -set /dev/hme adv_autoneg_cap 0

=======
Is the hme interface running at 10BaseT or 100BaseT

How do you tell if the hme interface is actually linked up at 10 Mbps or


100 Mbps?

Answer:

# ndd -get /dev/hme link_status


# ndd -get /dev/hme link_speed
# ndd -get /dev/hme link_mode

link_status (read only)


0 for Link Down
1 for Link up

link_speed (read only)


0 for 10 Mbps
1 for 100 Mbps

link_mode (read only)


0 for Half-Duplex mode
1 for Full-Duplex mode
How to add a NIC card on Sun:

ifconfig hmeX plumb


ifconfig hmeX inet xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx
ifconfig hmeX up

How to change a hostname on Sun:

Make sure to use notepad or vi to edit files in order to avoid hidden characters.

There are four files that must be modified in order to rename the hostname:

1) /etc/hosts
2) /etc/net/ticlts/hosts
3) /etc/net/ticolts/hosts
4) /etc/nodename
5) /etc/hostname.hmex
6) /etc/net/ticotsord/hosts

Another way to change the hostname is by using sys-unconfig command. This restores
the system to an unconfigured
state and should only be used when you are not concerned about preserving the current
setup of the system. I suggest
looking at the man pages for further information (man sys-unconfig) or edit the following
files above.

Note: rename the directory under /var/crash to match your new hostname.

Sun Solaris Servers Network Configuration Guide (SPARC Platform Only)

To bind an IP address to a Network Interface Card

#ifconfig -a
--- to check the configuration
#ifconfig qfe0 plumb
--- to enable the first Network Interface Card
#ifconfig qfe0 {ip address}
netmask {subnet} up
--- to bind IP address, subnet, and enable the configuration

Create a file on /etc directory - hostname.qfe0 with hostname entry


Add entry on /etc/netmasks if IP address is on different subnet
Add entry on /etc/inet/hosts file with IP address and hostname

Example:
#ifconfig -a
hme0: flags=863UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST mtu 1500
inet 202.40.231.2 netmask ffffff00 broadcast 202.40.231.255
ether 8:0:20:9f:51:fe

#ifconfig qfe0 plumb


#ifconfig qfe0 202.40.231.3 netmask 255.255.255.0 up
#ifconfig -a

hme0: flags=863 UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST mtu 1500


inet 202.40.231.2 netmask ffffff00 broadcast 202.40.231.255
ether 8:0:20:9f:51:fe
qfe0: flags=863UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST mtu 1500
inet 202.40.231.3 netmask ffffff00 broadcast 202.40.231.255

To change IP Address
#ifconfig qfe0 down
--- to disable the first Network Interface Card

To remove Network Interface Card


#ifconfig qfe0 unplumb
--- to remove the first Network Interface Card

To bind a virtual IP address to Network Interface Card


#ifconfig qfe0:1 plumb
--- in some cases this is not needed if qfe0 has been plumb
#ifconfig qfe0:1 202.40.231.4 netmask 255.255.255.0 up

Create a file on /etc directory - hostname.qfe0:1 with hostname entry


Add entry on /etc/netmasks if IP address is on different subnet
Add entry on /etc/inet/hosts file with IP address and hostname

NOTE:
-If adding a quad

Network Interface Card, the naming convention will be qfe0, qfe1, qfe2, qfe3.
-If adding a single port Network Interface Card, the naming convention will be hme1,
hme2, hme3.
-The onboard Network Interface Card is hme0
-If adding a virtual IP address, the naming convention will be hme0:1, hme0:2, up to
hme0:3 only for hme0,
or qfe0:1, qfe0:2, up to qfe0:3 only for qfe0, depending on the number of hme and qfe
port used.
To hardcode the speed of the Network Interface Card
Example:
You want to hardcode 100Full Duplex for hme0
#ndd -set /dev/hme instance 0
#ndd -set /dev/hme adv_100fdx_cap 1
#ndd -set /dev/hme adv_100hdx_cap 0
#ndd -set /dev/hme adv_10fdx_cap 0
#ndd -set /dev/hme adv_10hdx_cap 0
#ndd -set /dev/hme adv_autoneg_cap 0

Create an input on the file /etc/system so that when your system rebooted it will run the
NIC in 100Full Duplex
automatically.
set hme:hme_adv_100fdx_cap=1
set hme:hme_adv_100hdx_cap=0
set hme:hme_adv_10fdx_cap=0
set hme:hme_adv_10hdx_cap=0
set hme:hme_adv_autoneg_cap=0

To check the status


#ndd /dev/hme \?
--- displays all command options for ndd
#ndd /dev/hme link_status
--- displays the hme0 link status

The above configurations should be followed in order.

1 = Capable/Enable
0 = Disable
hme1 = instance 1
hme2 = instance 2
hme3 = instance 3

The system on the other end of network cable should be hardcode to 100Full Duplex also.
If the other end is a
switch, check your vendor manuals on how to do it.

To monitor packets traveling in your NIC ports


Example:
You want to monitor your hme0 port of packets coming from IP address 202.40.224.14
#snoop -d hme0 | grep 202.40.224.14

You want to monitor your qfe1 port of packets coming from host server1
#snoop -d qfe1 | grep server1
You want to monitor your hme1 ports of all packets
#snoop -d hme1

To add or remove a static route


Example:
You want to add a static route to network 192.168.16.0 to your default gateway of
10.236.74.1
#route add -net 192.168.16.0 10.236.74.1

then create a script, so that when the system rebooted the route will automatically added
#cd /etc/rc2.d
#vi S168staticroute

Add the following line


route add -net 192.168.16.0 10.236.74.1

You want to add a static route to host 192.168.64.4 to your default gateway of
10.236.74.1
#route add 192.168.64.4 10.236.74.1

then create a script, so that when the system rebooted the route will automatically added
#cd /etc/rc2.d
#vi S168staticroute

Add the following line


route add 192.168.64.4 10.236.74.1

You want to delete the static route to network 192.168.16.0 to your default gateway of
10.236.74.1
#route delete -net 192.168.16.0 10.236.74.1

You want to delete the static route to host 192.168.64.4 to your default gateway of
10.236.74.1
#route delete 192.168.64.4 10.236.74.1

I just want to contribute a little bit.

Network failover using Solaris multipathing - in.mapthd

Network failover using Solaris multipathing


I've got this Sun box running Solaris 8 that I've managed to get three 10/100 hme ethernet
cards into. All are connected to the 100Mbit switch that runs most of our LAN. This the
quick guide to how I set up multipathing on those three interfaces. As clearly stated in
Sun's docs, each interface involved in failover must be assigned to a group (I use the
same group for all three, it can be named about whatever you want), and assigned an
additional IP address for in.mpathd to use for testing whether the interface is up or not.
While these additional IPs will only be relevant to this host, they must NOT be in use
anywhere else on your subnet.

Conventions

Network: 10.0.0.0/24
Hostname: acadie
Domain: internal
Interfaces: hme0 hme1 hme2
Failover group name: mofo
Main "live" address: 10.0.0.101
hme0 "test" address: 10.0.0.110
hme1 "test" address: 10.0.0.111
hme2 "test" address: 10.0.0.112

Configuration files

/etc/hosts:

# # Internet host table # 127.0.0.1 localhost loghost


10.0.0.101 acadie.internal acadie 10.0.0.110 acadie-hme0
10.0.0.111 acadie-hme1 10.0.0.112 acadie-hme2

/etc/netmasks:

10.0.0.0 255.255.255.0

/etc/hostname.hme0:

acadie netmask + broadcast + up \ group mofo \ addif acadie-hme0


netmask + broadcast + \ deprecated -failover up

/etc/hostname.hme1:

acadie-hme1 netmask + broadcast + \ group mofo \ deprecated -failover


standby up

/etc/hostname.hme2:

acadie-hme2 netmask + broadcast + \ group mofo \ deprecated -failover


standby up

Command line

The above configuration is all that is required to make this configuration persistent across
reboots. If, however, you are in the position of having to implement this on a running
machine without rebooting, you pretty much just run `ifconfig` for each interface, with
the arguments shown in the /etc/hostname.hme? files above.

For example, if you're already up and running on hme0, and want to add hme1 and hme2
as failover interfaces to hme0:

acadie# ifconfig hme0 hme0:


flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 10.0.0.101 netmask ffffff00 broadcast 10.0.0.255 ether
8:0:20:c5:10:15

Assign hme0 to your failover group, and add an alias to it for the testing address:

acadie# ifconfig hme0 group mofo acadie# ifconfig hme0 addif 10.0.0.110
netmask 255.255.255.0 \ broadcast 10.0.0.255 -failover deprecated
up

Then add hme1 and hme2 in:

acadie# ifconfig hme1 plumb 10.0.0.111 netmask 255.255.255.0 \


broadcast 10.0.0.255 group mofo deprecated -failover standby up acadie#
ifconfig hme2 plumb 10.0.0.112 netmask 255.255.255.0 \ broadcast
10.0.0.255 group mofo deprecated -failover standby up

Note: You can substitute in hostnames for the IP addresses in those ifconfig commands,
provided they are in /etc/hosts.

acadie# ifconfig -a lo0:


flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 inde

Вам также может понравиться