Solved

Using Route Commands and Aliasing

Posted on 2004-04-01
7
863 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
  • 5
  • 2
7 Comments
 
LVL 9

Expert Comment

by:Alf666
Comment Utility
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
Comment Utility
#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
Comment Utility
BTW 192.229.23.64 is a typo in my last post evertyhing should be relative to the 192.226.23.0 network
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 2

Author Comment

by:hexfusion
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Yes perfect!!!
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
OpenVPN routing 2 43
OpenWrt 1 28
IPA - change main server? 3 86
IPA client Config problems 2 96
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now