LinuxQuestions.org
Visit Jeremy's Blog.
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 02-06-2004, 06:27 PM   #1
v4lu3s
LQ Newbie
 
Registered: Feb 2004
Posts: 2

Rep: Reputation: 0
multiple IPs, one nic


I am having a hard time with this...i ahve added 2 additional IPs to my NIC, using /etc/sysconfig/network-scripts/ and then creating ifcfg-eth0:1 and ifcfg-eth0:2 . I copied ifcfg-eth0 and edited the IP address and device name. All three interfaces come up at boot time.
However when i try to ping those IPs from another network they do not reply, and when i ping FROM them it only sends ONE packet and then hangs. I can traceroute out just fine as well though. It doenst seem to make sense to me.
My other issue is that I am working on getting a dns caching server running on the alternat IP addresses.
Is it possible that iptables is interfering with traffic on those IP addresses?
If anyone has ANY ideas it will help save some of my hair

thanks!
 
Old 02-06-2004, 11:36 PM   #2
Astro
Member
 
Registered: Jan 2003
Location: Ballston Lake, NY
Distribution: Slackware, Debian
Posts: 660

Rep: Reputation: 30
From prior experience with binding multiple IP's to an interface I can say it does work. I've used it in SNAT(Static Network Address Translation) for boxes behind a firewall. This was done with shorewall and webmin... a nice combination. Check that out.. www.webmin.com and www.shorewall.net
 
Old 02-07-2004, 05:41 AM   #3
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
I have heard that using to IP's on one NIC might be a problem if they are in the same network.
That is 192.168.0.1/24 and 192.168.0.2/24 would be a problem, but 192.168.1.1/24 and 192.168.0.1/24 would work fine.

This has to do with routing as routing depends on the network part of the IP address for it's path decision. There might be a way to get it working, but I donšt know how.
 
Old 02-07-2004, 10:34 AM   #4
v4lu3s
LQ Newbie
 
Registered: Feb 2004
Posts: 2

Original Poster
Rep: Reputation: 0
well i ended up getting it working. turns out webmin had botched my ip tables rules some how. i went back in and ran the lokkit config tool and suddenly everything worked perfectly. I am running 3 ip addresses on one Nic all on the same network. It was frustrating becuase i was doing it just like a server at work that had 256 ips on one NIC.
Anyway all I did was copy the ifcfg-eth0 to ifcfg-eth0:0 and edit the interface name and ip address and it worked great!
 
Old 02-07-2004, 10:52 AM   #5
Astro
Member
 
Registered: Jan 2003
Location: Ballston Lake, NY
Distribution: Slackware, Debian
Posts: 660

Rep: Reputation: 30
Quote:
Originally posted by ugge
I have heard that using to IP's on one NIC might be a problem if they are in the same network.
That is 192.168.0.1/24 and 192.168.0.2/24 would be a problem, but 192.168.1.1/24 and 192.168.0.1/24 would work fine.

This has to do with routing as routing depends on the network part of the IP address for it's path decision. There might be a way to get it working, but I donšt know how.

We run about 10 IP's off the same nic for a firewall setup at the isp where I work, never had a problem with it. They are all on the same subnet as well.
 
  


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, different networks branden_burger Linux - Networking 3 03-15-2005 07:24 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


All times are GMT -5. The time now is 02:24 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration