LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices


Reply
  Search this Thread
Old 08-06-2013, 04:44 PM   #1
yashraj221087
Member
 
Registered: Jul 2010
Posts: 44

Rep: Reputation: 0
AIX add route with subnet


hi,
I want to add below entry in netstat/ routing table on AIX.
160.118.106.128/26 as destination.

How can I add that ? I tried to add that using smitty mkroute but smitty doesnt allow me to add /26.

Please let me know.
 
Old 08-06-2013, 08:37 PM   #2
Sydney
Member
 
Registered: Mar 2012
Distribution: Scientific Linux
Posts: 147

Rep: Reputation: 36
Did you try?
route add 160.118.106.128/26 dev eth0
 
Old 08-07-2013, 12:32 PM   #3
yashraj221087
Member
 
Registered: Jul 2010
Posts: 44

Original Poster
Rep: Reputation: 0
I tried with

route add -net 160.118.106.128/26 6.2.63.43

But how can I make it persistent ?
 
Old 08-08-2013, 02:26 AM   #4
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,860
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
That's what smitty is good for.
 
Old 08-08-2013, 11:25 AM   #5
yashraj221087
Member
 
Registered: Jul 2010
Posts: 44

Original Poster
Rep: Reputation: 0
But Smitty is not accepting /26 format
 
Old 08-08-2013, 11:38 AM   #6
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,860
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
So you tried format netmask=255.255.255.192 instead?
 
Old 08-08-2013, 12:25 PM   #7
vermaden
Member
 
Registered: Jan 2006
Location: pl_PL.lodz
Distribution: FreeBSD
Posts: 406

Rep: Reputation: 89
@yashraj221087

These egzamples below works:

// make sure that inet0 exists, if not, create it
Code:
# lsdev -C -S1 -F name -l inet0 || mkdev -t inet 
inet0
// add route
Code:
# chdev -l inet0 -a route=net,-hopcount,0,-netmask,255.255.192.0,-static,10.176.128.0,10.149.3.254
inet0 changed
// remove route
Code:
# chdev -l inet0 -a delroute=net,-hopcount,0,-netmask,255.255.192.0,-static,10.176.128.0,10.149.3.254
inet0 changed
The smitty does exacly those commands above.

Last edited by vermaden; 08-08-2013 at 12:27 PM.
 
Old 08-09-2013, 11:32 AM   #8
yashraj221087
Member
 
Registered: Jul 2010
Posts: 44

Original Poster
Rep: Reputation: 0
Thanks guys,

I am able to do that with smitty using the info you provided.

Now I need to remove an unwanted entry which was added while playing with smitty.

160.118.109.192/26 6.2.63.43 UGS 0 0 en2 - -

but getting error as below:

Method error (/usr/lib/methods/chginet):
0514-009 Cannot delete an object from the device
configuration database.
0821-216 chginet: Cannot delete route (net,160.118.109.192,6.2.63.43) from CuAt.


Any ideas?
 
Old 08-11-2013, 06:21 AM   #9
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,860
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
Trying as root, I hope.
 
  


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
Multihomed NAT box - one problem - cannot route to VLANS off of main subnet lewis_ph Linux - Networking 1 05-29-2010 08:24 PM
noob: ip route add vs route add jCash Linux - Networking 1 07-19-2007 11:12 AM
Starting an Interface without a Default Subnet Route LinuxGeek Linux - Networking 5 08-30-2006 06:46 AM
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 04:34 AM
Route to subnet exists but I get "Network unreachable" when adding default route fciuffani Linux - Networking 4 08-18-2004 02:11 PM

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

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