"Route add" problems...


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers "Route add" problems...
# 1  
Old 01-24-2006
"Route add" problems...

Hi all...
i need to add a route to a HP-UX 11.11 U server.
Well, i have this server in a 192.168.1.x network and i need to reach a new fresh network with the IP 192.168.237.x trough the 192.168.1.247 gateway, then, when i run the "route add" command this fail all the time, it only show this message: "-net: bad value" or simply gives me a "usage" message. please help me to solve this issue Smilie

PD: I already test this command with many combinations but still no luck Smilie
like:
route add -net 192.168.237.0 255.255.255.0 192.168.1.247
route add -net 192.168.237.0 netmask 255.255.255.0 192.168.1.247
route add -net 192.168.237.0 netmask 255.255.255.0 192.168.1.247 1
route add -net 192.168.237.0 netmask 255.255.255.0 192.168.1.247 metric 1
route add -net 192.168.237.0 netmask 255.255.255.0 gw 192.168.1.247
route add -net 192.168.237.0 netmask 255.255.255.0 gw 192.168.1.247 1
route add -net 192.168.237.0 netmask 255.255.255.0 gw 192.168.1.247 metric 1
/etc/route add -net 192.168.237.0 netmask 255.255.255.0 192.168.1.247

... and so on...

Thanks in advance

kaddet.
# 2  
Old 01-24-2006
It's "net" not "-net". And ironically, the "net" is optional.
route add net 192.168.237.0 netmask 255.255.255.0 192.168.1.247 1
if you like the verbose form. Or
route add 192.168.237.0 192.168.1.247

Note that 192.168.1.247 must be reachable already for this to work.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

find files in sub dir with tag & add "." at the beginning [tag -f "Note" . | xargs -0 {} mv {} .{}]

I am trying find files in sub dir with certain tags using tag command, and add the period to the beginning. I can't use chflags hidden {} cause it doesn't add period to the beginning of the string for web purpose. So far with my knowledge, I only know mdfind or tag can be used to search files with... (6 Replies)
Discussion started by: Nexeu
6 Replies

2. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

3. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

4. UNIX for Advanced & Expert Users

"Network error: No route to host" While connecting guest RHEL4 using putty

Hi, I have installed RHEL4 using vmware workstation.. Host OS: Windows XP Guest OS: RHEL4 Pls refer step 17 & 18 in below link... ORACLE-BASE - Red Hat Enterprise Linux 4 and Centos 4 Installation 1) If i choose to assign IP automatically (using DHCP) means, i am able to connect RHEL4... (3 Replies)
Discussion started by: thomasraj87
3 Replies

5. Shell Programming and Scripting

Problems with "write" and "wall"

Hello, I am using VirtualBox to simulate a small network with two Linux computers, the host is Mac OS X. My problem is that I can't send "write" and "wall" messages from the host to one of those Linux computers. Here is what works: - The virtual Linux computer answers "ping" messages that have... (5 Replies)
Discussion started by: 123_abc
5 Replies

6. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

7. UNIX for Advanced & Expert Users

add seconds to: date"|"time"|"HHMMSS

Hey all, I have a shell that invokes a AWK. In this AWK i want invoke a function that receives 3 parameters: date: 20080831 time: 235901 duration: 00023 that function receive this 3 parameters and sum to this value two more seconds: 2008083123590100025 Remember that in case that... (3 Replies)
Discussion started by: anaconga
3 Replies

8. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

9. UNIX for Advanced & Expert Users

Can a "route add" command crash a router? well it does...need help

OK Sun E420R server Solaris 7 Command: route add default ###.###.###.### 15 Seconds later my router is rebooting and will continue this until I flush the route table on the server Any ideas?! Help!! (3 Replies)
Discussion started by: n9ninchd
3 Replies
Login or Register to Ask a Question