Several IPs for one Host / Box / PC

This is a discussion on Several IPs for one Host / Box / PC within the Linux Networking forums, part of the Linux Forums category; Hello, I'm running debian/testing under kernel 2.6.5 and I would like to setup my box so ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-06-2004
Fritz Bayer
 
Posts: n/a
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?
Reply With Quote
  #2 (permalink)  
Old 07-06-2004
Davide Bianchi
 
Posts: n/a
Default Re: Several IPs for one Host / Box / PC

Fritz Bayer <fritz-bayer@web.de> 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 (permalink)  
Old 07-07-2004
Fritz Bayer
 
Posts: n/a
Default Re: Several IPs for one Host / Box / PC

Davide Bianchi <davideyeahsure@onlyforfun.net> wrote in message news:<2kvh1oF6avmqU2@uni-berlin.de>...
> Fritz Bayer <fritz-bayer@web.de> 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 (permalink)  
Old 07-08-2004
David Efflandt
 
Posts: n/a
Default Re: Several IPs for one Host / Box / PC

On 6 Jul 2004, Davide Bianchi <davideyeahsure@onlyforfun.net> wrote:
> Fritz Bayer <fritz-bayer@web.de> 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:01 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0