Configure network card?

Hi All,

Can one network card be configured with two IP addresses? Only one is used for communication.

If yes, how can I do this?

Thanks!

iecuAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

yuzhCommented:
Which version of OS are you using, please post the output of:

uname -a
0
iecuAuthor Commented:
Dear yuzh,

the output is

SunOS test_machine 5.7 Generic_106541-10 Sun4u spare SUNW, UltraSPARC-IIi-CEngine

Thanks
0
yuzhCommented:
Please have a look at the answer in the following page:

http:Q_20765167.html

BTW, Solaris 7 is very old consider to upgrade your OS to Solaris 9
(at least should run Solaris 8)

You can downlaod Solaris 9 from:
http://wwws.sun.com/software/solaris/binaries/get.html
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

iecuAuthor Commented:
Dear yuzh,

I am a new Unix user.
The ouptut of running ifconfig -a is as follows:

lo0: flags=849<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232 inet 127.0.0.1 netmask ff000000

hme0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500 inet 165.202.7.10 netmask fffffffc broadcast 165.202.7.11 ether 8:0:20:da:5e:f6

hme1:flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500 inet 165.202.171.125 netmask ffffff00 broadcast 165.202.171.255 ether 8:0:20:da:5e:f6

Now I would like to configure the interface hme0 with
IP = 10.11.4.1
subnetmask = 255.255.255.0

What is the broadcast address & UP? How to determine this?

Can u teach me the correct steps to add the IP to the interface hme0?

ifconfig hme0:1 plumb
ifconfig hme0:1 10.11.4.1 netmask 255.255.255.0 broadcast ?.?.?.? up ?.?.?.?

Then create a new file called hostname.hme0:1 contains
new_host

Then edit file /etc/hosts, add
10.11.4.1 new_host

Then edit file /etc/netmasks, add
10.11.4.0 255.255.255.0

Any mistaked I made?

Thanks!
0
wesly_chenCommented:
>Now I would like to configure the interface hme0 with
>IP = 10.11.4.1
>subnetmask = 255.255.255.0

broadcast 10.11.4.255
Based on your subnetmask (255.255.255.0)
255 (decimal) ==> 11111111 (binary)
10 (decimal) ==> 00001010
Do "AND" 11111111 x 00001010 = 00001010 (binary) = 10
The same way on 11, 4.
The last one (1 x 0 =0) and do bit-reverse (00000000 --> 11111111). So it is 255.

Wesly
0
yuzhCommented:
Do you really have hme1 or just hme0:1 ?
0
iecuAuthor Commented:
Dear yuzh,

Originally, I have one interface card with 2 ports.
Now I want to configure two IP addresses at the interface hem0.

Thanks
0
yuzhCommented:
assume that you still want to keep 165.202.7.10  for hme0 and you want to add
10.11.4.1 to interface hme0, you do:

1) edit /etc/hosts, to add
   10.11.4.1 new_host
2) create /etc/hostname.hme0:1 contains
   new_host
 
3) run the following commands:
   ifconfig hme0:1 plumb
   ifconfig hme0:1 10.11.4.1 netmask + broadcast + up

 PS:  see the example in http:Q_20765167.html
   using "netmask +" and "broadcast +" will assign the default netmask and broadcast for the first octet's traditional class (A, B, C.)  

   You can you thenetmasks after step 2)
   

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.