LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-15-2005, 07:02 AM   #1
branden_burger
Member
 
Registered: Dec 2004
Posts: 66

Rep: Reputation: 15
multiple IPs, one NIC, different networks


Hello people.

I have a self managed linux server running FC1. Now I've been given two IP's - on different networks - say 55.100.100.100 and 44.100.100.100 . There's only one NIC hooked up to the internet. That's through 55.100.100.100 now given the netmask of the second ip, can I just put it up on the NIC eth0 like so:

ip addr add 44.100.100.100/netmask dev eth0

I mean even if it did work - why would packets meant for 44.100.100.100/24 travel on the 55.100.100.100/24 network?

I'm asking because I'm remote administering this server and I can't poke around..

Thanks

Last edited by branden_burger; 03-15-2005 at 07:04 AM.
 
Old 03-15-2005, 07:06 AM   #2
fr_laz
Member
 
Registered: Jan 2005
Location: Cork Ireland
Distribution: Debian
Posts: 384

Rep: Reputation: 32
How did you get these IPs ? DHCP ? From a router/fw ?
 
Old 03-15-2005, 07:11 AM   #3
branden_burger
Member
 
Registered: Dec 2004
Posts: 66

Original Poster
Rep: Reputation: 15
No - these are static addresses provided by the hosting service - not assigned by DHCP. And I'm running iptables, yes - why is that important? I'm not doing SNAT or anything. It's a single box serving mail, web pages etc in some place in Florida.

Thanks
 
Old 03-15-2005, 07:24 AM   #4
fr_laz
Member
 
Registered: Jan 2005
Location: Cork Ireland
Distribution: Debian
Posts: 384

Rep: Reputation: 32
Quote:
I'm running iptables
I meant how did you get these IPs, from a dhcp server or from a router/fw ? As you said it, running iptables has nothing to do with your problem.

What's the config now ? The new one should be on the same network, no ?

If you really have to change it now, you could issue the command :
root@machine# ifconfig eth0 55.100.100.100 netmask 255.255.255.0 broadcast 55.100.100.255 ; ifconfig eth0.1 44.100.100.100 netmask 255.255.255.0 broadcast 44.100.100.255
thus you'll configure the 2 IP on the same nic... keep the hand on it and then see which is in use

2 other ideas :
Don't you have the IP of the gateway ? It should be on the same subnet as one of the 2 IPs.
You can also learn the different subnets by doing a traceroute to the server....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple IPs on one NIC - How to use them all? MG-Cloud Linux - Networking 4 10-03-2005 02:28 AM
multiple IPs, one nic v4lu3s Linux - Networking 4 02-07-2004 10:52 AM
binding multiple IPs to single NIC? lok1 Linux - Networking 2 11-16-2003 02:58 PM
Adding multiple static IPs to one NIC digihlp Linux - Networking 2 06-26-2003 07:13 PM
Multiple NIC cards - public and private IPs harryinjapan Linux - Networking 2 12-02-2001 04:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration