Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: route table always change back when i boot

  1. #1

    Default route table always change back when i boot

    hi all

    after i do this commands
    Code:
    linux-3qjp:~ # ip route list
    default via 10.172.112.210 dev eth0  proto dhcp 
    10.172.112.0/24 dev eth0  proto kernel  scope link  src 10.172.112.121 
    192.168.102.0/24 dev vmnet8  proto kernel  scope link  src 192.168.102.1 
    192.168.239.0/24 dev vmnet1  proto kernel  scope link  src 192.168.239.1 
    linux-3qjp:~ # ip route del default
    linux-3qjp:~ # ip route add default via 192.168.102.131 dev vmnet8
    my route table (list) always go back to
    Code:
    linux-3qjp:~ # ip route list
    default via 10.172.112.210 dev eth0  proto dhcp 
    10.172.112.0/24 dev eth0  proto kernel  scope link  src 10.172.112.121 
    192.168.102.0/24 dev vmnet8  proto kernel  scope link  src 192.168.102.1 
    192.168.239.0/24 dev vmnet1  proto kernel  scope link  src 192.168.239.1
    when i boot .

    anyone can help me?

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    30,484

    Default Re: route table always change back when i boot

    That then seems to be the default router you get from your DHCP server.

    Are you sure you use the correct DHCP server?

    What system is 10.172.112.210 and what system is 192.168.102.131?
    Henk van Velden

  3. #3

    Default Re: route table always change back when i boot

    yes

    the 10.172.112.210 its the router gateways
    and
    192.168.102.131 its the vmware gateways

    i just want to switch between them and after boot it always return to the default


  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    30,484

    Default Re: route table always change back when i boot

    Quote Originally Posted by habnir View Post
    yes

    the 10.172.112.210 its the router gateways
    and
    192.168.102.131 its the vmware gateways

    i just want to switch between them and after boot it always return to the default

    Sorry, my post above was a bit in haste because I had to go. Back again.

    First, you seem to have the wrong idea about what the ip statement does. It works on kernel data structures connected with networking. That means that when the kernel is stopped (shutdown of the system), all what is set there is lost. It sets them, but does not configure things for next network start. So it is normal what you experience, it returns to what is configured somewhere and not what you changed it into during your previous boot session.

    So when you want to change parameters used at network start, you should alter the configurations. It is there where we come to the mising information:
    Do you use wicked or NetworkManager?
    In both cases, do you use DHCP or not (when using NM, most probably you do)?
    Last edited by hcvv; 24-Feb-2018 at 07:14.
    Henk van Velden

  5. #5
    Join Date
    Sep 2012
    Posts
    7,481

    Default Re: route table always change back when i boot

    Assuming you are using wicked, disable "Change Default Route via DHCP" and set it manually. NetworkManager has similar per-connection option.

    Or simply disable DHCP and set everything manually.

  6. #6

    Default Re: route table always change back when i boot

    i disable "Change Default Route via DHCP"

    i use wicked . and eth0 set on DHCP

    and

    this is what i want to be :

    Code:
    linux-3qjp:~ # ip route show
    default via 192.168.102.131 dev vmnet8 
    10.172.112.0/24 dev eth0  proto kernel  scope link  src 10.172.112.121 
    192.168.102.0/24 dev vmnet8  proto kernel  scope link  src 192.168.102.1 
    192.168.239.0/24 dev vmnet1  proto kernel  scope link  src 192.168.239.1 
    linux-3qjp:~ #
    soo If you can explain to me step by step I will really be thankful

  7. #7
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    30,484

    Default Re: route table always change back when i boot

    YaST > Network Devices > Network settings.
    There is a tab "Routing". There you can enter it. What is the problem?
    Henk van Velden

  8. #8

    Default Re: route table always change back when i boot

    the problem that it wont accept "vmnet8"

    and this is my ifconfig

    Code:
    eth0      Link encap:Ethernet  HWaddr AC:9E:17:BA:11:99  
              inet addr:10.172.112.121  Bcast:10.172.112.255  Mask:255.255.255.0
              inet6 addr: fe80::ae9e:17ff:feba:1199/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:21147 errors:0 dropped:0 overruns:0 frame:0
              TX packets:13187 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:19056027 (18.1 Mb)  TX bytes:2207260 (2.1 Mb)
              Memory:fb600000-fb61ffff 
    
    
    eth1      Link encap:Ethernet  HWaddr AC:9E:17:BA:0E:C7  
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
              Interrupt:20 Memory:fbc00000-fbc20000 
    
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:5818 errors:0 dropped:0 overruns:0 frame:0
              TX packets:5818 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1 
              RX bytes:1418024 (1.3 Mb)  TX bytes:1418024 (1.3 Mb)
    
    
    vmnet1    Link encap:Ethernet  HWaddr 00:50:56:C0:00:01  
              inet addr:192.168.239.1  Bcast:192.168.239.255  Mask:255.255.255.0
              inet6 addr: fe80::250:56ff:fec0:1/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:263 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
    
    
    vmnet8    Link encap:Ethernet  HWaddr 00:50:56:C0:00:08  
              inet addr:192.168.102.1  Bcast:192.168.102.255  Mask:255.255.255.0
              inet6 addr: fe80::250:56ff:fec0:8/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:4341 errors:0 dropped:0 overruns:0 frame:0
              TX packets:4723 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


  9. #9
    Join Date
    Sep 2012
    Posts
    7,481

    Default Re: route table always change back when i boot

    Quote Originally Posted by habnir View Post
    the problem that it wont accept "vmnet8"
    Not sure what it means but it is not mandatory to specify any device.

  10. #10
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    30,484

    Default Re: route table always change back when i boot

    Quote Originally Posted by habnir View Post
    the problem that it wont accept "vmnet8"

    What do you mean with "vmnet8"? Are you doing in YaST what I suggested? Or are you somewhere else? Do not speak in riddles please.
    Henk van Velden

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •