Change gateway without reboot server


 
Thread Tools Search this Thread
Operating Systems Solaris Change gateway without reboot server
# 1  
Old 12-29-2009
Change gateway without reboot server

Hi Gurus

Recently i had change the gateway for a server
i had change the IP in the /etc/defaultrouter
and run the below command

Code:
# route add default 10.86.33.222
# route delete default 10.86.33.1

# netstat -rn

Routing Table: IPv4
  Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ ---------
10.0.0.0             10.86.33.18          U         1   4359 hme0
224.0.0.0            10.86.33.18          U         1      0 hme0
default              10.86.33.222         UG        1      0
127.0.0.1            127.0.0.1            UH        61038511 lo0

when i traceroute my PC IP, it look like still use back the old route.

Code:
# traceroute 10.13.5.156
traceroute to 10.13.5.156 (10.13.5.156), 30 hops max, 40 byte packets
 1  10.86.33.2 (10.86.33.2)  5.320 ms  0.349 ms  0.370 ms
 2  10.86.32.251 (10.86.32.251)  1.568 ms  1.127 ms  1.459 ms
 3  117.58.186.61 (117.58.186.61)  178.042 ms  5.784 ms  5.207 ms
 4  111.92.220.61 (111.92.220.61)  37.612 ms  35.106 ms  35.186 ms
 5  220.232.26.49 (220.232.26.49)  66.356 ms  65.040 ms  65.170 ms
 6  220.232.26.50 (220.232.26.50)  155.544 ms  86.923 ms  109.377 ms
 7  10.60.48.23 (10.60.48.23)  88.819 ms  95.388 ms  93.648 ms
 8  10.60.254.22 (10.60.254.22)  239.116 ms  277.526 ms  258.929 ms
 9  10.13.243.3 (10.13.243.3)  255.812 ms  241.631 ms  257.630 ms
10  * *

How to change the gateway without reboot the server?
i cannot add a routing table, because i may use dial VPN to connect to this server.
any idea ?
# 2  
Old 12-30-2009
first you need to turn off ethernet

Code:
ifconfig  hme0 down

then delete old route

Code:
route delete default 10.86.33.1

add new default route

Code:
route add default 10.86.33.222

turn on ethernet

Code:
ifconfig hme0 up

or insert line in

Code:
 /etc/defaultrouter

and restart
Code:
 svcadm restart physical

# 3  
Old 12-30-2009
Your method and the order you followed is wrong. Perhaps use solaris_user steps. It should work. But NOTE*** that your network connections will definitely get disconnected for sometime (not so bad as to rebooting the server)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Inconsistency between RedHat 6.5 global gateway and single gateway leads to loss of default gateway

Dear friends I use RedHat 6.5, which sets the gateway in the configuration file / etc / sysconfig / network as GATEWAY = 192.168.1.26, and the gateway in the configuration file / etc / sysconfig / network-scripts / ifcfg-eth11 as GATEWAY = 192.168.1.256. The two gateways are different.... (6 Replies)
Discussion started by: tanpeng
6 Replies

2. Solaris

Validate mountpoints on solaris server after server reboot

Hi, anyone please let us know how to write shell script to find the missing mountpoints after server reboot. i want to take the mountpount information before server reboot, and validate the mountpoints after server reboot if any missing.please let us know the shell script from begining to end as... (24 Replies)
Discussion started by: VenkatReddy786
24 Replies

3. UNIX for Dummies Questions & Answers

Will authconfig make permanent change or lost after reboot?

Hi, I made following configuration to create user directory: # authconfig --enablemkhomedir --update But the directory is created as permission 755, I'd like to modify the script to change directory access permission to 700, where is the script which copies /etc/skel to /home... (0 Replies)
Discussion started by: hce
0 Replies

4. Red Hat

Change Default gateway

Hi..I have to change default gateway in my linux machine. Its OS is RHEL6. I followed following steps. 1.run command ip route to check current default gateway 2.delete that gateway with command route del default gw x.x.x.x eth2 3.Add new gatewy with command below route add default gateway... (3 Replies)
Discussion started by: deljatt
3 Replies

5. UNIX for Dummies Questions & Answers

Info about Gateway Server

Hi, Q1) What is a gateway server. Q2) In a dataflow diagram I see that two applications (on Server A) pass data to a server XYZ. In the document one application lists the Server XYZ as a gateway server, but the other doesn't talk about it. Both are similar applications i.e. applications in a... (1 Reply)
Discussion started by: tostay2003
1 Replies

6. Solaris

Permission Change Upon Reboot

I have a Sun 4800 running on Solaris 9 OS. Each time I reboot the server the permissions on /tmp are change from root/sys 1777 to root/root 775. This causes a problem as I have custom programs the need this directory set to root/sys. I have search the sun site and can't find a solution. Anybody... (2 Replies)
Discussion started by: gross
2 Replies

7. Shell Programming and Scripting

script to change default route when primary gateway dies

Hello all! We have two fedora routers one at each site. What we are trying to do worked using freesco but not on fedora, i'm not very good at scripting and need a little guidence. Basicly what we are trying to do is if the primary line dies, the router will change it's routes to go through our... (0 Replies)
Discussion started by: slacker
0 Replies

8. Solaris

How can I change the default gateway?

my actual default gatewas IP is: default 192.168.11.254 and I need to change it to 192.168.11.2, I'm using Solaris 9, how can i do it? and how i can save it in case that the machine restart and have the new default gateway IP saved? (5 Replies)
Discussion started by: Lestat
5 Replies

9. UNIX for Dummies Questions & Answers

/etc/defaultrouter change without reboot

Hi I have had to change the defaultrouter of a production server. I have ammended /etc/defaultrouter to point to the new address but when I do a netstat -rn , it hasnt updated. Is there anyway I can apply this change without rebooting the system ?? regards (3 Replies)
Discussion started by: hcclnoodles
3 Replies

10. IP Networking

internet speed thru gateway/server

Other than security does having a separate linux box for the intranet server and a separate one for intranet gateway effect the speed of the internet connection. We have our server and gateway on 40GB HD 256 MB RAM 1.5 GHz Intel P3 Can the server/gateway be configured for better speed?... (1 Reply)
Discussion started by: ramyar
1 Replies
Login or Register to Ask a Question