Multiple IP Addresses for one Interface.

Multiple IP Addresses for one Interface.

Post by Sam » Thu, 04 Apr 2002 23:24:34



Can someone explain to me how to assign multiple IP addresses to the same
card. I know one can define loopback adaptors (lo:1, lo:2 etc), but I am not
sure if that does the job.

I want to assign 10 IP addresses to hme0.

Thanks!

 
 
 

Multiple IP Addresses for one Interface.

Post by WaMa » Fri, 05 Apr 2002 00:00:29


It is quite simple juste create a file in the /etc
For example, if you want a virtual address for hme0 (let say 10.0.0.10)
/etc/hostname.hme0
"your IP address"<--------- this is for the normal ip address
&
/etc/hostname.hme0:1
10.0.0.10
 should be like this

Wama.


> Can someone explain to me how to assign multiple IP addresses to the same
> card. I know one can define loopback adaptors (lo:1, lo:2 etc), but I am not
> sure if that does the job.

> I want to assign 10 IP addresses to hme0.

> Thanks!


 
 
 

Multiple IP Addresses for one Interface.

Post by Venkat » Fri, 05 Apr 2002 04:11:57


YES..

Rememebr the virtual ips have to be on the same network id..

You cannot have hme0 as  10.1.1.1 and hme0:1 as 192.9.200.1 ( correct
me if i am wrong)

cheers

/

Venkat D .................................
Sun Solaris Admin ..

Passing through the Solar System .. Gald you are too .....:-)  

---------------------------------------------------------------------


> It is quite simple juste create a file in the /etc
> For example, if you want a virtual address for hme0 (let say 10.0.0.10)
> /etc/hostname.hme0
> "your IP address"<--------- this is for the normal ip address
> &
> /etc/hostname.hme0:1
> 10.0.0.10
>  should be like this

> Wama.


> > Can someone explain to me how to assign multiple IP addresses to the same
> > card. I know one can define loopback adaptors (lo:1, lo:2 etc), but I am not
> > sure if that does the job.

> > I want to assign 10 IP addresses to hme0.

> > Thanks!

 
 
 

Multiple IP Addresses for one Interface.

Post by Darren Dunha » Fri, 05 Apr 2002 04:39:32



> YES..
> Rememebr the virtual ips have to be on the same network id..
> You cannot have hme0 as  10.1.1.1 and hme0:1 as 192.9.200.1 ( correct
> me if i am wrong)

No reason you couldn't.

How useful it is depends on other devices on the network and if they'll
talk to those addresses.  Having 2 subnets on one physical cable can be
done for several reasons...

--

Unix System Administrator                    Taos - The SysAdmin Company
Got some Dr Pepper?                           San Francisco, CA bay area
          < How are you gentlemen!! Take off every '.SIG'!! >

 
 
 

Multiple IP Addresses for one Interface.

Post by Venkat » Fri, 05 Apr 2002 07:38:30


Thats interesting...

I thought the virtual ips are a spin off from the sdame Physical
ethernet and they all have the same mac address ...

I always was under the impression of that we canot have 2 different
sub nets..

Thanks for clearing my doubt and now i have to really check this out..

How useful it is .. we had some web servers running on the Virtual ips
on the sun boxes for www.sun.com :-) and they were on the same subnet
.. and i did ask on of the sys admin and he said we could not have
different ones..

So if i have different ip address as hme:1 hme:2 hme:3 so on you mean
to say i can use them ?

cheers
/v


Venkat D .................................
Sun Solaris Admin ..

Passing through the Solar System .. Gald you are too .....:-)  

---------------------------------------------------------------------



> > YES..

> > Rememebr the virtual ips have to be on the same network id..

> > You cannot have hme0 as  10.1.1.1 and hme0:1 as 192.9.200.1 ( correct
> > me if i am wrong)

> No reason you couldn't.

> How useful it is depends on other devices on the network and if they'll
> talk to those addresses.  Having 2 subnets on one physical cable can be
> done for several reasons...

 
 
 

Multiple IP Addresses for one Interface.

Post by Darren Dunha » Fri, 05 Apr 2002 09:49:01



> Thats interesting...
> I thought the virtual ips are a spin off from the sdame Physical
> ethernet and they all have the same mac address ...

I don't know what you mean by "spin off", but yes, they do have the same
mac address.

Quote:> I always was under the impression of that we canot have 2 different
> sub nets..

Yes, you can, and it doesn't require having separate mac addesses.  You
map from IP to mac, not from mac to IP.

Quote:> How useful it is .. we had some web servers running on the Virtual ips
> on the sun boxes for www.sun.com :-) and they were on the same subnet
> .. and i did ask on of the sys admin and he said we could not have
> different ones..

Well, on a "normal" subnet your router will only handle traffic for
addresses on that configured subnet.  So if you bring it up on a
different subnet, then the return packets won't ever reach your
machine.  Pretty useless.

However, if your router is handling that subnet (or if you have other
machines listening for that subnet), then yes, they are valid.

Quote:> So if i have different ip address as hme:1 hme:2 hme:3 so on you mean
> to say i can use them ?

Assuming you meant hme0:1, hme0:2, hme0:3, yes.

Whether or not anything on your subnet will hear them depends on your
network configuration.

--

Unix System Administrator                    Taos - The SysAdmin Company
Got some Dr Pepper?                           San Francisco, CA bay area
          < How are you gentlemen!! Take off every '.SIG'!! >

 
 
 

Multiple IP Addresses for one Interface.

Post by Lanc » Fri, 05 Apr 2002 09:59:23


Quote:> Well, on a "normal" subnet your router will only handle traffic for
> addresses on that configured subnet.  So if you bring it up on a
> different subnet, then the return packets won't ever reach your
> machine.  Pretty useless.

> However, if your router is handling that subnet (or if you have other
> machines listening for that subnet), then yes, they are valid.

You can use a secondary IP address on the router.  Two totally different
subnets, same router port.  Very useful when you do IP renumbering.

Lance

 
 
 

Multiple IP Addresses for one Interface.

Post by bit-buc.. » Sat, 06 Apr 2002 03:56:24


[[ top-posting fixed, see: http://www.allmyfaqs.com/faq.pl?How_to_post ]]


:> Can someone explain to me how to assign multiple IP addresses to the same
:> card. I know one can define loopback adaptors (lo:1, lo:2 etc), but I am not
:> sure if that does the job.
:>
:> I want to assign 10 IP addresses to hme0.
:>
:> Thanks!

: It is quite simple juste create a file in the /etc
: For example, if you want a virtual address for hme0 (let say 10.0.0.10)
: /etc/hostname.hme0
: "your IP address"<--------- this is for the normal ip address
: &
: /etc/hostname.hme0:1
: 10.0.0.10
: should be like this

That's only half right.

If you just want the extra interfaces temporarily without worrying
about them coming back after a reboot, you can do it simply by
using 'ifconfig'.

If you need the interfaces to return after a reboot, you will also
need to create the various /etc/hostname.interface:instance files
(though you should place a hostname in there that refers to an entry
in /etc/inet/hosts instead of an IP address).

fpsm
--
| Fredrich P. Maney              my_last_name AT my_last_name DOT org |
|   Do NOT send me HTML formatted E-mail or copies of netnews posts!  |
|  Address in header is a spamtrap. Use one in signature for replies. |
|  Please review http://www.maney.org/fred/site/uce/ before emailing. |

 
 
 

1. IP Aliaseing (Multiple IP address to one interface)

I have a fresh install of SUSE 7.1 on a machine and I want to configure
multiple IP addresses to the same Network card can anybody point me in the
direction of a handy tutorial for doing this or give me the required steps
includeing any kernal compiles i need to do-it

Thanks
Alan

2. cluj

3. assigning multiple IP address to one interface via dhcpd

4. question re: floppy mounting error on Sparc 5

5. multiple IP-Addresses on one interface

6. Imake documentation

7. Assigning multiple IP addresses to one interface

8. Terminal Setting

9. Multiple IP addresses for one interface?

10. Question with multiple IP addresses on one Interface

11. Multiple IP-Addresses on one Ethernet Interface?

12. Multiple IP addresses (or hosts) on one LAN interface