LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 08-06-2009, 12:58 AM   #1
soubhagya
LQ Newbie
 
Registered: Aug 2009
Location: PUNE India
Posts: 2

Rep: Reputation: 0
Urgent Please Help me Routing !!!!!!!!!!!!!


Hi,
My M/c has got three Interfaces

eth0 Link encap:Ethernet HWaddr 00:0C:29:14:F0:3A
inet addr:59.163.222.47 Bcast:59.163.222.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe14:f03a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2970193 errors:3 dropped:7 overruns:0 frame:0
TX packets:60721 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:377065991 (359.5 MiB) TX bytes:5624457 (5.3 MiB)
Interrupt:177 Base address:0x2000

eth1 Link encap:Ethernet HWaddr 00:0C:29:14:F0:44
inet addr:10.59.4.47 Bcast:10.59.4.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe14:f044/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31 errors:0 dropped:0 overruns:0 frame:0
TX packets:89 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2506 (2.4 KiB) TX bytes:4858 (4.7 KiB)
Interrupt:185 Base address:0x2080

eth2 Link encap:Ethernet HWaddr 00:0C:29:14:F0:4E
inet addr:10.59.5.47 Bcast:10.59.5.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe14:f04e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:480 (480.0 b) TX bytes:546 (546.0 b)
Interrupt:169 Base address:0x2400

eth3 Link encap:Ethernet HWaddr 00:0C:29:14:F0:58
inet addr:10.59.6.47 Bcast:10.59.6.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe14:f058/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:480 (480.0 b) TX bytes:546 (546.0 b)
Interrupt:177 Base address:0x2480

My Route Table looks Like this


Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
64.233.161.0 59.163.222.45 255.255.255.0 UG 0 0 0 eth0
10.59.6.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3
10.59.4.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
202.43.219.0 59.163.222.45 255.255.255.0 UG 0 0 0 eth0
10.59.5.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
202.86.7.0 59.163.222.45 255.255.255.0 UG 0 0 0 eth0
64.233.169.0 59.163.222.45 255.255.255.0 UG 0 0 0 eth0
212.227.93.0 59.163.222.45 255.255.255.0 UG 0 0 0 eth0
59.163.222.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth3
0.0.0.0 59.163.222.1 0.0.0.0 UG 0 0 0 eth0


I want to route the packate from eth1 through 59.163.222.45 and I cant do that I know because both are in the different subnet so how can I do that ?
 
Old 08-06-2009, 01:05 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
this is not urgent for our voluntary members, please do not use such words in future.
 
Old 08-06-2009, 01:19 AM   #3
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

Do you want to route only certain packets through eth0 or all traffic, hence setting eth0 as gateway for eth1?

Have a look at this Linux Routing.

Depending on what you exactly want you could also use IPTABLES. Also to allow LinuxQuestions users to help you out provide what distro you're using etc.

Little warning: it's not a good idea to provide your WAN IP in a public forum for anyone to read, best replace it by XXX before posting. You never know who is looking.

Kind regards,

Eric
 
Old 08-06-2009, 04:15 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Well that was clearly urgent wasn't it...
 
Old 08-06-2009, 04:17 PM   #5
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Quote:
Originally Posted by acid_kewpie View Post
Well that was clearly urgent wasn't it...
Apparently! Maybe suffering from timezone shift or alike, but more than 12 hours???
 
Old 08-21-2009, 07:06 AM   #6
soubhagya
LQ Newbie
 
Registered: Aug 2009
Location: PUNE India
Posts: 2

Original Poster
Rep: Reputation: 0
Sorry If I have done some mistake but guys I have written a word Urgent okay I did not know so.....But to say this thing there are many better ways. I felt you are bit rude.But anyways thanks for the help guys. Keep up the good work.
 
Old 08-21-2009, 09:16 AM   #7
evilted
Member
 
Registered: Aug 2009
Location: Ouagadougou, Burkina Faso
Distribution: centos
Posts: 92

Rep: Reputation: 18
im finding it interesting that some people in this forum are quick to point fingers, but slow to help...

Quote:
Originally Posted by acid_kewpie View Post
this is not urgent for our voluntary members, please do not use such words in future.
Quote:
Originally Posted by acid_kewpie View Post
Well that was clearly urgent wasn't it...

the guy asking for help is a newb on this site, just like me. He probably doesnt even speak english as a first language. it can be very discouraging for people asking for help, when all they get is.. (hope you catch my drift) and sure ban me if you want, but after the responses ive gotten ive decided not to ask for help again on this forum.
 
Old 08-21-2009, 09:50 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I agree that posting a first response of "it's not urgent for us" and without addressing the OP's questions, as some LQ members do, does not help advertise the LQ Community as being helpful. Moderators of course have dispensation to do so anyway for educational purposes but indeed the effect remains the same. It's also often pointed out that regardless of the first response there will be helpful replies but that's besides the point and not always the case.

Please feel free to ask questions but it would be good to know basic netiquette, the LQ Rules, How to ask specific questions and if applicable How to Use LinuxQuestions.org and the LQ FAQ.

Last edited by unSpawn; 08-21-2009 at 09:53 AM.
 
Old 08-21-2009, 11:39 AM   #9
TimothyEBaldwin
Member
 
Registered: Mar 2009
Posts: 249

Rep: Reputation: 27
Why do you want to route packets based upon the interface they arrive at? It's not a normal task.
  1. Use ibtables to mark packets based on incoming interface.
  2. Use "ip rule" to select different routing tables based on the mark.
  3. Use "ip route" to add entries to the routing tables explicitly stating the logical interface.
 
Old 08-21-2009, 01:59 PM   #10
evilted
Member
 
Registered: Aug 2009
Location: Ouagadougou, Burkina Faso
Distribution: centos
Posts: 92

Rep: Reputation: 18
maybe something like...

Code:
ip route add x.x.x.x/y dev eth? src z.z.z.z
 
Old 08-21-2009, 02:09 PM   #11
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by evilted View Post
the guy asking for help is a newb on this site, just like me. He probably doesnt even speak english as a first language. it can be very discouraging for people asking for help, when all they get is.. (hope you catch my drift) and sure ban me if you want, but after the responses ive gotten ive decided not to ask for help again on this forum.
Actually acid_kewpie was actually HELPING him...

I ALWAYS skip over the "urgent" messages...and focus on the ones that actually PROVIDE useful info in the subject...

He was trying to help him to actually get MORE responses in the future...

-C
 
Old 08-21-2009, 02:55 PM   #12
evilted
Member
 
Registered: Aug 2009
Location: Ouagadougou, Burkina Faso
Distribution: centos
Posts: 92

Rep: Reputation: 18
Quote:
Originally Posted by custangro View Post
He was trying to help him to actually get MORE responses in the future...

-C
Helping him would have been to point him here:
http://www.linuxquestions.org/questi...estion-531122/
 
Old 08-21-2009, 05:14 PM   #13
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by evilted View Post
Helping him would have been to point him here:
http://www.linuxquestions.org/questi...estion-531122/
Correct.

-C
 
  


Reply



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
boot sector and lilo collapse !!!!! URGENT URGENT URGEN !!!!! frelihm Linux - Software 21 12-02-2009 10:21 AM
pre routing , post routing and qos support msridhar87 Linux - Networking 0 02-13-2009 05:37 AM
Urgent Urgent !!!! Mozilla Keeps All Your Deleted Emails !!!! odin123 Linux - Software 2 01-31-2004 02:22 AM

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

All times are GMT -5. The time now is 02:23 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