Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
03-23-2012, 10:01 AM
|
#1
|
|
LQ Newbie
Registered: Mar 2011
Posts: 4
Rep:
|
basic routing commands
Hi everybody
My route -n and ifconfig look like this right now. Letter characters in place of numeric digits below are for privacy.
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.11.ac.0 0.0.0.0 255.255.252.0 U 1 0 0 eth0
1de.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
0.0.0.0 10.11.ab.254 0.0.0.0 UG 0 0 0 eth0
ifconfig eth0
eth0 Link encap:Ethernet HWaddr ...
inet addr:10.11.72.68 Bcast:10.11.ab.255 Mask:255.255.252.0
What commands can i enter to make a route to host 192.168.fef.ghi?
Thanks ...
|
|
|
|
03-23-2012, 10:08 AM
|
#2
|
|
Member
Registered: May 2011
Location: Nottingham, UK
Distribution: Debian
Posts: 144
Rep:
|
ip route add x.x.x.x via y.y.y.y
or
ip route add x.x.x.a/bb via y.y.y.y, where 'a' is the subnet address and 'bb' the prefix length - most commonly equal to '0/24'
you might also have to do 'ip route flush cache' after adding the route to activate it.
|
|
|
|
03-23-2012, 10:47 AM
|
#3
|
|
LQ Newbie
Registered: Mar 2011
Posts: 4
Original Poster
Rep:
|
Thanks. So in my case it would be
ip route add 192.168.fef.ghi via y.y.y.y
or
ip route add 192.168.fef.0/24 via y.y.y.y
But how do i figure out y.y.y.y? ...
|
|
|
|
03-23-2012, 10:51 AM
|
#4
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,711
|
you don't "figure it out", you either know, or you ask someone who knows your network better than you do. It's an arbitrary device on YOUR network, so we can't tell you that.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
|
routing issue - basic
|
elemental09 |
Linux - Networking |
2 |
04-01-2011 07:26 PM |
|
Basic routing help
|
Firebar |
Linux - Networking |
4 |
05-11-2007 07:27 AM |
|
Basic Routing
|
broadband |
Linux - Networking |
9 |
09-07-2004 12:44 AM |
|
Basic routing
|
pcrs |
Linux - Networking |
1 |
10-07-2002 09:25 AM |
|
Basic routing
|
john.martelli |
Linux - Networking |
3 |
03-25-2002 01:41 AM |
All times are GMT -5. The time now is 09:12 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|