Solved

Using Route Commands and Aliasing

Posted on 2004-04-01
7
869 Views
Last Modified: 2010-03-18
IP's have been changed to protect the innocent.  

  I am using a small floppy based linux disro called freesco v3.0 and I am having a bit of trouble completly understanding how the route command should be used in the situation I have.  We have 3 IP pools assisgned by our ISP (see below) 2 of which are in sequence but are seperate pools.  The router has 3 NICs eth0, eth1, eth2 and due to limitations with the hardware we cannot add another card.  Which would in this case have been an easy way out.  Also the router does not use the NAT or firewall functions of the router.

Step1 (alaising)

#ifconfig eth1:1 192.226.23.65 netmask 255.255.255.224 broadcast 192.229.23.95

  So in order to add the third pool I have 1st aliased the gateway ip for the 2nd pool to eth1 calling it eth1:1.  I can ping this ip fine and it works great.  But now i need to add proper routing for this pool and I am having some issues on how I should break the routing between the 2 pools using the route command.  The link below highlights the commands but I am unsure as to the proper usage in this situation.

http://www.die.net/doc/linux/man/man8/route.8.html

here is a look at my /proc/net/route but what does this mean?

IfaceIDestinationIGateway IFlagsIRefCntIUseIMetricIMaskIIMTUIWindowIIRTT
eth2IFFFFFFFFI00000000I05I0I0I0IFFFFFFFFI1500I0I0
eth1IFFFFFFFFI00000000I05I0I0I0IFFFFFFFFI1500I0I0
eth2I9859E518I00000000I01I0I81I0IF8FFFFFFI1500I0I0
eth1I2017E518I00000000I01I0I1267I0IE0FFFFFFI1500I0I0
eth0I400DE518I00000000I01I0I2I0IC0FFFFFFI1500I0I0
loI0000007FI00000000I01I0I9I0I000000FFI3584I0I0
eth0I00000000I410DE518I03I0I15878I0I00000000I1500I0I0


NIC configuration.

eth0 (192.226.13.78) <static recieved dhcp>

eth1 (192.226.23.33) <IP pool 1 subnet (255.255.255.224)>
   |-----eth1:1 <IP pool 2 aliased 192.229.23.65 subnet (255.255.255.224)>

eth2 (192.226.89.153)


So the question I am asking is what route commands should be used to add 192.229.23.64/27 to eth1:1

Thank you for your time and consideration.


0
Comment
Question by:hexfusion
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
7 Comments
 
LVL 9

Expert Comment

by:Alf666
ID: 10731493
I don't understand what you're looking for ?

At the moment you create the alias, it should automatically add a route for outgoing packets thru this interface as it's a directly connected route.

What, practically, can't you do ? What does not work ?
0
 
LVL 2

Author Comment

by:hexfusion
ID: 10731538
#ifconfig eth1:1 192.226.23.65 netmask 255.255.255.224 broadcast 192.229.23.95

Created eth1:1 to resolve as 192.226.23.65 works fine

But routing does not work for the IP pool 192.226.23.64 /27 through eth1:1 which has been set as 192.226.23.65.  I can ping the address of eth1:1 but I cannot connect to a computer through eth1:1 in the pool ex.) 192.226.23.67.  So it would seem that although eth1:1 has a static IP it does not understand that it must route traffic for this pool through it.  So I am trying to set routing using the route command.  Below is my hypothesis but as I have never used this command I would like some guidance if possible to my logic.

#route add -net 192.229.23.64 netmask 255.255.255.224 gw 192.229.23.65 dev eth1:1

This would read add network 192.229.23.64 with netmask 255.255.255.224 through gateway 192.229.23.65 on device eth1:1

Thanks
0
 
LVL 2

Author Comment

by:hexfusion
ID: 10731543
BTW 192.229.23.64 is a typo in my last post evertyhing should be relative to the 192.226.23.0 network
0
Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

 
LVL 2

Author Comment

by:hexfusion
ID: 10731607
Also see how no route for eth1:1 was added

#cat /proc/net/route

Iface   Destination     Gateway         Flags   RefCnt  Use     Metric  Mask   MTU      Window  IRTT
eth2    FFFFFFFF        00000000        05      0       0       0       FFFFFFFF1500    0       0                                                              
eth1    FFFFFFFF        00000000        05      0       0       0       FFFFFFFF1500    0       0                                                              
eth2    9859E518        00000000        01      0       84      0       F8FFFFFF1500    0       0                                                              
eth1    2017E518        00000000        01      0       1327    0       E0FFFFFF1500    0       0                                                              
eth0    400DE518        00000000        01      0       2       0       C0FFFFFF1500    0       0                                                              
lo      0000007F        00000000        01      0       10      0       000000FF3584    0       0                                                              
eth0    00000000        410DE518        03      0       16483   0       000000001500    0       0
0
 
LVL 2

Author Comment

by:hexfusion
ID: 10731621
I guess I have left out a major point here this is a ROUTER
0
 
LVL 9

Accepted Solution

by:
Alf666 earned 500 total points
ID: 10731774
Weird. You mean you can't ping one of the boxes on the network from the router ?

Maybe something special with this distrib. Then, you should do :

route add -net 192.229.23.64 netmask 255.255.255.224 dev eth1

No gateway as this is not a gateway, but a directly connected route.
Also, dev is eth1. eth1:1 is just an alias. the real device is in fact eth1.
0
 
LVL 2

Author Comment

by:hexfusion
ID: 10732006
Yes perfect!!!
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question