Skip to contentSkip to conversation

File system storage for alternate ip routing tables and additional ip rules

DISCUSSION Leroy Tennison 3 participants 3 messages May 25, 2018 – May 29, 2018

lore
Share & tools
lore
#0 lore raw

QXJlIHRoZXNlIHN0b3JlZCBhbnl3aGVyZSAob3RoZXIgdGhhbiBzeXN0ZW0gcmFtKSB3aGVuICdp cCByb3V0ZSBhZGQgLi4uIHRhYmxlIDx3aGF0ZXZlcj4nIGFuZCAnaXAgcnVsZSBhZGQgLi4uJyBh cmUgdXNlZCBmcm9tIHRoZSBjb21tYW5kIGxpbmU/ICBJJ20gdXNpbmcgVWJ1bnR1IGFuZCBhbSBh c3N1bWluZyB0aGV5IG5lZWQgdG8gYmUgYWRkZWQgdG8gL2V0Yy9uZXR3b3JrL2ludGVyZmFjZXMg b3IgZWxzZXdoZXJlICgvZXRjL3JjLmxvY2FsKSB0byBiZSBhcHBsaWVkIG9uIHN0YXJ0dXAgdW5s ZXNzIHNvbWVvbmUga25vd3Mgb3RoZXJ3aXNlLg0KDQoNClNhdmUgdGhlDQpEYXRlIDIwMTggTW9t ZW50dW0gVXNlciBDb25mZXJlbmNlDQpTZXB0ZW1iZXIgMjUgLSAyOCwgMjAxOA0KQXRoZW5zLCBH ZW9yZ2lhOiBUaGUgQ2xhc3NpYyBDZW50ZXINCkxlcm95IFRlbm5pc29uDQpOZXR3b3JrIEluZm9y bWF0aW9uL0N5YmVyIFNlY3VyaXR5IFNwZWNpYWxpc3QNCkU6IGxlcm95QGRhdGF2b2ljZWludC5j b20NCjIyMjAgQnVzaCBEcg0KTWNLaW5uZXksIFRleGFzDQo3NTA3MA0Kd3d3LmRhdGF2b2ljZWlu dC5jb20NClRUaGlzIG1lc3NhZ2UgaGFzIGJlZW4gc2VudCBvbiBiZWhhbGYNCm9mIGEgY29tcGFu eSB0aGF0IGlzIHBhcnQgb2YgdGhlIEhhcnJpcyBPcGVyYXRpbmcgR3JvdXAgb2YNCkNvbnN0ZWxs YXRpb24gU29mdHdhcmUgSW5jLiBUaGVzZSBjb21wYW5pZXMgYXJlIGxpc3RlZA0KaGVyZQ0KLg0K SWYgeW91IHByZWZlciBub3QgdG8gYmUgY29udGFjdGVkIGJ5IEhhcnJpcw0KT3BlcmF0aW5nIEdy b3VwDQpwbGVhc2Ugbm90aWZ5IHVzDQouDQpUaGlzIG1lc3NhZ2UgaXMgaW50ZW5kZWQgZXhjbHVz aXZlbHkgZm9yIHRoZQ0KaW5kaXZpZHVhbCBvciBlbnRpdHkgdG8gd2hpY2ggaXQgaXMgYWRkcmVz c2VkLiBUaGlzIGNvbW11bmljYXRpb24NCm1heSBjb250YWluIGluZm9ybWF0aW9uIHRoYXQgaXMg cHJvcHJpZXRhcnksIHByaXZpbGVnZWQgb3INCmNvbmZpZGVudGlhbCBvciBvdGhlcndpc2UgbGVn YWxseSBleGVtcHQgZnJvbSBkaXNjbG9zdXJlLiBJZiB5b3UgYXJlDQpub3QgdGhlIG5hbWVkIGFk ZHJlc3NlZSwgeW91IGFyZSBub3QgYXV0aG9yaXplZCB0byByZWFkLCBwcmludCwNCnJldGFpbiwg Y29weSBvciBkaXNzZW1pbmF0ZSB0aGlzIG1lc3NhZ2Ugb3IgYW55IHBhcnQgb2YgaXQuIElmIHlv dQ0KaGF2ZSByZWNlaXZlZCB0aGlzIG1lc3NhZ2UgaW4gZXJyb3IsIHBsZWFzZSBub3RpZnkgdGhl IHNlbmRlcg0KaW1tZWRpYXRlbHkgYnkgZS1tYWlsIGFuZCBkZWxldGUgYWxsIGNvcGllcyBvZiB0 aGUNCm1lc3NhZ2UuDQoNCg=

#1 lore raw
Quoted 1 line · Leroy Tennison

Are these stored anywhere (other than system ram) when 'ip route add ... table <whatever>' and 'ip rule add ...' are used from the command line? I'm using Ubuntu and am assuming they need to be added to /etc/network/interfaces or elsewhere (/etc/rc.local) to be applied on startup unless someone knows otherwise.

I'm not aware of any persistent storage for this in any Linux distribution.

I've always just created a shell script with the commands and arranged for it to be run on start up.

There may be something if you look at Bird / Quagga / Zebra / etc that supports multiple routing tables through their config.

Signature · 2 lines
Grant. . . .
unix || die
#2 lore raw
In reply to Leroy Tennison

Hi.
Nope, there isn't a native way to store this info in filesystem to restore at the boot. All implementations of similar feature are distributive-specific.
If you use the interfaces file for network configuraton, then the best way is use of post-up statements in interface configuration section. Check 'man interfaces' for details.

Quoted 33 lines · Leroy Tennison

Are these stored anywhere (other than system ram) when 'ip route add ... table <whatever>' and 'ip rule add ...' are used from the command line? I'm using Ubuntu and am assuming they need to be added to /etc/network/interfaces or elsewhere (/etc/rc.local) to be applied on startup unless someone knows otherwise.

Save the
Date 2018 Momentum User Conference
September 25 - 28, 2018
Athens, Georgia: The Classic Center
Leroy Tennison
Network Information/Cyber Security Specialist
E: [email protected]
2220 Bush Dr
McKinney, Texas
75070
www.datavoiceint.com
TThis message has been sent on behalf
of a company that is part of the Harris Operating Group of Constellation Software Inc. These companies are listed here
.
If you prefer not to be contacted by Harris
Operating Group
please notify us
.
This message is intended exclusively for the
individual or entity to which it is addressed. This communication may contain information that is proprietary, privileged or confidential or otherwise legally exempt from disclosure. If you are not the named addressee, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this message in error, please notify the sender immediately by e-mail and delete all copies of the message.

Signature · 1 line
Anton.