LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-29-2003, 01:52 AM   #1
gr8razorx
LQ Newbie
 
Registered: Nov 2003
Posts: 12

Rep: Reputation: 0
Setting Up 2 i.p address on one computer with one ethernet card


Hi i have 2 separate i.p address and i am looking to route traffic through each of them (load balancing). But for the life of me i cannot get it to work.
Is it possible on 1 ethernet card? To set up two separate i.p addresses?
The two separate i.p addresses are using the same gateway.

Thanks much
 
Old 11-29-2003, 04:17 AM   #2
jayakrishnan
Member
 
Registered: Feb 2002
Location: India
Distribution: Slacky 12.1, XP
Posts: 992

Rep: Reputation: 30
R u trying to setup a gateserver or something.

see the ifconfig command

Last edited by jayakrishnan; 11-29-2003 at 04:19 AM.
 
Old 11-29-2003, 12:42 PM   #3
gr8razorx
LQ Newbie
 
Registered: Nov 2003
Posts: 12

Original Poster
Rep: Reputation: 0
Yes I am trying to set up my linux box to accept data packet over 2 separate i.p's and load balance between the two... Both i.p use the same gateway server ex(10.144.0.1) but I cannot bind two i.p to one eth0 card

Heres a copy of my ifconfig


eth0 Link encap:Ethernet HWaddr 00:50:BF:9781
inet addr:209.105.221.138 Bcast:255.255.255.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1570750 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:170419 dropped:0 overruns:0 carrier:340742
collisions:0 txqueuelen:100
RX bytes:349024894 (332.8 Mb) TX bytes:0 (0.0 b)
Interrupt:19 Base address:0xd000

eth1 Link encap:Ethernet HWaddr 00:50:BA:4B:3C:5A
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:178138 errors:0 dropped:0 overruns:0 frame:0
TX packets:245177 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:12520336 (11.9 Mb) TX bytes:275519218 (262.7 Mb)
Interrupt:17 Base address:0xb000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:124 errors:0 dropped:0 overruns:0 frame:0
TX packets:124 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7480 (7.3 Kb) TX bytes:7480 (7.3 Kb)




But as it stands i own the i.p address 209.105.221.138 and 209.105.221.210 and want this box to accept packets over both and send packets over both i.p's and help would be much appreciated

i am using iproute2
 
Old 11-29-2003, 01:51 PM   #4
gr8razorx
LQ Newbie
 
Registered: Nov 2003
Posts: 12

Original Poster
Rep: Reputation: 0
Tell me if this means that it is working and if so how do i go about checking if it does in fact work?

> ip route list
209.105.221.210 via 209.105.221.1 dev eth0
209.105.221.138 via 209.105.221.1 dev eth0
192.168.1.0/24 dev eth1 scope link
209.105.221.0/24 dev eth0 proto kernel scope link src 209.105.221.138
127.0.0.0/8 dev lo scope link
default via 209.105.221.1 dev eth0



> ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:BF:9781
inet addr:209.105.221.138 Bcast:255.255.255.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1750002 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:193087 dropped:0 overruns:0 carrier:386034
collisions:0 txqueuelen:100
RX bytes:376070956 (358.6 Mb) TX bytes:0 (0.0 b)
Interrupt:19 Base address:0xd000

eth0:1 Link encap:Ethernet HWaddr 00:50:BF:9781
inet addr:209.105.221.210 Bcast:255.255.255.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:19 Base address:0xd000

eth1 Link encap:Ethernet HWaddr 00:50:BA:4B:3C:5A
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:215490 errors:0 dropped:0 overruns:0 frame:0
TX packets:287039 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:18784709 (17.9 Mb) TX bytes:301529136 (287.5 Mb)
Interrupt:17 Base address:0xb000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:128 errors:0 dropped:0 overruns:0 frame:0
TX packets:128 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7680 (7.5 Kb) TX bytes:7680 (7.5 Kb)
 
  


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
Setting Up Ethernet Card Drakkath Slackware 6 05-17-2005 06:44 PM
Multi IP Address to Single ethernet card scratch09 Linux - Networking 4 02-22-2005 10:22 PM
Why when i restart my computer, my ethernet card don't work? crocha Red Hat 1 05-17-2004 06:07 AM
How to find ethernet card I/O address palanisaravanan Linux - Newbie 2 12-29-2003 12:53 PM
Ethernet Card Dead after a Computer Crash?! monkeygirl Linux - Hardware 2 09-15-2003 07:15 AM

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

All times are GMT -5. The time now is 03:08 AM.

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