• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 164
  • Last Modified:

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!

0
iecu
Asked:
iecu
  • 4
  • 3
1 Solution
 
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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
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

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now