Koozali.org: home of the SME Server

Add additional IP address to NIC?

Offline bubbers214

  • **
  • 32
  • +0/-0
Add additional IP address to NIC?
« on: May 25, 2005, 08:53:21 PM »
I am looking for a way to add another IP address to the single NIC so i can access my HP JetDirect network.  I have been searching and searching, and I found the HOWTO but it was for an older version of SME and im a noob and cannot figure out how to modify it for version 6.5, can anyone tell me how to add another IP address to the nic?

Offline bubbers214

  • **
  • 32
  • +0/-0
Add additional IP address to NIC?
« Reply #1 on: May 26, 2005, 05:54:21 PM »
anyone have any ideas?  I really need to get this figured out so I can test to see if our printer will work with this server ot not.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Add additional IP address to NIC?
« Reply #2 on: May 26, 2005, 06:11:48 PM »
Quote from: "bubbers214"
I am looking for a way to add another IP address to the single NIC so i can access my HP JetDirect network.


Change the IP of either your HP Jetdirect or your SME so that they are on the same network.

Offline RedBeard

  • ***
  • 62
  • +0/-0
Add additional IP address to NIC?
« Reply #3 on: May 26, 2005, 10:19:22 PM »
I was interested in this in order to use a different ip address for the wireless portion of a network that we will be implementing.  This would make it easier to keep track of issues with the wireless portion.  Haven’t really thought about it much.  

Charlie is this not possible to have two ip addresses on the lan nic?

Would it be possible to uses a wired address of  10.0.0.x/255.255.254.0 and use 10.0.1.x for the wireless portion?  How would DHCP work in this case?  This is just off the top of my head so it may be a stupid question.

Thanks
............

Offline arne

  • *****
  • 1,116
  • +0/-4
Add additional IP address to NIC?
« Reply #4 on: May 27, 2005, 01:12:14 AM »
Used to have two ip's on my sme for a while ago ..

I wonder if it vere like this (untested):

ifconfig eth0:0 address 10.0.0.5 netmask 255.255.255.0 broadcast 10.0.0.255

Note: Do have console access. Doing it incorrectely might make the server to lose its network connection.

Arne.
......

Offline arne

  • *****
  • 1,116
  • +0/-4
Add additional IP address to NIC?
« Reply #5 on: May 27, 2005, 01:20:00 AM »
Tested on a Centos 4.0 just now. Two IP worked OK.
......

Offline bubbers214

  • **
  • 32
  • +0/-0
Add additional IP address to NIC?
« Reply #6 on: May 27, 2005, 07:01:57 AM »
Quote from: "arne"
Used to have two ip's on my sme for a while ago ..

I wonder if it vere like this (untested):

ifconfig eth0:0 address 10.0.0.5 netmask 255.255.255.0 broadcast 10.0.0.255

Note: Do have console access. Doing it incorrectely might make the server to lose its network connection.

Arne.


I am not quite sure what you are saying that you did here, would you mind explaning a little more about how you set that ipadress?

Offline arne

  • *****
  • 1,116
  • +0/-4
Add additional IP address to NIC?
« Reply #7 on: May 27, 2005, 04:17:08 PM »
Well normally my homeserver has ip 10.0.0.2 on eth0 only.

First I logged on remotely via shell/putty.

Then I made a copy past of this line:

ifconfig eth0:0 address 10.0.0.5 netmask 255.255.255.0 broadcast 10.0.0.255

And then puched enter, and then the card had the address 10.0.0.2 and 10.0.0.5 - two ip's as requested.

Arne.
......

Offline arne

  • *****
  • 1,116
  • +0/-4
Add additional IP address to NIC?
« Reply #8 on: May 27, 2005, 04:19:29 PM »
eth0   10.0.0.2
eth0:0 10.0.0.5


to read these configs: "ifconfig eth0" and "ifconfig eth0:0" or just "ifconfig".


Best reg Arne.
......

Offline bubbers214

  • **
  • 32
  • +0/-0
Add additional IP address to NIC?
« Reply #9 on: May 27, 2005, 05:07:05 PM »
when i try to put that command in using my own IP address it says
address: Unknown Host
any idea what that is?

Offline arne

  • *****
  • 1,116
  • +0/-4
Add additional IP address to NIC?
« Reply #10 on: May 27, 2005, 05:13:49 PM »
"when i try to put that command in using my own IP address"

Don't know what you mean exactely... Are you logged on as root when you try to run this command:

ifconfig eth0:0 address 10.0.0.5 netmask 255.255.255.0 broadcast 10.0.0.255

Can you run this command only: ifconfig

Please do a copy post and show some more of your dialog.

Arne
......

Offline bubbers214

  • **
  • 32
  • +0/-0
Add additional IP address to NIC?
« Reply #11 on: May 27, 2005, 05:19:54 PM »
That is the exact code that I typed in and the results that it gave me, and yes I can run the ifconfig command by itself.


Code: [Select]
[root@pse5 root]# ifconfig eth0:0 address 192.111.0.5 netmask 255.255.255.0 broadcast 192.111.0.255
address: Unknown host
ifconfig: --help' gives usage information.

Offline arne

  • *****
  • 1,116
  • +0/-4
Add additional IP address to NIC?
« Reply #12 on: May 27, 2005, 09:44:35 PM »
I testet on a Centos 4.0 that is equivalent to Red Hat Enterprice server 4

It seems like there is sligetly small differences for the syntax/command set for ifconfig.

OK, try this:

ifconfig eth0:0 192.111.0.5 netmask 255.255.255.0 broadcast 192.111.0.255

And if this not work, only this:

ifconfig eth0:0 192.111.0.5

And then check status:

ifconfig.


By the way I made a copy past on your command string and tested it here. Worked like a dream here, so you have not done any mistyping either ..

Hope it work snow :-)

Arne.
......

Offline bubbers214

  • **
  • 32
  • +0/-0
Add additional IP address to NIC?
« Reply #13 on: May 31, 2005, 06:37:06 PM »
Quote from: "arne"

ifconfig eth0:0 192.111.0.5


that command worked beautifully, thank you so much.