Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

Several IPs for one Host / Box / PC

Reply
 
Thread Tools Display Modes
  #1  
Old 07-06-2004, 11:10 AM
Default Several IPs for one Host / Box / PC



Hello,

I'm running debian/testing under kernel 2.6.5 and I would like to
setup my box so that it has two ip addresses.

I have one ethernet card installed. The ip of the box is 192.168.1.4.
The module I'm loading eth0 on is b44.

I added another ip to the hosts file. Now I guess I have to create
another alias for the module b44 - which I would name eth1 - and load
this with ifconfig?

Can somebody briefly explain the steps I have to walk through?


Fritz Bayer
Reply With Quote
  #2  
Old 07-06-2004, 12:34 PM
Davide Bianchi
Guest
 
Posts: n/a
Default Re: Several IPs for one Host / Box / PC

Fritz Bayer <fritz-(E-Mail Removed)> wrote:
> I have one ethernet card installed. The ip of the box is 192.168.1.4.
> The module I'm loading eth0 on is b44.
> I added another ip to the hosts file. Now I guess I have to create


You can have "aliases" on the same Network Card. Each alias
is eth0:X where 'X' is a number from 1 to 255.
Just use ifconfig eth0:1 your.second.ip.address

And that's it.

Davide

--
| Just go with the flow control, roll with the crunches, and, when you
| get a prompt, type like hell.
|
|
Reply With Quote
  #3  
Old 07-07-2004, 01:50 PM
Fritz Bayer
Guest
 
Posts: n/a
Default Re: Several IPs for one Host / Box / PC

Davide Bianchi <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> Fritz Bayer <fritz-(E-Mail Removed)> wrote:
> > I have one ethernet card installed. The ip of the box is 192.168.1.4.
> > The module I'm loading eth0 on is b44.
> > I added another ip to the hosts file. Now I guess I have to create

>
> You can have "aliases" on the same Network Card. Each alias
> is eth0:X where 'X' is a number from 1 to 255.
> Just use ifconfig eth0:1 your.second.ip.address
>
> And that's it.
>
> Davide


Thanks Davide! This is what i was looking for!
Reply With Quote
  #4  
Old 07-08-2004, 02:55 AM
David Efflandt
Guest
 
Posts: n/a
Default Re: Several IPs for one Host / Box / PC

On 6 Jul 2004, Davide Bianchi <(E-Mail Removed)> wrote:
> Fritz Bayer <fritz-(E-Mail Removed)> wrote:
>> I have one ethernet card installed. The ip of the box is 192.168.1.4.
>> The module I'm loading eth0 on is b44.
>> I added another ip to the hosts file. Now I guess I have to create

>
> You can have "aliases" on the same Network Card. Each alias
> is eth0:X where 'X' is a number from 1 to 255.
> Just use ifconfig eth0:1 your.second.ip.address


Actually 'X' starts at zero, but it does not matter if you skip numbers.

--
David Efflandt - All spam ignored http://www.de-srv.com/
Reply With Quote
Reply

Tags
box, host, ips

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 03:13 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.