f



How to set my Linux machine to have two network cards with two IPs

Dear all gurus out there,

I am newbie to Linux and networking.

I have a Red hat linux that used as a Database machine, oracle.

I have 2 network cards that I wish to set to 192.168.0.10 and
192.168.0.11 respectively, the default gw is 192.168.0.1. The
connection of the two IPs coming from 2 different switches (still from
the same router).

My purpose is that : if one of the switches is down, my connection
still up with the other side.

I know switch is hardly "down", but i wish to have full redundancy.

What I did is, I jus set the 2 network cards with the two IPs and I
switch off one of the switches, "poof" the whole network
down..........so, how can it be done ?

Or any other alternatives ?


Thanks.

0
keanewoon (1)
5/27/2007 9:02:58 AM
comp.os.linux.networking 15677 articles. 3 followers. Post Follow

4 Replies
949 Views

Similar Articles

[PageSpeed] 41

On Sun, 27 May 2007 02:02:58 -0700, keanewoon wrote:

[link failover]

> Or any other alternatives ?

Try the 'bonding' driver:
http://linux-net.osdl.org/index.php/Bonding

And use an interface alias if you still need the second IP adress, e.g.:
ifconfig bond0:1 <ipadress> ...

-- 
-Menno.

0
pan (45)
5/27/2007 11:38:09 AM
In article <1180256578.345257.44170@d30g2000prg.googlegroups.com>,
 <keanewoon@gmail.com> wrote:
>Dear all gurus out there,
>
>I am newbie to Linux and networking.
>
>I have a Red hat linux that used as a Database machine, oracle.
>
>I have 2 network cards that I wish to set to 192.168.0.10 and
>192.168.0.11 respectively, the default gw is 192.168.0.1. The
>connection of the two IPs coming from 2 different switches (still from
>the same router).
>
>My purpose is that : if one of the switches is down, my connection
>still up with the other side.
>
>I know switch is hardly "down", but i wish to have full redundancy.
>
>What I did is, I jus set the 2 network cards with the two IPs and I
>switch off one of the switches, "poof" the whole network
>down..........so, how can it be done ?
>
>Or any other alternatives ?
>
>
>Thanks.
>

Google bonding network interfaces...

You need to have one ip address that is on both switches and will move
from a primary to a seconday NIC.

Intel had it's own IANS software on the older Linux versions but is now
supporting standard bonding.  On the 2.4 the Intel stuff was nice but
required at least one Intel NIC per bonded pair.

Bill

-- 
  "When I think back on all the crap I learned in Vax school
  It's a wonder I fixed anything at all."   (to the tune of Kodachrome)
  pechter-at-gmail.com
0
pechter3 (90)
5/27/2007 12:45:49 PM
William Pechter wrote:

> In article <1180256578.345257.44170@d30g2000prg.googlegroups.com>,
>  <keanewoon@gmail.com> wrote:
>>Dear all gurus out there,
>>
>>I am newbie to Linux and networking.
>>
>>I have a Red hat linux that used as a Database machine, oracle.
>>
>>I have 2 network cards that I wish to set to 192.168.0.10 and
>>192.168.0.11 respectively, the default gw is 192.168.0.1. The
>>connection of the two IPs coming from 2 different switches (still from
>>the same router).
>>
>>My purpose is that : if one of the switches is down, my connection
>>still up with the other side.
>>
>>I know switch is hardly "down", but i wish to have full redundancy.
>>
>>What I did is, I jus set the 2 network cards with the two IPs and I
>>switch off one of the switches, "poof" the whole network
>>down..........so, how can it be done ?
>>
>>Or any other alternatives ?
>>
>>
>>Thanks.
>>
> 
> Google bonding network interfaces...
> 
> You need to have one ip address that is on both switches and will move
> from a primary to a seconday NIC.

Follow on from this:

Caveat: I have only done bonding with 802.3ad for the purposes of link
aggregation (enhanced bandwith), not for failover.

I agree that bonding is probably the neater solution (only ever have one IP)
and I believe that a suitable way would be to use the arp monitoring
failover mode in the linux bonding module. Wanring though: don't just set
up a bonded link in aggregation mode willy nilly or there is going to be
much network weirdness resulting (arp confusion for one). The "ultimate"
documentation can be found in the linux source here:

linux/Documentation/networking/bonding.txt

To the OP - when you have a solution, I would recommend that you test it
thoroughly with 2 tcpdump sessions bound each to one NIC and see if it is
really behaving as you expect. Link aggregation requires support from the
switch infrastructure and I've never come across link aggregation working
where the links feed two different switches. Failover should howvere work
with any kit, though you might get a pregnant pause when the primary link
fails and the switches have to re-discover the path, but that shouldn;t be
more than a few seconds IME.

Cheers

Tim


0
ts98 (140)
5/27/2007 6:57:10 PM
hi,
this configuration is not a linux issue your configuration is fine
but will not support your target to make a fail over
to make the data base client to use both IP's configure the client
side
tnsnames.ora to fail over the other IP if one faild
the 2nd and the most important is the however your connection
will be established again but you will loose your session
to avoid such issue you should use a caching library in your code
(application) such as oci or jdbc.
one more thing if you really want to make complete redundant use RAC
configuration
as the instance is more critical than the switch

0
5/28/2007 2:31:46 PM
Reply:

Similar Artilces:

Proper routes for linux machine with two network ports to same network
Hi, I run a Fedora Core 4 system with two network devices eth0 (assigned 10.10.10.30) and eth1 (assigned 10.10.10.31). The local network is 10.10.10.0, the gateway is 10.10.10.1 # route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.10.10.1 * 255.255.255.255 UH 0 0 0 eth1 10.10.10.0 * 255.255.255.0 U 0 0 0 eth0 10.10.10.0 * 255.255.255.0 U 0 0 0 eth1 169.254.0.0 * 255.255.0.0 U 0 0 0 eth1 defa...

Any Documentaion about How Linux Networking IP stack looklike between Linux PC (single NIC card) and Router with multiple Network interfaces (LAN and WAN)?
Any Documenttaion about How Linux IP Networking stack looklike bwteen Linux PC (single NIC card) and Router with multiple Network interfaces running on Linux (LAN and WAN)?. appreciated for links or some documentation. Thanks. ...

Networking two machines under Linux
Hi, I am relatively new to Linux, but I have been using Windows for years. I have an Zyxel 643 router (ADSL modem incorporated)linked to 3 boxes. One box just runs Windows XP, the other two run a dual boot with Windows XP/Suse Linux 9.1. When I set the Suse software up it automatically found the ADSL system which means that I can get both machines onto the 'net. Subsequently my wife and I set up Samba to access from her Windows setup to my Linux system. I keep a directory on my machine purely as an archive for files for everyone. I have tried twice now to set up NFS to enable us to con...

Connecting two networks with two linux boxes.
I have 2 networks each with a linux box as the gateway to the internet. At the moment they are VPN'd together, but are close enough to get a cable run and I'd like to connct them like this to make it quicker so each linux box will have 3 nics in it. My question is possibly a dumb one! But what should the IP for the 3rd nic in each box be? The networks are: network - linux box internal address Box 1) 10.0.12.x/24 - 10.0.12.1 Box 2) 192.168.12.x/24 - 192.168.12.1 Should the 3rd NIC in the box 1 be on the 192.168.12.x range, and vice versa but wouldn't that confuse the ...

Connecting two networks together by having two network cards in the same computer
Hi, I recently aquired two 100Mbs cards and I am trying to incorporate them in my existing network at home. My old network looks as follows: 10Mbs 10Mbs Mountainman ------------- Surfrat -------- Win XP Win 98SE | 192.168.0.1 192.168.0.2 | 255.255.255.0 255.255.255.0 | | |---------------------------------------------| | | 10Mbs |- Jukebox ---------------- J...

Ping Problems On Two-Machine Linux Network
Hi. I wonder whether anyone out there can help me. I'm new to networking, and have set up my first simple network by connecting two P100 linux boxes with an RJ-45 crossover cable. The first of these machines, 'methuselah', is installed with a D-Link DE-220PCT jumperless NE2000-type card, and is running Slackware 9. The second, 'blockhead', is installed with an unidentified ISA RTL8019-based jumpered card, and is running Redhat 6.1. Both machines' LEDs come on when I plug in the crossover cable, and flickering on one end causes flickering at the other, but I can'...

Two network cards, two external IPs, one switch and sendmail, how can this be done?
Hello to everybody. I'm having some problems traying a new configuration on my Linux mail server. I need another server, but instead of buying a new computer I decided to buy a new network card (much cheaper!). I pluged the new network card and connected it to the switch where the other card and the two routers are plugged. I changed NAT in router A to forward port 25 trafic for the public IP A to the port 25 in 192.168.1.100 machine (card A) and the same in router B (port 25 for public IP B to port 25 in card B: 192.168.1.200). The problem arises when I try to telnet to the port 25 to eac...

US - MA Linux Kernel help needed in Camberidge , Mass
just wanted to let Linux security folks know that we have high dollar need for Kernel engineering needs in Mass. A high-performing, robust, and secure Linux kernel is crucial a.. Enhance the kernel and OS to support exciting new features a.. Evaluate system performance on variety of hardware platforms and under various workloads a.. Track, evaluate, and integrate development from the open source community. a.. Work on the world's largest distributed computing and content delivery system Deep expertise in the design, implementation, and ongoing development roadmap o...

Network structure with two 3Com 509 network cards
Hi all, I have a problem using two network cards connected to the same PC under QNX6. I don't know if this is a bug coming from QNX6 network driver or is a misunderstanding from my own. Thus, I have two 3Com 509 COMBO network cards plugged in the PC. This hardware configuration works properly under QNX4, and I can start the Net.509 drivers and use one card in LAN 1 and the other one in LAN 2. However, It does not work properly under QNX6. I do the following to start both cards: slay -f io-net io-net -d el509 ioport=0x310,irq=7 -p tcpip -p qnet sleep 2 netmanager I ha...

Host with two network adapters and two Internet IP addresses
I have a particular host in my datacenter that has two network cards, eth0 and eth1. I have two IP ranges and I wanted to give eth0 an address from one IP range, and eth1 an address from another IP range. That's not really complicated, but what confuses me is the routing. How can I make sure that packets sent in response to a request sent to eth0, go through eth0, and packets sent in response to requests sent to eth1, go through eth1. On the first sight, it does not seem to be very easily done, but, perhaps, I am missing something. Am I stuck with only being able to u...

how to use two monitors with two Video card on Linux box?
Hi, everybody. I have two graphics card on my system... And I'd like to use two monintors at same time. for example, they display diffrent contents... I'd like to know how to setup for using two monitors on Linux? to use two montors, do I need to install some other applications or special device? ( on windows, I can see some peope are using two montors... ) Have a nice day. In comp.os.linux.setup somez72 <rambo88@gmail.com>: > Hi, everybody. > I have two graphics card on my system... Hi! Would you mind stopping multi-posting? Just trie...

Linux, Linux, Linux
Hi, Interested in trying Linux? Well you came to comp.os.linux.advocacy for some reason, and you probably won't stay long. Here's a list of Linux distributions to choose from. Ubuntu http://www.ubuntu.com Newbie friendly and good support forums. SuSE http://www.novell.com/linux Pay for some support if you're not opposed to spending a little money. Fedora Core http://fedoraproject.org If you're more comfortable with your computer, try this one out. If you get frustrated, don't give up so easy. There is a wealth of information online for whichever distro you choose....

How to Connecting two different network in redhat linux 9
hello friends, I have linux server with three ethernet cards. eth0 : 202.66.55.100 --> gw 202.66.55.97 eth1 : 192.168.0.1 --> gw 202.66.55.100 eth2 : 192.168.1.1 --> gw 202.66.55.100 default gateway : 202.66.55.97 eth0 act as gateway to share internet to two networks throu eth1 and eth2. how to access from client eth1 network to client eth2 network throu redhat linux 9 server. Every hint is appreciated. with regards pvn On 2004-11-27, visu <pvn_26@rediffmail.com> wrote: > I have linux server with three ethernet cards. > eth0 : 202.66.55.100 --> gw 202.66.55....

From Network World: Two Cisco router security, IP networking experts ready for your questions
All you ever wanted to know about router security strategies, IP network traffic planes and more - two Cisco experts are ready for your questions. Gregg Schudel and David J. Smith are CCIEs and authors of the new Cisco Press book "Router Security Strategies: Securing IP Network Traffic Planes". They're going to be blogging for Network World's Cisco Subnet in February and they are poised to answer your router security, IP networking questions. Go here to pose your question.http://www.networkworld.com/community/node/24125. Cisco Subnet, your gateway to Cisco news, blogs, disc...

Web resources about - How to set my Linux machine to have two network cards with two IPs - comp.os.linux.networking

Machine - Wikipedia, the free encyclopedia
A machine is a tool containing one or more parts that uses energy to perform an intended action. Machines are usually powered by mechanical, ...

Watch Machine Zone's 'Mobile Strike' Super Bowl Teaser Featuring Arnold Schwarzenegger
App game maker Machine Zone will air an ad in Super Bowl 50, the company said Tuesday night, confirming an earlier report by Ad Age. During ...

Matmos share new video from washing machine sounds LP, playing shows
... in October (more by Greg Cristman) Matmos are just about to release Ultimate Care II, their new album that's made entirely from washing machine ...

A teen built a KFC chicken vending machine made entirely of Lego blocks — here's how it works
Astonishing Studios built a vending machine for KFC fried chicken made entirely of Legos. The machine is one of the many imaginative Lego creations ...

A Teen Built A Working KFC Vending Machine Out Of LEGO
Is it boredom? A business opportunity? Honestly, we think the spate of branded vending machines built out of Lego bricks by one Astonishing Studios ...

New App Seeks to Use Blockchain as Immutable Answering Machine
LedgerAssets, developer of an app that timestamps users photos on bitcoin's blockchain, is to launch a similar application for phone calls.

Machine learning is a champ at fixing buggy code
Here's yet another new application of machine learning: MIT has developed a system for fixing errors in bug-riddled code. The new machine-learning ...

Swarm Intelligence could level the playing field between man and machine
The problems of the future, as encapsulated by global warming and environmental degradation, will require forms of intelligence and cooperation ...

China's Bubble-Making Machine Continues In Shanghai Housing
Shanghai home prices rose 31% last year despite pressure by the government to curb demand. Imagine what would happen if Chinese real estate investors ...

The Political Machine 2016 released
Stardock Software has officially released the final version of The Political Machine 2016 – right at the start of the primary season for Republican ...

Resources last updated: 2/6/2016 3:04:13 AM